[LayaAirIDE 2.0]ReferenceError: Laya3D is not defined?
我按着官方实例写的,为什么老是提示我没有定义场景?
ReferenceError: Laya3D is not defined
preload.js:55
at new HelloWord3D (file:///E:/LayaWorkSpace/HelloWord3D1/bin/js/bundle.js:26:9)
at Object.1 (file:///E:/LayaWorkSpace/HelloWord3D1/bin/js/bundle.js:44:1)
at o (file:///E:/LayaWorkSpace/HelloWord3D1/bin/js/bundle.js:11:265)
at r (file:///E:/LayaWorkSpace/HelloWord3D1/bin/js/bundle.js:11:431)
at file:///E:/LayaWorkSpace/HelloWord3D1/bin/js/bundle.js:11:460
Laya3D.init(600, 600,true);
Laya.Stat.show();
Laya.stage.scaleMode = Laya.Stage.SCALE_FULL;
Laya.stage.screenMode = Laya.Stage.SCREEN_NONE;
Laya.Scene3D.load("LayaScene_Main/Conventional/Main.ls", Laya.Handler.create(null, function(scene:Laya.Scene3D):void {
Laya.stage.addChild(scene) as Laya.Scene3D;
var camera:Laya.Camera = scene.getChildByName("Main Camera") as Laya.Camera;
//camera.addComponent(CameraMoveScript);
}));
ReferenceError: Laya3D is not defined
preload.js:55
at new HelloWord3D (file:///E:/LayaWorkSpace/HelloWord3D1/bin/js/bundle.js:26:9)
at Object.1 (file:///E:/LayaWorkSpace/HelloWord3D1/bin/js/bundle.js:44:1)
at o (file:///E:/LayaWorkSpace/HelloWord3D1/bin/js/bundle.js:11:265)
at r (file:///E:/LayaWorkSpace/HelloWord3D1/bin/js/bundle.js:11:431)
at file:///E:/LayaWorkSpace/HelloWord3D1/bin/js/bundle.js:11:460
Laya3D.init(600, 600,true);
Laya.Stat.show();
Laya.stage.scaleMode = Laya.Stage.SCALE_FULL;
Laya.stage.screenMode = Laya.Stage.SCREEN_NONE;
Laya.Scene3D.load("LayaScene_Main/Conventional/Main.ls", Laya.Handler.create(null, function(scene:Laya.Scene3D):void {
Laya.stage.addChild(scene) as Laya.Scene3D;
var camera:Laya.Camera = scene.getChildByName("Main Camera") as Laya.Camera;
//camera.addComponent(CameraMoveScript);
}));
没有找到相关结果
已邀请:
要回复问题请先登录
0 个回复