|
|
@ -58,6 +58,7 @@ import { ModelInfo_mark_multiArrow } from '../model/info/mark/other/mark-plan-mu |
|
|
|
import { ModelInfo_mark_particle } from '../model/info/mark/other/mark-plan-particle-info'; |
|
|
|
import { ModelInfo_mark_particle } from '../model/info/mark/other/mark-plan-particle-info'; |
|
|
|
import { FacilityPosType, ModelData_facility } from '../model/data/model-data/model-data-facility'; |
|
|
|
import { FacilityPosType, ModelData_facility } from '../model/data/model-data/model-data-facility'; |
|
|
|
import { LoadTool } from '../tool/load-tool'; |
|
|
|
import { LoadTool } from '../tool/load-tool'; |
|
|
|
|
|
|
|
import { flatten } from 'earcut'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//场景管理器
|
|
|
|
//场景管理器
|
|
|
@ -78,7 +79,7 @@ export class SceneManager { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static s_openLight: boolean = true;//开启光照效果(关闭是要同时关闭阴影)
|
|
|
|
static s_openLight: boolean = true;//开启光照效果(关闭是要同时关闭阴影)
|
|
|
|
static s_openShadow: boolean = true;//开启阴影(必须开启阴影)
|
|
|
|
static s_openShadow: boolean = true;//开启阴影(必须开启光照)
|
|
|
|
static s_openSkyBox: boolean = true;//使用天空盒
|
|
|
|
static s_openSkyBox: boolean = true;//使用天空盒
|
|
|
|
static s_environmentCubeTexture: CubeTexture;//环境所用的cubeTexture
|
|
|
|
static s_environmentCubeTexture: CubeTexture;//环境所用的cubeTexture
|
|
|
|
static s_openEnvironmentReflection: boolean = true;//使用环境反射
|
|
|
|
static s_openEnvironmentReflection: boolean = true;//使用环境反射
|
|
|
@ -232,7 +233,7 @@ export class SceneManager { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
else { |
|
|
|
if (this.sunLight == null) { |
|
|
|
if (this.sunLight != null) { |
|
|
|
this.sunLight.setEnabled(false); |
|
|
|
this.sunLight.setEnabled(false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -244,7 +245,7 @@ export class SceneManager { |
|
|
|
* 初始化阴影 |
|
|
|
* 初始化阴影 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public updateShadow() { |
|
|
|
public updateShadow() { |
|
|
|
if (SceneManager.s_openShadow) { |
|
|
|
if (SceneManager.s_openLight && SceneManager.s_openShadow) { |
|
|
|
if (this.shadowGenerator == null) { |
|
|
|
if (this.shadowGenerator == null) { |
|
|
|
this.shadowGenerator = new ShadowGenerator(2048, this.sunLight); |
|
|
|
this.shadowGenerator = new ShadowGenerator(2048, this.sunLight); |
|
|
|
} |
|
|
|
} |
|
|
|