@vectojs/core 1.40.0 → 1.40.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/index.js +14 -2
- package/dist/index.mjs +14 -2
- package/dist/tree/Scene.d.ts +3 -2
- package/dist/tree/scene/ProjectionBackend.d.ts +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3819,6 +3819,8 @@ var SCENE_OPTION_KEYS = [
|
|
|
3819
3819
|
"maxFPS",
|
|
3820
3820
|
"particleBackend",
|
|
3821
3821
|
"pointBackend",
|
|
3822
|
+
"projectionAutoDomBudget",
|
|
3823
|
+
"projectionHysteresisFrames",
|
|
3822
3824
|
"readingDirection",
|
|
3823
3825
|
"renderer",
|
|
3824
3826
|
"renderMode",
|
|
@@ -5803,6 +5805,15 @@ var Scene = (_class15 = class _Scene {
|
|
|
5803
5805
|
while (this.overlayRoot.children.length > 0) {
|
|
5804
5806
|
this.destroyEntitySubtree(this.overlayRoot.children.at(-1));
|
|
5805
5807
|
}
|
|
5808
|
+
for (const node of this.domSeenNodes.values()) {
|
|
5809
|
+
for (const backend of this.projectionBackends) backend.unmount(node);
|
|
5810
|
+
}
|
|
5811
|
+
this.domSeenNodes.clear();
|
|
5812
|
+
this.domSeenThisFrame.clear();
|
|
5813
|
+
this.domSeenPrevFrame.clear();
|
|
5814
|
+
this.projectionResolutions.clear();
|
|
5815
|
+
this.projectionHysteresis.clear();
|
|
5816
|
+
this.projectionGesturePins.clear();
|
|
5806
5817
|
if (typeof window !== "undefined" && !this.disableWindowResize) {
|
|
5807
5818
|
window.removeEventListener("resize", this.resizeHandler);
|
|
5808
5819
|
}
|
|
@@ -6301,7 +6312,7 @@ var Scene = (_class15 = class _Scene {
|
|
|
6301
6312
|
shouldProjectA11y(node) {
|
|
6302
6313
|
if (!node.interactive) return false;
|
|
6303
6314
|
if (!(node.width > 0 || node.a11yFullViewport)) return false;
|
|
6304
|
-
if (
|
|
6315
|
+
if (this.resolveProjectionFor(node) === "dom") return false;
|
|
6305
6316
|
switch (node.a11yProjection) {
|
|
6306
6317
|
case "never":
|
|
6307
6318
|
return false;
|
|
@@ -7754,7 +7765,8 @@ var Scene = (_class15 = class _Scene {
|
|
|
7754
7765
|
* the per-frame materialization of scene semantics into pixels through the
|
|
7755
7766
|
* backend-agnostic `IRenderer` contract. (The `A11yProjection` /
|
|
7756
7767
|
* `ContentProjection` rows run on the same cadence via {@link Scene.syncA11y}
|
|
7757
|
-
* below; the `DOMProjection` row
|
|
7768
|
+
* below; the `DOMProjection` row lives in `@vectojs/dom` and is driven from
|
|
7769
|
+
* the render walk further below.)
|
|
7758
7770
|
*
|
|
7759
7771
|
* Main-frame causal order is a correctness contract:
|
|
7760
7772
|
*
|
package/dist/index.mjs
CHANGED
|
@@ -3818,6 +3818,8 @@ var SCENE_OPTION_KEYS = [
|
|
|
3818
3818
|
"maxFPS",
|
|
3819
3819
|
"particleBackend",
|
|
3820
3820
|
"pointBackend",
|
|
3821
|
+
"projectionAutoDomBudget",
|
|
3822
|
+
"projectionHysteresisFrames",
|
|
3821
3823
|
"readingDirection",
|
|
3822
3824
|
"renderer",
|
|
3823
3825
|
"renderMode",
|
|
@@ -5802,6 +5804,15 @@ var Scene = class _Scene {
|
|
|
5802
5804
|
while (this.overlayRoot.children.length > 0) {
|
|
5803
5805
|
this.destroyEntitySubtree(this.overlayRoot.children.at(-1));
|
|
5804
5806
|
}
|
|
5807
|
+
for (const node of this.domSeenNodes.values()) {
|
|
5808
|
+
for (const backend of this.projectionBackends) backend.unmount(node);
|
|
5809
|
+
}
|
|
5810
|
+
this.domSeenNodes.clear();
|
|
5811
|
+
this.domSeenThisFrame.clear();
|
|
5812
|
+
this.domSeenPrevFrame.clear();
|
|
5813
|
+
this.projectionResolutions.clear();
|
|
5814
|
+
this.projectionHysteresis.clear();
|
|
5815
|
+
this.projectionGesturePins.clear();
|
|
5805
5816
|
if (typeof window !== "undefined" && !this.disableWindowResize) {
|
|
5806
5817
|
window.removeEventListener("resize", this.resizeHandler);
|
|
5807
5818
|
}
|
|
@@ -6300,7 +6311,7 @@ var Scene = class _Scene {
|
|
|
6300
6311
|
shouldProjectA11y(node) {
|
|
6301
6312
|
if (!node.interactive) return false;
|
|
6302
6313
|
if (!(node.width > 0 || node.a11yFullViewport)) return false;
|
|
6303
|
-
if (
|
|
6314
|
+
if (this.resolveProjectionFor(node) === "dom") return false;
|
|
6304
6315
|
switch (node.a11yProjection) {
|
|
6305
6316
|
case "never":
|
|
6306
6317
|
return false;
|
|
@@ -7753,7 +7764,8 @@ var Scene = class _Scene {
|
|
|
7753
7764
|
* the per-frame materialization of scene semantics into pixels through the
|
|
7754
7765
|
* backend-agnostic `IRenderer` contract. (The `A11yProjection` /
|
|
7755
7766
|
* `ContentProjection` rows run on the same cadence via {@link Scene.syncA11y}
|
|
7756
|
-
* below; the `DOMProjection` row
|
|
7767
|
+
* below; the `DOMProjection` row lives in `@vectojs/dom` and is driven from
|
|
7768
|
+
* the render walk further below.)
|
|
7757
7769
|
*
|
|
7758
7770
|
* Main-frame causal order is a correctness contract:
|
|
7759
7771
|
*
|
package/dist/tree/Scene.d.ts
CHANGED
|
@@ -287,7 +287,7 @@ export interface SceneOptions {
|
|
|
287
287
|
* against. A new option must be added here too — the test suite asserts the two
|
|
288
288
|
* stay in sync.
|
|
289
289
|
*/
|
|
290
|
-
export declare const SCENE_OPTION_KEYS: readonly ['a11ySyncInterval', 'autoThrottle', 'contentProjection', 'contentProjectionMargin', 'contentSemanticBudget', 'contentSemanticMargin', 'debugA11y', 'disableWindowResize', 'idleFPS', 'maxDPR', 'maxFPS', 'particleBackend', 'pointBackend', 'readingDirection', 'renderer', 'renderMode', 'respectReducedMotion', 'semanticProjectionPolicy', 'userTiming'];
|
|
290
|
+
export declare const SCENE_OPTION_KEYS: readonly ['a11ySyncInterval', 'autoThrottle', 'contentProjection', 'contentProjectionMargin', 'contentSemanticBudget', 'contentSemanticMargin', 'debugA11y', 'disableWindowResize', 'idleFPS', 'maxDPR', 'maxFPS', 'particleBackend', 'pointBackend', 'projectionAutoDomBudget', 'projectionHysteresisFrames', 'readingDirection', 'renderer', 'renderMode', 'respectReducedMotion', 'semanticProjectionPolicy', 'userTiming'];
|
|
291
291
|
/** Frame-rate the loop is capped to when the OS requests reduced motion. */
|
|
292
292
|
export declare const REDUCED_MOTION_FPS = 30;
|
|
293
293
|
export type { AcceleratorReason, AcceleratorStatus, AcceleratorReport };
|
|
@@ -1812,7 +1812,8 @@ export declare class Scene {
|
|
|
1812
1812
|
* the per-frame materialization of scene semantics into pixels through the
|
|
1813
1813
|
* backend-agnostic `IRenderer` contract. (The `A11yProjection` /
|
|
1814
1814
|
* `ContentProjection` rows run on the same cadence via {@link Scene.syncA11y}
|
|
1815
|
-
* below; the `DOMProjection` row
|
|
1815
|
+
* below; the `DOMProjection` row lives in `@vectojs/dom` and is driven from
|
|
1816
|
+
* the render walk further below.)
|
|
1816
1817
|
*
|
|
1817
1818
|
* Main-frame causal order is a correctness contract:
|
|
1818
1819
|
*
|
|
@@ -18,8 +18,8 @@ export type ProjectionBackendKind = 'canvas' | 'dom' | 'a11y' | 'content' | (str
|
|
|
18
18
|
* mount/update/unmount shape the existing projections already follow so
|
|
19
19
|
* RFC2 (DOM projection), RFC3 (semantic/a11y projection), and RFC4
|
|
20
20
|
* (projection policy) can each name which row they implement or consume.
|
|
21
|
-
*
|
|
22
|
-
* backend onto the code that performs its role
|
|
21
|
+
* `@vectojs/dom` implements the `'dom'` row (`DOMProjection`); the rows below
|
|
22
|
+
* map each backend onto the code that performs its role, with the invariant
|
|
23
23
|
* from RFC1 §2: two projections of the same node must agree on geometry
|
|
24
24
|
* (world matrix), visibility, and lifecycle state, while each keeps its own
|
|
25
25
|
* medium-specific representation.
|
|
@@ -29,7 +29,7 @@ export type ProjectionBackendKind = 'canvas' | 'dom' | 'a11y' | 'content' | (str
|
|
|
29
29
|
* | `CanvasProjection` (`'canvas'`) | the main render pass via `IRenderer` | `Scene.render(renderer)` (`tree/Scene.ts`) → per-entity `Entity.render` (`tree/Entity.ts`) |
|
|
30
30
|
* | `A11yProjection` (`'a11y'`) | `A11yProjectionManager` + `a11yRoot` mirrors | mirror creation in the `Scene.syncA11y` walk (`tree/Scene.ts`); ordering in `A11yProjectionManager` |
|
|
31
31
|
* | `ContentProjection` (`'content'`) | `ContentProjectionManager` + `Entity.getContentProjection` | `Scene.syncContentProjection`, driven on the a11y sync cadence (`tree/Scene.ts`) |
|
|
32
|
-
* | `DOMProjection` (`'dom'`) |
|
|
32
|
+
* | `DOMProjection` (`'dom'`) | `@vectojs/dom` (`DOMProjection`, driven from the render walk) | `Scene.addProjectionBackend` + walk hook (`tree/Scene.ts`) |
|
|
33
33
|
*
|
|
34
34
|
* Open points deliberately left to RFC2/RFC4 (RFC1 §5): whether `update`
|
|
35
35
|
* receives the full matrix or a decomposed transform, how z-order/layering
|