Merge branch 'feature/glow' into dev
This commit is contained in:
commit
5b48cab85c
@ -46,6 +46,7 @@ CCProgram vs %{
|
||||
// in 用在函数的参数中,表示这个参数是输入的,在函数中改变这个值,并不会影响对调用的函数产生副作用。(相当于C语言的传值),这个是函数参数默认的修饰符
|
||||
|
||||
// 顶点坐标
|
||||
// a_position 是笛卡尔坐标右手系,也是OpenGL的坐标系,原点在左下角,X轴正方向往右,Y轴正方向往上,Z轴正方向往外
|
||||
in vec3 a_position;
|
||||
|
||||
// 顶点颜色,实际为对应节点的颜色
|
||||
@ -61,6 +62,7 @@ CCProgram vs %{
|
||||
#if USE_TEXTURE
|
||||
|
||||
// 输入的纹理坐标
|
||||
// a_uv0 是标准屏幕坐标系,即原点在左上角,X轴正方向往右,Y轴正方向往下
|
||||
in vec2 a_uv0;
|
||||
|
||||
// 输出的纹理坐标
|
||||
|
239
assets/effects/sprite-glow-inner.effect
Normal file
239
assets/effects/sprite-glow-inner.effect
Normal file
@ -0,0 +1,239 @@
|
||||
// Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
|
||||
// 内发光特效
|
||||
// 原理: 采样周边像素alpha取平均值,叠加发光效果
|
||||
CCEffect %{
|
||||
techniques:
|
||||
- passes:
|
||||
- vert: vs
|
||||
frag: fs
|
||||
blendState:
|
||||
targets:
|
||||
- blend: true
|
||||
rasterizerState:
|
||||
cullMode: none
|
||||
properties:
|
||||
texture: { value: white }
|
||||
alphaThreshold: { value: 0.5 }
|
||||
|
||||
# 自定义参数
|
||||
# 发光颜色
|
||||
glowColor: {
|
||||
value: [1.0, 1.0, 0.0, 1.0],
|
||||
inspector: {
|
||||
type: color,
|
||||
tooltip: "发光颜色"
|
||||
}
|
||||
}
|
||||
# 发光宽度
|
||||
glowColorSize: {
|
||||
value: 0.2,
|
||||
inspector: {
|
||||
tooltip: "发光宽度",
|
||||
range: [0.0, 1.0],
|
||||
}
|
||||
}
|
||||
# 发光透明度阈值
|
||||
# 只有超过这个透明度的点才会发光
|
||||
# 一般用于解决图像边缘存在渐变透明的时,决定超过这个透明度阈值的边缘点才点发光,具体可以操作一下
|
||||
glowThreshold: {
|
||||
value: 0.1,
|
||||
inspector: {
|
||||
tooltip: "发光阈值",
|
||||
range: [0.0, 1.0]
|
||||
}
|
||||
}
|
||||
}%
|
||||
|
||||
|
||||
CCProgram vs %{
|
||||
precision highp float;
|
||||
|
||||
#include <cc-global>
|
||||
#include <cc-local>
|
||||
|
||||
in vec3 a_position;
|
||||
in vec4 a_color;
|
||||
out vec4 v_color;
|
||||
|
||||
#if USE_TEXTURE
|
||||
in vec2 a_uv0;
|
||||
out vec2 v_uv0;
|
||||
#endif
|
||||
|
||||
void main () {
|
||||
vec4 pos = vec4(a_position, 1);
|
||||
|
||||
#if CC_USE_MODEL
|
||||
pos = cc_matViewProj * cc_matWorld * pos;
|
||||
#else
|
||||
pos = cc_matViewProj * pos;
|
||||
#endif
|
||||
|
||||
#if USE_TEXTURE
|
||||
v_uv0 = a_uv0;
|
||||
#endif
|
||||
|
||||
v_color = a_color;
|
||||
|
||||
gl_Position = pos;
|
||||
}
|
||||
}%
|
||||
|
||||
|
||||
CCProgram fs %{
|
||||
precision highp float;
|
||||
|
||||
#include <alpha-test>
|
||||
|
||||
in vec4 v_color;
|
||||
|
||||
#if USE_TEXTURE
|
||||
in vec2 v_uv0;
|
||||
uniform sampler2D texture;
|
||||
#endif
|
||||
|
||||
#if SHOW_INNER_GLOW
|
||||
|
||||
uniform glow {
|
||||
// 发光颜色
|
||||
vec4 glowColor;
|
||||
// 发光范围
|
||||
float glowColorSize;
|
||||
// 发光阈值
|
||||
float glowThreshold;
|
||||
// 特别地,必须是 vec4 先于 float 声明
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取指定角度方向,距离为xxx的像素的透明度
|
||||
*
|
||||
* @param angle 角度 [0.0, 360.0]
|
||||
* @param dist 距离 [0.0, 1.0]
|
||||
*
|
||||
* @return alpha [0.0, 1.0]
|
||||
*/
|
||||
float getColorAlpha(float angle, float dist) {
|
||||
// 角度转弧度,公式为:弧度 = 角度 * (pi / 180)
|
||||
float radian = angle * 0.01745329252; // 这个浮点数是 pi / 180
|
||||
vec4 color = texture(texture, v_uv0 + vec2(dist * cos(radian), dist * sin(radian)));
|
||||
return color.a;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取指定距离的周边像素的透明度平均值
|
||||
*
|
||||
* @param dist 距离 [0.0, 1.0]
|
||||
*
|
||||
* @return average alpha [0.0, 1.0]
|
||||
*/
|
||||
float getAverageAlpha(float dist) {
|
||||
|
||||
|
||||
float totalAlpha = 0.0;
|
||||
// 以30度为一个单位,那么「周边一圈」就由0到360度中共计12个点的组成
|
||||
totalAlpha += getColorAlpha(0.0, dist);
|
||||
totalAlpha += getColorAlpha(30.0, dist);
|
||||
totalAlpha += getColorAlpha(60.0, dist);
|
||||
totalAlpha += getColorAlpha(90.0, dist);
|
||||
totalAlpha += getColorAlpha(120.0, dist);
|
||||
totalAlpha += getColorAlpha(150.0, dist);
|
||||
totalAlpha += getColorAlpha(180.0, dist);
|
||||
totalAlpha += getColorAlpha(210.0, dist);
|
||||
totalAlpha += getColorAlpha(240.0, dist);
|
||||
totalAlpha += getColorAlpha(270.0, dist);
|
||||
totalAlpha += getColorAlpha(300.0, dist);
|
||||
totalAlpha += getColorAlpha(330.0, dist);
|
||||
return totalAlpha * 0.0833; // 1 / 12 = 0.08333
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取发光的透明度
|
||||
*/
|
||||
float getGlowAlpha() {
|
||||
// 如果发光宽度为0,直接返回0.0透明度,减少计算量
|
||||
if (glowColorSize == 0.0) {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
// 因为我们是要做内发光,所以如果点本来是透明的或者接近透明的
|
||||
// 那么就意味着这个点是图像外的透明点或者图像内透明点(如空洞)之类的
|
||||
// 内发光的话,这些透明点我们不用处理,让它保持原样,否则就是会有内描边或者一点扩边的效果
|
||||
// 同时也是提前直接结束,减少计算量
|
||||
vec4 srcColor = texture(texture, v_uv0);
|
||||
if (srcColor.a <= glowThreshold) {
|
||||
return srcColor.a;
|
||||
}
|
||||
|
||||
// 将传入的指定距离,平均分成10圈,求出每一圈的平均透明度,
|
||||
// 然后求和取平均值,那么就可以得到该点的平均透明度
|
||||
float totalAlpha = 0.0;
|
||||
totalAlpha += getAverageAlpha(glowColorSize * 0.1);
|
||||
totalAlpha += getAverageAlpha(glowColorSize * 0.2);
|
||||
totalAlpha += getAverageAlpha(glowColorSize * 0.3);
|
||||
totalAlpha += getAverageAlpha(glowColorSize * 0.4);
|
||||
totalAlpha += getAverageAlpha(glowColorSize * 0.5);
|
||||
totalAlpha += getAverageAlpha(glowColorSize * 0.6);
|
||||
totalAlpha += getAverageAlpha(glowColorSize * 0.7);
|
||||
totalAlpha += getAverageAlpha(glowColorSize * 0.8);
|
||||
totalAlpha += getAverageAlpha(glowColorSize * 0.9);
|
||||
totalAlpha += getAverageAlpha(glowColorSize * 1.0);
|
||||
return totalAlpha * 0.1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void main () {
|
||||
vec4 o = vec4(1, 1, 1, 1);
|
||||
|
||||
#if USE_TEXTURE
|
||||
o *= texture(texture, v_uv0);
|
||||
#if CC_USE_ALPHA_ATLAS_TEXTURE
|
||||
o.a *= texture2D(texture, v_uv0 + vec2(0, 0.5)).r;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
o *= v_color;
|
||||
|
||||
ALPHA_TEST(o);
|
||||
|
||||
gl_FragColor = o;
|
||||
|
||||
#if SHOW_INNER_GLOW
|
||||
// 目标颜色(图像)
|
||||
vec4 color_dest = o;
|
||||
|
||||
// 获取发光透明度
|
||||
// 此时我们得到的是内部透明度为1,靠近边缘的为接近0的透明度,其他位置为0的透明度
|
||||
float alpha = getGlowAlpha();
|
||||
|
||||
// 而内发光是从边缘开始的,那么什么算是边缘呢?
|
||||
// 如果图像边缘有大量渐变,那么如果我们取大于 0.0 点就算是图像内的话,那么可能边缘会出现锯齿
|
||||
// 因此为了确定边缘,引入了发光阈值,我们只需要比较一下发光阈值就可以,大于发光阈值的点都是(图像内)发光点
|
||||
if (alpha > glowThreshold) {
|
||||
|
||||
// 内发光是从边缘发光的,是需要内部透明度为0,靠近边缘的接近1的透明度
|
||||
// 因此我们需要翻转一下透明度
|
||||
alpha = 1.0 - alpha;
|
||||
|
||||
// 给点调料,让靠近边缘的更加亮
|
||||
alpha = -1.0 * (alpha - 1.0) * (alpha - 1.0) * (alpha - 1.0) * (alpha - 1.0) + 1.0;
|
||||
}
|
||||
// 源颜色(内发光)
|
||||
vec4 color_src = glowColor * alpha;
|
||||
|
||||
// 按照这个顺序,源颜色就是内发光颜色,目标颜色就是图案颜色色
|
||||
// 所以命名就是 color_src, color_dest
|
||||
|
||||
// 按照混合颜色规则 http://docs.cocos.com/creator/manual/zh/advanced-topics/ui-auto-batch.html#blend-%E6%A8%A1%E5%BC%8F
|
||||
// 要在图案上方,叠加一个内发光,将两者颜色混合起来,那么最终选择的混合模式如下:
|
||||
//
|
||||
// (内发光)color_src: GL_SRC_ALPHA
|
||||
// (原图像)color_dest: GL_ONE
|
||||
//
|
||||
// 即最终颜色如下:
|
||||
// color_src * GL_SRC_ALPHA + color_dest * GL_ONE
|
||||
|
||||
gl_FragColor = color_src * color_src.a + color_dest;
|
||||
#endif
|
||||
}
|
||||
}%
|
17
assets/effects/sprite-glow-inner.effect.meta
Normal file
17
assets/effects/sprite-glow-inner.effect.meta
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"ver": "1.0.23",
|
||||
"uuid": "90211f16-c00e-4c37-a192-43ec50c9ea35",
|
||||
"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_INNER_GLOW\n\nuniform vec4 glowColor;\nuniform float glowColorSize;\nuniform float glowThreshold;\n\n/**\n * 获取指定角度方向,距离为xxx的像素的透明度\n *\n * @param angle 角度 [0.0, 360.0]\n * @param dist 距离 [0.0, 1.0]\n *\n * @return alpha [0.0, 1.0]\n */\nfloat getColorAlpha(float angle, float dist) {\n\n float radian = angle * 0.01745329252;\n\n vec4 color = texture2D(texture, v_uv0 + vec2(dist * cos(radian), dist * sin(radian))); \n return color.a;\n}\n\n/**\n * 获取指定距离的周边像素的透明度平均值\n *\n * @param dist 距离 [0.0, 1.0]\n *\n * @return average alpha [0.0, 1.0]\n */\nfloat getAverageAlpha(float dist) {\n\n float totalAlpha = 0.0;\n\n totalAlpha += getColorAlpha(0.0, dist);\n totalAlpha += getColorAlpha(30.0, dist);\n totalAlpha += getColorAlpha(60.0, dist);\n totalAlpha += getColorAlpha(90.0, dist);\n totalAlpha += getColorAlpha(120.0, dist);\n totalAlpha += getColorAlpha(150.0, dist);\n totalAlpha += getColorAlpha(180.0, dist);\n totalAlpha += getColorAlpha(210.0, dist);\n totalAlpha += getColorAlpha(240.0, dist);\n totalAlpha += getColorAlpha(270.0, dist);\n totalAlpha += getColorAlpha(300.0, dist);\n totalAlpha += getColorAlpha(330.0, dist);\n return totalAlpha * 0.0833;\n\n}\n\n/**\n * 获取发光的透明度\n */\nfloat getGlowAlpha() {\n\n if (glowColorSize == 0.0) {\n return 0.0;\n }\n\n vec4 srcColor = texture2D(texture, v_uv0);\n if (srcColor.a <= glowThreshold) {\n return srcColor.a;\n }\n\n float totalAlpha = 0.0;\n totalAlpha += getAverageAlpha(glowColorSize * 0.1);\n totalAlpha += getAverageAlpha(glowColorSize * 0.2);\n totalAlpha += getAverageAlpha(glowColorSize * 0.3);\n totalAlpha += getAverageAlpha(glowColorSize * 0.4);\n totalAlpha += getAverageAlpha(glowColorSize * 0.5);\n totalAlpha += getAverageAlpha(glowColorSize * 0.6);\n totalAlpha += getAverageAlpha(glowColorSize * 0.7);\n totalAlpha += getAverageAlpha(glowColorSize * 0.8);\n totalAlpha += getAverageAlpha(glowColorSize * 0.9);\n totalAlpha += getAverageAlpha(glowColorSize * 1.0);\n return totalAlpha * 0.1;\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_INNER_GLOW\n\n vec4 color_dest = o;\n\n float alpha = getGlowAlpha();\n\n if (alpha > glowThreshold) {\n\n alpha = 1.0 - alpha;\n\n alpha = -1.0 * (alpha - 1.0) * (alpha - 1.0) * (alpha - 1.0) * (alpha - 1.0) + 1.0;\n }\n\n vec4 color_src = glowColor * alpha;\n\n gl_FragColor = color_src * color_src.a + color_dest;\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_INNER_GLOW\n\nuniform glow {\n\n vec4 glowColor;\n\n float glowColorSize;\n\n float glowThreshold;\n\n};\n\n/**\n * 获取指定角度方向,距离为xxx的像素的透明度\n *\n * @param angle 角度 [0.0, 360.0]\n * @param dist 距离 [0.0, 1.0]\n *\n * @return alpha [0.0, 1.0]\n */\nfloat getColorAlpha(float angle, float dist) {\n\n float radian = angle * 0.01745329252;\n\n vec4 color = texture(texture, v_uv0 + vec2(dist * cos(radian), dist * sin(radian))); \n return color.a;\n}\n\n/**\n * 获取指定距离的周边像素的透明度平均值\n *\n * @param dist 距离 [0.0, 1.0]\n *\n * @return average alpha [0.0, 1.0]\n */\nfloat getAverageAlpha(float dist) {\n\n float totalAlpha = 0.0;\n\n totalAlpha += getColorAlpha(0.0, dist);\n totalAlpha += getColorAlpha(30.0, dist);\n totalAlpha += getColorAlpha(60.0, dist);\n totalAlpha += getColorAlpha(90.0, dist);\n totalAlpha += getColorAlpha(120.0, dist);\n totalAlpha += getColorAlpha(150.0, dist);\n totalAlpha += getColorAlpha(180.0, dist);\n totalAlpha += getColorAlpha(210.0, dist);\n totalAlpha += getColorAlpha(240.0, dist);\n totalAlpha += getColorAlpha(270.0, dist);\n totalAlpha += getColorAlpha(300.0, dist);\n totalAlpha += getColorAlpha(330.0, dist);\n return totalAlpha * 0.0833;\n\n}\n\n/**\n * 获取发光的透明度\n */\nfloat getGlowAlpha() {\n\n if (glowColorSize == 0.0) {\n return 0.0;\n }\n\n vec4 srcColor = texture(texture, v_uv0);\n if (srcColor.a <= glowThreshold) {\n return srcColor.a;\n }\n\n float totalAlpha = 0.0;\n totalAlpha += getAverageAlpha(glowColorSize * 0.1);\n totalAlpha += getAverageAlpha(glowColorSize * 0.2);\n totalAlpha += getAverageAlpha(glowColorSize * 0.3);\n totalAlpha += getAverageAlpha(glowColorSize * 0.4);\n totalAlpha += getAverageAlpha(glowColorSize * 0.5);\n totalAlpha += getAverageAlpha(glowColorSize * 0.6);\n totalAlpha += getAverageAlpha(glowColorSize * 0.7);\n totalAlpha += getAverageAlpha(glowColorSize * 0.8);\n totalAlpha += getAverageAlpha(glowColorSize * 0.9);\n totalAlpha += getAverageAlpha(glowColorSize * 1.0);\n return totalAlpha * 0.1;\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_INNER_GLOW\n\n vec4 color_dest = o;\n\n float alpha = getGlowAlpha();\n\n if (alpha > glowThreshold) {\n\n alpha = 1.0 - alpha;\n\n alpha = -1.0 * (alpha - 1.0) * (alpha - 1.0) * (alpha - 1.0) * (alpha - 1.0) + 1.0;\n }\n\n vec4 color_src = glowColor * alpha;\n\n gl_FragColor = color_src * color_src.a + color_dest;\n #endif\n}\n"
|
||||
}
|
||||
}
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
287
assets/effects/sprite-glow-outter.effect
Normal file
287
assets/effects/sprite-glow-outter.effect
Normal file
@ -0,0 +1,287 @@
|
||||
// Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
|
||||
// 外发光特效
|
||||
// 原理:采样周边像素alpha取平均值,给外部加发光效果(1-col.a可避免内部发光)
|
||||
CCEffect %{
|
||||
techniques:
|
||||
- passes:
|
||||
- vert: vs
|
||||
frag: fs
|
||||
blendState:
|
||||
targets:
|
||||
- blend: true
|
||||
rasterizerState:
|
||||
cullMode: none
|
||||
properties:
|
||||
texture: { value: white }
|
||||
alphaThreshold: { value: 0.5 }
|
||||
|
||||
# 自定义参数
|
||||
# 发光颜色
|
||||
glowColor: {
|
||||
value: [1.0, 1.0, 0.0, 1.0],
|
||||
inspector: {
|
||||
type: color,
|
||||
tooltip: "发光颜色"
|
||||
}
|
||||
}
|
||||
# 发光宽度
|
||||
glowColorSize: {
|
||||
value: 0.15,
|
||||
inspector: {
|
||||
tooltip: "发光宽度",
|
||||
range: [0.0, 1.0],
|
||||
}
|
||||
}
|
||||
# 发光透明度阈值
|
||||
# 只有小于等于这个透明度的点才会发光
|
||||
glowThreshold: {
|
||||
value: 1.0,
|
||||
inspector: {
|
||||
tooltip: "发光阈值",
|
||||
range: [0.0, 1.0]
|
||||
}
|
||||
}
|
||||
}%
|
||||
|
||||
|
||||
CCProgram vs %{
|
||||
precision highp float;
|
||||
|
||||
#include <cc-global>
|
||||
#include <cc-local>
|
||||
|
||||
// a_position 是笛卡尔坐标右手系,也是OpenGL的坐标系,原点在左下角,X轴正方向往右,Y轴正方向往上,Z轴正方向往外
|
||||
in vec3 a_position;
|
||||
in vec4 a_color;
|
||||
out vec4 v_color;
|
||||
|
||||
#if USE_TEXTURE
|
||||
// a_uv0 是标准屏幕坐标系,即原点在左上角,X轴正方向往右,Y轴正方向往下
|
||||
in vec2 a_uv0;
|
||||
out vec2 v_uv0;
|
||||
#endif
|
||||
|
||||
void main () {
|
||||
vec4 pos = vec4(a_position, 1);
|
||||
// vec4 pos = vec4(a_position * vec3(1.0, 1.0, 1.0), 1);
|
||||
|
||||
#if CC_USE_MODEL
|
||||
pos = cc_matViewProj * cc_matWorld * pos;
|
||||
#else
|
||||
pos = cc_matViewProj * pos;
|
||||
#endif
|
||||
|
||||
#if USE_TEXTURE
|
||||
v_uv0 = a_uv0;
|
||||
|
||||
// // 左移
|
||||
// v_uv0 = a_uv0 + vec2(0.1, 0.0);
|
||||
// // 右移
|
||||
// v_uv0 = a_uv0 + vec2(-0.1, 0.0);
|
||||
// // 上移
|
||||
// v_uv0 = a_uv0 + vec2(0.0, 0.1);
|
||||
// // 下移
|
||||
// v_uv0 = a_uv0 + vec2(0.0, -0.1);
|
||||
|
||||
// // x轴拉伸
|
||||
// v_uv0 = a_uv0 * vec2(0.5, 1.0);
|
||||
// // x轴压缩
|
||||
// v_uv0 = a_uv0 * vec2(2.0, 1.0);
|
||||
// // y轴拉伸
|
||||
// v_uv0 = a_uv0 * vec2(1.0, 0.5);
|
||||
// // y轴压缩
|
||||
// v_uv0 = a_uv0 * vec2(1.0, 2.0);
|
||||
|
||||
// 先缩小一倍,然后在移动回去中间
|
||||
// v_uv0 = a_uv0 * 2.0 - 0.5;
|
||||
#endif
|
||||
|
||||
v_color = a_color;
|
||||
|
||||
// pos *= vec4(2.0, 2.0, 1.0, 1.0);
|
||||
gl_Position = pos;
|
||||
}
|
||||
}%
|
||||
|
||||
|
||||
CCProgram fs %{
|
||||
precision highp float;
|
||||
|
||||
#include <alpha-test>
|
||||
|
||||
in vec4 v_color;
|
||||
|
||||
#if USE_TEXTURE
|
||||
in vec2 v_uv0;
|
||||
uniform sampler2D texture;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* 获取纹理uv颜色
|
||||
*
|
||||
* 超出边界的统一返回 vec4(0.0, 0.0, 0.0, 0.0)
|
||||
*/
|
||||
vec4 getTexture(sampler2D texture, vec2 v_uv0) {
|
||||
if (v_uv0.x > 1.0 || v_uv0.x < 0.0 || v_uv0.y > 1.0 || v_uv0.y < 0.0) {
|
||||
return vec4(0.0, 0.0, 0.0, 0.0);
|
||||
}
|
||||
return texture(texture, v_uv0);
|
||||
}
|
||||
|
||||
#if SHOW_OUTTER_GLOW
|
||||
|
||||
uniform glow {
|
||||
// 发光颜色
|
||||
vec4 glowColor;
|
||||
// 发光范围
|
||||
float glowColorSize;
|
||||
// 发光阈值
|
||||
float glowThreshold;
|
||||
// 特别地,必须是 vec4 先于 float 声明
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 获取指定角度方向,距离为xxx的像素的透明度
|
||||
*
|
||||
* @param angle 角度 [0.0, 360.0]
|
||||
* @param dist 距离 [0.0, 1.0]
|
||||
*
|
||||
* @return alpha [0.0, 1.0]
|
||||
*/
|
||||
float getColorAlpha(float angle, float dist) {
|
||||
// 角度转弧度,公式为:弧度 = 角度 * (pi / 180)
|
||||
float radian = angle * 0.01745329252; // 这个浮点数是 pi / 180
|
||||
vec4 color = getTexture(texture, v_uv0 + vec2(dist * cos(radian), dist * sin(radian)));
|
||||
return color.a;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取指定距离的周边像素的透明度平均值
|
||||
*
|
||||
* @param dist 距离 [0.0, 1.0]
|
||||
*
|
||||
* @return average alpha [0.0, 1.0]
|
||||
*/
|
||||
float getAverageAlpha(float dist) {
|
||||
float totalAlpha = 0.0;
|
||||
// 以30度为一个单位,那么「周边一圈」就由0到360度中共计12个点的组成
|
||||
totalAlpha += getColorAlpha(0.0, dist);
|
||||
totalAlpha += getColorAlpha(30.0, dist);
|
||||
totalAlpha += getColorAlpha(60.0, dist);
|
||||
totalAlpha += getColorAlpha(90.0, dist);
|
||||
totalAlpha += getColorAlpha(120.0, dist);
|
||||
totalAlpha += getColorAlpha(150.0, dist);
|
||||
totalAlpha += getColorAlpha(180.0, dist);
|
||||
totalAlpha += getColorAlpha(210.0, dist);
|
||||
totalAlpha += getColorAlpha(240.0, dist);
|
||||
totalAlpha += getColorAlpha(270.0, dist);
|
||||
totalAlpha += getColorAlpha(300.0, dist);
|
||||
totalAlpha += getColorAlpha(330.0, dist);
|
||||
return totalAlpha * 0.0833; // 1 / 12 = 0.08333
|
||||
|
||||
// // for 循环写法据说耗性能
|
||||
// float totalAlpha = 0.0;
|
||||
// const float count = 12.0;
|
||||
// const float angle = 360.0 / count;
|
||||
// for (float i = 0.0; i < count; i += 1.0) {
|
||||
// totalAlpha += getColorAlpha(angle * i, dist) ;
|
||||
// }
|
||||
// return totalAlpha / count;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取发光的透明度
|
||||
*/
|
||||
float getGlowAlpha() {
|
||||
// 如果发光宽度为0,直接返回0.0透明度,减少计算量
|
||||
if (glowColorSize == 0.0) {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
// // 因为我们是要做内发光,所以如果点本来是透明的或者接近透明的
|
||||
// // 那么就意味着这个点是图像外的透明点或者图像内透明点(如空洞)之类的
|
||||
// // 内发光的话,这些透明点我们不用处理,让它保持原样,否则就是会有内描边或者一点扩边的效果
|
||||
// // 同时也是提前直接结束,减少计算量
|
||||
// vec4 srcColor = texture(texture, v_uv0);
|
||||
// if (srcColor.a <= glowThreshold) {
|
||||
// return srcColor.a;
|
||||
// }
|
||||
|
||||
// 将传入的指定距离,平均分成10圈,求出每一圈的平均透明度,
|
||||
// 然后求和取平均值,那么就可以得到该点的平均透明度
|
||||
float totalAlpha = 0.0;
|
||||
totalAlpha += getAverageAlpha(glowColorSize * 0.1);
|
||||
totalAlpha += getAverageAlpha(glowColorSize * 0.2);
|
||||
totalAlpha += getAverageAlpha(glowColorSize * 0.3);
|
||||
totalAlpha += getAverageAlpha(glowColorSize * 0.4);
|
||||
totalAlpha += getAverageAlpha(glowColorSize * 0.5);
|
||||
totalAlpha += getAverageAlpha(glowColorSize * 0.6);
|
||||
totalAlpha += getAverageAlpha(glowColorSize * 0.7);
|
||||
totalAlpha += getAverageAlpha(glowColorSize * 0.8);
|
||||
totalAlpha += getAverageAlpha(glowColorSize * 0.9);
|
||||
totalAlpha += getAverageAlpha(glowColorSize * 1.0);
|
||||
return totalAlpha * 0.1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void main () {
|
||||
vec4 o = vec4(1, 1, 1, 1);
|
||||
|
||||
#if USE_TEXTURE
|
||||
o *= getTexture(texture, v_uv0);
|
||||
#if CC_USE_ALPHA_ATLAS_TEXTURE
|
||||
o.a *= texture2D(texture, v_uv0 + vec2(0, 0.5)).r;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
o *= v_color;
|
||||
|
||||
ALPHA_TEST(o);
|
||||
|
||||
gl_FragColor = o;
|
||||
|
||||
#if SHOW_OUTTER_GLOW
|
||||
// 获取发光透明度
|
||||
// 此时我们得到的是内部透明度为1,靠近边缘的为接近0的透明度,其他位置为0的透明度
|
||||
float alpha = getGlowAlpha();
|
||||
|
||||
// 而外发光是从边缘开始的,那么什么算是边缘呢?
|
||||
// 一般图像边缘是存在渐变,即从图像内 1.0-> 0.0 图像外,那么发光边缘我们可以这样子定义
|
||||
// 当该点的透明度小于一个阈值,那么我们就当该点为一个发光点
|
||||
if (alpha <= glowThreshold) {
|
||||
// 然后以阈值作为标量,重新将透明度归一化
|
||||
alpha = alpha / glowThreshold;
|
||||
|
||||
// 给点调料,让靠近边缘的更加亮
|
||||
alpha = -1.0 * (alpha - 1.0) * (alpha - 1.0) * (alpha - 1.0) * (alpha - 1.0) + 1.0;
|
||||
} else {
|
||||
// 然后这里大于阈值的基本就是便是图像本身,不需要发光,那么将发光透明度置为0
|
||||
alpha = 0.0;
|
||||
}
|
||||
|
||||
// 忽略阈值,直接处理
|
||||
// // 给点调料,让靠近边缘的更加亮
|
||||
// alpha = -1.0 * (alpha - 1.0) * (alpha - 1.0) * (alpha - 1.0) * (alpha - 1.0) + 1.0;
|
||||
|
||||
// 外发光颜色
|
||||
vec4 color_dest = glowColor * alpha;
|
||||
vec4 color_src = o;
|
||||
|
||||
// 本次我们将先画外发光作为背景,然后在上方放图像
|
||||
//
|
||||
// 按照混合颜色规则 http://docs.cocos.com/creator/manual/zh/advanced-topics/ui-auto-batch.html#blend-%E6%A8%A1%E5%BC%8F
|
||||
//
|
||||
// 最终选择的混合模式如下:
|
||||
//
|
||||
// (原图像)color_src: GL_SRC_ALPHA
|
||||
// (外发光)color_dest: GL_ONE_MINUS_SRC_ALPHAA
|
||||
//
|
||||
// 即最终颜色如下:
|
||||
// color_src * GL_SRC_ALPHA + color_dest * GL_ONE_MINUS_SRC_ALPHAA
|
||||
|
||||
gl_FragColor = color_src * color_src.a + color_dest * (1.0 - color_src.a);
|
||||
#endif
|
||||
}
|
||||
}%
|
17
assets/effects/sprite-glow-outter.effect.meta
Normal file
17
assets/effects/sprite-glow-outter.effect.meta
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"ver": "1.0.23",
|
||||
"uuid": "89f30b2e-b75e-49b1-9dfc-cb341cadd30a",
|
||||
"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\n\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\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/**\n * 获取纹理uv颜色 \n *\n * 超出边界的统一返回 vec4(0.0, 0.0, 0.0, 0.0)\n */\nvec4 getTexture(sampler2D texture, vec2 v_uv0) {\n if (v_uv0.x > 1.0 || v_uv0.x < 0.0 || v_uv0.y > 1.0 || v_uv0.y < 0.0) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n }\n return texture2D(texture, v_uv0);\n}\n\n#if SHOW_OUTTER_GLOW\n\nuniform vec4 glowColor;\nuniform float glowColorSize;\nuniform float glowThreshold;\n\n/**\n * 获取指定角度方向,距离为xxx的像素的透明度\n *\n * @param angle 角度 [0.0, 360.0]\n * @param dist 距离 [0.0, 1.0]\n *\n * @return alpha [0.0, 1.0]\n */\nfloat getColorAlpha(float angle, float dist) {\n\n float radian = angle * 0.01745329252;\n\n vec4 color = getTexture(texture, v_uv0 + vec2(dist * cos(radian), dist * sin(radian))); \n return color.a;\n}\n\n/**\n * 获取指定距离的周边像素的透明度平均值\n *\n * @param dist 距离 [0.0, 1.0]\n *\n * @return average alpha [0.0, 1.0]\n */\nfloat getAverageAlpha(float dist) {\n float totalAlpha = 0.0;\n\n totalAlpha += getColorAlpha(0.0, dist);\n totalAlpha += getColorAlpha(30.0, dist);\n totalAlpha += getColorAlpha(60.0, dist);\n totalAlpha += getColorAlpha(90.0, dist);\n totalAlpha += getColorAlpha(120.0, dist);\n totalAlpha += getColorAlpha(150.0, dist);\n totalAlpha += getColorAlpha(180.0, dist);\n totalAlpha += getColorAlpha(210.0, dist);\n totalAlpha += getColorAlpha(240.0, dist);\n totalAlpha += getColorAlpha(270.0, dist);\n totalAlpha += getColorAlpha(300.0, dist);\n totalAlpha += getColorAlpha(330.0, dist);\n return totalAlpha * 0.0833;\n\n}\n\n/**\n * 获取发光的透明度\n */\nfloat getGlowAlpha() {\n\n if (glowColorSize == 0.0) {\n return 0.0;\n }\n\n float totalAlpha = 0.0;\n totalAlpha += getAverageAlpha(glowColorSize * 0.1);\n totalAlpha += getAverageAlpha(glowColorSize * 0.2);\n totalAlpha += getAverageAlpha(glowColorSize * 0.3);\n totalAlpha += getAverageAlpha(glowColorSize * 0.4);\n totalAlpha += getAverageAlpha(glowColorSize * 0.5);\n totalAlpha += getAverageAlpha(glowColorSize * 0.6);\n totalAlpha += getAverageAlpha(glowColorSize * 0.7);\n totalAlpha += getAverageAlpha(glowColorSize * 0.8);\n totalAlpha += getAverageAlpha(glowColorSize * 0.9);\n totalAlpha += getAverageAlpha(glowColorSize * 1.0);\n return totalAlpha * 0.1;\n}\n\n#endif\n\nvoid main () {\n vec4 o = vec4(1, 1, 1, 1);\n\n #if USE_TEXTURE\n o *= getTexture(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_OUTTER_GLOW\n\n float alpha = getGlowAlpha();\n\n if (alpha <= glowThreshold) {\n\n alpha = alpha / glowThreshold;\n\n alpha = -1.0 * (alpha - 1.0) * (alpha - 1.0) * (alpha - 1.0) * (alpha - 1.0) + 1.0;\n } else {\n\n alpha = 0.0;\n }\n\n vec4 color_dest = glowColor * alpha;\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\n\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\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/**\n * 获取纹理uv颜色 \n *\n * 超出边界的统一返回 vec4(0.0, 0.0, 0.0, 0.0)\n */\nvec4 getTexture(sampler2D texture, vec2 v_uv0) {\n if (v_uv0.x > 1.0 || v_uv0.x < 0.0 || v_uv0.y > 1.0 || v_uv0.y < 0.0) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n }\n return texture(texture, v_uv0);\n}\n\n#if SHOW_OUTTER_GLOW\n\nuniform glow {\n\n vec4 glowColor;\n\n float glowColorSize;\n\n float glowThreshold;\n\n};\n\n/**\n * 获取指定角度方向,距离为xxx的像素的透明度\n *\n * @param angle 角度 [0.0, 360.0]\n * @param dist 距离 [0.0, 1.0]\n *\n * @return alpha [0.0, 1.0]\n */\nfloat getColorAlpha(float angle, float dist) {\n\n float radian = angle * 0.01745329252;\n\n vec4 color = getTexture(texture, v_uv0 + vec2(dist * cos(radian), dist * sin(radian))); \n return color.a;\n}\n\n/**\n * 获取指定距离的周边像素的透明度平均值\n *\n * @param dist 距离 [0.0, 1.0]\n *\n * @return average alpha [0.0, 1.0]\n */\nfloat getAverageAlpha(float dist) {\n float totalAlpha = 0.0;\n\n totalAlpha += getColorAlpha(0.0, dist);\n totalAlpha += getColorAlpha(30.0, dist);\n totalAlpha += getColorAlpha(60.0, dist);\n totalAlpha += getColorAlpha(90.0, dist);\n totalAlpha += getColorAlpha(120.0, dist);\n totalAlpha += getColorAlpha(150.0, dist);\n totalAlpha += getColorAlpha(180.0, dist);\n totalAlpha += getColorAlpha(210.0, dist);\n totalAlpha += getColorAlpha(240.0, dist);\n totalAlpha += getColorAlpha(270.0, dist);\n totalAlpha += getColorAlpha(300.0, dist);\n totalAlpha += getColorAlpha(330.0, dist);\n return totalAlpha * 0.0833;\n\n}\n\n/**\n * 获取发光的透明度\n */\nfloat getGlowAlpha() {\n\n if (glowColorSize == 0.0) {\n return 0.0;\n }\n\n float totalAlpha = 0.0;\n totalAlpha += getAverageAlpha(glowColorSize * 0.1);\n totalAlpha += getAverageAlpha(glowColorSize * 0.2);\n totalAlpha += getAverageAlpha(glowColorSize * 0.3);\n totalAlpha += getAverageAlpha(glowColorSize * 0.4);\n totalAlpha += getAverageAlpha(glowColorSize * 0.5);\n totalAlpha += getAverageAlpha(glowColorSize * 0.6);\n totalAlpha += getAverageAlpha(glowColorSize * 0.7);\n totalAlpha += getAverageAlpha(glowColorSize * 0.8);\n totalAlpha += getAverageAlpha(glowColorSize * 0.9);\n totalAlpha += getAverageAlpha(glowColorSize * 1.0);\n return totalAlpha * 0.1;\n}\n\n#endif\n\nvoid main () {\n vec4 o = vec4(1, 1, 1, 1);\n\n #if USE_TEXTURE\n o *= getTexture(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_OUTTER_GLOW\n\n float alpha = getGlowAlpha();\n\n if (alpha <= glowThreshold) {\n\n alpha = alpha / glowThreshold;\n\n alpha = -1.0 * (alpha - 1.0) * (alpha - 1.0) * (alpha - 1.0) * (alpha - 1.0) + 1.0;\n } else {\n\n alpha = 0.0;\n }\n\n vec4 color_dest = glowColor * alpha;\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": {}
|
||||
}
|
26
assets/materials/sprite-glow-inner.mtl
Normal file
26
assets/materials/sprite-glow-inner.mtl
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"__type__": "cc.Material",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_effectAsset": {
|
||||
"__uuid__": "90211f16-c00e-4c37-a192-43ec50c9ea35"
|
||||
},
|
||||
"_defines": {
|
||||
"USE_TEXTURE": true,
|
||||
"USE_ALPHA_TEST": false,
|
||||
"SHOW_INNER_GLOW": true
|
||||
},
|
||||
"_props": {
|
||||
"texture": null,
|
||||
"glowColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"glowColorSize": 0.2,
|
||||
"glowThreshold": 0.1
|
||||
}
|
||||
}
|
6
assets/materials/sprite-glow-inner.mtl.meta
Normal file
6
assets/materials/sprite-glow-inner.mtl.meta
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"ver": "1.0.2",
|
||||
"uuid": "2c760728-404d-4553-a1d0-7ab18263845c",
|
||||
"dataAsSubAsset": null,
|
||||
"subMetas": {}
|
||||
}
|
26
assets/materials/sprite-glow-outter.mtl
Normal file
26
assets/materials/sprite-glow-outter.mtl
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"__type__": "cc.Material",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_effectAsset": {
|
||||
"__uuid__": "89f30b2e-b75e-49b1-9dfc-cb341cadd30a"
|
||||
},
|
||||
"_defines": {
|
||||
"USE_TEXTURE": true,
|
||||
"USE_ALPHA_TEST": false,
|
||||
"SHOW_OUTTER_GLOW": true
|
||||
},
|
||||
"_props": {
|
||||
"texture": null,
|
||||
"glowColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"glowColorSize": 0.15,
|
||||
"glowThreshold": 1
|
||||
}
|
||||
}
|
6
assets/materials/sprite-glow-outter.mtl.meta
Normal file
6
assets/materials/sprite-glow-outter.mtl.meta
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"ver": "1.0.2",
|
||||
"uuid": "16dd0f06-6280-4d74-8483-a50e23c00733",
|
||||
"dataAsSubAsset": null,
|
||||
"subMetas": {}
|
||||
}
|
5882
assets/scenes/GlowInnerEffectScene.fire
Executable file
5882
assets/scenes/GlowInnerEffectScene.fire
Executable file
File diff suppressed because it is too large
Load Diff
7
assets/scenes/GlowInnerEffectScene.fire.meta
Normal file
7
assets/scenes/GlowInnerEffectScene.fire.meta
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.2.5",
|
||||
"uuid": "69a920f1-0509-4d54-b033-5fb5b1283b72",
|
||||
"asyncLoadAssets": false,
|
||||
"autoReleaseAssets": false,
|
||||
"subMetas": {}
|
||||
}
|
5882
assets/scenes/GlowOutterEffectScene.fire
Executable file
5882
assets/scenes/GlowOutterEffectScene.fire
Executable file
File diff suppressed because it is too large
Load Diff
7
assets/scenes/GlowOutterEffectScene.fire.meta
Normal file
7
assets/scenes/GlowOutterEffectScene.fire.meta
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.2.5",
|
||||
"uuid": "6c0134dc-238e-4bed-b9a3-3f09c1e320a3",
|
||||
"asyncLoadAssets": false,
|
||||
"autoReleaseAssets": false,
|
||||
"subMetas": {}
|
||||
}
|
@ -177,7 +177,7 @@
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
491.0364039457767,
|
||||
393.1755333181352,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@ -992,7 +992,7 @@
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 585.3299999999999,
|
||||
"height": 150
|
||||
"height": 0
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
@ -1066,7 +1066,7 @@
|
||||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
-195.16499999999996,
|
||||
26.272,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@ -1160,7 +1160,7 @@
|
||||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
121.50000000000003,
|
||||
37.609,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@ -1225,7 +1225,7 @@
|
||||
"_layoutSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 585.3299999999999,
|
||||
"height": 150
|
||||
"height": 0
|
||||
},
|
||||
"_resize": 1,
|
||||
"_N$layoutType": 1,
|
||||
|
126
assets/scripts/GlowInnerEffectScene.ts
Normal file
126
assets/scripts/GlowInnerEffectScene.ts
Normal file
@ -0,0 +1,126 @@
|
||||
const { ccclass, property } = cc._decorator;
|
||||
|
||||
@ccclass
|
||||
export default class GlowInnerEffectScene extends cc.Component {
|
||||
private _redSlider: cc.Slider = null;
|
||||
private _redSliderLabel: cc.Label = null;
|
||||
|
||||
private _greenSlider: cc.Slider = null;
|
||||
private _greenSliderLabel: cc.Label = null;
|
||||
|
||||
private _blueSlider: cc.Slider = null;
|
||||
private _blueSliderLabel: cc.Label = null;
|
||||
|
||||
private _alphaSlider: cc.Slider = null;
|
||||
private _alphaSliderLabel: cc.Label = null;
|
||||
|
||||
private _glowWidthSlider: cc.Slider = null;
|
||||
private _glowWidthSliderLabel: cc.Label = null;
|
||||
|
||||
private _glowThresholdSlider: cc.Slider = null;
|
||||
private _glowThresholdSliderLabel: cc.Label = null;
|
||||
|
||||
private _examplesParentNode: cc.Node = null;
|
||||
|
||||
onLoad() {
|
||||
this._redSlider = cc.find("Canvas/Content/Sliders/ColorRedSlider/Slider").getComponent(cc.Slider);
|
||||
this._redSliderLabel = cc.find("Canvas/Content/Sliders/ColorRedSlider/ValueLabel").getComponent(cc.Label);
|
||||
|
||||
this._greenSlider = cc.find("Canvas/Content/Sliders/ColorGreenSlider/Slider").getComponent(cc.Slider);
|
||||
this._greenSliderLabel = cc.find("Canvas/Content/Sliders/ColorGreenSlider/ValueLabel").getComponent(cc.Label);
|
||||
|
||||
this._blueSlider = cc.find("Canvas/Content/Sliders/ColorBlueSlider/Slider").getComponent(cc.Slider);
|
||||
this._blueSliderLabel = cc.find("Canvas/Content/Sliders/ColorBlueSlider/ValueLabel").getComponent(cc.Label);
|
||||
|
||||
this._alphaSlider = cc.find("Canvas/Content/Sliders/ColorAlphaSlider/Slider").getComponent(cc.Slider);
|
||||
this._alphaSliderLabel = cc.find("Canvas/Content/Sliders/ColorAlphaSlider/ValueLabel").getComponent(cc.Label);
|
||||
|
||||
this._glowWidthSlider = cc.find("Canvas/Content/Sliders/GlowWidthSlider/Slider").getComponent(cc.Slider);
|
||||
this._glowWidthSliderLabel = cc.find("Canvas/Content/Sliders/GlowWidthSlider/ValueLabel").getComponent(cc.Label);
|
||||
|
||||
this._glowThresholdSlider = cc.find("Canvas/Content/Sliders/GlowThresholdSlider/Slider").getComponent(cc.Slider);
|
||||
this._glowThresholdSliderLabel = cc.find("Canvas/Content/Sliders/GlowThresholdSlider/ValueLabel").getComponent(cc.Label);
|
||||
|
||||
this._examplesParentNode = cc.find("Canvas/Content/Examples");
|
||||
}
|
||||
|
||||
onEnable() {
|
||||
this._redSlider.node.on("slide", this._onSliderChanged, this);
|
||||
this._greenSlider.node.on("slide", this._onSliderChanged, this);
|
||||
this._blueSlider.node.on("slide", this._onSliderChanged, this);
|
||||
this._alphaSlider.node.on("slide", this._onSliderChanged, this);
|
||||
this._glowWidthSlider.node.on("slide", this._onSliderChanged, this);
|
||||
this._glowThresholdSlider.node.on("slide", this._onSliderChanged, this);
|
||||
}
|
||||
|
||||
onDisable() {
|
||||
this._redSlider.node.off("slide", this._onSliderChanged, this);
|
||||
this._greenSlider.node.off("slide", this._onSliderChanged, this);
|
||||
this._blueSlider.node.off("slide", this._onSliderChanged, this);
|
||||
this._alphaSlider.node.off("slide", this._onSliderChanged, this);
|
||||
this._glowWidthSlider.node.off("slide", this._onSliderChanged, this);
|
||||
this._glowThresholdSlider.node.off("slide", this._onSliderChanged, this);
|
||||
}
|
||||
|
||||
start() {
|
||||
this._onSliderChanged();
|
||||
}
|
||||
|
||||
private _onSliderChanged() {
|
||||
// 更新进度条值 Label 文本
|
||||
this._redSliderLabel.string = `${this._redSlider.progress.toFixed(2)} | ${Math.round(255 * this._redSlider.progress)}`;
|
||||
this._greenSliderLabel.string = `${this._greenSlider.progress.toFixed(2)} | ${Math.round(255 * this._greenSlider.progress)}`;
|
||||
this._blueSliderLabel.string = `${this._blueSlider.progress.toFixed(2)} | ${Math.round(255 * this._blueSlider.progress)}`;
|
||||
this._alphaSliderLabel.string = `${this._alphaSlider.progress.toFixed(2)} | ${Math.round(255 * this._alphaSlider.progress)}`;
|
||||
|
||||
// 这里为约束一下值发光宽度值在 [0.0, 0.1] 因为 0.1+ 之后的效果可能不明显,也可以自己尝试修改
|
||||
let realGlowWidthProgress = this._glowWidthSlider.progress * 0.1;
|
||||
this._glowWidthSliderLabel.string = `${realGlowWidthProgress.toFixed(2)}`;
|
||||
|
||||
// 这里为约束一下值发光阈值值在 [0.0, 0.5] 因为 0.5+ 之后的效果可能就是其他效果,也可以自己修改这里
|
||||
// let realGlowThresholdProgress = this._glowThresholdSlider.progress * 0.5;
|
||||
let realGlowThresholdProgress = this._glowThresholdSlider.progress;
|
||||
this._glowThresholdSliderLabel.string = `${realGlowThresholdProgress.toFixed(2)}`;
|
||||
|
||||
// 更新材质
|
||||
this._updateRenderComponentOutterGlowMaterial({
|
||||
glowColor: cc.v4(this._redSlider.progress, this._greenSlider.progress, this._blueSlider.progress, this._alphaSlider.progress),
|
||||
glowColorSize: realGlowWidthProgress,
|
||||
glowThreshold: realGlowThresholdProgress
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新渲染组件的材质
|
||||
*
|
||||
* 1. 获取材质
|
||||
* 2. 给材质的 unitform 变量赋值
|
||||
* 3. 重新将材质赋值回去
|
||||
*/
|
||||
private _updateRenderComponentOutterGlowMaterial(param: {
|
||||
/**
|
||||
* 发光宽度 [0.0, 1.0]
|
||||
*/
|
||||
glowColorSize: number;
|
||||
|
||||
/**
|
||||
* 发光颜色 [0.0, 1.0]
|
||||
*/
|
||||
glowColor: cc.Vec4;
|
||||
|
||||
/**
|
||||
* 发光阈值 [0.0, 1.0]
|
||||
*/
|
||||
glowThreshold: number;
|
||||
}) {
|
||||
this._examplesParentNode.children.forEach(childNode => {
|
||||
childNode.getComponents(cc.RenderComponent).forEach(renderComponent => {
|
||||
let material: cc.Material = renderComponent.getMaterial(0);
|
||||
material.setProperty("glowColorSize", param.glowColorSize);
|
||||
material.setProperty("glowColor", param.glowColor);
|
||||
material.setProperty("glowThreshold", param.glowThreshold);
|
||||
renderComponent.setMaterial(0, material);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "93154cca-114c-4db2-938b-f750f686fe9b",
|
||||
"uuid": "eebe516b-e5b8-4c3b-b22c-a30a0b5bf629",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
130
assets/scripts/GlowOutterEffectScene.ts
Normal file
130
assets/scripts/GlowOutterEffectScene.ts
Normal file
@ -0,0 +1,130 @@
|
||||
const { ccclass, property } = cc._decorator;
|
||||
|
||||
@ccclass
|
||||
export default class GlowOutterEffectScene extends cc.Component {
|
||||
private _redSlider: cc.Slider = null;
|
||||
private _redSliderLabel: cc.Label = null;
|
||||
|
||||
private _greenSlider: cc.Slider = null;
|
||||
private _greenSliderLabel: cc.Label = null;
|
||||
|
||||
private _blueSlider: cc.Slider = null;
|
||||
private _blueSliderLabel: cc.Label = null;
|
||||
|
||||
private _alphaSlider: cc.Slider = null;
|
||||
private _alphaSliderLabel: cc.Label = null;
|
||||
|
||||
private _glowWidthSlider: cc.Slider = null;
|
||||
private _glowWidthSliderLabel: cc.Label = null;
|
||||
|
||||
private _glowThresholdSlider: cc.Slider = null;
|
||||
private _glowThresholdSliderLabel: cc.Label = null;
|
||||
|
||||
private _examplesParentNode: cc.Node = null;
|
||||
|
||||
onLoad() {
|
||||
// 关闭动态合图
|
||||
cc.dynamicAtlasManager.enabled = false;
|
||||
|
||||
// cc.dynamicAtlasManager.showDebug(true);
|
||||
this._redSlider = cc.find("Canvas/Content/Sliders/ColorRedSlider/Slider").getComponent(cc.Slider);
|
||||
this._redSliderLabel = cc.find("Canvas/Content/Sliders/ColorRedSlider/ValueLabel").getComponent(cc.Label);
|
||||
|
||||
this._greenSlider = cc.find("Canvas/Content/Sliders/ColorGreenSlider/Slider").getComponent(cc.Slider);
|
||||
this._greenSliderLabel = cc.find("Canvas/Content/Sliders/ColorGreenSlider/ValueLabel").getComponent(cc.Label);
|
||||
|
||||
this._blueSlider = cc.find("Canvas/Content/Sliders/ColorBlueSlider/Slider").getComponent(cc.Slider);
|
||||
this._blueSliderLabel = cc.find("Canvas/Content/Sliders/ColorBlueSlider/ValueLabel").getComponent(cc.Label);
|
||||
|
||||
this._alphaSlider = cc.find("Canvas/Content/Sliders/ColorAlphaSlider/Slider").getComponent(cc.Slider);
|
||||
this._alphaSliderLabel = cc.find("Canvas/Content/Sliders/ColorAlphaSlider/ValueLabel").getComponent(cc.Label);
|
||||
|
||||
this._glowWidthSlider = cc.find("Canvas/Content/Sliders/GlowWidthSlider/Slider").getComponent(cc.Slider);
|
||||
this._glowWidthSliderLabel = cc.find("Canvas/Content/Sliders/GlowWidthSlider/ValueLabel").getComponent(cc.Label);
|
||||
|
||||
this._glowThresholdSlider = cc.find("Canvas/Content/Sliders/GlowThresholdSlider/Slider").getComponent(cc.Slider);
|
||||
this._glowThresholdSliderLabel = cc.find("Canvas/Content/Sliders/GlowThresholdSlider/ValueLabel").getComponent(cc.Label);
|
||||
|
||||
this._examplesParentNode = cc.find("Canvas/Content/Examples");
|
||||
}
|
||||
|
||||
onEnable() {
|
||||
this._redSlider.node.on("slide", this._onSliderChanged, this);
|
||||
this._greenSlider.node.on("slide", this._onSliderChanged, this);
|
||||
this._blueSlider.node.on("slide", this._onSliderChanged, this);
|
||||
this._alphaSlider.node.on("slide", this._onSliderChanged, this);
|
||||
this._glowWidthSlider.node.on("slide", this._onSliderChanged, this);
|
||||
this._glowThresholdSlider.node.on("slide", this._onSliderChanged, this);
|
||||
}
|
||||
|
||||
onDisable() {
|
||||
this._redSlider.node.off("slide", this._onSliderChanged, this);
|
||||
this._greenSlider.node.off("slide", this._onSliderChanged, this);
|
||||
this._blueSlider.node.off("slide", this._onSliderChanged, this);
|
||||
this._alphaSlider.node.off("slide", this._onSliderChanged, this);
|
||||
this._glowWidthSlider.node.off("slide", this._onSliderChanged, this);
|
||||
this._glowThresholdSlider.node.off("slide", this._onSliderChanged, this);
|
||||
}
|
||||
|
||||
start() {
|
||||
this._onSliderChanged();
|
||||
}
|
||||
|
||||
private _onSliderChanged() {
|
||||
// 更新进度条值 Label 文本
|
||||
this._redSliderLabel.string = `${this._redSlider.progress.toFixed(2)} | ${Math.round(255 * this._redSlider.progress)}`;
|
||||
this._greenSliderLabel.string = `${this._greenSlider.progress.toFixed(2)} | ${Math.round(255 * this._greenSlider.progress)}`;
|
||||
this._blueSliderLabel.string = `${this._blueSlider.progress.toFixed(2)} | ${Math.round(255 * this._blueSlider.progress)}`;
|
||||
this._alphaSliderLabel.string = `${this._alphaSlider.progress.toFixed(2)} | ${Math.round(255 * this._alphaSlider.progress)}`;
|
||||
|
||||
// 这里为约束一下值发光宽度值在 [0.0, 0.1] 因为 0.1+ 之后的效果可能不明显,也可以自己尝试修改
|
||||
let realGlowWidthProgress = this._glowWidthSlider.progress * 0.1;
|
||||
this._glowWidthSliderLabel.string = `${realGlowWidthProgress.toFixed(2)}`;
|
||||
|
||||
// 这里为约束一下值发光阈值值在 [0.0, 0.5] 因为 0.5+ 之后的效果可能就是其他效果,也可以自己修改这里
|
||||
// let realGlowThresholdProgress = this._glowThresholdSlider.progress * 0.5;
|
||||
let realGlowThresholdProgress = this._glowThresholdSlider.progress;
|
||||
this._glowThresholdSliderLabel.string = `${realGlowThresholdProgress.toFixed(2)}`;
|
||||
|
||||
// 更新材质
|
||||
this._updateRenderComponentOutterGlowMaterial({
|
||||
glowColor: cc.v4(this._redSlider.progress, this._greenSlider.progress, this._blueSlider.progress, this._alphaSlider.progress),
|
||||
glowColorSize: realGlowWidthProgress,
|
||||
glowThreshold: realGlowThresholdProgress
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新渲染组件的材质
|
||||
*
|
||||
* 1. 获取材质
|
||||
* 2. 给材质的 unitform 变量赋值
|
||||
* 3. 重新将材质赋值回去
|
||||
*/
|
||||
private _updateRenderComponentOutterGlowMaterial(param: {
|
||||
/**
|
||||
* 发光宽度 [0.0, 1.0]
|
||||
*/
|
||||
glowColorSize: number;
|
||||
|
||||
/**
|
||||
* 发光颜色 [0.0, 1.0]
|
||||
*/
|
||||
glowColor: cc.Vec4;
|
||||
|
||||
/**
|
||||
* 发光阈值 [0.0, 1.0]
|
||||
*/
|
||||
glowThreshold: number;
|
||||
}) {
|
||||
this._examplesParentNode.children.forEach(childNode => {
|
||||
childNode.getComponents(cc.RenderComponent).forEach(renderComponent => {
|
||||
let material: cc.Material = renderComponent.getMaterial(0);
|
||||
material.setProperty("glowColorSize", param.glowColorSize);
|
||||
material.setProperty("glowColor", param.glowColor);
|
||||
material.setProperty("glowThreshold", param.glowThreshold);
|
||||
renderComponent.setMaterial(0, material);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
9
assets/scripts/GlowOutterEffectScene.ts.meta
Normal file
9
assets/scripts/GlowOutterEffectScene.ts.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "885555a3-a2a6-4260-a7a9-d363145fced6",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
const { ccclass, property } = cc._decorator;
|
||||
|
||||
@ccclass
|
||||
export default class SpriteOutlineCtrl extends cc.Component {
|
||||
private _sprite: cc.Sprite = null;
|
||||
|
||||
onLoad() {
|
||||
this._sprite = this.getComponent(cc.Sprite);
|
||||
if (this._sprite == null) {
|
||||
throw new Error(`${this.name} can only bind on Sprite`);
|
||||
}
|
||||
}
|
||||
|
||||
start() {
|
||||
// let material: cc.Material = this._sprite.getMaterial(0);
|
||||
// material.setProperty("test", 0);
|
||||
// this._sprite.setMaterial(0, material);
|
||||
}
|
||||
|
||||
// update (dt) {}
|
||||
}
|
7
assets/scripts/ccutils.meta
Normal file
7
assets/scripts/ccutils.meta
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"uuid": "f997b961-2f60-436e-8980-c469c1effc84",
|
||||
"isSubpackage": false,
|
||||
"subpackageName": "",
|
||||
"subMetas": {}
|
||||
}
|
7
assets/scripts/ccutils/multiresolution.meta
Normal file
7
assets/scripts/ccutils/multiresolution.meta
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"uuid": "93bfb663-05e2-402a-9ed4-0e9f785baeda",
|
||||
"isSubpackage": false,
|
||||
"subpackageName": "",
|
||||
"subMetas": {}
|
||||
}
|
79
assets/scripts/ccutils/multiresolution/ContentAdapter.ts
Normal file
79
assets/scripts/ccutils/multiresolution/ContentAdapter.ts
Normal file
@ -0,0 +1,79 @@
|
||||
const { ccclass, property } = cc._decorator;
|
||||
|
||||
/**
|
||||
* @classdesc 游戏主内容节点自适应所有分辨率的脚本
|
||||
* @author caizhitao
|
||||
* @version 0.1.0
|
||||
* @since 2018-11-30
|
||||
* @description
|
||||
*
|
||||
* 用法:
|
||||
* 1. 将本组件挂载在节点上即可
|
||||
*
|
||||
* 适配原理:
|
||||
* 1. 将游戏主内容节点的宽高调整为画布的大小,以进行Size适配
|
||||
*
|
||||
* 注意:
|
||||
* 1. 挂载这个脚本的节点不能加入Widget组件,不然这个适配是没有效果的
|
||||
* 2. 目前只支持 SHOW_ALL 模式下的背景缩放适配,不支持其他模式的背景缩放
|
||||
*
|
||||
* @example
|
||||
```
|
||||
// e.g.
|
||||
// 代码中设置 SHOW_ALL 模式的参考代码
|
||||
cc.view.setDesignResolutionSize(720, 1280, cc.ResolutionPolicy.SHOW_ALL);
|
||||
|
||||
// 或者 Canvas 组件中,同时勾选 Fit Width 和 Fit Height
|
||||
```
|
||||
*/
|
||||
@ccclass
|
||||
export default class ContentAdapter extends cc.Component {
|
||||
onLoad() {
|
||||
// if (CC_DEBUG) {
|
||||
// cc.log("调整前");
|
||||
// cc.log(`屏幕分辨率: ${cc.view.getCanvasSize().width} x ${cc.view.getCanvasSize().height}`);
|
||||
// cc.log(`视图窗口可见区域分辨率: ${cc.view.getVisibleSize().width} x ${cc.view.getVisibleSize().height}`);
|
||||
// cc.log(`视图中边框尺寸: ${cc.view.getFrameSize().width} x ${cc.view.getFrameSize().height}`);
|
||||
// cc.log(`设备或浏览器像素比例: ${cc.view.getDevicePixelRatio()}`);
|
||||
// cc.log(`节点宽高: ${this.node.width} x ${this.node.height}`);
|
||||
// }
|
||||
|
||||
// 1. 先找到 SHOW_ALL 模式适配之后,本节点的实际宽高以及初始缩放值
|
||||
let srcScaleForShowAll = Math.min(cc.view.getCanvasSize().width / this.node.width, cc.view.getCanvasSize().height / this.node.height);
|
||||
let realWidth = this.node.width * srcScaleForShowAll;
|
||||
let realHeight = this.node.height * srcScaleForShowAll;
|
||||
|
||||
// 2. 基于第一步的数据,再做节点宽高适配
|
||||
this.node.width = this.node.width * (cc.view.getCanvasSize().width / realWidth);
|
||||
this.node.height = this.node.height * (cc.view.getCanvasSize().height / realHeight);
|
||||
|
||||
// // 3. 因为本节点的宽高发生了改变,所以要手动更新剩下子节点的宽高
|
||||
// this._updateAllChildNodeWidget(this.node);
|
||||
|
||||
// if (CC_DEBUG) {
|
||||
// cc.log(`节点在SHOW_ALL模式下展示的宽高: ${realWidth} x ${realHeight}`);
|
||||
// cc.log(`节点在SHOW_ALL模式下展示的缩放: ${srcScaleForShowAll}`);
|
||||
// cc.log(
|
||||
// `节点在SHOW_ALL模式下做全屏处理后的实际宽高(${cc.view.getCanvasSize().width}x${
|
||||
// cc.view.getCanvasSize().height
|
||||
// })等价于于原节点的宽高(${this.node.width}x${this.node.height})`
|
||||
// );
|
||||
// }
|
||||
}
|
||||
|
||||
// private _updateAllChildNodeWidget(parentNode: cc.Node) {
|
||||
// if (parentNode == null) {
|
||||
// return;
|
||||
// }
|
||||
// let widget = parentNode.getComponent(cc.Widget);
|
||||
// if (widget != null) {
|
||||
// widget.updateAlignment();
|
||||
// }
|
||||
// if (parentNode.childrenCount == 0) {
|
||||
// return;
|
||||
// }
|
||||
// parentNode.children.forEach((childNode: cc.Node) => {
|
||||
// this._updateAllChildNodeWidget(childNode);
|
||||
// });
|
||||
// }
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "a749157b-2487-4425-b8f5-35bdc284b345",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
@ -9,7 +9,7 @@
|
||||
"packable": true,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"ball_00": {
|
||||
"ball_0": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "d0b78623-4e79-4de1-b1d2-ea211bf4652c",
|
||||
"rawTextureUuid": "c996c862-3d09-4bc6-915d-e8a8e7226933",
|
BIN
assets/textures/ball_1.png
Normal file
BIN
assets/textures/ball_1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.6 KiB |
34
assets/textures/ball_1.png.meta
Normal file
34
assets/textures/ball_1.png.meta
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"ver": "2.3.3",
|
||||
"uuid": "bdfd3151-8c13-406b-8f94-1f101c972e7e",
|
||||
"type": "sprite",
|
||||
"wrapMode": "clamp",
|
||||
"filterMode": "bilinear",
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"ball_1": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "969fa66a-ae10-4157-b16e-4c1a4665920c",
|
||||
"rawTextureUuid": "bdfd3151-8c13-406b-8f94-1f101c972e7e",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 10,
|
||||
"trimY": 10,
|
||||
"width": 60,
|
||||
"height": 60,
|
||||
"rawWidth": 80,
|
||||
"rawHeight": 80,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"subMetas": {}
|
||||
}
|
||||
}
|
||||
}
|
BIN
assets/textures/video_btn.png
Normal file
BIN
assets/textures/video_btn.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
34
assets/textures/video_btn.png.meta
Normal file
34
assets/textures/video_btn.png.meta
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"ver": "2.3.3",
|
||||
"uuid": "2453b01d-4364-4d87-ab53-391d1a42d07d",
|
||||
"type": "sprite",
|
||||
"wrapMode": "clamp",
|
||||
"filterMode": "bilinear",
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"video_btn": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "54142b08-a163-426e-a75e-4c7b21046413",
|
||||
"rawTextureUuid": "2453b01d-4364-4d87-ab53-391d1a42d07d",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 1,
|
||||
"offsetY": 1,
|
||||
"trimX": 6,
|
||||
"trimY": 4,
|
||||
"width": 50,
|
||||
"height": 50,
|
||||
"rawWidth": 60,
|
||||
"rawHeight": 60,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"subMetas": {}
|
||||
}
|
||||
}
|
||||
}
|
263
assets/textures/xmlBMFont.fnt
Executable file
263
assets/textures/xmlBMFont.fnt
Executable file
@ -0,0 +1,263 @@
|
||||
<font>
|
||||
<info face="font" size="48" bold="0" italic="0" charset="" unicode="" stretchH="100" smooth="1" aa="1" padding="2,2,2,2" spacing="0,0" outline="0"/>
|
||||
<common lineHeight="56" base="41" scaleW="1114" scaleH="512" pages="1" packed="0"/>
|
||||
<pages>
|
||||
<page id="0" file="xmlBMFont.png"/>
|
||||
</pages>
|
||||
<chars count="253">
|
||||
<char id="97" x="2" y="2" width="39" height="36" xoffset="0" yoffset="9" xadvance="35" page="0" chnl="15"/>
|
||||
<char id="98" x="2" y="40" width="32" height="39" xoffset="1" yoffset="7" xadvance="29" page="0" chnl="15"/>
|
||||
<char id="99" x="2" y="81" width="33" height="35" xoffset="-1" yoffset="11" xadvance="28" page="0" chnl="15"/>
|
||||
<char id="100" x="36" y="40" width="39" height="39" xoffset="0" yoffset="9" xadvance="34" page="0" chnl="15"/>
|
||||
<char id="101" x="2" y="118" width="32" height="37" xoffset="0" yoffset="9" xadvance="29" page="0" chnl="15"/>
|
||||
<char id="102" x="43" y="2" width="30" height="36" xoffset="-1" yoffset="9" xadvance="23" page="0" chnl="15"/>
|
||||
<char id="103" x="2" y="157" width="36" height="37" xoffset="0" yoffset="8" xadvance="31" page="0" chnl="15"/>
|
||||
<char id="104" x="75" y="2" width="31" height="36" xoffset="0" yoffset="10" xadvance="28" page="0" chnl="15"/>
|
||||
<char id="105" x="36" y="118" width="13" height="32" xoffset="-2" yoffset="14" xadvance="8" page="0" chnl="15"/>
|
||||
<char id="106" x="2" y="196" width="23" height="37" xoffset="-2" yoffset="8" xadvance="19" page="0" chnl="15"/>
|
||||
<char id="107" x="2" y="235" width="37" height="37" xoffset="0" yoffset="8" xadvance="34" page="0" chnl="15"/>
|
||||
<char id="108" x="37" y="81" width="27" height="34" xoffset="-1" yoffset="11" xadvance="21" page="0" chnl="15"/>
|
||||
<char id="109" x="27" y="196" width="38" height="37" xoffset="0" yoffset="8" xadvance="33" page="0" chnl="15"/>
|
||||
<char id="110" x="40" y="152" width="34" height="38" xoffset="1" yoffset="8" xadvance="32" page="0" chnl="15"/>
|
||||
<char id="111" x="66" y="81" width="33" height="36" xoffset="1" yoffset="11" xadvance="30" page="0" chnl="15"/>
|
||||
<char id="112" x="77" y="40" width="34" height="36" xoffset="-2" yoffset="10" xadvance="28" page="0" chnl="15"/>
|
||||
<char id="113" x="2" y="274" width="41" height="37" xoffset="1" yoffset="11" xadvance="34" page="0" chnl="15"/>
|
||||
<char id="114" x="2" y="313" width="37" height="40" xoffset="2" yoffset="5" xadvance="35" page="0" chnl="15"/>
|
||||
<char id="115" x="2" y="355" width="35" height="40" xoffset="0" yoffset="6" xadvance="30" page="0" chnl="15"/>
|
||||
<char id="116" x="108" y="2" width="35" height="36" xoffset="0" yoffset="9" xadvance="30" page="0" chnl="15"/>
|
||||
<char id="117" x="41" y="235" width="34" height="35" xoffset="1" yoffset="10" xadvance="32" page="0" chnl="15"/>
|
||||
<char id="118" x="67" y="192" width="32" height="36" xoffset="0" yoffset="10" xadvance="29" page="0" chnl="15"/>
|
||||
<char id="119" x="76" y="119" width="40" height="33" xoffset="2" yoffset="13" xadvance="39" page="0" chnl="15"/>
|
||||
<char id="120" x="76" y="154" width="36" height="36" xoffset="0" yoffset="10" xadvance="31" page="0" chnl="15"/>
|
||||
<char id="121" x="113" y="40" width="28" height="40" xoffset="-1" yoffset="9" xadvance="23" page="0" chnl="15"/>
|
||||
<char id="122" x="2" y="397" width="36" height="37" xoffset="-1" yoffset="8" xadvance="31" page="0" chnl="15"/>
|
||||
<char id="65" x="2" y="436" width="46" height="43" xoffset="-3" yoffset="5" xadvance="39" page="0" chnl="15"/>
|
||||
<char id="66" x="40" y="355" width="38" height="46" xoffset="-2" yoffset="3" xadvance="32" page="0" chnl="15"/>
|
||||
<char id="67" x="41" y="313" width="39" height="40" xoffset="-4" yoffset="8" xadvance="31" page="0" chnl="15"/>
|
||||
<char id="68" x="77" y="230" width="46" height="46" xoffset="-4" yoffset="5" xadvance="38" page="0" chnl="15"/>
|
||||
<char id="69" x="114" y="154" width="38" height="44" xoffset="-3" yoffset="5" xadvance="32" page="0" chnl="15"/>
|
||||
<char id="70" x="118" y="82" width="35" height="43" xoffset="-4" yoffset="5" xadvance="25" page="0" chnl="15"/>
|
||||
<char id="71" x="145" y="2" width="43" height="44" xoffset="-4" yoffset="5" xadvance="35" page="0" chnl="15"/>
|
||||
<char id="72" x="50" y="403" width="39" height="42" xoffset="-4" yoffset="6" xadvance="31" page="0" chnl="15"/>
|
||||
<char id="73" x="45" y="272" width="14" height="38" xoffset="-2" yoffset="10" xadvance="9" page="0" chnl="15"/>
|
||||
<char id="74" x="80" y="355" width="27" height="44" xoffset="-4" yoffset="4" xadvance="21" page="0" chnl="15"/>
|
||||
<char id="75" x="50" y="447" width="45" height="43" xoffset="-3" yoffset="5" xadvance="37" page="0" chnl="15"/>
|
||||
<char id="76" x="91" y="401" width="31" height="40" xoffset="-3" yoffset="7" xadvance="23" page="0" chnl="15"/>
|
||||
<char id="77" x="97" y="443" width="45" height="44" xoffset="-3" yoffset="4" xadvance="37" page="0" chnl="15"/>
|
||||
<char id="78" x="82" y="278" width="40" height="45" xoffset="-2" yoffset="4" xadvance="36" page="0" chnl="15"/>
|
||||
<char id="79" x="109" y="325" width="39" height="42" xoffset="-2" yoffset="7" xadvance="33" page="0" chnl="15"/>
|
||||
<char id="80" x="124" y="278" width="40" height="42" xoffset="-5" yoffset="3" xadvance="31" page="0" chnl="15"/>
|
||||
<char id="81" x="124" y="369" width="50" height="43" xoffset="-3" yoffset="8" xadvance="37" page="0" chnl="15"/>
|
||||
<char id="82" x="125" y="200" width="45" height="47" xoffset="-2" yoffset="1" xadvance="38" page="0" chnl="15"/>
|
||||
<char id="83" x="154" y="127" width="41" height="47" xoffset="-4" yoffset="2" xadvance="34" page="0" chnl="15"/>
|
||||
<char id="84" x="150" y="322" width="42" height="43" xoffset="-3" yoffset="5" xadvance="33" page="0" chnl="15"/>
|
||||
<char id="85" x="166" y="249" width="41" height="41" xoffset="-2" yoffset="7" xadvance="35" page="0" chnl="15"/>
|
||||
<char id="86" x="172" y="176" width="38" height="42" xoffset="-3" yoffset="6" xadvance="32" page="0" chnl="15"/>
|
||||
<char id="87" x="155" y="48" width="48" height="39" xoffset="-2" yoffset="9" xadvance="44" page="0" chnl="15"/>
|
||||
<char id="88" x="190" y="2" width="42" height="41" xoffset="-3" yoffset="6" xadvance="35" page="0" chnl="15"/>
|
||||
<char id="89" x="197" y="89" width="33" height="49" xoffset="-4" yoffset="5" xadvance="25" page="0" chnl="15"/>
|
||||
<char id="90" x="144" y="414" width="43" height="43" xoffset="-4" yoffset="4" xadvance="34" page="0" chnl="15"/>
|
||||
<char id="33" x="176" y="367" width="16" height="44" xoffset="-3" yoffset="4" xadvance="10" page="0" chnl="15"/>
|
||||
<char id="8470" x="144" y="459" width="56" height="45" xoffset="-4" yoffset="4" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="59" x="197" y="140" width="17" height="34" xoffset="-3" yoffset="20" xadvance="11" page="0" chnl="15"/>
|
||||
<char id="37" x="189" y="413" width="47" height="43" xoffset="-3" yoffset="4" xadvance="40" page="0" chnl="15"/>
|
||||
<char id="58" x="124" y="414" width="16" height="27" xoffset="-2" yoffset="21" xadvance="12" page="0" chnl="15"/>
|
||||
<char id="63" x="202" y="458" width="25" height="44" xoffset="-3" yoffset="4" xadvance="19" page="0" chnl="15"/>
|
||||
<char id="42" x="166" y="292" width="27" height="28" xoffset="-4" yoffset="8" xadvance="20" page="0" chnl="15"/>
|
||||
<char id="40" x="229" y="458" width="19" height="51" xoffset="-6" yoffset="4" xadvance="10" page="0" chnl="15"/>
|
||||
<char id="41" x="194" y="322" width="20" height="51" xoffset="-3" yoffset="4" xadvance="13" page="0" chnl="15"/>
|
||||
<char id="95" x="125" y="249" width="36" height="12" xoffset="-3" yoffset="36" xadvance="28" page="0" chnl="15"/>
|
||||
<char id="43" x="155" y="89" width="30" height="30" xoffset="-4" yoffset="17" xadvance="20" page="0" chnl="15"/>
|
||||
<char id="45" x="82" y="325" width="25" height="14" xoffset="-3" yoffset="27" xadvance="18" page="0" chnl="15"/>
|
||||
<char id="61" x="97" y="489" width="31" height="21" xoffset="-3" yoffset="21" xadvance="24" page="0" chnl="15"/>
|
||||
<char id="46" x="154" y="176" width="16" height="16" xoffset="-2" yoffset="32" xadvance="11" page="0" chnl="15"/>
|
||||
<char id="44" x="101" y="82" width="15" height="22" xoffset="-3" yoffset="33" xadvance="9" page="0" chnl="15"/>
|
||||
<char id="47" x="209" y="220" width="28" height="46" xoffset="-4" yoffset="2" xadvance="20" page="0" chnl="15"/>
|
||||
<char id="124" x="209" y="268" width="13" height="48" xoffset="1" yoffset="7" xadvance="15" page="0" chnl="15"/>
|
||||
<char id="34" x="101" y="200" width="21" height="22" xoffset="-3" yoffset="7" xadvance="15" page="0" chnl="15"/>
|
||||
<char id="39" x="118" y="127" width="15" height="23" xoffset="-4" yoffset="7" xadvance="8" page="0" chnl="15"/>
|
||||
<char id="64" x="212" y="176" width="36" height="39" xoffset="-3" yoffset="8" xadvance="29" page="0" chnl="15"/>
|
||||
<char id="35" x="216" y="318" width="33" height="43" xoffset="-3" yoffset="5" xadvance="26" page="0" chnl="15"/>
|
||||
<char id="36" x="238" y="363" width="33" height="50" xoffset="-4" yoffset="3" xadvance="24" page="0" chnl="15"/>
|
||||
<char id="94" x="2" y="492" width="26" height="15" xoffset="-4" yoffset="3" xadvance="15" page="0" chnl="15"/>
|
||||
<char id="38" x="224" y="268" width="36" height="45" xoffset="-4" yoffset="3" xadvance="31" page="0" chnl="15"/>
|
||||
<char id="123" x="239" y="217" width="25" height="49" xoffset="-4" yoffset="6" xadvance="16" page="0" chnl="15"/>
|
||||
<char id="125" x="262" y="268" width="25" height="48" xoffset="-4" yoffset="6" xadvance="16" page="0" chnl="15"/>
|
||||
<char id="91" x="250" y="415" width="22" height="49" xoffset="-4" yoffset="6" xadvance="14" page="0" chnl="15"/>
|
||||
<char id="93" x="273" y="318" width="22" height="49" xoffset="-2" yoffset="6" xadvance="18" page="0" chnl="15"/>
|
||||
<char id="32" x="41" y="272" width="0" height="0" xoffset="0" yoffset="43" xadvance="10" page="0" chnl="15"/>
|
||||
<char id="48" x="216" y="140" width="28" height="32" xoffset="-3" yoffset="17" xadvance="22" page="0" chnl="15"/>
|
||||
<char id="49" x="194" y="375" width="21" height="34" xoffset="1" yoffset="13" xadvance="21" page="0" chnl="15"/>
|
||||
<char id="50" x="205" y="45" width="30" height="32" xoffset="-4" yoffset="16" xadvance="22" page="0" chnl="15"/>
|
||||
<char id="51" x="234" y="2" width="25" height="41" xoffset="-2" yoffset="12" xadvance="22" page="0" chnl="15"/>
|
||||
<char id="52" x="273" y="369" width="30" height="39" xoffset="-3" yoffset="13" xadvance="22" page="0" chnl="15"/>
|
||||
<char id="53" x="250" y="466" width="29" height="37" xoffset="-3" yoffset="15" xadvance="22" page="0" chnl="15"/>
|
||||
<char id="54" x="274" y="410" width="27" height="42" xoffset="-2" yoffset="6" xadvance="22" page="0" chnl="15"/>
|
||||
<char id="55" x="281" y="454" width="29" height="40" xoffset="-3" yoffset="12" xadvance="22" page="0" chnl="15"/>
|
||||
<char id="56" x="232" y="79" width="30" height="43" xoffset="-4" yoffset="6" xadvance="22" page="0" chnl="15"/>
|
||||
<char id="57" x="303" y="410" width="26" height="38" xoffset="-1" yoffset="15" xadvance="22" page="0" chnl="15"/>
|
||||
<char id="60" x="51" y="119" width="21" height="30" xoffset="-3" yoffset="13" xadvance="14" page="0" chnl="15"/>
|
||||
<char id="62" x="237" y="45" width="21" height="30" xoffset="-4" yoffset="13" xadvance="13" page="0" chnl="15"/>
|
||||
<char id="92" x="246" y="124" width="23" height="49" xoffset="-4" yoffset="6" xadvance="13" page="0" chnl="15"/>
|
||||
<char id="96" x="30" y="492" width="21" height="16" xoffset="-4" yoffset="0" xadvance="13" page="0" chnl="15"/>
|
||||
<char id="126" x="53" y="492" width="32" height="17" xoffset="-2" yoffset="23" xadvance="30" page="0" chnl="15"/>
|
||||
<char id="20070" x="312" y="450" width="45" height="48" xoffset="2" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="31461" x="261" y="2" width="46" height="51" xoffset="1" yoffset="1" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="29983" x="264" y="55" width="43" height="45" xoffset="3" yoffset="4" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="31168" x="266" y="175" width="47" height="48" xoffset="1" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="25165" x="271" y="102" width="44" height="46" xoffset="3" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="20030" x="289" y="225" width="49" height="49" xoffset="0" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="20154" x="315" y="150" width="42" height="45" xoffset="4" yoffset="4" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="35299" x="297" y="276" width="48" height="49" xoffset="0" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="20803" x="340" y="197" width="42" height="46" xoffset="4" yoffset="5" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="36129" x="305" y="327" width="45" height="45" xoffset="1" yoffset="5" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="22763" x="331" y="374" width="46" height="45" xoffset="1" yoffset="5" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="21516" x="347" y="245" width="44" height="45" xoffset="2" yoffset="4" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="36827" x="352" y="292" width="48" height="48" xoffset="0" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="20986" x="359" y="421" width="41" height="48" xoffset="3" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="36523" x="379" y="342" width="45" height="48" xoffset="2" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="25506" x="309" y="2" width="48" height="47" xoffset="-1" yoffset="4" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="33457" x="317" y="51" width="47" height="50" xoffset="1" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="27036" x="359" y="103" width="49" height="50" xoffset="-1" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="30524" x="359" y="2" width="47" height="47" xoffset="1" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="29366" x="366" y="51" width="47" height="47" xoffset="0" yoffset="4" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="32534" x="408" y="2" width="47" height="47" xoffset="0" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="20462" x="384" y="155" width="48" height="48" xoffset="-1" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="24220" x="410" y="100" width="44" height="49" xoffset="2" yoffset="1" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="19998" x="415" y="51" width="45" height="47" xoffset="1" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="32752" x="393" y="205" width="48" height="49" xoffset="1" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="26519" x="434" y="151" width="48" height="48" xoffset="0" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="23398" x="456" y="100" width="44" height="49" xoffset="3" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="24481" x="402" y="256" width="50" height="51" xoffset="-1" yoffset="1" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="21490" x="443" y="201" width="44" height="49" xoffset="3" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="20013" x="484" y="151" width="41" height="48" xoffset="4" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="35449" x="462" y="2" width="45" height="51" xoffset="1" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="20365" x="502" y="55" width="48" height="49" xoffset="0" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="37070" x="509" y="2" width="45" height="47" xoffset="2" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="22823" x="402" y="392" width="44" height="45" xoffset="2" yoffset="4" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="25991" x="402" y="439" width="46" height="49" xoffset="1" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="26354" x="426" y="309" width="43" height="45" xoffset="3" yoffset="4" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="26143" x="454" y="252" width="43" height="48" xoffset="3" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="30830" x="448" y="356" width="49" height="50" xoffset="-1" yoffset="1" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="23450" x="489" y="201" width="43" height="49" xoffset="3" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="35201" x="471" y="302" width="45" height="47" xoffset="2" yoffset="5" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="36864" x="499" y="252" width="46" height="47" xoffset="1" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="21527" x="527" y="106" width="47" height="46" xoffset="1" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="65311" x="317" y="103" width="25" height="45" xoffset="0" yoffset="9" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="65281" x="527" y="154" width="16" height="45" xoffset="4" yoffset="5" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="65292" x="271" y="150" width="15" height="22" xoffset="5" yoffset="32" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="12290" x="402" y="309" width="22" height="19" xoffset="1" yoffset="33" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="20998" x="534" y="201" width="47" height="47" xoffset="1" yoffset="4" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="20139" x="552" y="51" width="46" height="49" xoffset="2" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="22909" x="556" y="2" width="48" height="46" xoffset="1" yoffset="4" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="21451" x="576" y="102" width="44" height="49" xoffset="2" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="23545" x="576" y="153" width="47" height="46" xoffset="1" yoffset="4" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="20915" x="600" y="50" width="48" height="48" xoffset="0" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="25490" x="622" y="100" width="47" height="49" xoffset="1" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="34892" x="606" y="2" width="46" height="46" xoffset="1" yoffset="5" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="30591" x="654" y="2" width="50" height="51" xoffset="-1" yoffset="1" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="40511" x="450" y="408" width="50" height="49" xoffset="-2" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="28216" x="450" y="459" width="48" height="47" xoffset="0" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="25103" x="500" y="459" width="47" height="48" xoffset="0" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="26102" x="499" y="351" width="47" height="47" xoffset="0" yoffset="4" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="38388" x="518" y="301" width="43" height="45" xoffset="3" yoffset="5" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="21040" x="547" y="250" width="45" height="46" xoffset="1" yoffset="5" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="30475" x="583" y="201" width="44" height="47" xoffset="2" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="35270" x="625" y="151" width="49" height="47" xoffset="0" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="39057" x="502" y="400" width="48" height="47" xoffset="0" yoffset="4" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="22797" x="548" y="348" width="44" height="49" xoffset="2" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="27963" x="563" y="298" width="48" height="48" xoffset="0" yoffset="4" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="21457" x="549" y="449" width="43" height="47" xoffset="3" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="36215" x="671" y="55" width="47" height="49" xoffset="0" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="25361" x="552" y="399" width="46" height="48" xoffset="0" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="25112" x="594" y="348" width="46" height="48" xoffset="1" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="36755" x="706" y="2" width="48" height="49" xoffset="0" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="36194" x="594" y="449" width="46" height="51" xoffset="2" yoffset="1" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="19979" x="594" y="250" width="45" height="46" xoffset="1" yoffset="5" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="19968" x="549" y="498" width="41" height="12" xoffset="4" yoffset="19" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="20010" x="629" y="200" width="47" height="48" xoffset="1" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="21363" x="613" y="298" width="47" height="47" xoffset="2" yoffset="4" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="23558" x="676" y="106" width="50" height="50" xoffset="-1" yoffset="1" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="36229" x="600" y="398" width="47" height="49" xoffset="0" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="36234" x="642" y="347" width="48" height="48" xoffset="0" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="30340" x="720" y="53" width="47" height="48" xoffset="1" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="20320" x="642" y="449" width="48" height="50" xoffset="0" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="20102" x="756" y="2" width="41" height="47" xoffset="4" yoffset="4" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="22833" x="649" y="397" width="43" height="47" xoffset="2" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="36133" x="692" y="446" width="48" height="47" xoffset="1" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="20877" x="662" y="250" width="45" height="47" xoffset="2" yoffset="5" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="26469" x="678" y="158" width="44" height="48" xoffset="3" yoffset="4" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="23616" x="692" y="299" width="44" height="47" xoffset="2" yoffset="4" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="25104" x="709" y="208" width="44" height="48" xoffset="2" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="21151" x="694" y="348" width="46" height="49" xoffset="1" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="36807" x="724" y="158" width="48" height="46" xoffset="1" yoffset="4" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="20851" x="728" y="103" width="46" height="48" xoffset="0" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="24685" x="769" y="51" width="48" height="49" xoffset="0" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="21916" x="738" y="258" width="49" height="51" xoffset="-1" yoffset="1" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="20026" x="799" y="2" width="44" height="47" xoffset="2" yoffset="4" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="21319" x="755" y="206" width="45" height="46" xoffset="2" yoffset="4" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="32423" x="774" y="153" width="47" height="48" xoffset="1" yoffset="4" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="29609" x="694" y="399" width="48" height="45" xoffset="0" yoffset="6" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="26597" x="776" y="102" width="44" height="48" xoffset="1" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="20840" x="819" y="51" width="46" height="46" xoffset="0" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="37096" x="822" y="99" width="48" height="49" xoffset="0" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="21382" x="845" y="2" width="42" height="46" xoffset="4" yoffset="5" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="26368" x="742" y="446" width="48" height="51" xoffset="0" yoffset="1" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="39640" x="742" y="311" width="41" height="48" xoffset="4" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="26412" x="744" y="361" width="48" height="49" xoffset="0" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="27425" x="792" y="412" width="47" height="49" xoffset="0" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="24471" x="789" y="254" width="48" height="49" xoffset="0" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="32676" x="867" y="50" width="47" height="47" xoffset="0" yoffset="4" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="27599" x="789" y="305" width="48" height="50" xoffset="1" yoffset="1" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="21608" x="889" y="2" width="41" height="45" xoffset="5" yoffset="4" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="26356" x="792" y="463" width="42" height="46" xoffset="3" yoffset="5" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="26032" x="802" y="203" width="48" height="49" xoffset="0" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="19978" x="836" y="463" width="45" height="42" xoffset="2" yoffset="6" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="39029" x="823" y="150" width="39" height="47" xoffset="5" yoffset="4" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="39764" x="794" y="357" width="44" height="50" xoffset="2" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="26041" x="839" y="254" width="45" height="47" xoffset="2" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="22681" x="839" y="303" width="49" height="50" xoffset="-2" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="25214" x="852" y="199" width="47" height="48" xoffset="0" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="19981" x="864" y="150" width="47" height="43" xoffset="0" yoffset="7" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="22359" x="872" y="99" width="49" height="48" xoffset="0" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="28857" x="886" y="249" width="45" height="49" xoffset="2" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="20987" x="916" y="49" width="46" height="46" xoffset="1" yoffset="4" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="25353" x="901" y="195" width="48" height="49" xoffset="0" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="32426" x="913" y="149" width="47" height="44" xoffset="1" yoffset="4" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="24405" x="923" y="97" width="48" height="46" xoffset="0" yoffset="4" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="36992" x="840" y="355" width="46" height="48" xoffset="1" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="35831" x="841" y="405" width="48" height="48" xoffset="0" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="24320" x="888" y="355" width="47" height="47" xoffset="1" yoffset="5" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="22987" x="890" y="300" width="49" height="48" xoffset="0" yoffset="4" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="22810" x="933" y="246" width="38" height="50" xoffset="5" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="28040" x="951" y="195" width="46" height="49" xoffset="0" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="65306" x="61" y="278" width="16" height="33" xoffset="4" yoffset="21" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="12288" x="43" y="272" width="0" height="0" xoffset="0" yoffset="43" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="20108" x="932" y="2" width="46" height="35" xoffset="1" yoffset="8" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="24687" x="883" y="455" width="45" height="49" xoffset="2" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="36890" x="962" y="145" width="48" height="48" xoffset="0" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="32473" x="891" y="404" width="46" height="49" xoffset="0" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="23567" x="937" y="350" width="49" height="47" xoffset="-1" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="20249" x="941" y="298" width="48" height="47" xoffset="-1" yoffset="4" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="20276" x="973" y="246" width="48" height="48" xoffset="0" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="21543" x="999" y="195" width="48" height="47" xoffset="0" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="20934" x="930" y="455" width="46" height="50" xoffset="1" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="22791" x="939" y="399" width="47" height="50" xoffset="1" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="31561" x="964" y="39" width="47" height="50" xoffset="1" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="24453" x="973" y="91" width="48" height="50" xoffset="0" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="21152" x="1012" y="143" width="50" height="48" xoffset="-1" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="20837" x="978" y="451" width="44" height="42" xoffset="2" yoffset="6" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="26187" x="1013" y="2" width="48" height="48" xoffset="1" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="31215" x="1023" y="52" width="50" height="45" xoffset="-2" yoffset="5" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="21019" x="1063" y="2" width="47" height="48" xoffset="-1" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="24314" x="988" y="347" width="47" height="49" xoffset="0" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="24050" x="991" y="296" width="39" height="43" xoffset="4" yoffset="5" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="37325" x="1023" y="244" width="43" height="47" xoffset="3" yoffset="4" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="25151" x="1049" y="193" width="45" height="49" xoffset="1" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="35265" x="988" y="398" width="44" height="46" xoffset="3" yoffset="4" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="28385" x="1032" y="293" width="48" height="48" xoffset="-2" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="31163" x="1024" y="446" width="44" height="49" xoffset="3" yoffset="3" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="25955" x="1064" y="99" width="48" height="50" xoffset="1" yoffset="2" xadvance="48" page="0" chnl="15"/>
|
||||
<char id="32" x="0" y="0" width="0" height="0" xoffset="1" yoffset="2" xadvance="10" page="0" chnl="15"/>
|
||||
</chars>
|
||||
</font>
|
7
assets/textures/xmlBMFont.fnt.meta
Normal file
7
assets/textures/xmlBMFont.fnt.meta
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "4c95de7e-8cca-47bf-a446-47b7594e0992",
|
||||
"textureUuid": "a5454758-921f-46ab-a314-0a7936d03be7",
|
||||
"fontSize": 48,
|
||||
"subMetas": {}
|
||||
}
|
BIN
assets/textures/xmlBMFont.png
Executable file
BIN
assets/textures/xmlBMFont.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 329 KiB |
34
assets/textures/xmlBMFont.png.meta
Normal file
34
assets/textures/xmlBMFont.png.meta
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"ver": "2.3.3",
|
||||
"uuid": "a5454758-921f-46ab-a314-0a7936d03be7",
|
||||
"type": "sprite",
|
||||
"wrapMode": "clamp",
|
||||
"filterMode": "bilinear",
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"xmlBMFont": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "3982ad46-6016-4e58-a083-8fe4d8866553",
|
||||
"rawTextureUuid": "a5454758-921f-46ab-a314-0a7936d03be7",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 2,
|
||||
"trimY": 2,
|
||||
"width": 1110,
|
||||
"height": 508,
|
||||
"rawWidth": 1114,
|
||||
"rawHeight": 512,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"subMetas": {}
|
||||
}
|
||||
}
|
||||
}
|
2
creator.d.ts
vendored
2
creator.d.ts
vendored
@ -1633,7 +1633,7 @@ declare namespace cc {
|
||||
var v4 = cc.v4({x: 100, y: 100, z: 0});
|
||||
```
|
||||
*/
|
||||
export function v4(x?: number|any, y?: number, z?: number): Vec4;
|
||||
export function v4(x?: number|any, y?: number, z?: number, w?: number): Vec4;
|
||||
export var dynamicAtlasManager: DynamicAtlasManager;
|
||||
/** !#en
|
||||
cc.NodePool is the cache pool designed for node type.<br/>
|
||||
|
@ -8,28 +8,28 @@
|
||||
"group-list": [
|
||||
"default"
|
||||
],
|
||||
"start-scene": "2d2f792f-a40c-49bb-a189-ed176a246e49",
|
||||
"design-resolution-width": 960,
|
||||
"design-resolution-height": 640,
|
||||
"fit-width": false,
|
||||
"fit-height": true,
|
||||
"use-project-simulator-setting": false,
|
||||
"simulator-orientation": false,
|
||||
"use-customize-simulator": false,
|
||||
"use-customize-simulator": true,
|
||||
"simulator-resolution": {
|
||||
"width": 960,
|
||||
"height": 640
|
||||
"height": 640,
|
||||
"width": 960
|
||||
},
|
||||
"last-module-event-record-time": 1575989336079,
|
||||
"assets-sort-type": "name",
|
||||
"facebook": {
|
||||
"enable": false,
|
||||
"appID": "",
|
||||
"live": {
|
||||
"enable": false
|
||||
},
|
||||
"audience": {
|
||||
"enable": false
|
||||
},
|
||||
"enable": false,
|
||||
"live": {
|
||||
"enable": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"start-scene": "current"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user