import { Laya } from "Laya" ; import { Camera } from "laya/d3/core/Camera" ; import { Scene3D } from "laya/d3/core/scene/Scene3D" ; import { Vector3 } from "laya/d3/math/Vector3" ; import { Vector4 } from "laya/d3/math/Vector4" ; import { Stage } from "laya/display/Stage" ; import { Handler } from "laya/utils/Handler" ; import { Stat } from "laya/utils/Stat" ; import { Laya3D } from "Laya3D" ; import { CameraMoveScript } from "../common/CameraMoveScript" ; export class SceneLoad1 { constructor ( ) { Laya3D . init ( 0 , 0 ) ; Stat . show ( ) ; Laya . stage . scaleMode = Stage . SCALE_FULL ; Laya . stage . screenMode = Stage . SCREEN_NONE ; Scene3D . load ( "res/threeDimen/scene/LayaScene_dudeScene/Conventional/dudeScene.ls" , Handler . create ( this , function ( scene ) : void { ( < Scene3D > Laya . stage . addChild ( scene ) ) ; var camera = ( < Camera > scene . getChildByName ( "Camera" ) ) ; camera . transform . position = new Vector3 ( 0 , 0.81 , - 1.85 ) ; camera . transform . rotate ( new Vector3 ( 0 , 0 , 0 ) , true , false ) ; camera . fieldOfView = 60 ; camera . clearColor = new Vector4 ( 0 , 0 , 0.6 , 1 ) ; camera . addComponent ( CameraMoveScript ) ; } ) ) ; } }