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'