@threenative/three-native 0.3.9 → 0.3.11
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/package.json +4 -4
- package/src/addons/post-effects.ts +1 -1
- package/src/browser-tsl.ts +2 -0
- package/src/temp-node.ts +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@threenative/three-native",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.11",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "The native engine's machine-readable compatibility catalog and the generators that adapt it to TypeScript declarations and the C binding ABI.",
|
|
6
6
|
"keywords": [
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
},
|
|
18
18
|
"type": "module",
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@types/three": "0.
|
|
20
|
+
"@types/three": "0.187.0",
|
|
21
21
|
"publint": "0.3.22",
|
|
22
|
-
"three": "0.
|
|
22
|
+
"three": "0.187.0",
|
|
23
23
|
"typescript": "npm:@typescript/typescript6@6.0.2"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"three": "0.
|
|
26
|
+
"three": "0.187.0"
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
|
29
29
|
"src/**/*.ts",
|
|
@@ -196,7 +196,7 @@ export function definePostEffects(tsl: IEffectTsl) {
|
|
|
196
196
|
const clearViewOffset = () => {
|
|
197
197
|
viewCamera.clearViewOffset();
|
|
198
198
|
node.__effect("viewOffset", 0);
|
|
199
|
-
jitterIndex = (jitterIndex + 1) %
|
|
199
|
+
jitterIndex = (jitterIndex + 1) % 32; // r187 wraps over every offset; r185 wrapped at length - 1
|
|
200
200
|
};
|
|
201
201
|
Object.defineProperties(node, {
|
|
202
202
|
setViewOffset: { value: setViewOffset, configurable: true },
|
package/src/browser-tsl.ts
CHANGED
|
@@ -566,6 +566,8 @@ export function defineTsl(
|
|
|
566
566
|
};
|
|
567
567
|
const custom = defineTempNode(prototype);
|
|
568
568
|
const exports: Record<string, unknown> = {};
|
|
569
|
+
// three r187's base class name; `TempNode` is the deprecated alias (src/nodes/core/TempNode.js:39).
|
|
570
|
+
exports.Node = custom.Node;
|
|
569
571
|
exports.TempNode = custom.TempNode;
|
|
570
572
|
exports.NodeUpdateType = NodeUpdateType;
|
|
571
573
|
for (const name of FUNCTIONS)
|
package/src/temp-node.ts
CHANGED
|
@@ -105,7 +105,11 @@ export function defineTempNode(
|
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
Object.setPrototypeOf(TempNode.prototype, prototype);
|
|
108
|
+
// three r187 deprecated `TempNode` for its base class `Node`, and a game's node extends `Node`
|
|
109
|
+
// (src/nodes/core/TempNode.js:39). The shim class is that base here, so it answers both names.
|
|
110
|
+
const Node = TempNode;
|
|
108
111
|
return {
|
|
112
|
+
Node,
|
|
109
113
|
TempNode,
|
|
110
114
|
update(frame?: INodeFrame) {
|
|
111
115
|
if (!frame?.renderer || frame.frameId === undefined) return;
|