From cdac6bf71af54b7328299d4372cfdddfb3b6479d Mon Sep 17 00:00:00 2001 From: caizhitao Date: Tue, 24 Dec 2019 19:11:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=9D=90=E8=B4=A8inspector?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/effects/sprite-glow-inner.effect | 16 +++++++++------- assets/materials/sprite-glow-inner.mtl | 10 +++++----- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/assets/effects/sprite-glow-inner.effect b/assets/effects/sprite-glow-inner.effect index 76b8d38..b150d5e 100644 --- a/assets/effects/sprite-glow-inner.effect +++ b/assets/effects/sprite-glow-inner.effect @@ -19,16 +19,17 @@ CCEffect %{ # 发光颜色 glowColor: { value: [1.0, 1.0, 0.0, 1.0], - editor: { - type: color, - displayName: "发光颜色" + inspector: { + type: color, + tooltip: "发光颜色" } } # 发光宽度 glowColorSize: { value: 0.01, - editor: { - displayName: "发光宽度(百分比)" + inspector: { + tooltip: "发光宽度", + range: [0.0, 1.0], } } # 发光透明度阈值 @@ -36,8 +37,9 @@ CCEffect %{ # 一般用于解决图像边缘存在渐变透明的时,决定超过这个透明度阈值的边缘点才点发光,具体可以操作一下 glowThreshold: { value: 0.1, - editor: { - displayName: "发光阈值(百分比)" + inspector: { + tooltip: "发光阈值", + range: [0.0, 1.0] } } }% diff --git a/assets/materials/sprite-glow-inner.mtl b/assets/materials/sprite-glow-inner.mtl index 1b5eb7a..717e6e3 100644 --- a/assets/materials/sprite-glow-inner.mtl +++ b/assets/materials/sprite-glow-inner.mtl @@ -14,11 +14,11 @@ "_props": { "texture": null, "glowColor": { - "__type__": "cc.Vec4", - "x": 1, - "y": 0, - "z": 0, - "w": 1 + "__type__": "cc.Color", + "r": 255, + "g": 0, + "b": 0, + "a": 255 }, "glowColorSize": 0.2, "glowThreshold": 0.1