@shapediver/viewer.rendering-engine.light-engine
Advanced tools
Comparing version 2.4.2 to 2.5.0
@@ -139,7 +139,2 @@ "use strict"; | ||
} | ||
// this can only be the case if the settings were empty, therefore we assign the new light scene | ||
else { | ||
const ls = this.createLightScene({ name: 'standard', standard: true }); | ||
this._lightScenes[ls.id] = ls; | ||
} | ||
if (this._update) | ||
@@ -210,3 +205,3 @@ this._update(); | ||
saveSettings(settingsEngine) { | ||
settingsEngine.light.lightSceneId = this.lightScene ? this.lightScene.id : 'standard'; | ||
settingsEngine.light.lightSceneId = this.lightScene ? this.lightScene.id : undefined; | ||
const converted = {}; | ||
@@ -213,0 +208,0 @@ for (let lightSceneId in this._lightScenes) { |
@@ -18,3 +18,3 @@ "use strict"; | ||
color: properties.color || '#ffffff', | ||
intensity: properties.intensity !== undefined ? properties.intensity : 0.5, | ||
intensity: properties.intensity !== undefined ? properties.intensity : 1, | ||
type: ILight_1.LIGHT_TYPE.AMBIENT, | ||
@@ -21,0 +21,0 @@ name: properties.name, |
@@ -25,3 +25,3 @@ "use strict"; | ||
color: properties.color || '#ffffff', | ||
intensity: properties.intensity !== undefined ? properties.intensity : 0.5, | ||
intensity: properties.intensity !== undefined ? properties.intensity : 1, | ||
type: ILight_1.LIGHT_TYPE.DIRECTIONAL, | ||
@@ -33,3 +33,3 @@ name: properties.name, | ||
// #region Properties (4) | ||
_DirectionalLight_castShadow.set(this, false); | ||
_DirectionalLight_castShadow.set(this, true); | ||
_DirectionalLight_direction.set(this, gl_matrix_1.vec3.fromValues(-1, 0, 1)); | ||
@@ -41,3 +41,3 @@ _DirectionalLight_shadowMapBias.set(this, -0.003); | ||
__classPrivateFieldSet(this, _DirectionalLight_direction, properties.direction, "f"); | ||
if (properties.castShadow) | ||
if (properties.castShadow !== undefined) | ||
__classPrivateFieldSet(this, _DirectionalLight_castShadow, properties.castShadow, "f"); | ||
@@ -44,0 +44,0 @@ if (properties.shadowMapResolution) |
@@ -24,3 +24,3 @@ "use strict"; | ||
color: properties.color || '#ffffff', | ||
intensity: properties.intensity !== undefined ? properties.intensity : 0.5, | ||
intensity: properties.intensity !== undefined ? properties.intensity : 1, | ||
type: ILight_1.LIGHT_TYPE.HEMISPHERE, | ||
@@ -32,3 +32,3 @@ name: properties.name, | ||
// #region Properties (1) | ||
_HemisphereLight_groundColor.set(this, '#ffffff'); | ||
_HemisphereLight_groundColor.set(this, '#000000'); | ||
_HemisphereLight_threeJsObject.set(this, {}); | ||
@@ -35,0 +35,0 @@ if (properties.groundColor) |
@@ -25,3 +25,3 @@ "use strict"; | ||
color: properties.color || '#ffffff', | ||
intensity: properties.intensity !== undefined ? properties.intensity : 0.5, | ||
intensity: properties.intensity !== undefined ? properties.intensity : 1, | ||
type: ILight_1.LIGHT_TYPE.POINT, | ||
@@ -33,3 +33,3 @@ name: properties.name, | ||
// #region Properties (3) | ||
_PointLight_decay.set(this, 2); | ||
_PointLight_decay.set(this, 0); | ||
_PointLight_distance.set(this, 0); | ||
@@ -36,0 +36,0 @@ _PointLight_position.set(this, gl_matrix_1.vec3.fromValues(0, 0, 0)); |
@@ -25,3 +25,3 @@ "use strict"; | ||
color: properties.color || '#ffffff', | ||
intensity: properties.intensity !== undefined ? properties.intensity : 0.5, | ||
intensity: properties.intensity !== undefined ? properties.intensity : 1, | ||
type: ILight_1.LIGHT_TYPE.SPOT, | ||
@@ -34,3 +34,3 @@ name: properties.name, | ||
_SpotLight_angle.set(this, Math.PI / 4.0); | ||
_SpotLight_decay.set(this, 1); | ||
_SpotLight_decay.set(this, 0); | ||
_SpotLight_distance.set(this, 0); | ||
@@ -37,0 +37,0 @@ _SpotLight_penumbra.set(this, 0.5); |
{ | ||
"name": "@shapediver/viewer.rendering-engine.light-engine", | ||
"version": "2.4.2", | ||
"version": "2.5.0", | ||
"description": "", | ||
@@ -42,11 +42,11 @@ "keywords": [], | ||
"dependencies": { | ||
"@shapediver/viewer.rendering-engine.rendering-engine": "2.4.2", | ||
"@shapediver/viewer.rendering-engine.rendering-engine": "2.5.0", | ||
"@shapediver/viewer.settings": "0.1.36", | ||
"@shapediver/viewer.shared.node-tree": "2.4.2", | ||
"@shapediver/viewer.shared.services": "2.4.2", | ||
"@shapediver/viewer.shared.types": "2.4.2", | ||
"@shapediver/viewer.shared.node-tree": "2.5.0", | ||
"@shapediver/viewer.shared.services": "2.5.0", | ||
"@shapediver/viewer.shared.types": "2.5.0", | ||
"gl-matrix": "3.3.0", | ||
"tsyringe": "^4.5.0" | ||
}, | ||
"gitHead": "d830aeb2369059c7b8cd4e2bf9edd0db517878db" | ||
"gitHead": "bb8b2ae01b5f5d4f9c2e4005744578e60faee058" | ||
} |
@@ -162,7 +162,3 @@ import { container, singleton } from 'tsyringe' | ||
} | ||
// this can only be the case if the settings were empty, therefore we assign the new light scene | ||
else { | ||
const ls = <LightScene>this.createLightScene({ name: 'standard', standard: true }); | ||
this._lightScenes[ls.id] = ls; | ||
} | ||
if(this._update) this._update(); | ||
@@ -240,3 +236,3 @@ } | ||
public saveSettings(settingsEngine: SettingsEngine) { | ||
settingsEngine.light.lightSceneId = this.lightScene ? this.lightScene.id : 'standard'; | ||
settingsEngine.light.lightSceneId = this.lightScene ? this.lightScene.id : undefined; | ||
@@ -243,0 +239,0 @@ const converted: ILightSceneSettingsV3 = {}; |
@@ -25,3 +25,3 @@ import { ITreeNodeData } from '@shapediver/viewer.shared.node-tree' | ||
color: properties.color || '#ffffff', | ||
intensity: properties.intensity !== undefined ? properties.intensity : 0.5, | ||
intensity: properties.intensity !== undefined ? properties.intensity : 1, | ||
type: LIGHT_TYPE.AMBIENT, | ||
@@ -28,0 +28,0 @@ name: properties.name, |
@@ -11,3 +11,3 @@ import { ITreeNodeData } from '@shapediver/viewer.shared.node-tree' | ||
#castShadow: boolean = false; | ||
#castShadow: boolean = true; | ||
#direction: vec3 = vec3.fromValues(-1, 0, 1); | ||
@@ -35,3 +35,3 @@ #shadowMapBias: number = -0.003; | ||
color: properties.color || '#ffffff', | ||
intensity: properties.intensity !== undefined ? properties.intensity : 0.5, | ||
intensity: properties.intensity !== undefined ? properties.intensity : 1, | ||
type: LIGHT_TYPE.DIRECTIONAL, | ||
@@ -44,3 +44,3 @@ name: properties.name, | ||
if(properties.direction) this.#direction = properties.direction; | ||
if(properties.castShadow) this.#castShadow = properties.castShadow; | ||
if(properties.castShadow !== undefined) this.#castShadow = properties.castShadow; | ||
if(properties.shadowMapResolution) this.#shadowMapResolution = properties.shadowMapResolution; | ||
@@ -47,0 +47,0 @@ if(properties.shadowMapBias) this.#shadowMapBias = properties.shadowMapBias; |
@@ -11,3 +11,3 @@ import { ITreeNodeData } from '@shapediver/viewer.shared.node-tree' | ||
#groundColor: string = '#ffffff'; | ||
#groundColor: string = '#000000'; | ||
#threeJsObject: { [key: string]: THREE.HemisphereLight } = {}; | ||
@@ -29,3 +29,3 @@ | ||
color: properties.color || '#ffffff', | ||
intensity: properties.intensity !== undefined ? properties.intensity : 0.5, | ||
intensity: properties.intensity !== undefined ? properties.intensity : 1, | ||
type: LIGHT_TYPE.HEMISPHERE, | ||
@@ -32,0 +32,0 @@ name: properties.name, |
@@ -11,3 +11,3 @@ import { ITreeNodeData } from '@shapediver/viewer.shared.node-tree' | ||
#decay: number = 2; | ||
#decay: number = 0; | ||
#distance: number = 0; | ||
@@ -33,3 +33,3 @@ #position: vec3 = vec3.fromValues(0, 0, 0); | ||
color: properties.color || '#ffffff', | ||
intensity: properties.intensity !== undefined ? properties.intensity : 0.5, | ||
intensity: properties.intensity !== undefined ? properties.intensity : 1, | ||
type: LIGHT_TYPE.POINT, | ||
@@ -36,0 +36,0 @@ name: properties.name, |
@@ -12,3 +12,3 @@ import { ITreeNodeData } from '@shapediver/viewer.shared.node-tree' | ||
#angle: number = Math.PI / 4.0; | ||
#decay: number = 1; | ||
#decay: number = 0; | ||
#distance: number = 0; | ||
@@ -39,3 +39,3 @@ #penumbra: number = 0.5; | ||
color: properties.color || '#ffffff', | ||
intensity: properties.intensity !== undefined ? properties.intensity : 0.5, | ||
intensity: properties.intensity !== undefined ? properties.intensity : 1, | ||
type: LIGHT_TYPE.SPOT, | ||
@@ -42,0 +42,0 @@ name: properties.name, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
147063
2222
+ Added@shapediver/viewer.rendering-engine.rendering-engine@2.5.0(transitive)
+ Added@shapediver/viewer.shared.build-data@2.5.0(transitive)
+ Added@shapediver/viewer.shared.math@2.5.0(transitive)
+ Added@shapediver/viewer.shared.node-tree@2.5.0(transitive)
+ Added@shapediver/viewer.shared.services@2.5.0(transitive)
+ Added@shapediver/viewer.shared.types@2.5.0(transitive)
- Removed@shapediver/viewer.rendering-engine.rendering-engine@2.4.2(transitive)
- Removed@shapediver/viewer.shared.build-data@2.4.2(transitive)
- Removed@shapediver/viewer.shared.math@2.4.2(transitive)
- Removed@shapediver/viewer.shared.node-tree@2.4.2(transitive)
- Removed@shapediver/viewer.shared.services@2.4.2(transitive)
- Removed@shapediver/viewer.shared.types@2.4.2(transitive)
Updated@shapediver/viewer.rendering-engine.rendering-engine@2.5.0