@octanejs/three 0.1.50 → 0.1.52
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 +6 -6
- package/src/core/driver.ts +5 -1
- package/src/core/root.ts +3 -0
- package/src/intrinsics.ts +3 -0
- package/src/web/Canvas.tsrx +5 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octanejs/three",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.52",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"@types/three": ">=0.156.0",
|
|
53
|
-
"octane": "^0.
|
|
53
|
+
"octane": "^0.8.0",
|
|
54
54
|
"three": ">=0.156.0"
|
|
55
55
|
},
|
|
56
56
|
"peerDependenciesMeta": {
|
|
@@ -72,10 +72,10 @@
|
|
|
72
72
|
"typescript": "^5.9.3",
|
|
73
73
|
"vite": "^8.1.5",
|
|
74
74
|
"vitest": "^4.1.10",
|
|
75
|
-
"@octanejs/rsbuild-plugin": "0.1.
|
|
76
|
-
"@octanejs/rspack-plugin": "0.1.
|
|
77
|
-
"@octanejs/vite-plugin": "0.
|
|
78
|
-
"octane": "0.
|
|
75
|
+
"@octanejs/rsbuild-plugin": "0.1.58",
|
|
76
|
+
"@octanejs/rspack-plugin": "0.1.56",
|
|
77
|
+
"@octanejs/vite-plugin": "0.2.0",
|
|
78
|
+
"octane": "0.8.0"
|
|
79
79
|
},
|
|
80
80
|
"scripts": {
|
|
81
81
|
"test": "pnpm upstream:check && vitest run --root ../.. --project three",
|
package/src/core/driver.ts
CHANGED
|
@@ -208,7 +208,11 @@ export function createThreePortalTarget(
|
|
|
208
208
|
export interface ThreeHostEnvironment {
|
|
209
209
|
/** Called once after an accepted host batch, without requiring WebGL. */
|
|
210
210
|
invalidate?(): void;
|
|
211
|
-
/**
|
|
211
|
+
/**
|
|
212
|
+
* Set false to omit accepted batches from the public diagnostic history.
|
|
213
|
+
* Roots created by `createRoot` (and therefore `Canvas` and the testing
|
|
214
|
+
* harness) set it false so a long-lived scene does not retain every batch.
|
|
215
|
+
*/
|
|
212
216
|
recordCommits?: boolean;
|
|
213
217
|
/** Root state associated with a configured managed scene. */
|
|
214
218
|
readonly store?: RootStore;
|
package/src/core/root.ts
CHANGED
|
@@ -469,6 +469,9 @@ function ensureHostRoot(internals: ThreeRootInternals<any>): void {
|
|
|
469
469
|
let hostRoot: UniversalRoot | null = null;
|
|
470
470
|
const environment: ThreeHostEnvironment = {
|
|
471
471
|
store: internals.store,
|
|
472
|
+
// An application root commits for its whole lifetime; keeping every accepted
|
|
473
|
+
// batch would retain each replaced props object and listener table forever.
|
|
474
|
+
recordCommits: false,
|
|
472
475
|
invalidate: () => internals.store.getState().invalidate(),
|
|
473
476
|
eventScope(priority, run) {
|
|
474
477
|
const root = hostRoot;
|
package/src/intrinsics.ts
CHANGED
|
@@ -35,4 +35,7 @@ export type {
|
|
|
35
35
|
/** TypeScript resolves this namespace through the intrinsic jsx-runtime export. */
|
|
36
36
|
export namespace JSX {
|
|
37
37
|
export interface IntrinsicElements extends ThreeIntrinsicElements {}
|
|
38
|
+
export interface ElementChildrenAttribute {
|
|
39
|
+
children: {};
|
|
40
|
+
}
|
|
38
41
|
}
|
package/src/web/Canvas.tsrx
CHANGED
|
@@ -291,7 +291,11 @@ export function Canvas({
|
|
|
291
291
|
...style,
|
|
292
292
|
};
|
|
293
293
|
|
|
294
|
-
return <div
|
|
294
|
+
return <div
|
|
295
|
+
ref={wrapperRef}
|
|
296
|
+
style={wrapperStyle}
|
|
297
|
+
{...domProps as typeof domProps & { ref?: undefined }}
|
|
298
|
+
>
|
|
295
299
|
<div style={{ width: '100%', height: '100%' }}>
|
|
296
300
|
<canvas ref={[canvasRef, ref]} style={{ display: 'block' }}>{fallback}</canvas>
|
|
297
301
|
</div>
|