@things-factory/scene-visualizer 5.0.14 → 6.0.0-alpha.13

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 CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@things-factory/scene-visualizer",
3
3
  "description": "The visualizer component for things-scene.",
4
- "version": "5.0.14",
4
+ "version": "6.0.0-alpha.13",
5
5
  "things-scene": true,
6
6
  "browser": "src/index.js",
7
- "author": "heartyoh",
7
+ "author": "heartyoh <heartyoh@hatiolab.com>",
8
8
  "license": "MIT",
9
9
  "publishConfig": {
10
10
  "access": "public",
@@ -17,8 +17,8 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@hatiolab/things-scene": "^3.0.23",
20
- "lit": "^2.2.7",
20
+ "lit": "^2.4.0",
21
21
  "three": "^0.122.0"
22
22
  },
23
- "gitHead": "9ceaa39746fcf42953e429fab2001353cd821ded"
23
+ "gitHead": "ee18af4bbf6b44e2f1d76258ad6922a535a9f0d8"
24
24
  }
@@ -56,6 +56,12 @@ export default class GLTFObject extends Object3D {
56
56
  var scene = gltf.scene
57
57
  var extObj = scene
58
58
 
59
+ gltf.scene.traverse(function (child) {
60
+ if (child.isMesh) {
61
+ child.castShadow = true
62
+ }
63
+ })
64
+
59
65
  var animations = gltf.animations
60
66
  this.addObject(extObj.clone(), animations)
61
67
 
package/src/sphere.js CHANGED
@@ -60,7 +60,7 @@ export default class Sphere extends Mesh {
60
60
  side: THREE.FrontSide
61
61
  })
62
62
 
63
- // this.castShadow = true
63
+ this.castShadow = true
64
64
  }
65
65
 
66
66
  get model() {
package/src/wall.js CHANGED
@@ -42,7 +42,7 @@ export default class Wall extends Mesh {
42
42
  this.geometry = new THREE.BoxBufferGeometry(w, d, h)
43
43
  this.material = new THREE.MeshStandardMaterial({ color: fillStyle, side: THREE.FrontSide })
44
44
 
45
- // this.castShadow = true
45
+ this.castShadow = true
46
46
  }
47
47
 
48
48
  raycast(raycaster, intersects) {}