@lukekaalim/act-three 8.0.1 → 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 +12 -0
- package/builder.ts +3 -1
- package/elements.ts +0 -1
- package/package.json +1 -1
- package/props.ts +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
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
|
+
|
|
9
|
+
## 8.0.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 36412c6: Fix issue with threejs builder trying to build non-primirive elements
|
|
14
|
+
|
|
3
15
|
## 8.0.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/builder.ts
CHANGED
|
@@ -9,7 +9,9 @@ export const createThreeJSBuilder = (rootObject: Object3D | null = null): NodeBu
|
|
|
9
9
|
roots: new Set(['threejs']),
|
|
10
10
|
|
|
11
11
|
create(element) {
|
|
12
|
-
|
|
12
|
+
if (typeof element.type === 'string')
|
|
13
|
+
return registry.create(element);
|
|
14
|
+
return null;
|
|
13
15
|
},
|
|
14
16
|
update(el, next, prev) {
|
|
15
17
|
registry.update(el, next, prev);
|
package/elements.ts
CHANGED
package/package.json
CHANGED
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
|
-
|
|
45
|
-
|
|
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) {
|