WebGAL
WebGAL copied to clipboard
feat: add stage target
介绍
新增 stage-main 目标, 意为主舞台, 是 figuireContainer bgContainer 的父级
可通过 setTransform setAnimation 设置参数 -target=stage-main 为其设置动画
主要更改
- 新增根容器
mainStageContainer - 新增
stage-main目标 -
initState现有一个常驻的主舞台 effect, 因为需要避免触发 alpha:0 的出场动画
测试
changeBg: bg.png -next;
changeFigure: stand.png -next;
changeFigure: stand.png -left -next;
changeFigure: stand.png -right -next;
setVar: targetId=`stage-main`;
:;
label: loop;
setAnimation: blur -target={targetId} -next;
: setAnimation: blur;
setAnimation: shockwaveOut -target={targetId} -next;
: setAnimation: shockwaveOut;
setAnimation: shake -target={targetId} -next;
: setAnimation: shake;
setTransform: {} -target={targetId} -duration=1000 -next;
: {};
setTransform: { "position":{ "x":-500 } } -target={targetId} -duration=1000 -next;
: { "position":{ "x":-500 } };
setTransform: { "position":{ "x":500 } } -target={targetId} -duration=1000 -next;
: { "position":{ "x":500 } };
setTransform: {"position":{"y":300}} -target={targetId} -duration=1000 -next;
: { "position":{ "y":300 } };
setTransform: { "scale":{ "x":1.5, "y":1.5 } } -target={targetId} -duration=1000 -next;
: { "scale":{ "x":1.5, "y":1.5 } };
setTransform: { "scale":{ "x":-1.5, "y":1.5 } } -target={targetId} -duration=1000 -next;
: { "scale":{ "x":-1.5, "y":1.5 } };
setTransform: {} -target={targetId} -duration=1000 -next;
: {};
setTransform: { "blur":20 } -target={targetId} -duration=1000 -next;
: { "blur":20 };
setTransform: { "saturation":0.2 } -target={targetId} -duration=1000 -next;
: { "saturation":0.2 };
setTransform: { "godrayFilm":1 } -target={targetId} -duration=1000 -next;
: { "godrayFilm":1 };
setTransform: { "godrayFilm":0, "bloom":0.5, "bloomBrightness":0.5, "bloomBlur":3, "contrast":1.2, "gamma":0.8 } -target={targetId} -duration=1000 -next;
: { "godrayFilm":0, "bloom":0.5, "bloomBrightness":0.5, "bloomBlur":3, "contrast":1.2, "gamma":0.8 };
jumpLabel: loop;