[LayaAirIDE 2.0]新版版2d粒子问题?同样的代码,LayaAir IDE 2.1.0版本正常,LayaAir IDE 2.2.0beta2版本报错
Laya.stage.on(Laya.Event.CLICK, this, () => {
Laya.loader.load("HallAni/star.part", Laya.Handler.create(this, (settings) => {
let Particle2D = Laya.Particle2D;
// 创建 Particle2D 实例
let partIns = new Particle2D(settings);
Laya.stage.addChild(partIns);
// 开始发射粒子
partIns.emitter.start(0.5);
// 播放
partIns.play();
partIns.x = Laya.stage.mouseX;
partIns.y = Laya.stage.mouseY;
}), null, Laya.Loader.JSON);
})
错误信息:TypeError: Failed to execute 'attachShader' on 'WebGL2RenderingContext': parameter 2 is not of type 'WebGLShader'
Laya.loader.load("HallAni/star.part", Laya.Handler.create(this, (settings) => {
let Particle2D = Laya.Particle2D;
// 创建 Particle2D 实例
let partIns = new Particle2D(settings);
Laya.stage.addChild(partIns);
// 开始发射粒子
partIns.emitter.start(0.5);
// 播放
partIns.play();
partIns.x = Laya.stage.mouseX;
partIns.y = Laya.stage.mouseY;
}), null, Laya.Loader.JSON);
})
错误信息:TypeError: Failed to execute 'attachShader' on 'WebGL2RenderingContext': parameter 2 is not of type 'WebGLShader'
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
1554865771用户
赞同来自: