完善马赛克demo

This commit is contained in:
caizhitao 2019-12-27 23:08:32 +08:00
parent cda2d5ab60
commit 16c07441be
3 changed files with 13 additions and 13 deletions

View File

@ -11,7 +11,7 @@
"USE_MOSAIC": true "USE_MOSAIC": true
}, },
"_props": { "_props": {
"xBlockCount": 30, "xBlockCount": 50,
"yBlockCount": 30 "yBlockCount": 50
} }
} }

View File

@ -171,7 +171,7 @@
"array": [ "array": [
0, 0,
0, 0,
492.17758360225525, 492.7684547533456,
0, 0,
0, 0,
0, 0,
@ -2128,7 +2128,7 @@
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 384, "width": 384,
"height": 583.73 "height": 598.4
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
@ -2140,7 +2140,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
288, 288,
291.865, 299.2,
0, 0,
0, 0,
0, 0,
@ -2657,8 +2657,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 167.5, "width": 201,
"height": 33.33 "height": 48
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
@ -2670,7 +2670,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 0,
-567.065, -574.4000000000001,
0, 0,
0, 0,
0, 0,
@ -2710,8 +2710,8 @@
"_useOriginalSize": false, "_useOriginalSize": false,
"_string": "BM Font", "_string": "BM Font",
"_N$string": "BM Font", "_N$string": "BM Font",
"_fontSize": 40, "_fontSize": 48,
"_lineHeight": 40, "_lineHeight": 48,
"_enableWrapText": true, "_enableWrapText": true,
"_N$file": { "_N$file": {
"__uuid__": "4c95de7e-8cca-47bf-a446-47b7594e0992" "__uuid__": "4c95de7e-8cca-47bf-a446-47b7594e0992"
@ -2764,7 +2764,7 @@
"_layoutSize": { "_layoutSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 384, "width": 384,
"height": 583.73 "height": 598.4
}, },
"_resize": 1, "_resize": 1,
"_N$layoutType": 2, "_N$layoutType": 2,

View File

@ -37,10 +37,10 @@ export default class MosaicEffectScene extends cc.Component {
} }
private _onSliderChanged() { private _onSliderChanged() {
let xMosaicCount = Math.round(this._xMosaicCountSlider.progress * 100); let xMosaicCount = Math.round(this._xMosaicCountSlider.progress * 300);
this._xMosaicCountSliderLabel.string = `${xMosaicCount}`; this._xMosaicCountSliderLabel.string = `${xMosaicCount}`;
let yMosaicCount = Math.round(this._yMosaicCountSlider.progress * 100); let yMosaicCount = Math.round(this._yMosaicCountSlider.progress * 300);
this._yMosaicCountSliderLabel.string = `${yMosaicCount}`; this._yMosaicCountSliderLabel.string = `${yMosaicCount}`;
// 更新材质 // 更新材质