@kimap/indoor-positioning-sdk-vue2 5.4.9 → 5.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/core/SceneCore.js +13 -9
package/package.json
CHANGED
package/src/core/SceneCore.js
CHANGED
|
@@ -183,23 +183,27 @@ SceneCore.prototype.initControls = function(OrbitControls) {
|
|
|
183
183
|
* 设置灯光
|
|
184
184
|
*/
|
|
185
185
|
SceneCore.prototype.setupLights = function() {
|
|
186
|
-
// 环境光
|
|
187
|
-
var ambientLight = new THREE.AmbientLight(0xffffff, 0.
|
|
186
|
+
// 环境光
|
|
187
|
+
var ambientLight = new THREE.AmbientLight(0xffffff, 0.25);
|
|
188
188
|
this.scene.add(ambientLight);
|
|
189
189
|
|
|
190
|
-
//
|
|
191
|
-
var directionalLight1 = new THREE.DirectionalLight(0xffffff, 0.
|
|
190
|
+
// 主光源(从上方)
|
|
191
|
+
var directionalLight1 = new THREE.DirectionalLight(0xffffff, 0.05);
|
|
192
192
|
directionalLight1.position.set(10, 20, 10);
|
|
193
|
-
directionalLight1.castShadow =
|
|
193
|
+
directionalLight1.castShadow = true;
|
|
194
|
+
directionalLight1.shadow.camera.left = -50;
|
|
195
|
+
directionalLight1.shadow.camera.right = 50;
|
|
196
|
+
directionalLight1.shadow.camera.top = 50;
|
|
197
|
+
directionalLight1.shadow.camera.bottom = -50;
|
|
194
198
|
this.scene.add(directionalLight1);
|
|
195
199
|
|
|
196
|
-
// 辅助光源
|
|
197
|
-
var directionalLight2 = new THREE.DirectionalLight(0xffffff, 0
|
|
200
|
+
// 辅助光源
|
|
201
|
+
var directionalLight2 = new THREE.DirectionalLight(0xffffff, 0);
|
|
198
202
|
directionalLight2.position.set(-10, 15, -10);
|
|
199
203
|
this.scene.add(directionalLight2);
|
|
200
204
|
|
|
201
|
-
// 半球光
|
|
202
|
-
var hemisphereLight = new THREE.HemisphereLight(0xffffff, 0x444444, 0.
|
|
205
|
+
// 半球光
|
|
206
|
+
var hemisphereLight = new THREE.HemisphereLight(0xffffff, 0x444444, 0.3);
|
|
203
207
|
this.scene.add(hemisphereLight);
|
|
204
208
|
};
|
|
205
209
|
|