@plasius/gpu-physics 0.1.18 → 0.1.19
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/CHANGELOG.md +27 -0
- package/README.md +63 -0
- package/dist/browser.cjs +228 -2
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.js +20 -2
- package/dist/{chunk-PFUNZLNF.js → chunk-AX6R2JMW.js} +1 -1
- package/dist/chunk-AX6R2JMW.js.map +1 -0
- package/dist/chunk-R75G2IBD.js +219 -0
- package/dist/chunk-R75G2IBD.js.map +1 -0
- package/dist/collision.cjs +249 -0
- package/dist/collision.cjs.map +1 -0
- package/dist/collision.js +21 -0
- package/dist/collision.js.map +1 -0
- package/dist/index.cjs +226 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +20 -2
- package/dist/index.js.map +1 -1
- package/package.json +17 -7
- package/src/browser.d.ts +1 -0
- package/src/browser.js +1 -0
- package/src/collision.d.ts +31 -0
- package/src/collision.js +189 -0
- package/src/index.d.ts +1 -0
- package/dist/chunk-PFUNZLNF.js.map +0 -1
- package/legal/CLA-REGISTRY.csv +0 -2
package/dist/index.js
CHANGED
|
@@ -9,7 +9,17 @@ import {
|
|
|
9
9
|
physicsWorkerManifests,
|
|
10
10
|
physicsWorkerProfileNames,
|
|
11
11
|
physicsWorkerQueueClasses
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-AX6R2JMW.js";
|
|
13
|
+
import {
|
|
14
|
+
collisionLimits,
|
|
15
|
+
integrateKinematic,
|
|
16
|
+
intersectAabbs,
|
|
17
|
+
intersectSphereAabb,
|
|
18
|
+
intersectSpheres,
|
|
19
|
+
sweepAabb,
|
|
20
|
+
sweepSphere,
|
|
21
|
+
sweepSphereAabb
|
|
22
|
+
} from "./chunk-R75G2IBD.js";
|
|
13
23
|
|
|
14
24
|
// src/index.js
|
|
15
25
|
import React from "react";
|
|
@@ -80,15 +90,23 @@ export {
|
|
|
80
90
|
KinematicRigidBody,
|
|
81
91
|
PhysicsRoot,
|
|
82
92
|
StaticRigidBody,
|
|
93
|
+
collisionLimits,
|
|
83
94
|
createPhysicsSimulationPlan,
|
|
84
95
|
createPhysicsWorldSnapshot,
|
|
85
96
|
defaultPhysicsWorkerProfile,
|
|
86
97
|
getPhysicsWorkerManifest,
|
|
98
|
+
integrateKinematic,
|
|
99
|
+
intersectAabbs,
|
|
100
|
+
intersectSphereAabb,
|
|
101
|
+
intersectSpheres,
|
|
87
102
|
physicsDebugOwner,
|
|
88
103
|
physicsSimulationPlans,
|
|
89
104
|
physicsSimulationStageOrder,
|
|
90
105
|
physicsWorkerManifests,
|
|
91
106
|
physicsWorkerProfileNames,
|
|
92
|
-
physicsWorkerQueueClasses
|
|
107
|
+
physicsWorkerQueueClasses,
|
|
108
|
+
sweepAabb,
|
|
109
|
+
sweepSphere,
|
|
110
|
+
sweepSphereAabb
|
|
93
111
|
};
|
|
94
112
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.js"],"sourcesContent":["import React from \"react\";\n\nexport const DEFAULT_GRAVITY = Object.freeze([0, -9.81, 0]);\n\nconst PhysicsContext = React.createContext({\n gravity: DEFAULT_GRAVITY,\n options: {},\n});\n\nconst RigidBodyContext = React.createContext({\n type: \"fixed\",\n colliders: \"trimesh\",\n options: {},\n});\n\nexport function PhysicsRoot({ gravity = DEFAULT_GRAVITY, children, ...props }) {\n const value = React.useMemo(\n () => ({\n gravity,\n options: props,\n }),\n [gravity, props]\n );\n return React.createElement(PhysicsContext.Provider, { value }, children);\n}\n\nexport function StaticRigidBody({\n colliders = \"trimesh\",\n children,\n ...props\n}) {\n const value = React.useMemo(\n () => ({\n type: \"fixed\",\n colliders,\n options: props,\n }),\n [colliders, props]\n );\n return React.createElement(RigidBodyContext.Provider, { value }, children);\n}\n\nexport function DynamicRigidBody({ colliders = \"hull\", children, ...props }) {\n const value = React.useMemo(\n () => ({\n type: \"dynamic\",\n colliders,\n options: props,\n }),\n [colliders, props]\n );\n return React.createElement(RigidBodyContext.Provider, { value }, children);\n}\n\nexport function KinematicRigidBody({\n colliders = \"hull\",\n children,\n ...props\n}) {\n const value = React.useMemo(\n () => ({\n type: \"kinematicPosition\",\n colliders,\n options: props,\n }),\n [colliders, props]\n );\n return React.createElement(RigidBodyContext.Provider, { value }, children);\n}\n\nexport * from \"./browser.js\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/index.js"],"sourcesContent":["import React from \"react\";\n\nexport const DEFAULT_GRAVITY = Object.freeze([0, -9.81, 0]);\n\nconst PhysicsContext = React.createContext({\n gravity: DEFAULT_GRAVITY,\n options: {},\n});\n\nconst RigidBodyContext = React.createContext({\n type: \"fixed\",\n colliders: \"trimesh\",\n options: {},\n});\n\nexport function PhysicsRoot({ gravity = DEFAULT_GRAVITY, children, ...props }) {\n const value = React.useMemo(\n () => ({\n gravity,\n options: props,\n }),\n [gravity, props]\n );\n return React.createElement(PhysicsContext.Provider, { value }, children);\n}\n\nexport function StaticRigidBody({\n colliders = \"trimesh\",\n children,\n ...props\n}) {\n const value = React.useMemo(\n () => ({\n type: \"fixed\",\n colliders,\n options: props,\n }),\n [colliders, props]\n );\n return React.createElement(RigidBodyContext.Provider, { value }, children);\n}\n\nexport function DynamicRigidBody({ colliders = \"hull\", children, ...props }) {\n const value = React.useMemo(\n () => ({\n type: \"dynamic\",\n colliders,\n options: props,\n }),\n [colliders, props]\n );\n return React.createElement(RigidBodyContext.Provider, { value }, children);\n}\n\nexport function KinematicRigidBody({\n colliders = \"hull\",\n children,\n ...props\n}) {\n const value = React.useMemo(\n () => ({\n type: \"kinematicPosition\",\n colliders,\n options: props,\n }),\n [colliders, props]\n );\n return React.createElement(RigidBodyContext.Provider, { value }, children);\n}\n\nexport * from \"./browser.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,WAAW;AAEX,IAAM,kBAAkB,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CAAC,WAAW,KAAK;AAAA,EACnB;AACA,SAAO,MAAM,cAAc,iBAAiB,UAAU,EAAE,MAAM,GAAG,QAAQ;AAC3E;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plasius/gpu-physics",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"description": "Physics integration bridge package for Plasius GPU renderer migration.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -27,12 +27,18 @@
|
|
|
27
27
|
"import": "./dist/browser.js",
|
|
28
28
|
"require": "./dist/browser.cjs"
|
|
29
29
|
},
|
|
30
|
+
"./collision": {
|
|
31
|
+
"types": "./src/collision.d.ts",
|
|
32
|
+
"import": "./dist/collision.js",
|
|
33
|
+
"require": "./dist/collision.cjs"
|
|
34
|
+
},
|
|
30
35
|
"./package.json": "./package.json"
|
|
31
36
|
},
|
|
32
37
|
"scripts": {
|
|
33
38
|
"build": "tsup",
|
|
34
39
|
"demo": "python3 -m http.server --directory ..",
|
|
35
|
-
"typecheck": "node --check src/index.js && node --check src/browser.js",
|
|
40
|
+
"typecheck": "node --check src/index.js && node --check src/browser.js && node --check src/collision.js && npm run test:types",
|
|
41
|
+
"test:types": "tsc --noEmit --strict --module nodenext --target es2022 tests/types/collision-consumer.ts",
|
|
36
42
|
"audit:eslint": "eslint . --max-warnings=0",
|
|
37
43
|
"audit:deps": "npm ls --all --omit=optional --omit=peer > /dev/null 2>&1 || true",
|
|
38
44
|
"audit:npm": "npm audit --audit-level=high --omit=dev",
|
|
@@ -57,14 +63,15 @@
|
|
|
57
63
|
"react": "^19"
|
|
58
64
|
},
|
|
59
65
|
"dependencies": {
|
|
60
|
-
"@plasius/gpu-shared": "^1.
|
|
66
|
+
"@plasius/gpu-shared": "^1.1.1"
|
|
61
67
|
},
|
|
62
68
|
"devDependencies": {
|
|
63
69
|
"@eslint/js": "^10.0.1",
|
|
70
|
+
"@types/react": "^19.3.0",
|
|
64
71
|
"c8": "^11.0.0",
|
|
65
|
-
"eslint": "^10.
|
|
66
|
-
"globals": "^17.
|
|
67
|
-
"react": "^19.2.
|
|
72
|
+
"eslint": "^10.9.1",
|
|
73
|
+
"globals": "^17.11.0",
|
|
74
|
+
"react": "^19.2.8",
|
|
68
75
|
"tsup": "^8.5.1",
|
|
69
76
|
"typescript": "^7.0.2"
|
|
70
77
|
},
|
|
@@ -90,7 +97,10 @@
|
|
|
90
97
|
}
|
|
91
98
|
],
|
|
92
99
|
"overrides": {
|
|
93
|
-
"
|
|
100
|
+
"brace-expansion": "5.0.12",
|
|
101
|
+
"esbuild": "^0.28.1",
|
|
102
|
+
"minimatch": "11.0.5",
|
|
103
|
+
"glob": "14.0.4"
|
|
94
104
|
},
|
|
95
105
|
"engines": {
|
|
96
106
|
"node": ">=24"
|
package/src/browser.d.ts
CHANGED
package/src/browser.js
CHANGED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export type CollisionVector3 = readonly [number, number, number];
|
|
2
|
+
export interface CollisionSphere { readonly center: CollisionVector3; readonly radius: number }
|
|
3
|
+
export interface CollisionAabb { readonly min: CollisionVector3; readonly max: CollisionVector3 }
|
|
4
|
+
export interface CollisionContact {
|
|
5
|
+
/** Unit normal pointing from the stationary shape toward the moving shape. */
|
|
6
|
+
readonly normal: CollisionVector3;
|
|
7
|
+
/** Contact point on the stationary shape. */
|
|
8
|
+
readonly point: CollisionVector3;
|
|
9
|
+
readonly penetration: number;
|
|
10
|
+
}
|
|
11
|
+
export interface CollisionSweepHit extends CollisionContact {
|
|
12
|
+
/** Fraction of displacement travelled, in [0, 1]. */
|
|
13
|
+
readonly time: number;
|
|
14
|
+
/** Moving sphere/box centre at first contact. */
|
|
15
|
+
readonly position: CollisionVector3;
|
|
16
|
+
readonly startsInContact: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface KinematicState { readonly position: CollisionVector3; readonly velocity: CollisionVector3 }
|
|
19
|
+
export const collisionLimits: Readonly<{
|
|
20
|
+
maxCoordinate: 1000000; maxVelocity: 100000; maxAcceleration: 1000000;
|
|
21
|
+
maxStepSeconds: 0.25; contactTolerance: 1e-8;
|
|
22
|
+
}>;
|
|
23
|
+
/** All queries reject invalid/nonfinite/out-of-bounds inputs. Touching is contact. */
|
|
24
|
+
export function intersectSpheres(a: CollisionSphere, b: CollisionSphere): CollisionContact | null;
|
|
25
|
+
export function intersectSphereAabb(a: CollisionSphere, b: CollisionAabb): CollisionContact | null;
|
|
26
|
+
export function intersectAabbs(a: CollisionAabb, b: CollisionAabb): CollisionContact | null;
|
|
27
|
+
export function sweepSphere(moving: CollisionSphere, displacement: CollisionVector3, target: CollisionSphere): CollisionSweepHit | null;
|
|
28
|
+
export function sweepSphereAabb(moving: CollisionSphere, displacement: CollisionVector3, target: CollisionAabb): CollisionSweepHit | null;
|
|
29
|
+
export function sweepAabb(moving: CollisionAabb, displacement: CollisionVector3, target: CollisionAabb): CollisionSweepHit | null;
|
|
30
|
+
/** One semi-implicit Euler step, without mutation. Throws if the result exceeds bounds. */
|
|
31
|
+
export function integrateKinematic(state: KinematicState, acceleration: CollisionVector3, deltaSeconds: number): KinematicState;
|
package/src/collision.js
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/** Portable CPU collision queries. No scheduling, ambient state or renderer. */
|
|
2
|
+
export const collisionLimits = Object.freeze({
|
|
3
|
+
maxCoordinate: 1_000_000,
|
|
4
|
+
maxVelocity: 100_000,
|
|
5
|
+
maxAcceleration: 1_000_000,
|
|
6
|
+
maxStepSeconds: 0.25,
|
|
7
|
+
contactTolerance: 1e-8,
|
|
8
|
+
});
|
|
9
|
+
const EPSILON = collisionLimits.contactTolerance;
|
|
10
|
+
|
|
11
|
+
function number(value, limit, label, minimum = -limit) {
|
|
12
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value < minimum || value > limit) {
|
|
13
|
+
throw new RangeError(`${label} must be finite and within [${minimum}, ${limit}].`);
|
|
14
|
+
}
|
|
15
|
+
return value;
|
|
16
|
+
}
|
|
17
|
+
function vector(value, limit, label) {
|
|
18
|
+
if (!Array.isArray(value) || value.length !== 3) throw new TypeError(`${label} must be a three-component array.`);
|
|
19
|
+
for (let i = 0; i < 3; i++) number(value[i], limit, `${label}[${i}]`);
|
|
20
|
+
return value;
|
|
21
|
+
}
|
|
22
|
+
function record(value, label) {
|
|
23
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) throw new TypeError(`${label} must be a shape or state object.`);
|
|
24
|
+
}
|
|
25
|
+
function sphere(value) {
|
|
26
|
+
record(value, "sphere");
|
|
27
|
+
vector(value.center, collisionLimits.maxCoordinate, "sphere.center");
|
|
28
|
+
number(value.radius, collisionLimits.maxCoordinate, "sphere.radius", 0);
|
|
29
|
+
}
|
|
30
|
+
function box(value) {
|
|
31
|
+
record(value, "box");
|
|
32
|
+
vector(value.min, collisionLimits.maxCoordinate, "box.min");
|
|
33
|
+
vector(value.max, collisionLimits.maxCoordinate, "box.max");
|
|
34
|
+
if (value.min.some((x, i) => x > value.max[i])) throw new RangeError("box.min must not exceed box.max.");
|
|
35
|
+
}
|
|
36
|
+
const clamp = (value, min, max) => Math.max(min, Math.min(max, value));
|
|
37
|
+
const at = (start, displacement, time) => start.map((x, i) => x + displacement[i] * time);
|
|
38
|
+
const dot = (a, b) => a.reduce((sum, x, i) => sum + x * b[i], 0);
|
|
39
|
+
const centerOf = (value) => value.min.map((x, i) => (x + value.max[i]) / 2);
|
|
40
|
+
function path(start, displacement) {
|
|
41
|
+
vector(displacement, collisionLimits.maxCoordinate, "displacement");
|
|
42
|
+
vector(at(start, displacement, 1), collisionLimits.maxCoordinate, "path endpoint");
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function spheresContact(a, b) {
|
|
46
|
+
const offset = a.center.map((x, i) => x - b.center[i]);
|
|
47
|
+
const distance = Math.sqrt(dot(offset, offset));
|
|
48
|
+
const radius = a.radius + b.radius;
|
|
49
|
+
if (distance > radius + EPSILON) return null;
|
|
50
|
+
const normal = distance > 0 ? offset.map(x => x / distance) : [1, 0, 0];
|
|
51
|
+
return { normal, point: b.center.map((x, i) => x + normal[i] * b.radius), penetration: Math.max(0, radius - distance) };
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function sphereBoxContact(a, b) {
|
|
55
|
+
const point = a.center.map((x, i) => clamp(x, b.min[i], b.max[i]));
|
|
56
|
+
const offset = a.center.map((x, i) => x - point[i]);
|
|
57
|
+
const distance = Math.sqrt(dot(offset, offset));
|
|
58
|
+
if (distance > a.radius + EPSILON) return null;
|
|
59
|
+
if (distance > 0) return { point, normal: offset.map(x => x / distance), penetration: Math.max(0, a.radius - distance) };
|
|
60
|
+
|
|
61
|
+
// Inside the box: choose the nearest exit face; strict comparison fixes ties.
|
|
62
|
+
let depth = Infinity, axis = 0, direction = -1;
|
|
63
|
+
for (let i = 0; i < 3; i++) {
|
|
64
|
+
const lower = a.center[i] - b.min[i], upper = b.max[i] - a.center[i];
|
|
65
|
+
if (lower < depth) { depth = lower; axis = i; direction = -1; }
|
|
66
|
+
if (upper < depth) { depth = upper; axis = i; direction = 1; }
|
|
67
|
+
}
|
|
68
|
+
const normal = [0, 0, 0]; normal[axis] = direction;
|
|
69
|
+
point[axis] = direction < 0 ? b.min[axis] : b.max[axis];
|
|
70
|
+
return { point, normal, penetration: a.radius + depth };
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function boxesContact(a, b) {
|
|
74
|
+
if (a.min.some((x, i) => x > b.max[i] + EPSILON || a.max[i] < b.min[i] - EPSILON)) return null;
|
|
75
|
+
let depth = Infinity, axis = 0, direction = -1;
|
|
76
|
+
for (let i = 0; i < 3; i++) {
|
|
77
|
+
const lower = a.max[i] - b.min[i], upper = b.max[i] - a.min[i];
|
|
78
|
+
if (lower < depth) { depth = lower; axis = i; direction = -1; }
|
|
79
|
+
if (upper < depth) { depth = upper; axis = i; direction = 1; }
|
|
80
|
+
}
|
|
81
|
+
const normal = [0, 0, 0]; normal[axis] = direction;
|
|
82
|
+
const point = centerOf(a).map((x, i) => clamp(x, b.min[i], b.max[i]));
|
|
83
|
+
point[axis] = direction < 0 ? b.min[axis] : b.max[axis];
|
|
84
|
+
return { normal, point, penetration: Math.max(0, depth) };
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** Contact normal points from b toward a; touching counts as contact. */
|
|
88
|
+
export function intersectSpheres(a, b) { sphere(a); sphere(b); return spheresContact(a, b); }
|
|
89
|
+
export function intersectSphereAabb(a, b) { sphere(a); box(b); return sphereBoxContact(a, b); }
|
|
90
|
+
export function intersectAabbs(a, b) { box(a); box(b); return boxesContact(a, b); }
|
|
91
|
+
|
|
92
|
+
// Solve distance²(t) = radius² around closest approach, avoiding subtraction of
|
|
93
|
+
// huge quadratic coefficients when the path is long relative to the radius.
|
|
94
|
+
function firstContact(offset, velocity, radius, maximum) {
|
|
95
|
+
const radiusSquared = radius * radius;
|
|
96
|
+
if (dot(offset, offset) <= radiusSquared) return 0;
|
|
97
|
+
const speedSquared = dot(velocity, velocity);
|
|
98
|
+
if (speedSquared === 0) return null;
|
|
99
|
+
const closestTime = -dot(offset, velocity) / speedSquared;
|
|
100
|
+
if (closestTime < 0) return null;
|
|
101
|
+
const closestOffset = at(offset, velocity, closestTime);
|
|
102
|
+
const distanceSquared = dot(closestOffset, closestOffset);
|
|
103
|
+
const remainder = radiusSquared - distanceSquared;
|
|
104
|
+
const roundoff = Number.EPSILON * 8 * (radiusSquared + distanceSquared);
|
|
105
|
+
if (remainder < -roundoff) return null;
|
|
106
|
+
const time = closestTime - Math.sqrt(Math.max(0, remainder) / speedSquared);
|
|
107
|
+
return time < -1e-12 || time > maximum + 1e-12 ? null : clamp(time, 0, maximum);
|
|
108
|
+
}
|
|
109
|
+
const hit = (contact, time, position, startsInContact) => ({ ...contact, time, position, startsInContact });
|
|
110
|
+
|
|
111
|
+
/** Sweep a moving sphere over displacement against a stationary sphere. */
|
|
112
|
+
export function sweepSphere(moving, displacement, target) {
|
|
113
|
+
sphere(moving); sphere(target); path(moving.center, displacement);
|
|
114
|
+
const initial = spheresContact(moving, target);
|
|
115
|
+
if (initial) return hit(initial, 0, [...moving.center], true);
|
|
116
|
+
const offset = moving.center.map((x, i) => x - target.center[i]);
|
|
117
|
+
const radius = moving.radius + target.radius;
|
|
118
|
+
const time = firstContact(offset, displacement, radius, 1);
|
|
119
|
+
if (time === null) return null;
|
|
120
|
+
const position = at(moving.center, displacement, time);
|
|
121
|
+
const contact = spheresContact({ center: position, radius: moving.radius }, target);
|
|
122
|
+
return contact ? hit(contact, time, position, false) : null;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function sweepRoundedBox(moving, displacement, target) {
|
|
126
|
+
const initial = sphereBoxContact(moving, target);
|
|
127
|
+
if (initial) return hit(initial, 0, [...moving.center], true);
|
|
128
|
+
const boundaries = [0, 1];
|
|
129
|
+
for (let axis = 0; axis < 3; axis++) {
|
|
130
|
+
if (displacement[axis] === 0) continue;
|
|
131
|
+
for (const plane of [target.min[axis], target.max[axis]]) {
|
|
132
|
+
const time = (plane - moving.center[axis]) / displacement[axis];
|
|
133
|
+
if (time > 0 && time < 1) boundaries.push(time);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
boundaries.sort((a, b) => a - b);
|
|
137
|
+
for (let segment = 0; segment < boundaries.length - 1; segment++) {
|
|
138
|
+
const start = boundaries[segment], end = boundaries[segment + 1];
|
|
139
|
+
if (end === start) continue;
|
|
140
|
+
const midpoint = at(moving.center, displacement, (start + end) / 2);
|
|
141
|
+
const origin = at(moving.center, displacement, start);
|
|
142
|
+
const offset = [0, 0, 0], velocity = [0, 0, 0];
|
|
143
|
+
for (let axis = 0; axis < 3; axis++) {
|
|
144
|
+
const value = midpoint[axis];
|
|
145
|
+
if (value >= target.min[axis] && value <= target.max[axis]) continue;
|
|
146
|
+
const plane = value < target.min[axis] ? target.min[axis] : target.max[axis];
|
|
147
|
+
offset[axis] = origin[axis] - plane; velocity[axis] = displacement[axis];
|
|
148
|
+
}
|
|
149
|
+
const localTime = firstContact(offset, velocity, moving.radius, end - start);
|
|
150
|
+
if (localTime === null) continue;
|
|
151
|
+
const time = start + localTime, position = at(moving.center, displacement, time);
|
|
152
|
+
const contact = sphereBoxContact({ center: position, radius: moving.radius }, target);
|
|
153
|
+
if (contact) return hit(contact, time, position, false);
|
|
154
|
+
}
|
|
155
|
+
return null;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/** Exact rounded-box sweep, including face, edge and corner contacts. */
|
|
159
|
+
export function sweepSphereAabb(moving, displacement, target) {
|
|
160
|
+
sphere(moving); box(target); path(moving.center, displacement);
|
|
161
|
+
return sweepRoundedBox(moving, displacement, target);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/** Sweep an axis-aligned box; the result position is its centre at contact. */
|
|
165
|
+
export function sweepAabb(moving, displacement, target) {
|
|
166
|
+
box(moving); box(target); path(moving.min, displacement); path(moving.max, displacement);
|
|
167
|
+
const center = centerOf(moving), initial = boxesContact(moving, target);
|
|
168
|
+
if (initial) return hit(initial, 0, center, true);
|
|
169
|
+
const half = moving.min.map((x, i) => (moving.max[i] - x) / 2);
|
|
170
|
+
const expanded = { min: target.min.map((x, i) => x - half[i]), max: target.max.map((x, i) => x + half[i]) };
|
|
171
|
+
const result = sweepRoundedBox({ center, radius: 0 }, displacement, expanded);
|
|
172
|
+
if (!result) return null;
|
|
173
|
+
result.point = result.position.map((x, i) => clamp(x - result.normal[i] * half[i], target.min[i], target.max[i]));
|
|
174
|
+
return result;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/** One semi-implicit Euler step. Hosts supply a fixed dt and resolve contacts. */
|
|
178
|
+
export function integrateKinematic(state, acceleration, deltaSeconds) {
|
|
179
|
+
record(state, "state");
|
|
180
|
+
vector(state.position, collisionLimits.maxCoordinate, "position");
|
|
181
|
+
vector(state.velocity, collisionLimits.maxVelocity, "velocity");
|
|
182
|
+
vector(acceleration, collisionLimits.maxAcceleration, "acceleration");
|
|
183
|
+
number(deltaSeconds, collisionLimits.maxStepSeconds, "deltaSeconds", 0);
|
|
184
|
+
const velocity = at(state.velocity, acceleration, deltaSeconds);
|
|
185
|
+
const position = at(state.position, velocity, deltaSeconds);
|
|
186
|
+
vector(velocity, collisionLimits.maxVelocity, "next velocity");
|
|
187
|
+
vector(position, collisionLimits.maxCoordinate, "next position");
|
|
188
|
+
return { position, velocity };
|
|
189
|
+
}
|
package/src/index.d.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/browser.js"],"sourcesContent":["export const physicsDebugOwner = \"physics\";\nexport const physicsWorkerQueueClasses = Object.freeze({\n simulation: \"simulation\",\n render: \"render\",\n});\nexport const defaultPhysicsWorkerProfile = \"gameplay\";\nexport const physicsSimulationStageOrder = Object.freeze([\n \"intentResolution\",\n \"broadphase\",\n \"narrowphase\",\n \"solver\",\n \"authoritativeCommit\",\n \"secondarySimulation\",\n \"animationStateInputs\",\n \"worldSnapshot\",\n \"visualFollowUp\",\n]);\n\nfunction assertIdentifier(name, value) {\n if (typeof value !== \"string\" || value.trim().length === 0) {\n throw new Error(`${name} must be a non-empty string.`);\n }\n\n return value;\n}\n\nfunction assertNonNegativeInteger(name, value) {\n if (!Number.isInteger(value) || value < 0) {\n throw new Error(`${name} must be an integer greater than or equal to zero.`);\n }\n\n return value;\n}\n\nfunction assertNonNegativeNumber(name, value) {\n if (typeof value !== \"number\" || !Number.isFinite(value) || value < 0) {\n throw new Error(`${name} must be a finite number greater than or equal to zero.`);\n }\n\n return value;\n}\n\nfunction normalizeMetadata(value) {\n if (value === undefined) {\n return Object.freeze({});\n }\n\n if (typeof value !== \"object\" || value === null || Array.isArray(value)) {\n throw new Error(\"snapshot.metadata must be a plain object when provided.\");\n }\n\n return Object.freeze({ ...value });\n}\n\nfunction buildWorkerBudgetLevels(jobType, queueClass, presets) {\n return Object.freeze([\n Object.freeze({\n id: \"low\",\n estimatedCostMs: presets.low.estimatedCostMs,\n config: Object.freeze({\n maxDispatchesPerFrame: presets.low.maxDispatchesPerFrame,\n maxJobsPerDispatch: presets.low.maxJobsPerDispatch,\n cadenceDivisor: presets.low.cadenceDivisor,\n workgroupScale: presets.low.workgroupScale,\n maxQueueDepth: presets.low.maxQueueDepth,\n metadata: Object.freeze({\n owner: physicsDebugOwner,\n queueClass,\n jobType,\n quality: \"low\",\n }),\n }),\n }),\n Object.freeze({\n id: \"medium\",\n estimatedCostMs: presets.medium.estimatedCostMs,\n config: Object.freeze({\n maxDispatchesPerFrame: presets.medium.maxDispatchesPerFrame,\n maxJobsPerDispatch: presets.medium.maxJobsPerDispatch,\n cadenceDivisor: presets.medium.cadenceDivisor,\n workgroupScale: presets.medium.workgroupScale,\n maxQueueDepth: presets.medium.maxQueueDepth,\n metadata: Object.freeze({\n owner: physicsDebugOwner,\n queueClass,\n jobType,\n quality: \"medium\",\n }),\n }),\n }),\n Object.freeze({\n id: \"high\",\n estimatedCostMs: presets.high.estimatedCostMs,\n config: Object.freeze({\n maxDispatchesPerFrame: presets.high.maxDispatchesPerFrame,\n maxJobsPerDispatch: presets.high.maxJobsPerDispatch,\n cadenceDivisor: presets.high.cadenceDivisor,\n workgroupScale: presets.high.workgroupScale,\n maxQueueDepth: presets.high.maxQueueDepth,\n metadata: Object.freeze({\n owner: physicsDebugOwner,\n queueClass,\n jobType,\n quality: \"high\",\n }),\n }),\n }),\n ]);\n}\n\nconst physicsWorkerProfileSpecs = {\n gameplay: {\n description:\n \"Authoritative gameplay profile that preserves rigid-body stability while scaling visual sync and contact presentation work.\",\n suggestedAllocationIds: [\n \"physics.gameplay.broadphase.grid\",\n \"physics.gameplay.contacts\",\n \"physics.gameplay.transforms\",\n ],\n jobs: {\n broadphase: {\n queueClass: physicsWorkerQueueClasses.simulation,\n domain: \"physics\",\n authority: \"authoritative\",\n importance: \"critical\",\n levels: buildWorkerBudgetLevels(\n \"physics.gameplay.broadphase\",\n physicsWorkerQueueClasses.simulation,\n {\n low: {\n estimatedCostMs: 0.45,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 128,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 512,\n },\n medium: {\n estimatedCostMs: 0.7,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 256,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 768,\n },\n high: {\n estimatedCostMs: 0.95,\n maxDispatchesPerFrame: 2,\n maxJobsPerDispatch: 384,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 1024,\n },\n }\n ),\n suggestedAllocationIds: [\"physics.gameplay.broadphase.grid\"],\n },\n narrowphase: {\n queueClass: physicsWorkerQueueClasses.simulation,\n domain: \"physics\",\n authority: \"authoritative\",\n importance: \"critical\",\n levels: buildWorkerBudgetLevels(\n \"physics.gameplay.narrowphase\",\n physicsWorkerQueueClasses.simulation,\n {\n low: {\n estimatedCostMs: 0.65,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 128,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 384,\n },\n medium: {\n estimatedCostMs: 0.95,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 192,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 512,\n },\n high: {\n estimatedCostMs: 1.3,\n maxDispatchesPerFrame: 2,\n maxJobsPerDispatch: 256,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 768,\n },\n }\n ),\n suggestedAllocationIds: [\"physics.gameplay.contacts\"],\n },\n solver: {\n queueClass: physicsWorkerQueueClasses.simulation,\n domain: \"physics\",\n authority: \"authoritative\",\n importance: \"critical\",\n levels: buildWorkerBudgetLevels(\n \"physics.gameplay.solver\",\n physicsWorkerQueueClasses.simulation,\n {\n low: {\n estimatedCostMs: 0.9,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 96,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 256,\n },\n medium: {\n estimatedCostMs: 1.3,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 128,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 384,\n },\n high: {\n estimatedCostMs: 1.8,\n maxDispatchesPerFrame: 2,\n maxJobsPerDispatch: 192,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 512,\n },\n }\n ),\n suggestedAllocationIds: [\"physics.gameplay.contacts\"],\n },\n authoritativeCommit: {\n queueClass: physicsWorkerQueueClasses.simulation,\n domain: \"physics\",\n authority: \"authoritative\",\n importance: \"critical\",\n levels: buildWorkerBudgetLevels(\n \"physics.gameplay.authoritativeCommit\",\n physicsWorkerQueueClasses.simulation,\n {\n low: {\n estimatedCostMs: 0.2,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 96,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 192,\n },\n medium: {\n estimatedCostMs: 0.35,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 128,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 256,\n },\n high: {\n estimatedCostMs: 0.55,\n maxDispatchesPerFrame: 2,\n maxJobsPerDispatch: 192,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 384,\n },\n }\n ),\n suggestedAllocationIds: [\"physics.gameplay.transforms\"],\n },\n animationStateInputs: {\n queueClass: physicsWorkerQueueClasses.render,\n domain: \"animation\",\n authority: \"visual\",\n importance: \"high\",\n levels: buildWorkerBudgetLevels(\n \"physics.gameplay.animationStateInputs\",\n physicsWorkerQueueClasses.render,\n {\n low: {\n estimatedCostMs: 0.15,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 96,\n cadenceDivisor: 2,\n workgroupScale: 0.5,\n maxQueueDepth: 192,\n },\n medium: {\n estimatedCostMs: 0.3,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 160,\n cadenceDivisor: 1,\n workgroupScale: 0.75,\n maxQueueDepth: 256,\n },\n high: {\n estimatedCostMs: 0.5,\n maxDispatchesPerFrame: 2,\n maxJobsPerDispatch: 256,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 384,\n },\n }\n ),\n suggestedAllocationIds: [\"physics.gameplay.transforms\"],\n },\n worldSnapshot: {\n queueClass: physicsWorkerQueueClasses.render,\n domain: \"physics\",\n authority: \"authoritative\",\n importance: \"critical\",\n levels: buildWorkerBudgetLevels(\n \"physics.gameplay.worldSnapshot\",\n physicsWorkerQueueClasses.render,\n {\n low: {\n estimatedCostMs: 0.15,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 96,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 192,\n },\n medium: {\n estimatedCostMs: 0.3,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 160,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 256,\n },\n high: {\n estimatedCostMs: 0.45,\n maxDispatchesPerFrame: 2,\n maxJobsPerDispatch: 256,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 384,\n },\n }\n ),\n suggestedAllocationIds: [\n \"physics.gameplay.contacts\",\n \"physics.gameplay.transforms\",\n ],\n },\n transforms: {\n queueClass: physicsWorkerQueueClasses.render,\n domain: \"animation\",\n authority: \"visual\",\n importance: \"high\",\n levels: buildWorkerBudgetLevels(\n \"physics.gameplay.transforms\",\n physicsWorkerQueueClasses.render,\n {\n low: {\n estimatedCostMs: 0.2,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 128,\n cadenceDivisor: 2,\n workgroupScale: 0.5,\n maxQueueDepth: 256,\n },\n medium: {\n estimatedCostMs: 0.45,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 256,\n cadenceDivisor: 1,\n workgroupScale: 0.75,\n maxQueueDepth: 384,\n },\n high: {\n estimatedCostMs: 0.75,\n maxDispatchesPerFrame: 2,\n maxJobsPerDispatch: 384,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 512,\n },\n }\n ),\n suggestedAllocationIds: [\"physics.gameplay.transforms\"],\n },\n contactVisuals: {\n queueClass: physicsWorkerQueueClasses.render,\n domain: \"post-processing\",\n authority: \"visual\",\n importance: \"medium\",\n levels: buildWorkerBudgetLevels(\n \"physics.gameplay.contactVisuals\",\n physicsWorkerQueueClasses.render,\n {\n low: {\n estimatedCostMs: 0.15,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 64,\n cadenceDivisor: 4,\n workgroupScale: 0.4,\n maxQueueDepth: 128,\n },\n medium: {\n estimatedCostMs: 0.35,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 128,\n cadenceDivisor: 2,\n workgroupScale: 0.7,\n maxQueueDepth: 192,\n },\n high: {\n estimatedCostMs: 0.55,\n maxDispatchesPerFrame: 2,\n maxJobsPerDispatch: 192,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 256,\n },\n }\n ),\n suggestedAllocationIds: [\"physics.gameplay.contacts\"],\n },\n },\n },\n cinematic: {\n description:\n \"Cinematic profile that keeps authoritative rigid-body work stable while enabling degradable cloth and fracture assistance passes.\",\n suggestedAllocationIds: [\n \"physics.cinematic.broadphase.grid\",\n \"physics.cinematic.contacts\",\n \"physics.cinematic.transforms\",\n \"physics.cinematic.cloth.state\",\n \"physics.cinematic.fracture.proxy\",\n ],\n jobs: {\n broadphase: {\n queueClass: physicsWorkerQueueClasses.simulation,\n domain: \"physics\",\n authority: \"authoritative\",\n importance: \"critical\",\n levels: buildWorkerBudgetLevels(\n \"physics.cinematic.broadphase\",\n physicsWorkerQueueClasses.simulation,\n {\n low: {\n estimatedCostMs: 0.5,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 160,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 640,\n },\n medium: {\n estimatedCostMs: 0.8,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 256,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 896,\n },\n high: {\n estimatedCostMs: 1.05,\n maxDispatchesPerFrame: 2,\n maxJobsPerDispatch: 384,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 1152,\n },\n }\n ),\n suggestedAllocationIds: [\"physics.cinematic.broadphase.grid\"],\n },\n narrowphase: {\n queueClass: physicsWorkerQueueClasses.simulation,\n domain: \"physics\",\n authority: \"authoritative\",\n importance: \"critical\",\n levels: buildWorkerBudgetLevels(\n \"physics.cinematic.narrowphase\",\n physicsWorkerQueueClasses.simulation,\n {\n low: {\n estimatedCostMs: 0.75,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 160,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 512,\n },\n medium: {\n estimatedCostMs: 1.05,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 224,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 768,\n },\n high: {\n estimatedCostMs: 1.45,\n maxDispatchesPerFrame: 2,\n maxJobsPerDispatch: 320,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 960,\n },\n }\n ),\n suggestedAllocationIds: [\"physics.cinematic.contacts\"],\n },\n solver: {\n queueClass: physicsWorkerQueueClasses.simulation,\n domain: \"physics\",\n authority: \"authoritative\",\n importance: \"critical\",\n levels: buildWorkerBudgetLevels(\n \"physics.cinematic.solver\",\n physicsWorkerQueueClasses.simulation,\n {\n low: {\n estimatedCostMs: 1.05,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 128,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 384,\n },\n medium: {\n estimatedCostMs: 1.5,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 192,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 512,\n },\n high: {\n estimatedCostMs: 2.05,\n maxDispatchesPerFrame: 2,\n maxJobsPerDispatch: 256,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 768,\n },\n }\n ),\n suggestedAllocationIds: [\"physics.cinematic.contacts\"],\n },\n authoritativeCommit: {\n queueClass: physicsWorkerQueueClasses.simulation,\n domain: \"physics\",\n authority: \"authoritative\",\n importance: \"critical\",\n levels: buildWorkerBudgetLevels(\n \"physics.cinematic.authoritativeCommit\",\n physicsWorkerQueueClasses.simulation,\n {\n low: {\n estimatedCostMs: 0.25,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 96,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 256,\n },\n medium: {\n estimatedCostMs: 0.4,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 160,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 320,\n },\n high: {\n estimatedCostMs: 0.65,\n maxDispatchesPerFrame: 2,\n maxJobsPerDispatch: 224,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 448,\n },\n }\n ),\n suggestedAllocationIds: [\"physics.cinematic.transforms\"],\n },\n animationStateInputs: {\n queueClass: physicsWorkerQueueClasses.render,\n domain: \"animation\",\n authority: \"visual\",\n importance: \"high\",\n levels: buildWorkerBudgetLevels(\n \"physics.cinematic.animationStateInputs\",\n physicsWorkerQueueClasses.render,\n {\n low: {\n estimatedCostMs: 0.2,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 128,\n cadenceDivisor: 2,\n workgroupScale: 0.5,\n maxQueueDepth: 256,\n },\n medium: {\n estimatedCostMs: 0.4,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 192,\n cadenceDivisor: 1,\n workgroupScale: 0.75,\n maxQueueDepth: 384,\n },\n high: {\n estimatedCostMs: 0.6,\n maxDispatchesPerFrame: 2,\n maxJobsPerDispatch: 256,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 512,\n },\n }\n ),\n suggestedAllocationIds: [\"physics.cinematic.transforms\"],\n },\n transforms: {\n queueClass: physicsWorkerQueueClasses.render,\n domain: \"animation\",\n authority: \"visual\",\n importance: \"high\",\n levels: buildWorkerBudgetLevels(\n \"physics.cinematic.transforms\",\n physicsWorkerQueueClasses.render,\n {\n low: {\n estimatedCostMs: 0.3,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 160,\n cadenceDivisor: 2,\n workgroupScale: 0.5,\n maxQueueDepth: 320,\n },\n medium: {\n estimatedCostMs: 0.6,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 256,\n cadenceDivisor: 1,\n workgroupScale: 0.8,\n maxQueueDepth: 512,\n },\n high: {\n estimatedCostMs: 0.9,\n maxDispatchesPerFrame: 2,\n maxJobsPerDispatch: 384,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 640,\n },\n }\n ),\n suggestedAllocationIds: [\"physics.cinematic.transforms\"],\n },\n clothAssist: {\n queueClass: physicsWorkerQueueClasses.simulation,\n domain: \"cloth\",\n authority: \"non-authoritative-simulation\",\n importance: \"medium\",\n levels: buildWorkerBudgetLevels(\n \"physics.cinematic.clothAssist\",\n physicsWorkerQueueClasses.simulation,\n {\n low: {\n estimatedCostMs: 0.35,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 64,\n cadenceDivisor: 3,\n workgroupScale: 0.4,\n maxQueueDepth: 128,\n },\n medium: {\n estimatedCostMs: 0.75,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 128,\n cadenceDivisor: 2,\n workgroupScale: 0.7,\n maxQueueDepth: 256,\n },\n high: {\n estimatedCostMs: 1.2,\n maxDispatchesPerFrame: 2,\n maxJobsPerDispatch: 192,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 384,\n },\n }\n ),\n suggestedAllocationIds: [\"physics.cinematic.cloth.state\"],\n },\n fracturePreview: {\n queueClass: physicsWorkerQueueClasses.simulation,\n domain: \"geometry\",\n authority: \"non-authoritative-simulation\",\n importance: \"low\",\n levels: buildWorkerBudgetLevels(\n \"physics.cinematic.fracturePreview\",\n physicsWorkerQueueClasses.simulation,\n {\n low: {\n estimatedCostMs: 0.25,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 32,\n cadenceDivisor: 4,\n workgroupScale: 0.35,\n maxQueueDepth: 96,\n },\n medium: {\n estimatedCostMs: 0.5,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 96,\n cadenceDivisor: 2,\n workgroupScale: 0.65,\n maxQueueDepth: 160,\n },\n high: {\n estimatedCostMs: 0.85,\n maxDispatchesPerFrame: 2,\n maxJobsPerDispatch: 160,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 256,\n },\n }\n ),\n suggestedAllocationIds: [\"physics.cinematic.fracture.proxy\"],\n },\n worldSnapshot: {\n queueClass: physicsWorkerQueueClasses.render,\n domain: \"physics\",\n authority: \"authoritative\",\n importance: \"critical\",\n levels: buildWorkerBudgetLevels(\n \"physics.cinematic.worldSnapshot\",\n physicsWorkerQueueClasses.render,\n {\n low: {\n estimatedCostMs: 0.2,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 96,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 192,\n },\n medium: {\n estimatedCostMs: 0.35,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 160,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 320,\n },\n high: {\n estimatedCostMs: 0.5,\n maxDispatchesPerFrame: 2,\n maxJobsPerDispatch: 224,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 448,\n },\n }\n ),\n suggestedAllocationIds: [\n \"physics.cinematic.contacts\",\n \"physics.cinematic.transforms\",\n \"physics.cinematic.cloth.state\",\n ],\n },\n contactVisuals: {\n queueClass: physicsWorkerQueueClasses.render,\n domain: \"post-processing\",\n authority: \"visual\",\n importance: \"medium\",\n levels: buildWorkerBudgetLevels(\n \"physics.cinematic.contactVisuals\",\n physicsWorkerQueueClasses.render,\n {\n low: {\n estimatedCostMs: 0.2,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 64,\n cadenceDivisor: 4,\n workgroupScale: 0.4,\n maxQueueDepth: 128,\n },\n medium: {\n estimatedCostMs: 0.4,\n maxDispatchesPerFrame: 1,\n maxJobsPerDispatch: 128,\n cadenceDivisor: 2,\n workgroupScale: 0.75,\n maxQueueDepth: 224,\n },\n high: {\n estimatedCostMs: 0.65,\n maxDispatchesPerFrame: 2,\n maxJobsPerDispatch: 224,\n cadenceDivisor: 1,\n workgroupScale: 1,\n maxQueueDepth: 320,\n },\n }\n ),\n suggestedAllocationIds: [\"physics.cinematic.contacts\"],\n },\n },\n },\n};\n\nconst physicsWorkerDagSpecs = {\n gameplay: {\n broadphase: { priority: 4, dependencies: [] },\n narrowphase: { priority: 4, dependencies: [\"broadphase\"] },\n solver: { priority: 4, dependencies: [\"narrowphase\"] },\n authoritativeCommit: { priority: 4, dependencies: [\"solver\"] },\n animationStateInputs: { priority: 3, dependencies: [\"authoritativeCommit\"] },\n worldSnapshot: { priority: 3, dependencies: [\"animationStateInputs\"] },\n transforms: { priority: 2, dependencies: [\"worldSnapshot\"] },\n contactVisuals: { priority: 1, dependencies: [\"worldSnapshot\"] },\n },\n cinematic: {\n broadphase: { priority: 4, dependencies: [] },\n narrowphase: { priority: 4, dependencies: [\"broadphase\"] },\n solver: { priority: 4, dependencies: [\"narrowphase\"] },\n authoritativeCommit: { priority: 4, dependencies: [\"solver\"] },\n animationStateInputs: { priority: 3, dependencies: [\"authoritativeCommit\"] },\n clothAssist: { priority: 2, dependencies: [\"authoritativeCommit\"] },\n fracturePreview: { priority: 1, dependencies: [\"authoritativeCommit\"] },\n worldSnapshot: {\n priority: 3,\n dependencies: [\n \"animationStateInputs\",\n \"clothAssist\",\n \"fracturePreview\",\n ],\n },\n transforms: { priority: 2, dependencies: [\"worldSnapshot\"] },\n contactVisuals: { priority: 1, dependencies: [\"worldSnapshot\"] },\n },\n};\n\nexport const physicsSimulationPlans = Object.freeze({\n gameplay: Object.freeze({\n description:\n \"Gameplay simulation plan that hands off a stable post-commit world snapshot to visual preparation.\",\n snapshotStageId: \"worldSnapshot\",\n secondarySimulationStageIds: Object.freeze([]),\n stages: Object.freeze([\n Object.freeze({\n id: \"intentResolution\",\n phase: \"simulation\",\n authority: \"authoritative\",\n dependencies: Object.freeze([]),\n output: \"resolved-movement-intents\",\n }),\n Object.freeze({\n id: \"broadphase\",\n phase: \"simulation\",\n authority: \"authoritative\",\n queueClass: physicsWorkerQueueClasses.simulation,\n jobType: \"physics.gameplay.broadphase\",\n dependencies: Object.freeze([\"intentResolution\"]),\n output: \"broadphase-pairs\",\n }),\n Object.freeze({\n id: \"narrowphase\",\n phase: \"simulation\",\n authority: \"authoritative\",\n queueClass: physicsWorkerQueueClasses.simulation,\n jobType: \"physics.gameplay.narrowphase\",\n dependencies: Object.freeze([\"broadphase\"]),\n output: \"contacts\",\n }),\n Object.freeze({\n id: \"solver\",\n phase: \"simulation\",\n authority: \"authoritative\",\n queueClass: physicsWorkerQueueClasses.simulation,\n jobType: \"physics.gameplay.solver\",\n dependencies: Object.freeze([\"narrowphase\"]),\n output: \"resolved-motion\",\n }),\n Object.freeze({\n id: \"authoritativeCommit\",\n phase: \"simulation\",\n authority: \"authoritative\",\n queueClass: physicsWorkerQueueClasses.simulation,\n jobType: \"physics.gameplay.authoritativeCommit\",\n dependencies: Object.freeze([\"solver\"]),\n output: \"committed-authoritative-transforms\",\n }),\n Object.freeze({\n id: \"animationStateInputs\",\n phase: \"animation-inputs\",\n authority: \"visual\",\n queueClass: physicsWorkerQueueClasses.render,\n jobType: \"physics.gameplay.animationStateInputs\",\n dependencies: Object.freeze([\"authoritativeCommit\"]),\n output: \"resolved-animation-inputs\",\n }),\n Object.freeze({\n id: \"worldSnapshot\",\n phase: \"handoff\",\n authority: \"authoritative\",\n queueClass: physicsWorkerQueueClasses.render,\n jobType: \"physics.gameplay.worldSnapshot\",\n dependencies: Object.freeze([\"animationStateInputs\"]),\n output: \"stable-world-snapshot\",\n }),\n Object.freeze({\n id: \"transforms\",\n phase: \"visual-follow-up\",\n authority: \"visual\",\n queueClass: physicsWorkerQueueClasses.render,\n jobType: \"physics.gameplay.transforms\",\n dependencies: Object.freeze([\"worldSnapshot\"]),\n output: \"render-transform-sync\",\n }),\n Object.freeze({\n id: \"contactVisuals\",\n phase: \"visual-follow-up\",\n authority: \"visual\",\n queueClass: physicsWorkerQueueClasses.render,\n jobType: \"physics.gameplay.contactVisuals\",\n dependencies: Object.freeze([\"worldSnapshot\"]),\n output: \"visual-contact-effects\",\n }),\n ]),\n }),\n cinematic: Object.freeze({\n description:\n \"Cinematic simulation plan that runs degradable secondary simulation before publishing a stable world snapshot.\",\n snapshotStageId: \"worldSnapshot\",\n secondarySimulationStageIds: Object.freeze([\n \"clothAssist\",\n \"fracturePreview\",\n ]),\n stages: Object.freeze([\n Object.freeze({\n id: \"intentResolution\",\n phase: \"simulation\",\n authority: \"authoritative\",\n dependencies: Object.freeze([]),\n output: \"resolved-movement-intents\",\n }),\n Object.freeze({\n id: \"broadphase\",\n phase: \"simulation\",\n authority: \"authoritative\",\n queueClass: physicsWorkerQueueClasses.simulation,\n jobType: \"physics.cinematic.broadphase\",\n dependencies: Object.freeze([\"intentResolution\"]),\n output: \"broadphase-pairs\",\n }),\n Object.freeze({\n id: \"narrowphase\",\n phase: \"simulation\",\n authority: \"authoritative\",\n queueClass: physicsWorkerQueueClasses.simulation,\n jobType: \"physics.cinematic.narrowphase\",\n dependencies: Object.freeze([\"broadphase\"]),\n output: \"contacts\",\n }),\n Object.freeze({\n id: \"solver\",\n phase: \"simulation\",\n authority: \"authoritative\",\n queueClass: physicsWorkerQueueClasses.simulation,\n jobType: \"physics.cinematic.solver\",\n dependencies: Object.freeze([\"narrowphase\"]),\n output: \"resolved-motion\",\n }),\n Object.freeze({\n id: \"authoritativeCommit\",\n phase: \"simulation\",\n authority: \"authoritative\",\n queueClass: physicsWorkerQueueClasses.simulation,\n jobType: \"physics.cinematic.authoritativeCommit\",\n dependencies: Object.freeze([\"solver\"]),\n output: \"committed-authoritative-transforms\",\n }),\n Object.freeze({\n id: \"clothAssist\",\n phase: \"secondary-simulation\",\n authority: \"non-authoritative-simulation\",\n queueClass: physicsWorkerQueueClasses.simulation,\n jobType: \"physics.cinematic.clothAssist\",\n dependencies: Object.freeze([\"authoritativeCommit\"]),\n output: \"cloth-secondary-state\",\n }),\n Object.freeze({\n id: \"fracturePreview\",\n phase: \"secondary-simulation\",\n authority: \"non-authoritative-simulation\",\n queueClass: physicsWorkerQueueClasses.simulation,\n jobType: \"physics.cinematic.fracturePreview\",\n dependencies: Object.freeze([\"authoritativeCommit\"]),\n output: \"fracture-preview-state\",\n }),\n Object.freeze({\n id: \"animationStateInputs\",\n phase: \"animation-inputs\",\n authority: \"visual\",\n queueClass: physicsWorkerQueueClasses.render,\n jobType: \"physics.cinematic.animationStateInputs\",\n dependencies: Object.freeze([\"authoritativeCommit\"]),\n output: \"resolved-animation-inputs\",\n }),\n Object.freeze({\n id: \"worldSnapshot\",\n phase: \"handoff\",\n authority: \"authoritative\",\n queueClass: physicsWorkerQueueClasses.render,\n jobType: \"physics.cinematic.worldSnapshot\",\n dependencies: Object.freeze([\n \"animationStateInputs\",\n \"clothAssist\",\n \"fracturePreview\",\n ]),\n output: \"stable-world-snapshot\",\n }),\n Object.freeze({\n id: \"transforms\",\n phase: \"visual-follow-up\",\n authority: \"visual\",\n queueClass: physicsWorkerQueueClasses.render,\n jobType: \"physics.cinematic.transforms\",\n dependencies: Object.freeze([\"worldSnapshot\"]),\n output: \"render-transform-sync\",\n }),\n Object.freeze({\n id: \"contactVisuals\",\n phase: \"visual-follow-up\",\n authority: \"visual\",\n queueClass: physicsWorkerQueueClasses.render,\n jobType: \"physics.cinematic.contactVisuals\",\n dependencies: Object.freeze([\"worldSnapshot\"]),\n output: \"visual-contact-effects\",\n }),\n ]),\n }),\n});\n\nfunction buildPhysicsWorkerManifestJob(profileName, key, spec) {\n const label = `physics.${profileName}.${key}`;\n const dag = physicsWorkerDagSpecs[profileName][key];\n const dependencies = dag.dependencies.map(\n (dependency) => `physics.${profileName}.${dependency}`\n );\n\n return Object.freeze({\n key,\n label,\n worker: Object.freeze({\n jobType: label,\n queueClass: spec.queueClass,\n priority: dag.priority,\n dependencies: Object.freeze(dependencies),\n schedulerMode: \"dag\",\n }),\n performance: Object.freeze({\n id: label,\n jobType: label,\n queueClass: spec.queueClass,\n domain: spec.domain,\n authority: spec.authority,\n importance: spec.importance,\n levels: spec.levels,\n }),\n debug: Object.freeze({\n owner: physicsDebugOwner,\n queueClass: spec.queueClass,\n jobType: label,\n tags: Object.freeze([\n \"physics\",\n profileName,\n key,\n spec.authority,\n spec.domain,\n ]),\n suggestedAllocationIds: Object.freeze([...spec.suggestedAllocationIds]),\n }),\n });\n}\n\nfunction buildPhysicsWorkerManifest(profileName, spec) {\n return Object.freeze({\n schemaVersion: 1,\n owner: physicsDebugOwner,\n profile: profileName,\n schedulerMode: \"dag\",\n description: spec.description,\n suggestedAllocationIds: Object.freeze([...spec.suggestedAllocationIds]),\n jobs: Object.freeze(\n Object.entries(spec.jobs).map(([key, jobSpec]) =>\n buildPhysicsWorkerManifestJob(profileName, key, jobSpec)\n )\n ),\n });\n}\n\nexport const physicsWorkerManifests = Object.freeze(\n Object.fromEntries(\n Object.entries(physicsWorkerProfileSpecs).map(([profileName, spec]) => [\n profileName,\n buildPhysicsWorkerManifest(profileName, spec),\n ])\n )\n);\n\nexport const physicsWorkerProfileNames = Object.freeze(\n Object.keys(physicsWorkerManifests)\n);\n\nexport function getPhysicsWorkerManifest(\n profile = defaultPhysicsWorkerProfile\n) {\n const manifest = physicsWorkerManifests[profile];\n if (!manifest) {\n const available = physicsWorkerProfileNames.join(\", \");\n throw new Error(\n `Unknown physics worker profile \"${profile}\". Available: ${available}.`\n );\n }\n return manifest;\n}\n\nexport function createPhysicsSimulationPlan(\n profile = defaultPhysicsWorkerProfile\n) {\n const plan = physicsSimulationPlans[profile];\n if (!plan) {\n const available = physicsWorkerProfileNames.join(\", \");\n throw new Error(\n `Unknown physics worker profile \"${profile}\". Available: ${available}.`\n );\n }\n\n return Object.freeze({\n profile,\n description: plan.description,\n snapshotStageId: plan.snapshotStageId,\n snapshotStability: \"post-authoritative-commit\",\n stageOrder: Object.freeze(plan.stages.map((stage) => stage.id)),\n secondarySimulationStageIds: plan.secondarySimulationStageIds,\n stages: plan.stages,\n });\n}\n\nexport function createPhysicsWorldSnapshot(input) {\n if (typeof input !== \"object\" || input === null || Array.isArray(input)) {\n throw new Error(\"snapshot input must be a plain object.\");\n }\n\n const profile = input.profile ?? defaultPhysicsWorkerProfile;\n if (!physicsWorkerManifests[profile]) {\n const available = physicsWorkerProfileNames.join(\", \");\n throw new Error(\n `Unknown physics worker profile \"${profile}\". Available: ${available}.`\n );\n }\n\n const bodyCount =\n input.bodyCount === undefined\n ? undefined\n : assertNonNegativeInteger(\"snapshot.bodyCount\", input.bodyCount);\n const dynamicBodyCount =\n input.dynamicBodyCount === undefined\n ? undefined\n : assertNonNegativeInteger(\n \"snapshot.dynamicBodyCount\",\n input.dynamicBodyCount\n );\n const contactCount =\n input.contactCount === undefined\n ? undefined\n : assertNonNegativeInteger(\"snapshot.contactCount\", input.contactCount);\n\n return Object.freeze({\n schemaVersion: 1,\n stage: \"worldSnapshot\",\n stability: \"post-authoritative-commit\",\n profile,\n frameId: assertIdentifier(\"snapshot.frameId\", input.frameId),\n tick: assertNonNegativeInteger(\"snapshot.tick\", input.tick),\n simulationTimeMs: assertNonNegativeNumber(\n \"snapshot.simulationTimeMs\",\n input.simulationTimeMs\n ),\n authoritativeTransformRevision: assertNonNegativeInteger(\n \"snapshot.authoritativeTransformRevision\",\n input.authoritativeTransformRevision\n ),\n secondarySimulationRevision:\n input.secondarySimulationRevision === undefined\n ? undefined\n : assertNonNegativeInteger(\n \"snapshot.secondarySimulationRevision\",\n input.secondarySimulationRevision\n ),\n animationInputRevision:\n input.animationInputRevision === undefined\n ? undefined\n : assertNonNegativeInteger(\n \"snapshot.animationInputRevision\",\n input.animationInputRevision\n ),\n bodyCount,\n dynamicBodyCount,\n contactCount,\n includesSecondarySimulation: input.secondarySimulationRevision !== undefined,\n metadata: normalizeMetadata(input.metadata),\n });\n}\n"],"mappings":";AAAO,IAAM,oBAAoB;AAC1B,IAAM,4BAA4B,OAAO,OAAO;AAAA,EACrD,YAAY;AAAA,EACZ,QAAQ;AACV,CAAC;AACM,IAAM,8BAA8B;AACpC,IAAM,8BAA8B,OAAO,OAAO;AAAA,EACvD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAED,SAAS,iBAAiB,MAAM,OAAO;AACrC,MAAI,OAAO,UAAU,YAAY,MAAM,KAAK,EAAE,WAAW,GAAG;AAC1D,UAAM,IAAI,MAAM,GAAG,IAAI,8BAA8B;AAAA,EACvD;AAEA,SAAO;AACT;AAEA,SAAS,yBAAyB,MAAM,OAAO;AAC7C,MAAI,CAAC,OAAO,UAAU,KAAK,KAAK,QAAQ,GAAG;AACzC,UAAM,IAAI,MAAM,GAAG,IAAI,oDAAoD;AAAA,EAC7E;AAEA,SAAO;AACT;AAEA,SAAS,wBAAwB,MAAM,OAAO;AAC5C,MAAI,OAAO,UAAU,YAAY,CAAC,OAAO,SAAS,KAAK,KAAK,QAAQ,GAAG;AACrE,UAAM,IAAI,MAAM,GAAG,IAAI,yDAAyD;AAAA,EAClF;AAEA,SAAO;AACT;AAEA,SAAS,kBAAkB,OAAO;AAChC,MAAI,UAAU,QAAW;AACvB,WAAO,OAAO,OAAO,CAAC,CAAC;AAAA,EACzB;AAEA,MAAI,OAAO,UAAU,YAAY,UAAU,QAAQ,MAAM,QAAQ,KAAK,GAAG;AACvE,UAAM,IAAI,MAAM,yDAAyD;AAAA,EAC3E;AAEA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