@lukekaalim/act-three 8.0.3 → 8.1.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/CHANGELOG.md +18 -0
- package/elements.ts +2 -2
- package/package.json +5 -5
- package/props.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @lukekaalim/act-three
|
|
2
2
|
|
|
3
|
+
## 8.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 2ed02cf: Breaking! Change how useRef works, no longer compatible with React-style.
|
|
8
|
+
|
|
9
|
+
New API has `.get` and `.set` properties in order to better type ReadOnlyRef and WriteOnlyRef.
|
|
10
|
+
|
|
11
|
+
Add primitive registry to web, remove old element API and replace with "html" and "svg" element maps
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [2ed02cf]
|
|
16
|
+
- @lukekaalim/act-web@6.0.0
|
|
17
|
+
- @lukekaalim/act@5.0.0
|
|
18
|
+
- @lukekaalim/act-recon@4.0.1
|
|
19
|
+
- @lukekaalim/act-backstage@3.2.1
|
|
20
|
+
|
|
3
21
|
## 8.0.3
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/elements.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as three from "three";
|
|
2
|
-
import {
|
|
2
|
+
import { WriteOnlyRef } from "@lukekaalim/act";
|
|
3
3
|
import { createPrimitiveRegistry } from "@lukekaalim/act-backstage";
|
|
4
4
|
import { setProps } from "./props";
|
|
5
5
|
|
|
@@ -31,7 +31,7 @@ export type PropsFromClass<T extends three.Object3D> = {
|
|
|
31
31
|
//onAdded?: (self: T) => void,
|
|
32
32
|
//onRemoved?: (self: T) => void,
|
|
33
33
|
|
|
34
|
-
ref?:
|
|
34
|
+
ref?: T extends three.Points<any, any, any> ? WriteOnlyRef<three.Points<any, any, any>> : WriteOnlyRef<T>,
|
|
35
35
|
}
|
|
36
36
|
& (T extends three.Mesh | three.Points | three.Line ? DrawableProps : {})
|
|
37
37
|
& (T extends three.Sprite ? SpriteProps : {})
|
package/package.json
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
"name": "@lukekaalim/act-three",
|
|
3
3
|
"main": "index.ts",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "8.0
|
|
5
|
+
"version": "8.1.0",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@lukekaalim/act": "^
|
|
8
|
-
"@lukekaalim/act-backstage": "^3.2.
|
|
9
|
-
"@lukekaalim/act-recon": "^4.0.
|
|
10
|
-
"@lukekaalim/act-web": "^
|
|
7
|
+
"@lukekaalim/act": "^5.0.0",
|
|
8
|
+
"@lukekaalim/act-backstage": "^3.2.1",
|
|
9
|
+
"@lukekaalim/act-recon": "^4.0.1",
|
|
10
|
+
"@lukekaalim/act-web": "^6.0.0",
|
|
11
11
|
"@types/three": ">= 0.185.0"
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
package/props.ts
CHANGED
|
@@ -37,7 +37,7 @@ export const setProps = (object: three.Object3D, props: PropsFromClass<three.Obj
|
|
|
37
37
|
object.userData = props.userData;
|
|
38
38
|
|
|
39
39
|
if (props.ref)
|
|
40
|
-
|
|
40
|
+
props.ref.set(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>;
|