@geometra/renderer-three 0.2.0 → 1.3.1
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/dist/host-css-coerce.d.ts +39 -0
- package/dist/host-css-coerce.d.ts.map +1 -0
- package/dist/host-css-coerce.js +69 -0
- package/dist/host-css-coerce.js.map +1 -0
- package/dist/host-layout-plain.d.ts +164 -0
- package/dist/host-layout-plain.d.ts.map +1 -0
- package/dist/host-layout-plain.js +255 -0
- package/dist/host-layout-plain.js.map +1 -0
- package/dist/index.d.ts +42 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +41 -5
- package/dist/index.js.map +1 -1
- package/dist/layout-sync.d.ts +51 -0
- package/dist/layout-sync.d.ts.map +1 -0
- package/dist/layout-sync.js +59 -0
- package/dist/layout-sync.js.map +1 -0
- package/dist/scene3d-manager.d.ts +29 -0
- package/dist/scene3d-manager.d.ts.map +1 -0
- package/dist/scene3d-manager.js +339 -0
- package/dist/scene3d-manager.js.map +1 -0
- package/dist/split-host.d.ts +48 -9
- package/dist/split-host.d.ts.map +1 -1
- package/dist/split-host.js +74 -39
- package/dist/split-host.js.map +1 -1
- package/dist/stacked-host.d.ts +64 -14
- package/dist/stacked-host.d.ts.map +1 -1
- package/dist/stacked-host.js +77 -41
- package/dist/stacked-host.js.map +1 -1
- package/dist/three-scene-basics.d.ts +313 -2
- package/dist/three-scene-basics.d.ts.map +1 -1
- package/dist/three-scene-basics.js +418 -1
- package/dist/three-scene-basics.js.map +1 -1
- package/dist/utils.d.ts +156 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +207 -6
- package/dist/utils.js.map +1 -1
- package/package.json +15 -18
- package/LICENSE +0 -21
- package/README.md +0 -111
package/dist/stacked-host.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stacked-host.js","sourceRoot":"","sources":["../src/stacked-host.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":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AAC;QACb,OAAO,EAAE,CAAA;QACT,MAAM,GAAG,CAAA;IACX,CAAC;IAED,MAAM,IAAI,GAAG,GAAG,EAAE;QAChB,IAAI,SAAS;YAAE,OAAM;QACrB,KAAK,GAAG,GAAG,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAA;QACvC,MAAM,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAA;QAC9B,MAAM,OAAO,GAAG,KAAK,CAAC,WAAW,CAAA;QACjC,IAAI,CAAC;YACH,IAAI,YAAY,EAAE,CAAC,EAAE,GAAG,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,KAAK,KAAK,EAAE,CAAC;gBACpE,OAAM;YACR,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,EAAE,CAAA;YACT,MAAM,GAAG,CAAA;QACX,CAAC;QACD,IAAI,SAAS;YAAE,OAAM;QACrB,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;IAClC,CAAC,CAAA;IAED,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,KAAK,GAAG,GAAG,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAA;IACzC,CAAC;IAED,OAAO;QACL,IAAI;QACJ,WAAW;QACX,WAAW;QACX,cAAc;QACd,QAAQ,EAAE,UAAU;QACpB,KAAK;QACL,MAAM;QACN,KAAK;QACL,QAAQ,EAAE,cAAc;QACxB,OAAO;KACR,CAAA;AACH,CAAC"}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
|
+
import type { WebGLRendererParameters } from 'three';
|
|
3
|
+
import { type PlainGeometraThreeViewSizingState } from './utils.js';
|
|
4
|
+
/** Scene, camera, and clock bundle returned by {@link createGeometraThreeSceneBasics}. */
|
|
5
|
+
export interface GeometraThreeSceneBasics {
|
|
6
|
+
scene: THREE.Scene;
|
|
7
|
+
camera: THREE.PerspectiveCamera;
|
|
8
|
+
clock: THREE.Clock;
|
|
9
|
+
}
|
|
2
10
|
/** Options shared by split/stacked hosts and {@link createGeometraThreeSceneBasics}. */
|
|
3
11
|
export interface GeometraThreeSceneBasicsOptions {
|
|
4
12
|
/** Clear color for the Three.js scene. Default: `0x000000`. */
|
|
@@ -12,16 +20,319 @@ export interface GeometraThreeSceneBasicsOptions {
|
|
|
12
20
|
/** Initial camera position. Default: `(0, 0, 5)`. */
|
|
13
21
|
cameraPosition?: THREE.Vector3Tuple;
|
|
14
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Scene and camera defaults shared by {@link createThreeGeometraSplitHost},
|
|
25
|
+
* {@link createThreeGeometraStackedHost}, and {@link createGeometraThreeSceneBasics}.
|
|
26
|
+
* Use in headless or custom renderer setups so numbers stay aligned with those hosts
|
|
27
|
+
* without copying literals from the README.
|
|
28
|
+
*/
|
|
29
|
+
export declare const GEOMETRA_THREE_HOST_SCENE_DEFAULTS: Required<GeometraThreeSceneBasicsOptions>;
|
|
30
|
+
/**
|
|
31
|
+
* Fully merged and coerced {@link GeometraThreeSceneBasicsOptions} using the same rules as
|
|
32
|
+
* {@link createGeometraThreeSceneBasics} (and split/stacked hosts).
|
|
33
|
+
*
|
|
34
|
+
* Use when you need host-aligned numbers for logging, tests, or agent-side protocol payloads without
|
|
35
|
+
* constructing a {@link THREE.Scene} or {@link THREE.PerspectiveCamera}.
|
|
36
|
+
*/
|
|
37
|
+
export declare function resolveGeometraThreeSceneBasicsOptions(options?: GeometraThreeSceneBasicsOptions): Required<GeometraThreeSceneBasicsOptions>;
|
|
38
|
+
/**
|
|
39
|
+
* Host-aligned scene/camera numbers in a JSON-friendly shape: clear color as a single **sRGB hex**
|
|
40
|
+
* integer (`0xRRGGBB`), same as {@link THREE.Color#getHex}.
|
|
41
|
+
*
|
|
42
|
+
* Use for logs, tests, or agent-side payloads where {@link GeometraThreeSceneBasicsOptions.threeBackground}
|
|
43
|
+
* may be a string or other {@link THREE.ColorRepresentation} but you need a stable numeric field for
|
|
44
|
+
* `JSON.stringify`.
|
|
45
|
+
*/
|
|
46
|
+
export interface PlainGeometraThreeSceneBasicsOptions {
|
|
47
|
+
threeBackgroundHex: number;
|
|
48
|
+
cameraFov: number;
|
|
49
|
+
cameraNear: number;
|
|
50
|
+
cameraFar: number;
|
|
51
|
+
cameraPosition: THREE.Vector3Tuple;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Same coercion as {@link resolveGeometraThreeSceneBasicsOptions}, plus a hex background for stable JSON.
|
|
55
|
+
*/
|
|
56
|
+
export declare function toPlainGeometraThreeSceneBasicsOptions(options?: GeometraThreeSceneBasicsOptions): PlainGeometraThreeSceneBasicsOptions;
|
|
57
|
+
/**
|
|
58
|
+
* Build {@link GeometraThreeSceneBasics} from {@link PlainGeometraThreeSceneBasicsOptions} (for example
|
|
59
|
+
* `JSON.parse` of logs, tests, or agent payloads). Maps `threeBackgroundHex` to {@link GeometraThreeSceneBasicsOptions.threeBackground}
|
|
60
|
+
* and forwards camera fields through {@link createGeometraThreeSceneBasics}, so invalid numbers get the same
|
|
61
|
+
* coercion as split/stacked hosts and {@link toPlainGeometraThreeSceneBasicsOptions} output round-trips when
|
|
62
|
+
* re-applied here.
|
|
63
|
+
*/
|
|
64
|
+
export declare function createGeometraThreeSceneBasicsFromPlain(plain: PlainGeometraThreeSceneBasicsOptions): GeometraThreeSceneBasics;
|
|
65
|
+
/**
|
|
66
|
+
* Single JSON-friendly object combining {@link PlainGeometraThreeViewSizingState} and
|
|
67
|
+
* {@link PlainGeometraThreeSceneBasicsOptions} with the same coercion rules as
|
|
68
|
+
* {@link toPlainGeometraThreeViewSizingState} and {@link toPlainGeometraThreeSceneBasicsOptions}.
|
|
69
|
+
*
|
|
70
|
+
* Use for logs, tests, or agent-side payloads when you want viewport + scene numbers in one
|
|
71
|
+
* `JSON.stringify` without calling both helpers separately.
|
|
72
|
+
*/
|
|
73
|
+
export type PlainGeometraThreeHostSnapshot = PlainGeometraThreeViewSizingState & PlainGeometraThreeSceneBasicsOptions;
|
|
74
|
+
/**
|
|
75
|
+
* Narrow `unknown` (e.g. `JSON.parse`) to {@link PlainGeometraThreeSceneBasicsOptions} — the scene/camera
|
|
76
|
+
* fields from {@link toPlainGeometraThreeSceneBasicsOptions} without viewport sizing. Extra keys are allowed.
|
|
77
|
+
* Pair with {@link isPlainGeometraThreeViewSizingState} when you need both slices before merging or calling
|
|
78
|
+
* {@link createGeometraThreeSceneBasicsFromPlain}.
|
|
79
|
+
*/
|
|
80
|
+
export declare function isPlainGeometraThreeSceneBasicsOptions(value: unknown): value is PlainGeometraThreeSceneBasicsOptions;
|
|
81
|
+
/**
|
|
82
|
+
* Narrow `unknown` (e.g. `JSON.parse`) to {@link PlainGeometraThreeHostSnapshot} when the object matches
|
|
83
|
+
* the shape from {@link toPlainGeometraThreeHostSnapshot} / {@link toPlainGeometraThreeHostSnapshotHeadless} /
|
|
84
|
+
* {@link toPlainGeometraThreeHostSnapshotFromViewSizing}. Extra keys (e.g. hybrid layout fields) are allowed.
|
|
85
|
+
* Composite payloads use {@link isPlainGeometraThreeSplitHostSnapshot} / {@link isPlainGeometraThreeStackedHostSnapshot}.
|
|
86
|
+
*/
|
|
87
|
+
export declare function isPlainGeometraThreeHostSnapshot(value: unknown): value is PlainGeometraThreeHostSnapshot;
|
|
88
|
+
/**
|
|
89
|
+
* Merge host-aligned viewport sizing and scene/camera plain fields for stable JSON.
|
|
90
|
+
*
|
|
91
|
+
* @see PlainGeometraThreeHostSnapshot
|
|
92
|
+
*/
|
|
93
|
+
export declare function toPlainGeometraThreeHostSnapshot(cssWidth: number, cssHeight: number, rawDevicePixelRatio: number, maxDevicePixelRatio?: number, sceneBasicsOptions?: GeometraThreeSceneBasicsOptions): PlainGeometraThreeHostSnapshot;
|
|
94
|
+
/**
|
|
95
|
+
* Same plain snapshot as {@link toPlainGeometraThreeHostSnapshot} with raw device pixel ratio **1** —
|
|
96
|
+
* the baseline after `win.devicePixelRatio || 1` when the ratio is missing, and the same raw input as
|
|
97
|
+
* {@link resolveHeadlessHostDevicePixelRatio} when you only apply an optional cap.
|
|
98
|
+
*
|
|
99
|
+
* Viewport fields match {@link toPlainGeometraThreeViewSizingStateHeadless}; for sizing-only JSON, call
|
|
100
|
+
* that helper directly.
|
|
101
|
+
*
|
|
102
|
+
* For headless GL, Node, tests, or agent payloads without a browser `window`, call this instead of
|
|
103
|
+
* passing a literal `1` as `rawDevicePixelRatio` everywhere.
|
|
104
|
+
*/
|
|
105
|
+
export declare function toPlainGeometraThreeHostSnapshotHeadless(cssWidth: number, cssHeight: number, maxDevicePixelRatio?: number, sceneBasicsOptions?: GeometraThreeSceneBasicsOptions): PlainGeometraThreeHostSnapshot;
|
|
106
|
+
/**
|
|
107
|
+
* Merge an existing {@link PlainGeometraThreeViewSizingState} (from {@link toPlainGeometraThreeViewSizingState}
|
|
108
|
+
* or your own pipeline) with {@link toPlainGeometraThreeSceneBasicsOptions} into one
|
|
109
|
+
* {@link PlainGeometraThreeHostSnapshot}.
|
|
110
|
+
*
|
|
111
|
+
* Use in headless loops, tests, or agent payloads when layout/DPR sizing is computed once and scene/camera
|
|
112
|
+
* options are added later, without re-running {@link toPlainGeometraThreeViewSizingState}.
|
|
113
|
+
*/
|
|
114
|
+
export declare function toPlainGeometraThreeHostSnapshotFromViewSizing(sizing: PlainGeometraThreeViewSizingState, sceneBasicsOptions?: GeometraThreeSceneBasicsOptions): PlainGeometraThreeHostSnapshot;
|
|
115
|
+
/**
|
|
116
|
+
* Combine an existing {@link PlainGeometraThreeViewSizingState} with an already-plain scene slice
|
|
117
|
+
* {@link PlainGeometraThreeSceneBasicsOptions} (for example after {@link isPlainGeometraThreeViewSizingState}
|
|
118
|
+
* and {@link isPlainGeometraThreeSceneBasicsOptions}) into one {@link PlainGeometraThreeHostSnapshot}.
|
|
119
|
+
*
|
|
120
|
+
* Same object shape as {@link toPlainGeometraThreeHostSnapshotFromViewSizing} when `scene` is the output of
|
|
121
|
+
* {@link toPlainGeometraThreeSceneBasicsOptions}, but skips a redundant {@link THREE.Color} round-trip when
|
|
122
|
+
* the scene fields are already JSON-stable.
|
|
123
|
+
*/
|
|
124
|
+
export declare function mergePlainGeometraThreeHostSnapshot(sizing: PlainGeometraThreeViewSizingState, scene: PlainGeometraThreeSceneBasicsOptions): PlainGeometraThreeHostSnapshot;
|
|
125
|
+
/**
|
|
126
|
+
* `WebGLRenderer` constructor options (excluding `canvas`) used by
|
|
127
|
+
* {@link createThreeGeometraSplitHost} and {@link createThreeGeometraStackedHost}.
|
|
128
|
+
*
|
|
129
|
+
* Typed as {@link WebGLRendererParameters} minus `canvas` so custom renderers stay compatible with
|
|
130
|
+
* Three’s constructor surface when you extend or mirror these flags.
|
|
131
|
+
*
|
|
132
|
+
* Spread into your own `new WebGLRenderer({ canvas, ...GEOMETRA_HOST_WEBGL_RENDERER_OPTIONS })` when
|
|
133
|
+
* you manage the renderer (headless GL, offscreen canvas, tests) so flags stay aligned with those hosts.
|
|
134
|
+
*/
|
|
135
|
+
export declare const GEOMETRA_HOST_WEBGL_RENDERER_OPTIONS: {
|
|
136
|
+
readonly antialias: true;
|
|
137
|
+
readonly alpha: false;
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
* Full {@link WebGLRendererParameters} for `new WebGLRenderer(...)`, with the same flags as
|
|
141
|
+
* {@link createThreeGeometraSplitHost} and {@link createThreeGeometraStackedHost} plus your `canvas`.
|
|
142
|
+
*
|
|
143
|
+
* Use in headless GL, offscreen canvas, or custom hosts so constructor input stays aligned with
|
|
144
|
+
* those packages without copying {@link GEOMETRA_HOST_WEBGL_RENDERER_OPTIONS} at every call site.
|
|
145
|
+
*/
|
|
146
|
+
export declare function createGeometraHostWebGLRendererParams(canvas: NonNullable<WebGLRendererParameters['canvas']>): WebGLRendererParameters;
|
|
147
|
+
/**
|
|
148
|
+
* `new WebGLRenderer(createGeometraHostWebGLRendererParams(canvas))` with the same flags as
|
|
149
|
+
* {@link createThreeGeometraSplitHost} and {@link createThreeGeometraStackedHost}.
|
|
150
|
+
*
|
|
151
|
+
* Use in the browser or any environment where Three can create a GL context (offscreen canvas,
|
|
152
|
+
* custom hosts). Prefer {@link createGeometraHostWebGLRendererParams} when you need to spread
|
|
153
|
+
* into a larger parameter object.
|
|
154
|
+
*/
|
|
155
|
+
export declare function createGeometraThreeWebGLRenderer(canvas: NonNullable<WebGLRendererParameters['canvas']>): THREE.WebGLRenderer;
|
|
15
156
|
/**
|
|
16
157
|
* Create a scene, perspective camera, and clock with the same defaults as
|
|
17
158
|
* {@link createThreeGeometraSplitHost} and {@link createThreeGeometraStackedHost}.
|
|
18
159
|
*
|
|
19
160
|
* Use this when you want Three.js state aligned with those hosts but manage your own
|
|
20
161
|
* `WebGLRenderer` (for example headless GL, offscreen canvas, or custom render targets).
|
|
162
|
+
*
|
|
163
|
+
* Non-finite or invalid perspective settings fall back to {@link GEOMETRA_THREE_HOST_SCENE_DEFAULTS}
|
|
164
|
+
* (or `far = max(default far, near × 2)` when the default far is not past a coerced near plane).
|
|
165
|
+
*
|
|
166
|
+
* @returns A {@link GeometraThreeSceneBasics} value aligned with split/stacked host defaults.
|
|
167
|
+
*/
|
|
168
|
+
export declare function createGeometraThreeSceneBasics(options?: GeometraThreeSceneBasicsOptions): GeometraThreeSceneBasics;
|
|
169
|
+
/** {@link createGeometraThreeSceneBasics} plus a host-aligned {@link THREE.WebGLRenderer} on the same canvas. */
|
|
170
|
+
export type GeometraThreeWebGLWithSceneBasics = GeometraThreeSceneBasics & {
|
|
171
|
+
renderer: THREE.WebGLRenderer;
|
|
172
|
+
};
|
|
173
|
+
/**
|
|
174
|
+
* Create a {@link THREE.WebGLRenderer} and {@link GeometraThreeSceneBasics} in one call, using the same
|
|
175
|
+
* constructor flags and scene defaults as {@link createThreeGeometraSplitHost} and
|
|
176
|
+
* {@link createThreeGeometraStackedHost}.
|
|
177
|
+
*
|
|
178
|
+
* Equivalent to {@link createGeometraThreeWebGLRenderer} on `canvas` plus
|
|
179
|
+
* {@link createGeometraThreeSceneBasics} with the same `options` — useful for offscreen canvas, custom hosts, or
|
|
180
|
+
* agent-side bootstrap where you want parity without duplicating the two factories.
|
|
181
|
+
*
|
|
182
|
+
* Requires a WebGL-capable environment (same as `new WebGLRenderer(...)`).
|
|
183
|
+
*/
|
|
184
|
+
export declare function createGeometraThreeWebGLWithSceneBasics(canvas: NonNullable<WebGLRendererParameters['canvas']>, options?: GeometraThreeSceneBasicsOptions): GeometraThreeWebGLWithSceneBasics;
|
|
185
|
+
/**
|
|
186
|
+
* Same host-aligned renderer + scene bundle as {@link createGeometraThreeWebGLWithSceneBasics}, but scene and
|
|
187
|
+
* camera are built from {@link PlainGeometraThreeSceneBasicsOptions} (for example `JSON.parse` of logs, tests,
|
|
188
|
+
* or agent payloads) via {@link createGeometraThreeSceneBasicsFromPlain}, so invalid fields get the same coercion
|
|
189
|
+
* as split/stacked hosts without manually mapping `threeBackgroundHex` into {@link GeometraThreeSceneBasicsOptions}.
|
|
190
|
+
*
|
|
191
|
+
* Requires a WebGL-capable environment (same as `new WebGLRenderer(...)`).
|
|
21
192
|
*/
|
|
22
|
-
export declare function
|
|
193
|
+
export declare function createGeometraThreeWebGLWithSceneBasicsFromPlain(canvas: NonNullable<WebGLRendererParameters['canvas']>, plain: PlainGeometraThreeSceneBasicsOptions): GeometraThreeWebGLWithSceneBasics;
|
|
194
|
+
/**
|
|
195
|
+
* Tear down the {@link THREE.WebGLRenderer} from {@link createGeometraThreeWebGLWithSceneBasics}
|
|
196
|
+
* (or any bundle that shares the same `renderer` reference).
|
|
197
|
+
*
|
|
198
|
+
* When `clock` is passed (for example the same bundle from {@link createGeometraThreeWebGLWithSceneBasics}),
|
|
199
|
+
* calls {@link THREE.Clock.stop} before {@link THREE.WebGLRenderer.dispose} so `getDelta` / `elapsedTime`
|
|
200
|
+
* do not keep advancing after teardown in headless ticks or agent loops.
|
|
201
|
+
*
|
|
202
|
+
* Calls {@link THREE.WebGLRenderer.dispose}; it does not traverse the scene or dispose meshes,
|
|
203
|
+
* materials, or textures — keep that cleanup in app code or a future helper if you need it.
|
|
204
|
+
*
|
|
205
|
+
* Registers the renderer so {@link tickGeometraThreeWebGLWithSceneBasicsFrame} skips a subsequent
|
|
206
|
+
* `render` when teardown runs inside `onFrame`, matching split/stacked hosts after {@link ThreeRuntimeContext.destroy}.
|
|
207
|
+
*/
|
|
208
|
+
export declare function disposeGeometraThreeWebGLWithSceneBasics(bundle: Pick<GeometraThreeWebGLWithSceneBasics, 'renderer'> & Partial<Pick<GeometraThreeWebGLWithSceneBasics, 'clock'>>): void;
|
|
209
|
+
/**
|
|
210
|
+
* Resize renderer and camera from {@link createGeometraThreeWebGLWithSceneBasics} using the same CSS layout,
|
|
211
|
+
* {@link resolveHostDevicePixelRatio} capping, and {@link resizeGeometraThreePerspectiveView} path as
|
|
212
|
+
* {@link createThreeGeometraSplitHost} and {@link createThreeGeometraStackedHost}.
|
|
213
|
+
*
|
|
214
|
+
* Use in headless GL, offscreen canvas, or custom hosts when you already hold the bundle and a layout size
|
|
215
|
+
* (e.g. from your own layout pass). Pass `rawDevicePixelRatio` from `window.devicePixelRatio` in the browser
|
|
216
|
+
* or `1` when there is no window.
|
|
217
|
+
*
|
|
218
|
+
* Equivalent to calling {@link resizeGeometraThreePerspectiveView} on `bundle.renderer` and `bundle.camera` with
|
|
219
|
+
* `resolveHostDevicePixelRatio(rawDevicePixelRatio, maxDevicePixelRatio)`.
|
|
220
|
+
*/
|
|
221
|
+
export declare function resizeGeometraThreeWebGLWithSceneBasicsView(bundle: Pick<GeometraThreeWebGLWithSceneBasics, 'renderer' | 'camera'>, cssWidth: number, cssHeight: number, rawDevicePixelRatio: number, maxDevicePixelRatio?: number): void;
|
|
222
|
+
/**
|
|
223
|
+
* Same as {@link resizeGeometraThreeWebGLWithSceneBasicsView} with raw device pixel ratio fixed at **1** —
|
|
224
|
+
* parity with {@link resolveHeadlessHostDevicePixelRatio} and {@link toPlainGeometraThreeHostSnapshotHeadless}
|
|
225
|
+
* for headless GL, Node, tests, or agent loops without a browser `window`.
|
|
226
|
+
*/
|
|
227
|
+
export declare function resizeGeometraThreeWebGLWithSceneBasicsViewHeadless(bundle: Pick<GeometraThreeWebGLWithSceneBasics, 'renderer' | 'camera'>, cssWidth: number, cssHeight: number, maxDevicePixelRatio?: number): void;
|
|
228
|
+
/**
|
|
229
|
+
* Resize from {@link PlainGeometraThreeViewSizingState} using `layoutWidth`, `layoutHeight`, and
|
|
230
|
+
* `effectiveDevicePixelRatio` — equivalent to
|
|
231
|
+
* {@link resizeGeometraThreeWebGLWithSceneBasicsView} with those dimensions and the same effective ratio
|
|
232
|
+
* the plain helpers compute from raw DPR and optional cap.
|
|
233
|
+
*
|
|
234
|
+
* Accepts any object with those fields, including a full {@link PlainGeometraThreeHostSnapshot} or composite
|
|
235
|
+
* split/stacked snapshot (extra keys ignored). Use when logs, tests, or agents already validated viewport JSON
|
|
236
|
+
* via {@link isPlainGeometraThreeHostSnapshot} and should not re-derive {@link resolveHostDevicePixelRatio}
|
|
237
|
+
* from partial inputs.
|
|
238
|
+
*/
|
|
239
|
+
export declare function resizeGeometraThreeWebGLWithSceneBasicsViewFromPlainViewSizing(bundle: Pick<GeometraThreeWebGLWithSceneBasics, 'renderer' | 'camera'>, sizing: PlainGeometraThreeViewSizingState): void;
|
|
240
|
+
/**
|
|
241
|
+
* One `renderer.render(scene, camera)` pass for a {@link GeometraThreeWebGLWithSceneBasics} bundle.
|
|
242
|
+
*
|
|
243
|
+
* Use in headless GL, tests, or agent-style loops after
|
|
244
|
+
* {@link resizeGeometraThreeWebGLWithSceneBasicsView} (or your own sizing) so a single frame matches
|
|
245
|
+
* the same scene/camera/renderer wiring as {@link createThreeGeometraSplitHost} /
|
|
246
|
+
* {@link createThreeGeometraStackedHost} without duplicating the render call.
|
|
247
|
+
*
|
|
248
|
+
* No-ops when the same `renderer` was already passed to {@link disposeGeometraThreeWebGLWithSceneBasics}
|
|
249
|
+
* — same skip-after-dispose registration as {@link tickGeometraThreeWebGLWithSceneBasicsFrame}.
|
|
250
|
+
*/
|
|
251
|
+
export declare function renderGeometraThreeWebGLWithSceneBasicsFrame(bundle: Pick<GeometraThreeWebGLWithSceneBasics, 'renderer' | 'scene' | 'camera'>): void;
|
|
252
|
+
/**
|
|
253
|
+
* Context passed to `onFrame` in {@link tickGeometraThreeWebGLWithSceneBasicsFrame}: the bundle’s renderer,
|
|
254
|
+
* scene, camera, and clock plus `delta` / `elapsed` from the same {@link THREE.Clock} read the hosts use
|
|
255
|
+
* before `onThreeFrame`.
|
|
256
|
+
*/
|
|
257
|
+
export interface GeometraThreeWebGLWithSceneBasicsTickContext {
|
|
258
|
+
renderer: THREE.WebGLRenderer;
|
|
23
259
|
scene: THREE.Scene;
|
|
24
260
|
camera: THREE.PerspectiveCamera;
|
|
25
261
|
clock: THREE.Clock;
|
|
26
|
-
|
|
262
|
+
delta: number;
|
|
263
|
+
elapsed: number;
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Same per-frame ordering as {@link createThreeGeometraSplitHost} and {@link createThreeGeometraStackedHost}:
|
|
267
|
+
* `clock.getDelta()` / `elapsedTime`, optional callback, then `renderer.render`.
|
|
268
|
+
*
|
|
269
|
+
* If `onFrame` returns **`false`**, `renderer.render` is skipped and this function returns **`false`** —
|
|
270
|
+
* parity with {@link ThreeGeometraSplitHostOptions.onThreeFrame} / stacked host `onThreeFrame` returning `false`.
|
|
271
|
+
* If `onFrame` calls {@link disposeGeometraThreeWebGLWithSceneBasics} on the same bundle (same idea as
|
|
272
|
+
* {@link ThreeRuntimeContext.destroy} in browser hosts), `render` is skipped and this returns **`false`** even when
|
|
273
|
+
* the callback does not return `false`. `undefined` and other return values still render when the renderer was not
|
|
274
|
+
* disposed through that helper, and the function returns **`true`** when `render` runs.
|
|
275
|
+
*
|
|
276
|
+
* If `onFrame` **throws**, the error propagates and `renderer.render` is not called — same ordering as browser
|
|
277
|
+
* hosts, which run the frame callback before `render`.
|
|
278
|
+
*
|
|
279
|
+
* Use in headless GL, tests, or agent loops when you want {@link THREE.Clock} timing parity with those hosts
|
|
280
|
+
* without duplicating the loop body. Omit the callback to match a tick that only advances the clock and renders.
|
|
281
|
+
*
|
|
282
|
+
* @returns `true` if `renderer.render` ran, `false` if `onFrame` returned `false` (draw skipped).
|
|
283
|
+
*/
|
|
284
|
+
export declare function tickGeometraThreeWebGLWithSceneBasicsFrame(bundle: GeometraThreeWebGLWithSceneBasics, onFrame?: (ctx: GeometraThreeWebGLWithSceneBasicsTickContext) => void | boolean): boolean;
|
|
285
|
+
/**
|
|
286
|
+
* One-step frame: {@link resizeGeometraThreeWebGLWithSceneBasicsView}, then
|
|
287
|
+
* {@link tickGeometraThreeWebGLWithSceneBasicsFrame} — same as calling those two in sequence (resize
|
|
288
|
+
* before `clock.getDelta()` / `onFrame` / `render`).
|
|
289
|
+
*
|
|
290
|
+
* Use when you have an explicit raw device pixel ratio (for example `window.devicePixelRatio || 1` from a
|
|
291
|
+
* provided `window`, or a simulated value in tests and agent loops) and want the same resize + frame
|
|
292
|
+
* ordering as {@link createThreeGeometraSplitHost} / {@link createThreeGeometraStackedHost} without inlining
|
|
293
|
+
* both calls.
|
|
294
|
+
*
|
|
295
|
+
* For raw DPR **1** without repeating that literal, prefer {@link resizeTickGeometraThreeWebGLWithSceneBasicsHeadless}.
|
|
296
|
+
*
|
|
297
|
+
* @returns Same boolean as {@link tickGeometraThreeWebGLWithSceneBasicsFrame}.
|
|
298
|
+
*/
|
|
299
|
+
export declare function resizeTickGeometraThreeWebGLWithSceneBasics(bundle: GeometraThreeWebGLWithSceneBasics, cssWidth: number, cssHeight: number, rawDevicePixelRatio: number, maxDevicePixelRatio?: number, onFrame?: (ctx: GeometraThreeWebGLWithSceneBasicsTickContext) => void | boolean): boolean;
|
|
300
|
+
/**
|
|
301
|
+
* Headless one-step frame: {@link resizeGeometraThreeWebGLWithSceneBasicsViewHeadless}, then
|
|
302
|
+
* {@link tickGeometraThreeWebGLWithSceneBasicsFrame} — same as calling those two in sequence (resize
|
|
303
|
+
* before `clock.getDelta()` / `onFrame` / `render`).
|
|
304
|
+
*
|
|
305
|
+
* Equivalent to {@link resizeTickGeometraThreeWebGLWithSceneBasics} with `rawDevicePixelRatio` **1** and
|
|
306
|
+
* the same optional `maxDevicePixelRatio` / `onFrame` arguments.
|
|
307
|
+
*
|
|
308
|
+
* For Node, headless WebGL, tests, or agent loops that need buffer + camera sync on every tick with raw
|
|
309
|
+
* DPR **1** and the same optional cap as the browser hosts, without repeating the pair at every call site.
|
|
310
|
+
*
|
|
311
|
+
* @returns Same boolean as {@link tickGeometraThreeWebGLWithSceneBasicsFrame}.
|
|
312
|
+
*/
|
|
313
|
+
export declare function resizeTickGeometraThreeWebGLWithSceneBasicsHeadless(bundle: GeometraThreeWebGLWithSceneBasics, cssWidth: number, cssHeight: number, maxDevicePixelRatio?: number, onFrame?: (ctx: GeometraThreeWebGLWithSceneBasicsTickContext) => void | boolean): boolean;
|
|
314
|
+
/**
|
|
315
|
+
* Resize from {@link PlainGeometraThreeViewSizingState}, then {@link tickGeometraThreeWebGLWithSceneBasicsFrame} —
|
|
316
|
+
* same as calling those two in sequence (resize before `clock.getDelta()` / `onFrame` / `render`).
|
|
317
|
+
*
|
|
318
|
+
* Use in headless GL, tests, or agent loops when viewport JSON is already validated (for example with
|
|
319
|
+
* {@link isPlainGeometraThreeHostSnapshot}) and you want the same one-step flow as
|
|
320
|
+
* {@link resizeTickGeometraThreeWebGLWithSceneBasics} without re-supplying raw DPR and `maxDevicePixelRatio` on
|
|
321
|
+
* every tick.
|
|
322
|
+
*
|
|
323
|
+
* @returns Same boolean as {@link tickGeometraThreeWebGLWithSceneBasicsFrame}.
|
|
324
|
+
*/
|
|
325
|
+
export declare function resizeTickGeometraThreeWebGLWithSceneBasicsFromPlainViewSizing(bundle: GeometraThreeWebGLWithSceneBasics, sizing: PlainGeometraThreeViewSizingState, onFrame?: (ctx: GeometraThreeWebGLWithSceneBasicsTickContext) => void | boolean): boolean;
|
|
326
|
+
/**
|
|
327
|
+
* Same as {@link resizeTickGeometraThreeWebGLWithSceneBasicsFromPlainViewSizing} but takes a full
|
|
328
|
+
* {@link PlainGeometraThreeHostSnapshot} (viewport + scene plain fields) — for example from
|
|
329
|
+
* {@link toPlainGeometraThreeHostSnapshot}, {@link toPlainGeometraThreeHostSnapshotHeadless},
|
|
330
|
+
* {@link toPlainGeometraThreeHostSnapshotFromViewSizing}, or composite split/stacked snapshots that
|
|
331
|
+
* include those keys. Only the {@link PlainGeometraThreeViewSizingState} slice is read for resize;
|
|
332
|
+
* extra fields (scene/camera hex, hybrid layout) are ignored here but often live on the same object
|
|
333
|
+
* you already validated with {@link isPlainGeometraThreeHostSnapshot}.
|
|
334
|
+
*
|
|
335
|
+
* @returns Same boolean as {@link tickGeometraThreeWebGLWithSceneBasicsFrame}.
|
|
336
|
+
*/
|
|
337
|
+
export declare function resizeTickGeometraThreeWebGLWithSceneBasicsFromPlainHostSnapshot(bundle: GeometraThreeWebGLWithSceneBasics, snapshot: PlainGeometraThreeHostSnapshot, onFrame?: (ctx: GeometraThreeWebGLWithSceneBasicsTickContext) => void | boolean): boolean;
|
|
27
338
|
//# sourceMappingURL=three-scene-basics.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"three-scene-basics.d.ts","sourceRoot":"","sources":["../src/three-scene-basics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"three-scene-basics.d.ts","sourceRoot":"","sources":["../src/three-scene-basics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,OAAO,CAAA;AACpD,OAAO,EAOL,KAAK,iCAAiC,EACvC,MAAM,YAAY,CAAA;AAInB,0FAA0F;AAC1F,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,KAAK,CAAC,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