Open jeremyjia opened 1 year ago
问题描述: 测试当同一个插件多次引用的时候,在相同的frameRange的时候,期望应该出现叠加效果,但实际效果并未叠加
原因分析: 经调查,即使是两个不同的插件在同样的frameRange区间,也没有出现叠加效果, 原因是如下代码引起的,目前每个插件都设置下面这句话 ctx.clearRect(0, 0, w, h); 这句话在Java引擎的代码中,会清除之前的绘制 public void clearRect(int x, int y, int width, int height) { graphics.clearRect(x, y, width, height); } Graphics2D graphics
两个解决办法: 插件层面自行解决:根据业务需求决定是否调用ctx.clearRect(0, 0, w, h); 剧本层面解决: 增加ForceOverlapped:"true",这个标记表示不管插件那边是否调用clearRect,Java这边都不会清除,这样就保留的叠加效果
问题描述: 测试当同一个插件多次引用的时候,在相同的frameRange的时候,期望应该出现叠加效果,但实际效果并未叠加
原因分析: 经调查,即使是两个不同的插件在同样的frameRange区间,也没有出现叠加效果, 原因是如下代码引起的,目前每个插件都设置下面这句话 ctx.clearRect(0, 0, w, h); 这句话在Java引擎的代码中,会清除之前的绘制 public void clearRect(int x, int y, int width, int height) { graphics.clearRect(x, y, width, height); } Graphics2D graphics
两个解决办法: 插件层面自行解决:根据业务需求决定是否调用ctx.clearRect(0, 0, w, h); 剧本层面解决: 增加ForceOverlapped:"true",这个标记表示不管插件那边是否调用clearRect,Java这边都不会清除,这样就保留的叠加效果