From e45be41e291674b27556b931206120a4dd370aab Mon Sep 17 00:00:00 2001 From: caizhitao Date: Wed, 1 Jan 2020 17:04:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E6=8F=8F=E8=BE=B9=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/effects/outline.effect.meta | 17 - .../{outline.effect => sprite-outline.effect} | 47 +- assets/effects/sprite-outline.effect.meta | 17 + .../{outline.mtl => sprite-outline.mtl} | 12 +- ...tline.mtl.meta => sprite-outline.mtl.meta} | 0 assets/scenes/OutlineEffectScene.fire | 1284 +++++++++++++---- assets/scenes/OutlineEffectScene.fire.meta | 2 +- assets/scripts/OutlineEffectScene.ts | 63 + ...cne.ts.meta => OutlineEffectScene.ts.meta} | 2 +- assets/scripts/OutlineEffectSecne.ts | 41 - 10 files changed, 1140 insertions(+), 345 deletions(-) delete mode 100644 assets/effects/outline.effect.meta rename assets/effects/{outline.effect => sprite-outline.effect} (69%) create mode 100644 assets/effects/sprite-outline.effect.meta rename assets/materials/{outline.mtl => sprite-outline.mtl} (74%) rename assets/materials/{outline.mtl.meta => sprite-outline.mtl.meta} (100%) mode change 100755 => 100644 assets/scenes/OutlineEffectScene.fire.meta create mode 100644 assets/scripts/OutlineEffectScene.ts rename assets/scripts/{OutlineEffectSecne.ts.meta => OutlineEffectScene.ts.meta} (74%) delete mode 100644 assets/scripts/OutlineEffectSecne.ts diff --git a/assets/effects/outline.effect.meta b/assets/effects/outline.effect.meta deleted file mode 100644 index f0d2d6d..0000000 --- a/assets/effects/outline.effect.meta +++ /dev/null @@ -1,17 +0,0 @@ -{ - "ver": "1.0.23", - "uuid": "559dcd1e-233b-4e1f-b1da-733c9232f06f", - "compiledShaders": [ - { - "glsl1": { - "vert": "\nprecision highp float;\nuniform mat4 cc_matViewProj;\nuniform mat4 cc_matWorld;\n\nattribute vec3 a_position;\nattribute vec4 a_color;\nvarying vec4 v_color;\n\n#if USE_TEXTURE\nattribute vec2 a_uv0;\nvarying vec2 v_uv0;\n#endif\n\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n\n #if CC_USE_MODEL\n pos = cc_matViewProj * cc_matWorld * pos;\n #else\n pos = cc_matViewProj * pos;\n #endif\n\n #if USE_TEXTURE\n v_uv0 = a_uv0;\n #endif\n\n v_color = a_color;\n\n gl_Position = pos;\n}\n", - "frag": "\nprecision highp float;\n\n#if USE_ALPHA_TEST\n \n uniform float alphaThreshold;\n#endif\n\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\n\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\n\nvarying vec4 v_color;\n\n#if USE_TEXTURE\nvarying vec2 v_uv0;\nuniform sampler2D texture;\n#endif\n\n#if SHOW_OUT_LINE\n\nuniform vec4 outlineColor;\nuniform float outlineSize;\n\nfloat getBgAlpha() {\n vec4 color_up = texture2D(texture, v_uv0 + vec2(0, outlineSize)); \n vec4 color_down = texture2D(texture, v_uv0 - vec2(0, outlineSize)); \n vec4 color_left = texture2D(texture, v_uv0 - vec2(outlineSize, 0)); \n vec4 color_right = texture2D(texture, v_uv0 + vec2(outlineSize, 0)); \n vec4 color_up_left = texture2D(texture, v_uv0 + vec2(outlineSize, -outlineSize)); \n vec4 color_up_right = texture2D(texture, v_uv0 + vec2(outlineSize, outlineSize)); \n vec4 color_down_left = texture2D(texture, v_uv0 + vec2(-outlineSize, -outlineSize)); \n vec4 color_down_right = texture2D(texture, v_uv0 + vec2(-outlineSize, outlineSize)); \n float total = color_right.a + color_left.a + color_down.a + color_up.a + color_up_left.a + color_up_right.a + color_down_left.a + color_down_right.a; \n return clamp(total, 0.0, 1.0);\n}\n\n#endif\n\nvoid main () {\n vec4 o = vec4(1, 1, 1, 1);\n\n #if USE_TEXTURE\n o *= texture2D(texture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_TEXTURE\n o.a *= texture2D(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #endif\n\n o *= v_color;\n\n ALPHA_TEST(o);\n\n gl_FragColor = o;\n\n #if SHOW_OUT_LINE\n\n vec4 color_dest = outlineColor * getBgAlpha();\n\n vec4 color_src = o;\n\n gl_FragColor = color_src * color_src.a + color_dest * (1.0 - color_src.a);\n #endif\n}\n" - }, - "glsl3": { - "vert": "\nprecision highp float;\nuniform CCGlobal {\n vec4 cc_time;\n\n vec4 cc_screenSize;\n\n vec4 cc_screenScale;\n\n vec4 cc_nativeSize;\n\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n\n vec4 cc_exposure;\n\n vec4 cc_mainLitDir;\n\n vec4 cc_mainLitColor;\n\n vec4 cc_ambientSky;\n vec4 cc_ambientGround;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\n\nin vec3 a_position;\nin vec4 a_color;\nout vec4 v_color;\n\n#if USE_TEXTURE\nin vec2 a_uv0;\nout vec2 v_uv0;\n#endif\n\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n\n #if CC_USE_MODEL\n pos = cc_matViewProj * cc_matWorld * pos;\n #else\n pos = cc_matViewProj * pos;\n #endif\n\n #if USE_TEXTURE\n v_uv0 = a_uv0;\n #endif\n\n v_color = a_color;\n\n gl_Position = pos;\n}\n", - "frag": "\nprecision highp float;\n\n#if USE_ALPHA_TEST\n \n uniform ALPHA_TEST {\n float alphaThreshold;\n }\n#endif\n\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\n\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\n\nin vec4 v_color;\n\n#if USE_TEXTURE\nin vec2 v_uv0;\nuniform sampler2D texture;\n#endif\n\n#if SHOW_OUT_LINE\n\nuniform Outline {\n\n vec4 outlineColor;\n\n float outlineSize;\n\n};\n\nfloat getBgAlpha() {\n vec4 color_up = texture(texture, v_uv0 + vec2(0, outlineSize)); \n vec4 color_down = texture(texture, v_uv0 - vec2(0, outlineSize)); \n vec4 color_left = texture(texture, v_uv0 - vec2(outlineSize, 0)); \n vec4 color_right = texture(texture, v_uv0 + vec2(outlineSize, 0)); \n vec4 color_up_left = texture(texture, v_uv0 + vec2(outlineSize, -outlineSize)); \n vec4 color_up_right = texture(texture, v_uv0 + vec2(outlineSize, outlineSize)); \n vec4 color_down_left = texture(texture, v_uv0 + vec2(-outlineSize, -outlineSize)); \n vec4 color_down_right = texture(texture, v_uv0 + vec2(-outlineSize, outlineSize)); \n float total = color_right.a + color_left.a + color_down.a + color_up.a + color_up_left.a + color_up_right.a + color_down_left.a + color_down_right.a; \n return clamp(total, 0.0, 1.0);\n}\n\n#endif\n\nvoid main () {\n vec4 o = vec4(1, 1, 1, 1);\n\n #if USE_TEXTURE\n o *= texture(texture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_TEXTURE\n o.a *= texture2D(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #endif\n\n o *= v_color;\n\n ALPHA_TEST(o);\n\n gl_FragColor = o;\n\n #if SHOW_OUT_LINE\n\n vec4 color_dest = outlineColor * getBgAlpha();\n\n vec4 color_src = o;\n\n gl_FragColor = color_src * color_src.a + color_dest * (1.0 - color_src.a);\n #endif\n}\n" - } - } - ], - "subMetas": {} -} \ No newline at end of file diff --git a/assets/effects/outline.effect b/assets/effects/sprite-outline.effect similarity index 69% rename from assets/effects/outline.effect rename to assets/effects/sprite-outline.effect index d68d79c..50ea566 100644 --- a/assets/effects/outline.effect +++ b/assets/effects/sprite-outline.effect @@ -13,8 +13,24 @@ CCEffect %{ properties: texture: { value: white } alphaThreshold: { value: 0.5 } - outlineColor: { value: [1.0, 0.0, 0.0, 1.0], editor: { type: color } } - outlineSize: { value: 0.01 } + + # 描边颜色 + outlineColor: { + value: [1.0, 0.0, 0.0, 1.0], + inspector: { + type: color, + tooltip: "描边颜色", + } + } + + # 描边宽度 + outlineWidth: { + value: 0.002, + inspector: { + tooltip: "描边宽度", + range: [0.0, 1.0] + } + } }% @@ -71,23 +87,23 @@ CCProgram fs %{ // 描边颜色 vec4 outlineColor; // 描边偏移大小 - float outlineSize; + float outlineWidth; // 特别地,必须是 vec4 先于 float 声明 }; - // 将图像往8个方向偏移后,得到一个类放大效果,然后取放大后的图像的透明度,即可得到一个放大后的区域,可以很方便填充(描边)颜色 - // 取当前点上、下、左、右、上左、上右、下左、下右共计8个方向,距离为 outlineSize 的8个点,求他们的透明度之和 + // 将图像往8个方向偏移后,得到一个类似放大的效果,然后取放大后的图像的透明度,即可得到一个放大后的区域,可以很方便填充(描边)颜色 + // 取当前点上、下、左、右、上左、上右、下左、下右共计8个方向,距离为 outlineWidth 的8个点,求他们的透明度之和 // 由此可以得到当前点是否属于图像往八个方向做偏移后得到的放大图区域,并且能得到该点最终透明度值 // 最终对应的为图像偏移/放大后的背景区域 float getBgAlpha() { - vec4 color_up = texture(texture, v_uv0 + vec2(0, outlineSize)); - vec4 color_down = texture(texture, v_uv0 - vec2(0, outlineSize)); - vec4 color_left = texture(texture, v_uv0 - vec2(outlineSize, 0)); - vec4 color_right = texture(texture, v_uv0 + vec2(outlineSize, 0)); - vec4 color_up_left = texture(texture, v_uv0 + vec2(outlineSize, -outlineSize)); - vec4 color_up_right = texture(texture, v_uv0 + vec2(outlineSize, outlineSize)); - vec4 color_down_left = texture(texture, v_uv0 + vec2(-outlineSize, -outlineSize)); - vec4 color_down_right = texture(texture, v_uv0 + vec2(-outlineSize, outlineSize)); + vec4 color_up = texture(texture, v_uv0 + vec2(0, outlineWidth)); + vec4 color_down = texture(texture, v_uv0 - vec2(0, outlineWidth)); + vec4 color_left = texture(texture, v_uv0 - vec2(outlineWidth, 0)); + vec4 color_right = texture(texture, v_uv0 + vec2(outlineWidth, 0)); + vec4 color_up_left = texture(texture, v_uv0 + vec2(outlineWidth, -outlineWidth)); + vec4 color_up_right = texture(texture, v_uv0 + vec2(outlineWidth, outlineWidth)); + vec4 color_down_left = texture(texture, v_uv0 + vec2(-outlineWidth, -outlineWidth)); + vec4 color_down_right = texture(texture, v_uv0 + vec2(-outlineWidth, outlineWidth)); float total = color_right.a + color_left.a + color_down.a + color_up.a + color_up_left.a + color_up_right.a + color_down_left.a + color_down_right.a; return clamp(total, 0.0, 1.0); } @@ -111,6 +127,11 @@ CCProgram fs %{ gl_FragColor = o; #if SHOW_OUT_LINE + // 无描边宽度即结束 + if (outlineWidth == 0.0) { + return; + } + // 先画背景色 vec4 color_dest = outlineColor * getBgAlpha(); diff --git a/assets/effects/sprite-outline.effect.meta b/assets/effects/sprite-outline.effect.meta new file mode 100644 index 0000000..f71aaa4 --- /dev/null +++ b/assets/effects/sprite-outline.effect.meta @@ -0,0 +1,17 @@ +{ + "ver": "1.0.23", + "uuid": "559dcd1e-233b-4e1f-b1da-733c9232f06f", + "compiledShaders": [ + { + "glsl1": { + "vert": "\nprecision highp float;\nuniform mat4 cc_matViewProj;\nuniform mat4 cc_matWorld;\n\nattribute vec3 a_position;\nattribute vec4 a_color;\nvarying vec4 v_color;\n\n#if USE_TEXTURE\nattribute vec2 a_uv0;\nvarying vec2 v_uv0;\n#endif\n\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n\n #if CC_USE_MODEL\n pos = cc_matViewProj * cc_matWorld * pos;\n #else\n pos = cc_matViewProj * pos;\n #endif\n\n #if USE_TEXTURE\n v_uv0 = a_uv0;\n #endif\n\n v_color = a_color;\n\n gl_Position = pos;\n}\n", + "frag": "\nprecision highp float;\n\n#if USE_ALPHA_TEST\n \n uniform float alphaThreshold;\n#endif\n\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\n\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\n\nvarying vec4 v_color;\n\n#if USE_TEXTURE\nvarying vec2 v_uv0;\nuniform sampler2D texture;\n#endif\n\n#if SHOW_OUT_LINE\n\nuniform vec4 outlineColor;\nuniform float outlineWidth;\n\nfloat getBgAlpha() {\n vec4 color_up = texture2D(texture, v_uv0 + vec2(0, outlineWidth)); \n vec4 color_down = texture2D(texture, v_uv0 - vec2(0, outlineWidth)); \n vec4 color_left = texture2D(texture, v_uv0 - vec2(outlineWidth, 0)); \n vec4 color_right = texture2D(texture, v_uv0 + vec2(outlineWidth, 0)); \n vec4 color_up_left = texture2D(texture, v_uv0 + vec2(outlineWidth, -outlineWidth)); \n vec4 color_up_right = texture2D(texture, v_uv0 + vec2(outlineWidth, outlineWidth)); \n vec4 color_down_left = texture2D(texture, v_uv0 + vec2(-outlineWidth, -outlineWidth)); \n vec4 color_down_right = texture2D(texture, v_uv0 + vec2(-outlineWidth, outlineWidth)); \n float total = color_right.a + color_left.a + color_down.a + color_up.a + color_up_left.a + color_up_right.a + color_down_left.a + color_down_right.a; \n return clamp(total, 0.0, 1.0);\n}\n\n#endif\n\nvoid main () {\n vec4 o = vec4(1, 1, 1, 1);\n\n #if USE_TEXTURE\n o *= texture2D(texture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_TEXTURE\n o.a *= texture2D(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #endif\n\n o *= v_color;\n\n ALPHA_TEST(o);\n\n gl_FragColor = o;\n\n #if SHOW_OUT_LINE\n\n if (outlineWidth == 0.0) {\n return;\n }\n\n vec4 color_dest = outlineColor * getBgAlpha();\n\n vec4 color_src = o;\n\n gl_FragColor = color_src * color_src.a + color_dest * (1.0 - color_src.a);\n #endif\n}\n" + }, + "glsl3": { + "vert": "\nprecision highp float;\nuniform CCGlobal {\n vec4 cc_time;\n\n vec4 cc_screenSize;\n\n vec4 cc_screenScale;\n\n vec4 cc_nativeSize;\n\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n\n vec4 cc_exposure;\n\n vec4 cc_mainLitDir;\n\n vec4 cc_mainLitColor;\n\n vec4 cc_ambientSky;\n vec4 cc_ambientGround;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\n\nin vec3 a_position;\nin vec4 a_color;\nout vec4 v_color;\n\n#if USE_TEXTURE\nin vec2 a_uv0;\nout vec2 v_uv0;\n#endif\n\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n\n #if CC_USE_MODEL\n pos = cc_matViewProj * cc_matWorld * pos;\n #else\n pos = cc_matViewProj * pos;\n #endif\n\n #if USE_TEXTURE\n v_uv0 = a_uv0;\n #endif\n\n v_color = a_color;\n\n gl_Position = pos;\n}\n", + "frag": "\nprecision highp float;\n\n#if USE_ALPHA_TEST\n \n uniform ALPHA_TEST {\n float alphaThreshold;\n }\n#endif\n\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\n\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\n\nin vec4 v_color;\n\n#if USE_TEXTURE\nin vec2 v_uv0;\nuniform sampler2D texture;\n#endif\n\n#if SHOW_OUT_LINE\n\nuniform Outline {\n\n vec4 outlineColor;\n\n float outlineWidth;\n\n};\n\nfloat getBgAlpha() {\n vec4 color_up = texture(texture, v_uv0 + vec2(0, outlineWidth)); \n vec4 color_down = texture(texture, v_uv0 - vec2(0, outlineWidth)); \n vec4 color_left = texture(texture, v_uv0 - vec2(outlineWidth, 0)); \n vec4 color_right = texture(texture, v_uv0 + vec2(outlineWidth, 0)); \n vec4 color_up_left = texture(texture, v_uv0 + vec2(outlineWidth, -outlineWidth)); \n vec4 color_up_right = texture(texture, v_uv0 + vec2(outlineWidth, outlineWidth)); \n vec4 color_down_left = texture(texture, v_uv0 + vec2(-outlineWidth, -outlineWidth)); \n vec4 color_down_right = texture(texture, v_uv0 + vec2(-outlineWidth, outlineWidth)); \n float total = color_right.a + color_left.a + color_down.a + color_up.a + color_up_left.a + color_up_right.a + color_down_left.a + color_down_right.a; \n return clamp(total, 0.0, 1.0);\n}\n\n#endif\n\nvoid main () {\n vec4 o = vec4(1, 1, 1, 1);\n\n #if USE_TEXTURE\n o *= texture(texture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_TEXTURE\n o.a *= texture2D(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #endif\n\n o *= v_color;\n\n ALPHA_TEST(o);\n\n gl_FragColor = o;\n\n #if SHOW_OUT_LINE\n\n if (outlineWidth == 0.0) {\n return;\n }\n\n vec4 color_dest = outlineColor * getBgAlpha();\n\n vec4 color_src = o;\n\n gl_FragColor = color_src * color_src.a + color_dest * (1.0 - color_src.a);\n #endif\n}\n" + } + } + ], + "subMetas": {} +} \ No newline at end of file diff --git a/assets/materials/outline.mtl b/assets/materials/sprite-outline.mtl similarity index 74% rename from assets/materials/outline.mtl rename to assets/materials/sprite-outline.mtl index 66141cf..73debb1 100644 --- a/assets/materials/outline.mtl +++ b/assets/materials/sprite-outline.mtl @@ -14,12 +14,12 @@ "_props": { "texture": null, "outlineColor": { - "__type__": "cc.Vec4", - "x": 1, - "y": 0, - "z": 0, - "w": 1 + "__type__": "cc.Color", + "r": 255, + "g": 0, + "b": 0, + "a": 255 }, - "outlineSize": 0.01 + "outlineWidth": 0.002 } } \ No newline at end of file diff --git a/assets/materials/outline.mtl.meta b/assets/materials/sprite-outline.mtl.meta similarity index 100% rename from assets/materials/outline.mtl.meta rename to assets/materials/sprite-outline.mtl.meta diff --git a/assets/scenes/OutlineEffectScene.fire b/assets/scenes/OutlineEffectScene.fire index 8466dd8..034ef32 100755 --- a/assets/scenes/OutlineEffectScene.fire +++ b/assets/scenes/OutlineEffectScene.fire @@ -17,7 +17,7 @@ "__id__": 2 } ], - "_active": true, + "_active": false, "_components": [], "_prefab": null, "_opacity": 255, @@ -58,7 +58,7 @@ "_groupIndex": 0, "groupIndex": 0, "autoReleaseAssets": false, - "_id": "2d2f792f-a40c-49bb-a189-ed176a246e49" + "_id": "dbecc9f5-b74f-4e1d-a024-bf3d5eac0847" }, { "__type__": "cc.Node", @@ -73,21 +73,15 @@ }, { "__id__": 5 - }, - { - "__id__": 8 - }, - { - "__id__": 21 } ], "_active": true, "_components": [ { - "__id__": 28 + "__id__": 45 }, { - "__id__": 29 + "__id__": 46 } ], "_prefab": null, @@ -177,7 +171,7 @@ "array": [ 0, 0, - 393.1755333181352, + 492.17758360225525, 0, 0, 0, @@ -238,19 +232,91 @@ }, { "__type__": "cc.Node", - "_name": "Bg", + "_name": "Content", "_objFlags": 0, "_parent": { "__id__": 2 }, + "_children": [ + { + "__id__": 6 + }, + { + "__id__": 9 + }, + { + "__id__": 29 + } + ], + "_active": true, + "_components": [ + { + "__id__": 44 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 960, + "height": 640 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "faqYlnbttBCaJJgkn4Ntv/" + }, + { + "__type__": "cc.Node", + "_name": "Bg", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, "_children": [], "_active": true, "_components": [ { - "__id__": 6 + "__id__": 7 }, { - "__id__": 7 + "__id__": 8 } ], "_prefab": null, @@ -306,7 +372,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 5 + "__id__": 6 }, "_enabled": true, "alignMode": 0, @@ -333,7 +399,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 5 + "__id__": 6 }, "_enabled": true, "_materials": [ @@ -362,26 +428,23 @@ }, { "__type__": "cc.Node", - "_name": "Layout", + "_name": "Sliders", "_objFlags": 0, "_parent": { - "__id__": 2 + "__id__": 5 }, "_children": [ { - "__id__": 9 - }, - { - "__id__": 11 + "__id__": 10 } ], "_active": true, "_components": [ { - "__id__": 19 + "__id__": 27 }, { - "__id__": 20 + "__id__": 28 } ], "_prefab": null, @@ -395,20 +458,20 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 548, - "height": 150 + "width": 576, + "height": 60 }, "_anchorPoint": { "__type__": "cc.Vec2", "x": 0.5, - "y": 0.5 + "y": 1 }, "_trs": { "__type__": "TypedArray", "ctor": "Float64Array", "array": [ - -62, - 168.26, + -192, + 320, 0, 0, 0, @@ -430,20 +493,95 @@ "_is3DNode": false, "_groupIndex": 0, "groupIndex": 0, - "_id": "11ZCsp/hhAnoxRSLqdlROB" + "_id": "d0PWmVX95D3LEcvBQBPDr+" }, { "__type__": "cc.Node", - "_name": "Label", + "_name": "WidthSlider", "_objFlags": 0, "_parent": { - "__id__": 8 + "__id__": 9 + }, + "_children": [ + { + "__id__": 11 + }, + { + "__id__": 14 + }, + { + "__id__": 23 + } + ], + "_active": true, + "_components": [ + { + "__id__": 26 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 576, + "height": 60 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -30, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "669o93+gJMWJFGUDKSDUJ7" + }, + { + "__type__": "cc.Node", + "_name": "SliderDescLabel", + "_objFlags": 0, + "_parent": { + "__id__": 10 }, "_children": [], "_active": true, "_components": [ { - "__id__": 10 + "__id__": 12 + }, + { + "__id__": 13 } ], "_prefab": null, @@ -457,19 +595,19 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 200, - "height": 50.4 + "width": 144, + "height": 40 }, "_anchorPoint": { "__type__": "cc.Vec2", - "x": 0.5, + "x": 1, "y": 0.5 }, "_trs": { "__type__": "TypedArray", "ctor": "Float64Array", "array": [ - -174, + -144, 0, 0, 0, @@ -492,14 +630,14 @@ "_is3DNode": false, "_groupIndex": 0, "groupIndex": 0, - "_id": "a8mK6UowJOqLvmjfPIiuTZ" + "_id": "d9MLgZpaFCEZu70E0LAUbn" }, { "__type__": "cc.Label", - "_name": "", + "_name": "SliderDescLabel