var resPath = "res/LayaScene_GameScene/Conventional/GameScene.ls"
Laya.Scene3D.load(resPath,Laya.Handler.create(this,function(scene) {
//加载完成获取到了Scene3d
Laya.stage.addChild(scene);
//获取摄像机
var camera = scene.getChildByName("MainCamera");
//添加光照
this.directionLight = new Laya.DirectionLight()
//this.directionLight = scene.addChild(new Laya.DirectionLight());
//设置灯光颜色
this.directionLight.shadow = true
this.directionLight.color = new Laya.Vector3(1, 1, 1);
scene.addChild(this.directionLight)
var mat = this.directionLight.transform.worldMatrix;
mat.setForward(new Laya.Vector3(-1.0, -1.0, -1.0));
this.directionLight.transform.worldMatrix = mat;
this.d