import { Laya } from "Laya" ; import { Camera } from "laya/d3/core/Camera" ; import { Scene3D } from "laya/d3/core/scene/Scene3D" ; import { Stage } from "laya/display/Stage" ; import { Handler } from "laya/utils/Handler" ; import { Stat } from "laya/utils/Stat" ; import { Laya3D } from "Laya3D" ; import { PixelLineSprite3D } from "laya/d3/core/pixelLine/PixelLineSprite3D" ; import { ReflectionProbe } from "laya/d3/core/reflectionProbe/ReflectionProbe" ; import { Utils3D } from "laya/d3/utils/Utils3D" ; import { CameraMoveScript } from "../common/CameraMoveScript" ; import { Color } from "laya/d3/math/Color" ; export class ReflectionProbeDemo { constructor ( ) { Laya3D . init ( 0 , 0 ) ; Stat . show ( ) ; Laya . stage . scaleMode = Stage . SCALE_FULL ; Laya . stage . screenMode = Stage . SCREEN_NONE ; Scene3D . load ( "res/threeDimen/ReflectionProbeDemo/Conventional/outpost with snow.ls" , Handler . create ( this , function ( scene ) : void { ( < Scene3D > Laya . stage . addChild ( scene ) ) ; var camera = ( < Camera > scene . getChildByName ( "Camera" ) ) ; camera . addComponent ( CameraMoveScript ) ; var reflectionProb = scene . getChildByName ( "ReflectionProb" ) as ReflectionProbe ; var lineSprite3D = new PixelLineSprite3D ( 50 , null ) ; scene . addChild ( lineSprite3D ) ; Utils3D . _drawBound ( lineSprite3D , reflectionProb . bounds . _boundBox , Color . RED ) ; } ) ) ; } }