@lukekaalim/act-three 5.12.1 → 5.12.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/entry.d.ts +2 -1
- package/package.json +1 -1
- package/props.js +13 -0
- package/reconciler.d.ts +3 -0
package/entry.d.ts
CHANGED
package/package.json
CHANGED
package/props.js
CHANGED
|
@@ -11,6 +11,7 @@ import { setHTMLProp } from "@lukekaalim/act-web";
|
|
|
11
11
|
import {
|
|
12
12
|
BufferGeometry,
|
|
13
13
|
Camera,
|
|
14
|
+
Color,
|
|
14
15
|
DirectionalLight,
|
|
15
16
|
Euler,
|
|
16
17
|
Group,
|
|
@@ -78,6 +79,15 @@ export const setMeshProp = (object/*: { [string]: mixed }*/, name/*: string*/, d
|
|
|
78
79
|
}
|
|
79
80
|
return false;
|
|
80
81
|
}
|
|
82
|
+
export const setInstanceProp = (object/*: { [string]: mixed }*/, name/*: string*/, diff/*: PropDiff*/)/*: boolean*/ => {
|
|
83
|
+
if (object[name] instanceof Color) {
|
|
84
|
+
if (diff.next instanceof Color || typeof diff.next === 'string' || typeof diff.next === 'number') {
|
|
85
|
+
object[name].set(diff.next)
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
81
91
|
|
|
82
92
|
export const setLightShadowProps = (
|
|
83
93
|
diffs/*: PropDiffRegistry*/,
|
|
@@ -119,6 +129,9 @@ export const setObjectProps2 = (
|
|
|
119
129
|
setLightShadowProps(propRegistry, target)
|
|
120
130
|
continue;
|
|
121
131
|
}
|
|
132
|
+
if (setInstanceProp((object/*: any*/), key, propDiff))
|
|
133
|
+
continue;
|
|
134
|
+
|
|
122
135
|
if (setMeshProp((object/*: any*/), key, propDiff)) {
|
|
123
136
|
continue;
|
|
124
137
|
}
|
package/reconciler.d.ts
ADDED