@things-factory/scene-visualizer 6.0.0-alpha.0 → 6.0.0-alpha.19

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.
@@ -1,3 +1,5 @@
1
+ import '@operato/i18n/ox-i18n.js'
2
+
1
3
  import { css, html } from 'lit'
2
4
 
3
5
  import { OxPropertyEditor } from '@operato/property-editor'
@@ -161,10 +163,10 @@ export default class LocationIncreasePatternEditor extends OxPropertyEditor {
161
163
  // TODO: background image change to use the url-loader
162
164
  return html`
163
165
  <fieldset fullwidth>
164
- <legend><i18n-msg msgid="label.location-increase-pattern">Increase Pattern</i18n-msg></legend>
166
+ <legend><ox-i18n msgid="label.location-increase-pattern">Increase Pattern</ox-i18n></legend>
165
167
 
166
168
  <div class="property-grid">
167
- <label> <i18n-msg msgid="label.start-section">Start Section</i18n-msg> </label>
169
+ <label> <ox-i18n msgid="label.start-section">Start Section</ox-i18n> </label>
168
170
  <input
169
171
  type="number"
170
172
  data-start-section
@@ -172,7 +174,7 @@ export default class LocationIncreasePatternEditor extends OxPropertyEditor {
172
174
  @change=${e => (this.startSection = e.target.valueAsNumber)}
173
175
  />
174
176
 
175
- <label> <i18n-msg msgid="label.start-unit">Start Unit</i18n-msg> </label>
177
+ <label> <ox-i18n msgid="label.start-unit">Start Unit</ox-i18n> </label>
176
178
  <input
177
179
  type="number"
178
180
  data-start-unit
@@ -183,7 +185,7 @@ export default class LocationIncreasePatternEditor extends OxPropertyEditor {
183
185
  <div class="checkbox-row" fullwidth>
184
186
  <input id="skip-numbering" type="checkbox" data-skip-numbering ?checked="${this.skipNumbering}" />
185
187
  <label for="skip-numbering">
186
- <i18n-msg msgid="label.skip-numbering">Skip Numbering</i18n-msg>
188
+ <ox-i18n msgid="label.skip-numbering">Skip Numbering</ox-i18n>
187
189
  </label>
188
190
  </div>
189
191
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@things-factory/scene-visualizer",
3
3
  "description": "The visualizer component for things-scene.",
4
- "version": "6.0.0-alpha.0",
4
+ "version": "6.0.0-alpha.19",
5
5
  "things-scene": true,
6
6
  "browser": "src/index.js",
7
7
  "author": "heartyoh <heartyoh@hatiolab.com>",
@@ -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": "e5b9823ab3ebc5d6ae5bcb4b5aa60c1306e4dd7e"
23
+ "gitHead": "b4a7e60e4ffbb2e5186ed031157cf183c69d352a"
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) {}