@aura3d/engine 1.5.0 → 1.5.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/README.md +77 -46
- package/dist/engine/agent-api/ApplicationKits.d.ts +307 -0
- package/dist/engine/agent-api/ApplicationKits.d.ts.map +1 -0
- package/dist/engine/agent-api/ApplicationKits.js +650 -0
- package/dist/engine/agent-api/ApplicationKits.js.map +1 -0
- package/dist/engine/agent-api/CombatFrameData.d.ts +210 -0
- package/dist/engine/agent-api/CombatFrameData.d.ts.map +1 -0
- package/dist/engine/agent-api/CombatFrameData.js +324 -0
- package/dist/engine/agent-api/CombatFrameData.js.map +1 -0
- package/dist/engine/agent-api/FocusSelection.d.ts +186 -0
- package/dist/engine/agent-api/FocusSelection.d.ts.map +1 -0
- package/dist/engine/agent-api/FocusSelection.js +436 -0
- package/dist/engine/agent-api/FocusSelection.js.map +1 -0
- package/dist/engine/agent-api/GameGenreKits.d.ts +32 -1
- package/dist/engine/agent-api/GameGenreKits.d.ts.map +1 -1
- package/dist/engine/agent-api/GameGenreKits.js +51 -7
- package/dist/engine/agent-api/GameGenreKits.js.map +1 -1
- package/dist/engine/agent-api/GameSceneGeometryBindings.d.ts +10 -0
- package/dist/engine/agent-api/GameSceneGeometryBindings.d.ts.map +1 -1
- package/dist/engine/agent-api/GameSceneGeometryBindings.js +7 -0
- package/dist/engine/agent-api/GameSceneGeometryBindings.js.map +1 -1
- package/dist/engine/agent-api/PlatformerMotion.d.ts +177 -0
- package/dist/engine/agent-api/PlatformerMotion.d.ts.map +1 -0
- package/dist/engine/agent-api/PlatformerMotion.js +207 -0
- package/dist/engine/agent-api/PlatformerMotion.js.map +1 -0
- package/dist/engine/agent-api/SceneQueries.d.ts +124 -0
- package/dist/engine/agent-api/SceneQueries.d.ts.map +1 -0
- package/dist/engine/agent-api/SceneQueries.js +221 -0
- package/dist/engine/agent-api/SceneQueries.js.map +1 -0
- package/dist/engine/agent-api/SpatialAnchoring.d.ts +232 -0
- package/dist/engine/agent-api/SpatialAnchoring.d.ts.map +1 -0
- package/dist/engine/agent-api/SpatialAnchoring.js +348 -0
- package/dist/engine/agent-api/SpatialAnchoring.js.map +1 -0
- package/dist/engine/agent-api/VehicleChassis.d.ts +192 -0
- package/dist/engine/agent-api/VehicleChassis.d.ts.map +1 -0
- package/dist/engine/agent-api/VehicleChassis.js +322 -0
- package/dist/engine/agent-api/VehicleChassis.js.map +1 -0
- package/dist/engine/agent-api/VehicleDriverAi.d.ts +123 -0
- package/dist/engine/agent-api/VehicleDriverAi.d.ts.map +1 -0
- package/dist/engine/agent-api/VehicleDriverAi.js +217 -0
- package/dist/engine/agent-api/VehicleDriverAi.js.map +1 -0
- package/dist/engine/agent-api/WorldLabelRenderer.d.ts +146 -0
- package/dist/engine/agent-api/WorldLabelRenderer.d.ts.map +1 -0
- package/dist/engine/agent-api/WorldLabelRenderer.js +331 -0
- package/dist/engine/agent-api/WorldLabelRenderer.js.map +1 -0
- package/dist/engine/agent-api/index.d.ts +30 -0
- package/dist/engine/agent-api/index.d.ts.map +1 -1
- package/dist/engine/agent-api/index.js +87 -1
- package/dist/engine/agent-api/index.js.map +1 -1
- package/dist/engine/agent-api/product-viewer-runtime.d.ts.map +1 -1
- package/package.json +8 -2
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reusable object focus and selection feedback.
|
|
3
|
+
*
|
|
4
|
+
* ## The defect this replaces
|
|
5
|
+
*
|
|
6
|
+
* The product configurator built its focus indicator by hand:
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* primitives.torus({ ... }).position(...p).rotate(1.5708, 0, 0).scale([1.22, 0.08, 0.78])
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* Aura3D's torus primitive is generated in local XY -- the ring lies in the XY
|
|
13
|
+
* plane with its tube thin on **Z** (`createTorusGeometry` sweeps `cos u, sin u`
|
|
14
|
+
* into X/Y and puts the tube's `sin v` on Z). Scaling `[1.22, 0.08, 0.78]`
|
|
15
|
+
* therefore squashes the ring's own **Y radius** to 8%, turning the circle into a
|
|
16
|
+
* flat horizontal sliver. The subsequent `rotate(pi/2, 0, 0)` tips that sliver
|
|
17
|
+
* into the ground plane, and it renders as the "random yellow/white bar" the
|
|
18
|
+
* user reported. A working ring in the same codebase uses `[0.72, 0.72, 0.028]`
|
|
19
|
+
* -- equal X/Y radii, thin on Z -- which is why the two looked unrelated.
|
|
20
|
+
*
|
|
21
|
+
* Changing those three constants would have fixed one route and left the trap in
|
|
22
|
+
* place for every other. The real defects are: primitive local axes were not
|
|
23
|
+
* documented, and no reusable focus feedback existed, so every route invented
|
|
24
|
+
* its own indicator geometry.
|
|
25
|
+
*
|
|
26
|
+
* This module removes the need to know the torus axis convention at all. A route
|
|
27
|
+
* states intent -- focus this target, with a ring and a callout -- and gets
|
|
28
|
+
* correct indicator geometry for any target size, orientation, or nonuniform
|
|
29
|
+
* scale.
|
|
30
|
+
*
|
|
31
|
+
* Pure and dependency-free: it returns scene-node JSON and camera intent, so it
|
|
32
|
+
* is unit-testable without a renderer and reusable by any route or kit.
|
|
33
|
+
*/
|
|
34
|
+
import type { AuraColor, AuraSceneNode, AuraVec3 } from "./index.js";
|
|
35
|
+
import { type PlacedBounds, type SemanticRegion } from "./SpatialAnchoring.js";
|
|
36
|
+
/**
|
|
37
|
+
* Local-axis conventions for Aura3D primitives.
|
|
38
|
+
*
|
|
39
|
+
* Published so a route that must build custom geometry can do so correctly, and
|
|
40
|
+
* so the reason for the configurator defect is discoverable rather than folklore.
|
|
41
|
+
*/
|
|
42
|
+
export declare const AURA_PRIMITIVE_AXES: {
|
|
43
|
+
/**
|
|
44
|
+
* A torus is a ring in the local XY plane. Its major radius spans X and Y
|
|
45
|
+
* equally; its tube thickness lies on Z. To thin a ring, scale **Z**. Scaling
|
|
46
|
+
* Y collapses the ring into a bar.
|
|
47
|
+
*/
|
|
48
|
+
readonly torus: {
|
|
49
|
+
readonly ringPlane: "xy";
|
|
50
|
+
readonly tubeAxis: "z";
|
|
51
|
+
readonly thinAxis: "z";
|
|
52
|
+
};
|
|
53
|
+
/** A cylinder's height runs along Y; its circular cross-section spans X and Z. */
|
|
54
|
+
readonly cylinder: {
|
|
55
|
+
readonly heightAxis: "y";
|
|
56
|
+
readonly crossSection: "xz";
|
|
57
|
+
readonly thinAxis: "y";
|
|
58
|
+
};
|
|
59
|
+
/** A plane lies in XZ with its normal on Y. */
|
|
60
|
+
readonly plane: {
|
|
61
|
+
readonly plane: "xz";
|
|
62
|
+
readonly normalAxis: "y";
|
|
63
|
+
readonly thinAxis: "y";
|
|
64
|
+
};
|
|
65
|
+
/** Boxes, spheres and capsules are axis-symmetric about their own extents. */
|
|
66
|
+
readonly box: {
|
|
67
|
+
readonly thinAxis: undefined;
|
|
68
|
+
};
|
|
69
|
+
readonly sphere: {
|
|
70
|
+
readonly thinAxis: undefined;
|
|
71
|
+
};
|
|
72
|
+
readonly capsule: {
|
|
73
|
+
readonly heightAxis: "y";
|
|
74
|
+
readonly thinAxis: undefined;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
/** Visual treatments a focus indicator can apply. */
|
|
78
|
+
export type FocusIndicator = "ring" | "halo" | "bounding-box" | "outline" | "emissive-highlight";
|
|
79
|
+
export interface FocusTargetBounds {
|
|
80
|
+
/** World position of the target's centre. */
|
|
81
|
+
readonly center: AuraVec3;
|
|
82
|
+
/** World-space extents of the target. */
|
|
83
|
+
readonly size: AuraVec3;
|
|
84
|
+
/**
|
|
85
|
+
* Euler rotation of the target, radians. Indicator geometry inherits it so a
|
|
86
|
+
* rotated part gets a rotated indicator rather than an axis-aligned one.
|
|
87
|
+
*/
|
|
88
|
+
readonly rotation?: AuraVec3 | undefined;
|
|
89
|
+
}
|
|
90
|
+
export interface FocusTarget extends FocusTargetBounds {
|
|
91
|
+
readonly id: string;
|
|
92
|
+
/** Human-readable name used for the callout and accessibility text. */
|
|
93
|
+
readonly label?: string | undefined;
|
|
94
|
+
}
|
|
95
|
+
export interface FocusOptions {
|
|
96
|
+
/** Indicators to draw. Defaults to a ring plus a callout label. */
|
|
97
|
+
readonly indicators?: readonly FocusIndicator[] | undefined;
|
|
98
|
+
readonly color?: AuraColor | undefined;
|
|
99
|
+
/** Draw a callout label anchored to the target. Defaults to true. */
|
|
100
|
+
readonly callout?: boolean | undefined;
|
|
101
|
+
/** Text for the callout. Defaults to the target's label. */
|
|
102
|
+
readonly calloutText?: string | undefined;
|
|
103
|
+
/** Draw a leader line from the callout to the target. Defaults to true. */
|
|
104
|
+
readonly leaderLine?: boolean | undefined;
|
|
105
|
+
/** Dim non-focused geometry. Reported as intent; the route applies it. */
|
|
106
|
+
readonly dimOthers?: boolean | undefined;
|
|
107
|
+
/** Move the camera to frame the target. Defaults to true. */
|
|
108
|
+
readonly cameraFocus?: boolean | undefined;
|
|
109
|
+
/**
|
|
110
|
+
* Extra clearance between the indicator and the target surface, as a fraction
|
|
111
|
+
* of the target's largest extent. Defaults to 0.12 so a ring reads as
|
|
112
|
+
* surrounding the part rather than intersecting it.
|
|
113
|
+
*/
|
|
114
|
+
readonly clearance?: number | undefined;
|
|
115
|
+
/** Node-name prefix, so indicator nodes are identifiable in evidence. */
|
|
116
|
+
readonly namePrefix?: string | undefined;
|
|
117
|
+
/**
|
|
118
|
+
* Viewport aspect ratio, used only to size camera framing distance. Defaults
|
|
119
|
+
* to 16/9.
|
|
120
|
+
*/
|
|
121
|
+
readonly aspect?: number | undefined;
|
|
122
|
+
/** Mobile viewports need a wider frame; defaults to false. */
|
|
123
|
+
readonly compactViewport?: boolean | undefined;
|
|
124
|
+
}
|
|
125
|
+
export interface FocusCameraIntent {
|
|
126
|
+
readonly position: AuraVec3;
|
|
127
|
+
readonly target: AuraVec3;
|
|
128
|
+
readonly fov: number;
|
|
129
|
+
/** True when the target's bounds fit inside the frustum at this distance. */
|
|
130
|
+
readonly containsTarget: boolean;
|
|
131
|
+
}
|
|
132
|
+
export interface FocusResult {
|
|
133
|
+
readonly kind: "aura-focus-result";
|
|
134
|
+
readonly targetId: string;
|
|
135
|
+
/** Indicator geometry and labels to add to the scene. */
|
|
136
|
+
readonly nodes: readonly AuraSceneNode[];
|
|
137
|
+
readonly camera: FocusCameraIntent | undefined;
|
|
138
|
+
/** Set when `dimOthers` was requested, so the route can lower other materials. */
|
|
139
|
+
readonly dimOthers: boolean;
|
|
140
|
+
/** Machine-checkable statement that indicators surround their target. */
|
|
141
|
+
readonly invariants: FocusInvariantReport;
|
|
142
|
+
/** Screen-reader text describing the current selection. */
|
|
143
|
+
readonly accessibilityLabel: string;
|
|
144
|
+
}
|
|
145
|
+
export interface FocusInvariantReport {
|
|
146
|
+
readonly schema: "aura3d-focus-invariants/1.0";
|
|
147
|
+
readonly checks: readonly {
|
|
148
|
+
readonly id: string;
|
|
149
|
+
readonly description: string;
|
|
150
|
+
readonly passes: boolean;
|
|
151
|
+
readonly detail: string;
|
|
152
|
+
}[];
|
|
153
|
+
readonly passes: boolean;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Build focus feedback for a target.
|
|
157
|
+
*
|
|
158
|
+
* The ring is sized from the target's own extents and thinned on **Z**, the
|
|
159
|
+
* torus tube axis, then rotated to lie in the horizontal plane. Because the
|
|
160
|
+
* radius is uniform in the ring's own plane it stays a ring for any target
|
|
161
|
+
* aspect ratio -- which is what the flattened-bar defect got wrong.
|
|
162
|
+
*/
|
|
163
|
+
export declare function focusObject(target: FocusTarget, options?: FocusOptions): FocusResult;
|
|
164
|
+
/**
|
|
165
|
+
* Focus a named region of a subject rather than a standalone object.
|
|
166
|
+
*
|
|
167
|
+
* This is how a configurator focuses "the earcups" without knowing where the
|
|
168
|
+
* earcups are in world space: the region is normalized to the subject's bounds,
|
|
169
|
+
* so it follows the asset.
|
|
170
|
+
*/
|
|
171
|
+
export declare function focusSemanticRegion(subject: PlacedBounds, region: SemanticRegion, options?: FocusOptions): FocusResult;
|
|
172
|
+
/** Empty focus state: no indicators, no camera change, reset accessibility text. */
|
|
173
|
+
export declare function clearFocus(): FocusResult;
|
|
174
|
+
/**
|
|
175
|
+
* Camera pose that frames a target's bounds.
|
|
176
|
+
*
|
|
177
|
+
* Distance is derived from the vertical and horizontal half-angles so the whole
|
|
178
|
+
* target fits regardless of viewport aspect. A compact (mobile) viewport pulls
|
|
179
|
+
* back further because UI chrome takes vertical space.
|
|
180
|
+
*/
|
|
181
|
+
export declare function focusCameraIntent(center: AuraVec3, size: AuraVec3, options?: {
|
|
182
|
+
readonly aspect?: number | undefined;
|
|
183
|
+
readonly compactViewport?: boolean | undefined;
|
|
184
|
+
readonly fov?: number | undefined;
|
|
185
|
+
}): FocusCameraIntent;
|
|
186
|
+
//# sourceMappingURL=FocusSelection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FocusSelection.d.ts","sourceRoot":"","sources":["../../../../../packages/engine/src/agent-api/FocusSelection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAoC,aAAa,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACvG,OAAO,EAKL,KAAK,YAAY,EACjB,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAE/B;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;IAC9B;;;;OAIG;;;;;;IAEH,kFAAkF;;;;;;IAElF,+CAA+C;;;;;;IAE/C,8EAA8E;;;;;;;;;;;CAItE,CAAC;AAEX,qDAAqD;AACrD,MAAM,MAAM,cAAc,GACtB,MAAM,GACN,MAAM,GACN,cAAc,GACd,SAAS,GACT,oBAAoB,CAAC;AAEzB,MAAM,WAAW,iBAAiB;IAChC,6CAA6C;IAC7C,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC;IAC1B,yCAAyC;IACzC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB;;;OAGG;IACH,QAAQ,CAAC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,EAAE,QAAQ,EACd,OAAO,GAAE;IAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAO,GACxI,iBAAiB,CAgCnB"}
|
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reusable object focus and selection feedback.
|
|
3
|
+
*
|
|
4
|
+
* ## The defect this replaces
|
|
5
|
+
*
|
|
6
|
+
* The product configurator built its focus indicator by hand:
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* primitives.torus({ ... }).position(...p).rotate(1.5708, 0, 0).scale([1.22, 0.08, 0.78])
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* Aura3D's torus primitive is generated in local XY -- the ring lies in the XY
|
|
13
|
+
* plane with its tube thin on **Z** (`createTorusGeometry` sweeps `cos u, sin u`
|
|
14
|
+
* into X/Y and puts the tube's `sin v` on Z). Scaling `[1.22, 0.08, 0.78]`
|
|
15
|
+
* therefore squashes the ring's own **Y radius** to 8%, turning the circle into a
|
|
16
|
+
* flat horizontal sliver. The subsequent `rotate(pi/2, 0, 0)` tips that sliver
|
|
17
|
+
* into the ground plane, and it renders as the "random yellow/white bar" the
|
|
18
|
+
* user reported. A working ring in the same codebase uses `[0.72, 0.72, 0.028]`
|
|
19
|
+
* -- equal X/Y radii, thin on Z -- which is why the two looked unrelated.
|
|
20
|
+
*
|
|
21
|
+
* Changing those three constants would have fixed one route and left the trap in
|
|
22
|
+
* place for every other. The real defects are: primitive local axes were not
|
|
23
|
+
* documented, and no reusable focus feedback existed, so every route invented
|
|
24
|
+
* its own indicator geometry.
|
|
25
|
+
*
|
|
26
|
+
* This module removes the need to know the torus axis convention at all. A route
|
|
27
|
+
* states intent -- focus this target, with a ring and a callout -- and gets
|
|
28
|
+
* correct indicator geometry for any target size, orientation, or nonuniform
|
|
29
|
+
* scale.
|
|
30
|
+
*
|
|
31
|
+
* Pure and dependency-free: it returns scene-node JSON and camera intent, so it
|
|
32
|
+
* is unit-testable without a renderer and reusable by any route or kit.
|
|
33
|
+
*/
|
|
34
|
+
import { containsPoint, distanceOutsideBounds, placedBounds, resolveSemanticRegion } from "./SpatialAnchoring.js";
|
|
35
|
+
/**
|
|
36
|
+
* Local-axis conventions for Aura3D primitives.
|
|
37
|
+
*
|
|
38
|
+
* Published so a route that must build custom geometry can do so correctly, and
|
|
39
|
+
* so the reason for the configurator defect is discoverable rather than folklore.
|
|
40
|
+
*/
|
|
41
|
+
export const AURA_PRIMITIVE_AXES = {
|
|
42
|
+
/**
|
|
43
|
+
* A torus is a ring in the local XY plane. Its major radius spans X and Y
|
|
44
|
+
* equally; its tube thickness lies on Z. To thin a ring, scale **Z**. Scaling
|
|
45
|
+
* Y collapses the ring into a bar.
|
|
46
|
+
*/
|
|
47
|
+
torus: { ringPlane: "xy", tubeAxis: "z", thinAxis: "z" },
|
|
48
|
+
/** A cylinder's height runs along Y; its circular cross-section spans X and Z. */
|
|
49
|
+
cylinder: { heightAxis: "y", crossSection: "xz", thinAxis: "y" },
|
|
50
|
+
/** A plane lies in XZ with its normal on Y. */
|
|
51
|
+
plane: { plane: "xz", normalAxis: "y", thinAxis: "y" },
|
|
52
|
+
/** Boxes, spheres and capsules are axis-symmetric about their own extents. */
|
|
53
|
+
box: { thinAxis: undefined },
|
|
54
|
+
sphere: { thinAxis: undefined },
|
|
55
|
+
capsule: { heightAxis: "y", thinAxis: undefined }
|
|
56
|
+
};
|
|
57
|
+
const DEFAULT_INDICATORS = ["ring"];
|
|
58
|
+
/**
|
|
59
|
+
* Build focus feedback for a target.
|
|
60
|
+
*
|
|
61
|
+
* The ring is sized from the target's own extents and thinned on **Z**, the
|
|
62
|
+
* torus tube axis, then rotated to lie in the horizontal plane. Because the
|
|
63
|
+
* radius is uniform in the ring's own plane it stays a ring for any target
|
|
64
|
+
* aspect ratio -- which is what the flattened-bar defect got wrong.
|
|
65
|
+
*/
|
|
66
|
+
export function focusObject(target, options = {}) {
|
|
67
|
+
const indicators = options.indicators ?? DEFAULT_INDICATORS;
|
|
68
|
+
const color = options.color ?? "#fde68a";
|
|
69
|
+
const prefix = options.namePrefix ?? `focus ${target.id}`;
|
|
70
|
+
const size = normalizeSize(target.size);
|
|
71
|
+
const maxExtent = Math.max(size[0], size[1], size[2]);
|
|
72
|
+
const clearance = Math.max(0, options.clearance ?? 0.12);
|
|
73
|
+
const rotation = target.rotation ?? [0, 0, 0];
|
|
74
|
+
const nodes = [];
|
|
75
|
+
// Horizontal radius that encloses the target's footprint, plus clearance.
|
|
76
|
+
const footprintRadius = Math.sqrt(size[0] * size[0] + size[2] * size[2]) / 2;
|
|
77
|
+
const ringRadius = footprintRadius * (1 + clearance);
|
|
78
|
+
if (indicators.includes("ring")) {
|
|
79
|
+
nodes.push(focusRingNode({
|
|
80
|
+
name: `${prefix} selection ring`,
|
|
81
|
+
center: target.center,
|
|
82
|
+
radius: ringRadius,
|
|
83
|
+
// The ring sits at the target's vertical centre so it reads as encircling
|
|
84
|
+
// the part rather than sitting under it.
|
|
85
|
+
color,
|
|
86
|
+
rotation,
|
|
87
|
+
// Tube thickness is a fraction of the ring's own radius, not of the
|
|
88
|
+
// target's largest extent. Using the largest extent made the tube thicker
|
|
89
|
+
// than the radius for tall thin targets (an antenna produced a disc).
|
|
90
|
+
tubeScale: ringTubeScale(ringRadius)
|
|
91
|
+
}));
|
|
92
|
+
}
|
|
93
|
+
if (indicators.includes("halo")) {
|
|
94
|
+
// A halo is a larger, softer ring in the same plane, offset above the target.
|
|
95
|
+
nodes.push(focusRingNode({
|
|
96
|
+
name: `${prefix} selection halo`,
|
|
97
|
+
center: [target.center[0], target.center[1] + size[1] / 2 + maxExtent * 0.06, target.center[2]],
|
|
98
|
+
radius: ringRadius * 1.22,
|
|
99
|
+
color,
|
|
100
|
+
rotation,
|
|
101
|
+
tubeScale: ringTubeScale(ringRadius * 1.22) * 0.6,
|
|
102
|
+
opacity: 0.42
|
|
103
|
+
}));
|
|
104
|
+
}
|
|
105
|
+
if (indicators.includes("bounding-box")) {
|
|
106
|
+
nodes.push(...focusBoundingBoxNodes(prefix, target.center, size, rotation, color, clearance));
|
|
107
|
+
}
|
|
108
|
+
if (indicators.includes("outline")) {
|
|
109
|
+
// An outline is a thin shell slightly larger than the target, drawn as an
|
|
110
|
+
// additive box so it reads as an edge highlight without hiding the part.
|
|
111
|
+
nodes.push({
|
|
112
|
+
kind: "primitive",
|
|
113
|
+
primitive: "box",
|
|
114
|
+
name: `${prefix} selection outline shell`,
|
|
115
|
+
material: { color, emissive: color, emissiveIntensity: 0.5, opacity: 0.18 },
|
|
116
|
+
position: target.center,
|
|
117
|
+
rotation,
|
|
118
|
+
scale: [size[0] * (1 + clearance * 0.5), size[1] * (1 + clearance * 0.5), size[2] * (1 + clearance * 0.5)]
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
if (indicators.includes("emissive-highlight")) {
|
|
122
|
+
nodes.push({
|
|
123
|
+
kind: "primitive",
|
|
124
|
+
primitive: "sphere",
|
|
125
|
+
name: `${prefix} selection emissive highlight`,
|
|
126
|
+
material: { color, emissive: color, emissiveIntensity: 1.1, opacity: 0.22 },
|
|
127
|
+
position: target.center,
|
|
128
|
+
scale: [size[0] * 0.5, size[1] * 0.5, size[2] * 0.5]
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
// Callout label, anchored outside the target so it never sits inside geometry.
|
|
132
|
+
const wantsCallout = options.callout ?? true;
|
|
133
|
+
const calloutText = options.calloutText ?? target.label ?? target.id;
|
|
134
|
+
let calloutPosition;
|
|
135
|
+
if (wantsCallout) {
|
|
136
|
+
calloutPosition = [
|
|
137
|
+
target.center[0] + ringRadius + maxExtent * 0.18,
|
|
138
|
+
target.center[1] + size[1] * 0.5 + maxExtent * 0.14,
|
|
139
|
+
target.center[2]
|
|
140
|
+
];
|
|
141
|
+
nodes.push({
|
|
142
|
+
kind: "label",
|
|
143
|
+
label: "callout",
|
|
144
|
+
name: `${prefix} callout`,
|
|
145
|
+
text: calloutText,
|
|
146
|
+
target: target.label ?? target.id,
|
|
147
|
+
position: calloutPosition,
|
|
148
|
+
color: "#f8fafc",
|
|
149
|
+
background: "#111827",
|
|
150
|
+
size: Math.max(0.12, maxExtent * 0.22),
|
|
151
|
+
leader: options.leaderLine ?? true,
|
|
152
|
+
// The label is anchored to a world point and projected each frame by the
|
|
153
|
+
// label renderer, so it stays attached while the camera moves.
|
|
154
|
+
anchorWorldPosition: target.center,
|
|
155
|
+
collisionAvoidance: true,
|
|
156
|
+
occlusionAware: true
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
const camera = (options.cameraFocus ?? true)
|
|
160
|
+
? focusCameraIntent(target.center, size, {
|
|
161
|
+
aspect: options.aspect ?? 16 / 9,
|
|
162
|
+
compactViewport: options.compactViewport ?? false
|
|
163
|
+
})
|
|
164
|
+
: undefined;
|
|
165
|
+
const invariants = checkFocusInvariants({
|
|
166
|
+
target,
|
|
167
|
+
size,
|
|
168
|
+
ringRadius,
|
|
169
|
+
nodes,
|
|
170
|
+
calloutPosition,
|
|
171
|
+
camera
|
|
172
|
+
});
|
|
173
|
+
return {
|
|
174
|
+
kind: "aura-focus-result",
|
|
175
|
+
targetId: target.id,
|
|
176
|
+
nodes,
|
|
177
|
+
camera,
|
|
178
|
+
dimOthers: options.dimOthers ?? false,
|
|
179
|
+
invariants,
|
|
180
|
+
accessibilityLabel: `${calloutText} selected${camera ? ", camera focused" : ""}`
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Focus a named region of a subject rather than a standalone object.
|
|
185
|
+
*
|
|
186
|
+
* This is how a configurator focuses "the earcups" without knowing where the
|
|
187
|
+
* earcups are in world space: the region is normalized to the subject's bounds,
|
|
188
|
+
* so it follows the asset.
|
|
189
|
+
*/
|
|
190
|
+
export function focusSemanticRegion(subject, region, options = {}) {
|
|
191
|
+
const resolved = resolveSemanticRegion(subject, region);
|
|
192
|
+
return focusObject({
|
|
193
|
+
id: resolved.id,
|
|
194
|
+
label: resolved.label ?? resolved.id,
|
|
195
|
+
center: resolved.center,
|
|
196
|
+
// A point region would produce a zero-radius ring. Fall back to a readable
|
|
197
|
+
// fraction of the subject so `extent`-less regions still get usable feedback.
|
|
198
|
+
size: [
|
|
199
|
+
resolved.size[0] > 0 ? resolved.size[0] : subject.size[0] * 0.3,
|
|
200
|
+
resolved.size[1] > 0 ? resolved.size[1] : subject.size[1] * 0.3,
|
|
201
|
+
resolved.size[2] > 0 ? resolved.size[2] : subject.size[2] * 0.3
|
|
202
|
+
]
|
|
203
|
+
}, options);
|
|
204
|
+
}
|
|
205
|
+
/** Empty focus state: no indicators, no camera change, reset accessibility text. */
|
|
206
|
+
export function clearFocus() {
|
|
207
|
+
return {
|
|
208
|
+
kind: "aura-focus-result",
|
|
209
|
+
targetId: "",
|
|
210
|
+
nodes: [],
|
|
211
|
+
camera: undefined,
|
|
212
|
+
dimOthers: false,
|
|
213
|
+
invariants: { schema: "aura3d-focus-invariants/1.0", checks: [], passes: true },
|
|
214
|
+
accessibilityLabel: "no selection"
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Camera pose that frames a target's bounds.
|
|
219
|
+
*
|
|
220
|
+
* Distance is derived from the vertical and horizontal half-angles so the whole
|
|
221
|
+
* target fits regardless of viewport aspect. A compact (mobile) viewport pulls
|
|
222
|
+
* back further because UI chrome takes vertical space.
|
|
223
|
+
*/
|
|
224
|
+
export function focusCameraIntent(center, size, options = {}) {
|
|
225
|
+
const fov = options.fov ?? 38;
|
|
226
|
+
const aspect = Math.max(0.2, options.aspect ?? 16 / 9);
|
|
227
|
+
const normalized = normalizeSize(size);
|
|
228
|
+
const halfHeight = normalized[1] / 2;
|
|
229
|
+
const halfWidth = Math.max(normalized[0], normalized[2]) / 2;
|
|
230
|
+
const vFov = (fov * Math.PI) / 180;
|
|
231
|
+
const hFov = 2 * Math.atan(Math.tan(vFov / 2) * aspect);
|
|
232
|
+
const distanceForHeight = halfHeight / Math.tan(vFov / 2);
|
|
233
|
+
const distanceForWidth = halfWidth / Math.tan(hFov / 2);
|
|
234
|
+
// Distance must also clear the target's bounding sphere against the narrower
|
|
235
|
+
// frustum half-angle. Sizing only from the axis-aligned half-extents framed a
|
|
236
|
+
// cube's faces but clipped its corners, so `containsTarget` was false for
|
|
237
|
+
// ordinary targets and the invariant reported a failure with no visible cause.
|
|
238
|
+
const boundingRadius = Math.sqrt(normalized[0] ** 2 + normalized[1] ** 2 + normalized[2] ** 2) / 2;
|
|
239
|
+
const narrowHalfAngle = Math.min(vFov, hFov) / 2;
|
|
240
|
+
const distanceForSphere = boundingRadius / Math.max(1e-6, Math.sin(narrowHalfAngle));
|
|
241
|
+
const margin = options.compactViewport === true ? 2.1 : 1.6;
|
|
242
|
+
const distance = Math.max(distanceForHeight, distanceForWidth, distanceForSphere) * margin;
|
|
243
|
+
// Approach from the front and slightly above: a three-quarter view reads the
|
|
244
|
+
// target's form without looking straight down on it.
|
|
245
|
+
const position = [
|
|
246
|
+
center[0] + distance * 0.42,
|
|
247
|
+
center[1] + distance * 0.34,
|
|
248
|
+
center[2] + distance * 0.84
|
|
249
|
+
];
|
|
250
|
+
const eyeDistance = Math.sqrt((position[0] - center[0]) ** 2 + (position[1] - center[1]) ** 2 + (position[2] - center[2]) ** 2);
|
|
251
|
+
// The target fits when its bounding sphere is inside both frustum half-angles.
|
|
252
|
+
const containsTarget = eyeDistance * Math.sin(narrowHalfAngle) >= boundingRadius;
|
|
253
|
+
return { position, target: center, fov, containsTarget };
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Ring geometry that is correct for any target proportions.
|
|
257
|
+
*
|
|
258
|
+
* Radius is applied uniformly in the torus's own ring plane (X and Y) and the
|
|
259
|
+
* tube is thinned on Z, its documented thin axis. The node is then rotated so
|
|
260
|
+
* the ring lies horizontally around the target. Compare with the defect, which
|
|
261
|
+
* thinned Y -- inside the ring plane -- and produced a bar.
|
|
262
|
+
*/
|
|
263
|
+
function focusRingNode(options) {
|
|
264
|
+
const radius = Math.max(1e-4, options.radius);
|
|
265
|
+
return {
|
|
266
|
+
kind: "primitive",
|
|
267
|
+
primitive: "torus",
|
|
268
|
+
name: options.name,
|
|
269
|
+
material: {
|
|
270
|
+
color: options.color,
|
|
271
|
+
emissive: options.color,
|
|
272
|
+
emissiveIntensity: 0.72,
|
|
273
|
+
opacity: options.opacity ?? 0.72
|
|
274
|
+
},
|
|
275
|
+
position: options.center,
|
|
276
|
+
// Tip the ring plane (local XY) into the world XZ plane, then apply the
|
|
277
|
+
// target's own yaw so a rotated part gets an aligned ring.
|
|
278
|
+
rotation: [Math.PI / 2 + options.rotation[0], options.rotation[1], options.rotation[2]],
|
|
279
|
+
// X and Y carry the ring radius; Z carries tube thickness.
|
|
280
|
+
scale: [radius, radius, Math.max(1e-4, options.tubeScale)]
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
/** Twelve thin bars forming a wireframe box around the target. */
|
|
284
|
+
function focusBoundingBoxNodes(prefix, center, size, rotation, color, clearance) {
|
|
285
|
+
const half = [
|
|
286
|
+
(size[0] * (1 + clearance)) / 2,
|
|
287
|
+
(size[1] * (1 + clearance)) / 2,
|
|
288
|
+
(size[2] * (1 + clearance)) / 2
|
|
289
|
+
];
|
|
290
|
+
const thickness = Math.max(0.004, Math.max(size[0], size[1], size[2]) * 0.012);
|
|
291
|
+
const material = { color, emissive: color, emissiveIntensity: 0.8, opacity: 0.85 };
|
|
292
|
+
const bars = [];
|
|
293
|
+
const signs = [-1, 1];
|
|
294
|
+
// Edges along X.
|
|
295
|
+
for (const y of signs) {
|
|
296
|
+
for (const z of signs) {
|
|
297
|
+
bars.push({
|
|
298
|
+
kind: "primitive",
|
|
299
|
+
primitive: "box",
|
|
300
|
+
name: `${prefix} bounds edge x ${y > 0 ? "top" : "bottom"} ${z > 0 ? "front" : "rear"}`,
|
|
301
|
+
material,
|
|
302
|
+
position: [center[0], center[1] + half[1] * y, center[2] + half[2] * z],
|
|
303
|
+
rotation,
|
|
304
|
+
scale: [half[0] * 2, thickness, thickness]
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
// Edges along Y.
|
|
309
|
+
for (const x of signs) {
|
|
310
|
+
for (const z of signs) {
|
|
311
|
+
bars.push({
|
|
312
|
+
kind: "primitive",
|
|
313
|
+
primitive: "box",
|
|
314
|
+
name: `${prefix} bounds edge y ${x > 0 ? "right" : "left"} ${z > 0 ? "front" : "rear"}`,
|
|
315
|
+
material,
|
|
316
|
+
position: [center[0] + half[0] * x, center[1], center[2] + half[2] * z],
|
|
317
|
+
rotation,
|
|
318
|
+
scale: [thickness, half[1] * 2, thickness]
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
// Edges along Z.
|
|
323
|
+
for (const x of signs) {
|
|
324
|
+
for (const y of signs) {
|
|
325
|
+
bars.push({
|
|
326
|
+
kind: "primitive",
|
|
327
|
+
primitive: "box",
|
|
328
|
+
name: `${prefix} bounds edge z ${x > 0 ? "right" : "left"} ${y > 0 ? "top" : "bottom"}`,
|
|
329
|
+
material,
|
|
330
|
+
position: [center[0] + half[0] * x, center[1] + half[1] * y, center[2]],
|
|
331
|
+
rotation,
|
|
332
|
+
scale: [thickness, thickness, half[2] * 2]
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
return bars;
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Assert that focus feedback is actually correct.
|
|
340
|
+
*
|
|
341
|
+
* These are the checks a pixel metric cannot make: that the indicator encloses
|
|
342
|
+
* the target rather than intersecting or missing it, that it is not degenerate
|
|
343
|
+
* in any axis (the bar defect), that the callout sits outside the target, and
|
|
344
|
+
* that the camera frames the selection.
|
|
345
|
+
*/
|
|
346
|
+
function checkFocusInvariants(input) {
|
|
347
|
+
const checks = [];
|
|
348
|
+
const footprintRadius = Math.sqrt(input.size[0] ** 2 + input.size[2] ** 2) / 2;
|
|
349
|
+
const ring = input.nodes.find((node) => node.kind === "primitive" && node.primitive === "torus" && (node.name ?? "").includes("selection ring"));
|
|
350
|
+
if (ring) {
|
|
351
|
+
const scale = toVec3Scale(ring.scale);
|
|
352
|
+
// The two ring-plane axes must be equal, or the ring is an ellipse/bar.
|
|
353
|
+
const ratio = scale[0] > 0 && scale[1] > 0 ? Math.min(scale[0], scale[1]) / Math.max(scale[0], scale[1]) : 0;
|
|
354
|
+
checks.push({
|
|
355
|
+
id: "ring-not-flattened",
|
|
356
|
+
description: "selection ring radius is uniform in the torus ring plane (local X and Y), so it cannot collapse into a bar",
|
|
357
|
+
passes: ratio > 0.999,
|
|
358
|
+
detail: `ring-plane scale ratio ${round(ratio)} for scale [${scale.map(round).join(", ")}]`
|
|
359
|
+
});
|
|
360
|
+
checks.push({
|
|
361
|
+
id: "ring-thin-axis-is-tube-axis",
|
|
362
|
+
description: "selection ring is thinned on Z, the torus tube axis",
|
|
363
|
+
passes: scale[2] < scale[0] && scale[2] < scale[1],
|
|
364
|
+
detail: `z scale ${round(scale[2])} vs ring radius ${round(scale[0])}`
|
|
365
|
+
});
|
|
366
|
+
checks.push({
|
|
367
|
+
id: "ring-surrounds-target",
|
|
368
|
+
description: "selection ring radius exceeds the target footprint radius",
|
|
369
|
+
passes: input.ringRadius >= footprintRadius,
|
|
370
|
+
detail: `ring radius ${round(input.ringRadius)} vs target footprint radius ${round(footprintRadius)}`
|
|
371
|
+
});
|
|
372
|
+
const degenerate = scale.some((value) => !(value > 0) || !Number.isFinite(value));
|
|
373
|
+
checks.push({
|
|
374
|
+
id: "no-degenerate-indicator-scale",
|
|
375
|
+
description: "no indicator axis is zero, negative or non-finite",
|
|
376
|
+
passes: !degenerate,
|
|
377
|
+
detail: degenerate ? `degenerate scale [${scale.join(", ")}]` : "all axes positive and finite"
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
if (input.calloutPosition) {
|
|
381
|
+
const bounds = placedBounds({
|
|
382
|
+
position: [input.target.center[0], input.target.center[1] - input.size[1] / 2, input.target.center[2]],
|
|
383
|
+
size: input.size,
|
|
384
|
+
floorY: input.target.center[1] - input.size[1] / 2
|
|
385
|
+
});
|
|
386
|
+
const outside = !containsPoint(bounds, input.calloutPosition);
|
|
387
|
+
checks.push({
|
|
388
|
+
id: "callout-outside-target",
|
|
389
|
+
description: "callout label is anchored outside the target bounds so it is not hidden inside geometry",
|
|
390
|
+
passes: outside,
|
|
391
|
+
detail: outside
|
|
392
|
+
? `callout ${round(distanceOutsideBounds(bounds, input.calloutPosition))} units outside bounds`
|
|
393
|
+
: "callout sits inside the target bounds"
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
if (input.camera) {
|
|
397
|
+
checks.push({
|
|
398
|
+
id: "camera-contains-target",
|
|
399
|
+
description: "focus camera frames the whole target",
|
|
400
|
+
passes: input.camera.containsTarget,
|
|
401
|
+
detail: input.camera.containsTarget ? "target bounding sphere inside frustum" : "target does not fit at the computed distance"
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
return {
|
|
405
|
+
schema: "aura3d-focus-invariants/1.0",
|
|
406
|
+
checks,
|
|
407
|
+
passes: checks.every((check) => check.passes)
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* Tube thickness for a focus ring of a given radius.
|
|
412
|
+
*
|
|
413
|
+
* Proportional to the radius so the ring reads as a ring at any scale, with a
|
|
414
|
+
* floor so a ring around a tiny part is still visible on screen.
|
|
415
|
+
*/
|
|
416
|
+
function ringTubeScale(radius) {
|
|
417
|
+
return Math.max(0.004, radius * 0.09);
|
|
418
|
+
}
|
|
419
|
+
function normalizeSize(size) {
|
|
420
|
+
return [
|
|
421
|
+
Math.max(1e-6, Math.abs(size[0])),
|
|
422
|
+
Math.max(1e-6, Math.abs(size[1])),
|
|
423
|
+
Math.max(1e-6, Math.abs(size[2]))
|
|
424
|
+
];
|
|
425
|
+
}
|
|
426
|
+
function toVec3Scale(scale) {
|
|
427
|
+
if (scale === undefined)
|
|
428
|
+
return [1, 1, 1];
|
|
429
|
+
if (typeof scale === "number")
|
|
430
|
+
return [scale, scale, scale];
|
|
431
|
+
return [scale[0], scale[1], scale[2]];
|
|
432
|
+
}
|
|
433
|
+
function round(value) {
|
|
434
|
+
return Math.round(value * 1e6) / 1e6;
|
|
435
|
+
}
|
|
436
|
+
//# sourceMappingURL=FocusSelection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FocusSelection.js","sourceRoot":"","sources":["../../../../../packages/engine/src/agent-api/FocusSelection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAGH,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,YAAY,EACZ,qBAAqB,EAGtB,MAAM,uBAAuB,CAAC;AAE/B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC;;;;OAIG;IACH,KAAK,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE;IACxD,kFAAkF;IAClF,QAAQ,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE;IAChE,+CAA+C;IAC/C,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE;IACtD,8EAA8E;IAC9E,GAAG,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE;IAC5B,MAAM,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE;IAC/B,OAAO,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAE;CACzC,CAAC;AA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