@lukekaalim/act-three 8.0.2 → 8.0.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @lukekaalim/act-three
2
2
 
3
+ ## 8.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 0378003: Fix issue with act-three always settings geometry and materials to props, even if left to undefined (resulting in geo/mats being set to undefined even if they exist)
8
+
3
9
  ## 8.0.2
4
10
 
5
11
  ### Patch Changes
package/elements.ts CHANGED
@@ -156,7 +156,6 @@ registry
156
156
  setProps(object, props as PropsFromClass<three.Object3D>);
157
157
  return object;
158
158
  }
159
- console.warn(`I WONT MAKE ${type}`)
160
159
  return null;
161
160
  })
162
161
  .addGlobalUpdateHandler((type, object, next, prev) => {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@lukekaalim/act-three",
3
3
  "main": "index.ts",
4
4
  "type": "module",
5
- "version": "8.0.2",
5
+ "version": "8.0.3",
6
6
  "dependencies": {
7
7
  "@lukekaalim/act": "^4.3.0",
8
8
  "@lukekaalim/act-backstage": "^3.2.0",
package/props.ts CHANGED
@@ -37,12 +37,14 @@ export const setProps = (object: three.Object3D, props: PropsFromClass<three.Obj
37
37
  object.userData = props.userData;
38
38
 
39
39
  if (props.ref)
40
- props.ref.current = object;
40
+ (props.ref as any).current = object;
41
41
 
42
42
  if (object instanceof three.Mesh || object instanceof three.Points || object instanceof three.Line) {
43
43
  const meshProps = props as PropsFromClass<three.Mesh | three.Points | three.Line>;
44
- object.geometry = meshProps.geometry;
45
- object.material = meshProps.material;
44
+ if (meshProps.geometry)
45
+ object.geometry = meshProps.geometry;
46
+ if (meshProps.material)
47
+ object.material = meshProps.material;
46
48
  }
47
49
 
48
50
  if (object instanceof three.PerspectiveCamera) {