star_mod_renderer
Advanced tools
Comparing version 1.0.77 to 1.0.78
@@ -532,3 +532,3 @@ import * as THREE from 'star_mod_custom_three'; | ||
if (child.material) { | ||
child.material.envMap = envMap; | ||
// child.material.envMap = envMap; | ||
child.material.envMapIntensity = 1; | ||
@@ -535,0 +535,0 @@ child.material.needsUpdate = true; |
@@ -0,0 +0,0 @@ import { |
{ | ||
"name": "star_mod_renderer", | ||
"version": "1.0.77", | ||
"version": "1.0.78", | ||
"description": "star mod project render auxiliary", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -146,3 +146,7 @@ /** | ||
// 灯光初始化 | ||
this.initLights(); | ||
if (this.options.isFashion) { | ||
this.initFashionLights(); | ||
} else { | ||
this.initLights(); | ||
} | ||
// 事件注册初始化 | ||
@@ -242,2 +246,46 @@ this.initSignal(); | ||
initFashionLights() { | ||
this.ambientLight = new THREE.AmbientLight( | ||
'#ffffff', | ||
0.31 | ||
); | ||
this.hemisphereLight = new THREE.HemisphereLight( | ||
'#ffffff', | ||
'#ffffff', | ||
0.31 | ||
); | ||
this.directionalLights = [ | ||
new THREE.DirectionalLight( | ||
'#ffffff', | ||
0.63 | ||
), | ||
new THREE.DirectionalLight( | ||
'#ffffff', | ||
0.4 | ||
), | ||
new THREE.DirectionalLight( | ||
'#ffffff', | ||
0.22 | ||
), | ||
]; | ||
this.addModel(this.ambientLight); | ||
this.addModel(this.hemisphereLight); | ||
this.directionalLights[0].position.set(426, 240, 131); | ||
this.directionalLights[0].target.position.set(0, 112, 0); | ||
this.scene.add(this.directionalLights[0].target); | ||
this.directionalLights[1].position.set(-582.6, 26.8, 55.6); | ||
this.directionalLights[1].target.position.set(0, 104, 0); | ||
this.scene.add(this.directionalLights[1].target); | ||
this.directionalLights[2].position.set(90, 120.8, -417); | ||
this.directionalLights[2].target.position.set(0, 107, 0); | ||
this.scene.add(this.directionalLights[2].target); | ||
this.directionalLights.forEach((item) => { | ||
this.addModel(item); | ||
}); | ||
} | ||
initSelectionBox() { | ||
@@ -540,3 +588,3 @@ this.box = new THREE.Box3(); | ||
this.scene.background = environment; | ||
this.scene.environment = environment; | ||
// this.scene.environment = environment; | ||
} else { | ||
@@ -543,0 +591,0 @@ this.scene.background = new THREE.Color(SCENE_BACKGROUND_COLOR); |
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
398845
10808