@series-inc/rundot-syncplay 5.28.0-beta.4 → 5.28.0-beta.5
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 +73 -4
- package/core/baker.d.ts +16 -0
- package/core/box3d-probe.d.ts +22 -0
- package/core/build-mobile-native.d.ts +8 -0
- package/core/build-native.d.ts +5 -0
- package/core/build-wasm-physics.d.ts +9 -0
- package/core/compiler.d.ts +6 -0
- package/core/deterministic-math.d.ts +6 -0
- package/core/envelope.d.ts +10 -0
- package/core/f64-bits.d.ts +6 -0
- package/core/index.d.ts +8 -0
- package/core/native/physics/abi.cpp +626 -2
- package/core/native/physics/abi.hpp +7 -0
- package/core/native/physics/articulation.cpp +1434 -0
- package/core/native/physics/articulation.hpp +279 -0
- package/core/native/physics/buoyancy.cpp +1015 -0
- package/core/native/physics/buoyancy.hpp +196 -0
- package/core/native/physics/buoyancy_probe.cpp +240 -0
- package/core/native/physics/character.cpp +638 -0
- package/core/native/physics/character.hpp +169 -0
- package/core/native/physics/cloth.cpp +1401 -0
- package/core/native/physics/cloth.hpp +357 -0
- package/core/native/physics/constraint_rows.cpp +564 -0
- package/core/native/physics/constraint_rows.hpp +152 -0
- package/core/native/physics/deformable_query.cpp +1630 -0
- package/core/native/physics/deformable_query.hpp +578 -0
- package/core/native/physics/distance.cpp +1163 -0
- package/core/native/physics/distance.hpp +151 -0
- package/core/native/physics/extended_abi.cpp +1242 -0
- package/core/native/physics/extended_abi.hpp +355 -0
- package/core/native/physics/extended_abi_characters.cpp +261 -0
- package/core/native/physics/extended_abi_characters.hpp +434 -0
- package/core/native/physics/extended_abi_core_features.cpp +711 -0
- package/core/native/physics/extended_abi_core_features.hpp +226 -0
- package/core/native/physics/extended_abi_deformables.cpp +448 -0
- package/core/native/physics/extended_abi_deformables.hpp +867 -0
- package/core/native/physics/extended_abi_vehicles.cpp +411 -0
- package/core/native/physics/extended_abi_vehicles.hpp +222 -0
- package/core/native/physics/extended_world.cpp +2715 -0
- package/core/native/physics/extended_world.hpp +429 -0
- package/core/native/physics/extended_world_abi.cpp +900 -0
- package/core/native/physics/extended_world_abi.hpp +215 -0
- package/core/native/physics/fracture.cpp +1981 -0
- package/core/native/physics/fracture.hpp +460 -0
- package/core/native/physics/gear.cpp +563 -0
- package/core/native/physics/gear.hpp +158 -0
- package/core/native/physics/joint_warm_probe.cpp +1090 -0
- package/core/native/physics/lag_compensation.cpp +1626 -0
- package/core/native/physics/lag_compensation.hpp +405 -0
- package/core/native/physics/particles.cpp +1065 -0
- package/core/native/physics/particles.hpp +261 -0
- package/core/native/physics/path_joint.cpp +781 -0
- package/core/native/physics/path_joint.hpp +154 -0
- package/core/native/physics/physics.cpp +3411 -1230
- package/core/native/physics/physics.hpp +259 -4
- package/core/native/physics/planar_deformable.cpp +2433 -0
- package/core/native/physics/planar_deformable.hpp +889 -0
- package/core/native/physics/platformer_2d.cpp +1353 -0
- package/core/native/physics/platformer_2d.hpp +340 -0
- package/core/native/physics/powered_ragdoll.cpp +1100 -0
- package/core/native/physics/powered_ragdoll.hpp +279 -0
- package/core/native/physics/powertrain.cpp +586 -0
- package/core/native/physics/powertrain.hpp +180 -0
- package/core/native/physics/pulley.cpp +311 -0
- package/core/native/physics/pulley.hpp +121 -0
- package/core/native/physics/ragdoll.cpp +586 -0
- package/core/native/physics/ragdoll.hpp +221 -0
- package/core/native/physics/rope.cpp +672 -0
- package/core/native/physics/rope.hpp +215 -0
- package/core/native/physics/rounded_convex.cpp +1229 -0
- package/core/native/physics/rounded_convex.hpp +287 -0
- package/core/native/physics/sdf_geometry.cpp +1821 -0
- package/core/native/physics/sdf_geometry.hpp +474 -0
- package/core/native/physics/soft_body.cpp +1449 -0
- package/core/native/physics/soft_body.hpp +328 -0
- package/core/native/physics/soft_collision.cpp +1862 -0
- package/core/native/physics/soft_collision.hpp +561 -0
- package/core/native/physics/surface_velocity.cpp +366 -0
- package/core/native/physics/surface_velocity.hpp +243 -0
- package/core/native/physics/topology.cpp +1107 -0
- package/core/native/physics/topology.hpp +237 -0
- package/core/native/physics/tracks.cpp +1179 -0
- package/core/native/physics/tracks.hpp +404 -0
- package/core/native/physics/vehicle.cpp +629 -0
- package/core/native/physics/vehicle.hpp +191 -0
- package/core/native/physics/voxel_cooking.cpp +1902 -0
- package/core/native/physics/voxel_cooking.hpp +395 -0
- package/core/native/physics/world.cpp +2042 -0
- package/core/native/physics/world.hpp +209 -0
- package/core/native/physics/world_abi.cpp +969 -0
- package/core/native/physics/world_abi.hpp +172 -0
- package/core/native/physics2d/buoyancy.cpp +885 -0
- package/core/native/physics2d/buoyancy.hpp +119 -0
- package/core/native/physics2d/buoyancy_probe.cpp +382 -0
- package/core/native/physics2d/ccd.cpp +971 -0
- package/core/native/physics2d/ccd.hpp +116 -0
- package/core/native/physics2d/commands.cpp +1058 -0
- package/core/native/physics2d/commands.hpp +163 -0
- package/core/native/physics2d/compound.cpp +581 -0
- package/core/native/physics2d/compound.hpp +248 -0
- package/core/native/physics2d/contact_feature_probe.cpp +354 -0
- package/core/native/physics2d/fluid.cpp +880 -0
- package/core/native/physics2d/fluid.hpp +261 -0
- package/core/native/physics2d/fluid_probe.cpp +321 -0
- package/core/native/physics2d/gear_probe.cpp +371 -0
- package/core/native/physics2d/joints.cpp +2534 -0
- package/core/native/physics2d/joints.hpp +669 -0
- package/core/native/physics2d/joints_probe.cpp +927 -0
- package/core/native/physics2d/owned_abi.cpp +1215 -0
- package/core/native/physics2d/owned_abi.hpp +459 -0
- package/core/native/physics2d/physics2d.cpp +3046 -0
- package/core/native/physics2d/physics2d.hpp +489 -0
- package/core/native/physics2d/physics2d_probe.cpp +659 -0
- package/core/native/physics2d/platformer.hpp +3 -0
- package/core/native/physics2d/pulley_probe.cpp +680 -0
- package/core/native/physics2d/queries.cpp +2343 -0
- package/core/native/physics2d/queries.hpp +337 -0
- package/core/native/physics2d/query_probe.cpp +874 -0
- package/core/native/physics2d/world.cpp +1786 -0
- package/core/native/physics2d/world.hpp +216 -0
- package/core/native/physics2d/world_probe.cpp +1017 -0
- package/core/native/wasm_runtime.cpp +4 -0
- package/core/native-product.d.ts +6 -0
- package/core/physics.d.ts +1170 -11
- package/core/physics2d-owned.d.ts +414 -0
- package/core/physics2d.d.ts +632 -0
- package/core/render-projection.d.ts +5 -0
- package/core/render-records.d.ts +10 -0
- package/core/runtime.d.ts +39 -0
- package/core/scripts/build-mobile-native.mjs +26 -0
- package/core/scripts/build-native.mjs +42 -5
- package/core/scripts/build-wasm-physics.mjs +1002 -104
- package/core/src/index.mjs +3 -0
- package/core/src/kinetix-product-contract.mjs +2 -0
- package/core/src/kinetix-runtime-adapter-utils.mjs +325 -47
- package/core/src/physics/abi-constants.mjs +10 -0
- package/core/src/physics/articulation.mjs +1141 -0
- package/core/src/physics/box3d-probe.mjs +41 -26
- package/core/src/physics/character.mjs +461 -0
- package/core/src/physics/cloth.mjs +1156 -0
- package/core/src/physics/deformable-query.mjs +1412 -0
- package/core/src/physics/distance.mjs +671 -0
- package/core/src/physics/extended-wasm-instance.mjs +187 -0
- package/core/src/physics/extended-world.mjs +911 -0
- package/core/src/physics/fracture.mjs +1324 -0
- package/core/src/physics/gear.mjs +956 -0
- package/core/src/physics/index.mjs +1102 -507
- package/core/src/physics/lag-compensation.mjs +1100 -0
- package/core/src/physics/mass-properties.mjs +18 -1
- package/core/src/physics/particles.mjs +758 -0
- package/core/src/physics/path-joint.mjs +1231 -0
- package/core/src/physics/physics-extended-wasm-module.generated.mjs +10 -0
- package/core/src/physics/physics-wasm-module.generated.mjs +8 -6
- package/core/src/physics/planar-deformable.mjs +1275 -0
- package/core/src/physics/platformer-2d.mjs +1137 -0
- package/core/src/physics/powered-ragdoll.mjs +1043 -0
- package/core/src/physics/powertrain.mjs +621 -0
- package/core/src/physics/pulley.mjs +686 -0
- package/core/src/physics/ragdoll.mjs +1323 -0
- package/core/src/physics/rope.mjs +423 -0
- package/core/src/physics/rounded-convex.mjs +1404 -0
- package/core/src/physics/sdf-geometry.mjs +1204 -0
- package/core/src/physics/sixdof.mjs +386 -0
- package/core/src/physics/soft-body.mjs +1285 -0
- package/core/src/physics/soft-collision.mjs +1883 -0
- package/core/src/physics/surface-velocity.mjs +885 -0
- package/core/src/physics/tracks.mjs +1074 -0
- package/core/src/physics/vehicle.mjs +423 -0
- package/core/src/physics/voxel-cooking.mjs +1475 -0
- package/core/src/physics/wasm-instance.mjs +101 -0
- package/core/src/physics/world.mjs +852 -0
- package/core/src/physics2d/body-state.mjs +249 -0
- package/core/src/physics2d/ccd.mjs +632 -0
- package/core/src/physics2d/compound.mjs +454 -0
- package/core/src/physics2d/fluid-state.mjs +145 -0
- package/core/src/physics2d/index.mjs +1463 -0
- package/core/src/physics2d/joint-output-state.mjs +295 -0
- package/core/src/physics2d/joint-state.mjs +1032 -0
- package/core/src/physics2d/owned-queries.mjs +54 -0
- package/core/src/physics2d/owned-transport.mjs +1240 -0
- package/core/src/physics2d/owned-world.mjs +1590 -0
- package/core/src/physics2d/physics2d-wasm-module.generated.mjs +53 -0
- package/core/src/physics2d/queries.mjs +124 -0
- package/core/src/physics2d/query-codec.mjs +305 -0
- package/core/src/physics2d/wasm-instance.mjs +215 -0
- package/core/src/runtime.mjs +5 -1
- package/core/world-kernel.d.ts +5 -0
- package/core/world.d.ts +107 -0
- package/dist/api-deprecations.generated.d.ts +38 -0
- package/dist/api-deprecations.generated.js +39 -0
- package/dist/api-diagnostics.d.ts +11 -0
- package/dist/api-diagnostics.js +25 -0
- package/dist/api-v1.generated.d.ts +257 -0
- package/dist/api-v1.generated.js +730 -0
- package/dist/browser.d.ts +2 -2
- package/dist/creator.d.ts +2 -1
- package/dist/creator.js +2 -1
- package/dist/errors.d.ts +7 -0
- package/dist/errors.js +4 -4
- package/dist/index.d.ts +3 -2
- package/dist/networked-client.d.ts +13 -6
- package/dist/networked-client.js +228 -99
- package/dist/physics3d-solver.js +19 -6
- package/dist/physics3d.d.ts +21 -0
- package/dist/physics3d.js +58 -3
- package/dist/runner.d.ts +41 -2
- package/dist/runner.js +341 -33
- package/dist/runtime-lease.d.ts +16 -0
- package/dist/runtime-lease.js +77 -0
- package/dist/state-digest.d.ts +28 -0
- package/dist/state-digest.js +83 -0
- package/package.json +111 -26
package/README.md
CHANGED
|
@@ -298,14 +298,22 @@ const runner = createSyncplayRunner({
|
|
|
298
298
|
events: (frame) => frame.events,
|
|
299
299
|
},
|
|
300
300
|
})
|
|
301
|
-
runner.
|
|
302
|
-
|
|
301
|
+
await runner.start({
|
|
302
|
+
mode: 'offline', identity, sessionConfigBytes, playerCount: 2, botInputForTick,
|
|
303
|
+
})
|
|
303
304
|
runner.applyInput(readInput())
|
|
304
305
|
runner.update(deltaMs)
|
|
305
306
|
render(runner.getRenderState(), runner.renderAlpha)
|
|
307
|
+
runner.stop()
|
|
308
|
+
await runner.start({
|
|
309
|
+
mode: 'networked',
|
|
310
|
+
connect: (signal) => createSyncplayRoom(api.realtime, roomOptions, signal),
|
|
311
|
+
})
|
|
312
|
+
runner.dispose()
|
|
306
313
|
```
|
|
307
314
|
|
|
308
|
-
|
|
315
|
+
`runner.lifecycle` reports `idle | starting | running | stopped | failed |
|
|
316
|
+
disposed`. The existing `status` field remains available for display state:
|
|
309
317
|
|
|
310
318
|
- `connecting` covers the room-open promise.
|
|
311
319
|
- `syncing` covers session-descriptor/asset preparation, reconnect, and catch-up.
|
|
@@ -314,7 +322,13 @@ render(runner.getRenderState(), runner.renderAlpha)
|
|
|
314
322
|
- `error` carries connection, preparation, and offline-construction failures on
|
|
315
323
|
the runner snapshot (and the throw is rethrown to the caller).
|
|
316
324
|
- `stop` aborts preparation, closes the transport, and disposes the active
|
|
317
|
-
client/session
|
|
325
|
+
client/session. `stop` and `dispose` are idempotent. `dispose` is terminal.
|
|
326
|
+
|
|
327
|
+
The runtime factory can return a runtime or a promise. A direct runtime is
|
|
328
|
+
borrowed. The runner does not dispose it. Return `{ runtime, dispose }` to give
|
|
329
|
+
the runner an owned lease. Cleanup releases session checkpoints before the
|
|
330
|
+
lease. Cancellation also cleans a late owned lease or transport. The old
|
|
331
|
+
`startOffline` and `startNetworked` methods remain as compatibility methods.
|
|
318
332
|
|
|
319
333
|
Presentation stays **predicted** for render motion, while side-effect events are
|
|
320
334
|
delivered only from authority-confirmed frames received after the first live
|
|
@@ -432,3 +446,58 @@ over a deterministic simulated network (`createSimulatedSyncplayMatch`,
|
|
|
432
446
|
and `assertPresentationParity` cover the runner seam — a real runner driven on
|
|
433
447
|
a fully controlled clock against the simulated match. Failures name the phase,
|
|
434
448
|
frame, and disagreeing checksums.
|
|
449
|
+
|
|
450
|
+
## Physics parity program
|
|
451
|
+
|
|
452
|
+
The physics parity program is in progress. The native 3D solver now performs
|
|
453
|
+
collision work in each substep. Core queries require explicit initialization.
|
|
454
|
+
The native 3D physics ABI is 18, as reported by `PHYSICS_ABI_VERSION` in
|
|
455
|
+
`core/src/physics/abi-constants.mjs`. It adds `breakForce` and `breakTorque`
|
|
456
|
+
joint limits and joint reactions in `world.jointCache`. The flat impulse fields remain
|
|
457
|
+
for compatibility. ABI16 physics snapshots are rejected, so affected checkpoint
|
|
458
|
+
histories need a rebuild or restart.
|
|
459
|
+
The new `core/physics2d` API is experimental. It supports circles, boxes,
|
|
460
|
+
capsules, and convex polygons with angular motion through the shared C++/WASM
|
|
461
|
+
source. Constant finite fluid regions provide native buoyancy and coupled drag.
|
|
462
|
+
|
|
463
|
+
It also supports eight experimental 2D joint primitives: distance, revolute,
|
|
464
|
+
prismatic, weld, wheel, motor, mouse and rope. Gear joints couple two revolute or prismatic sources.
|
|
465
|
+
Joint time uses seconds. Angles use radians. Body frames use the authoring
|
|
466
|
+
origin. World frames use world coordinates. Endpoint A defines prismatic and
|
|
467
|
+
wheel axes. `breakForce` and `breakTorque` are finite non-negative limits, and
|
|
468
|
+
zero disables each limit. Linear drives require `maxForce`; angular drives
|
|
469
|
+
require `maxTorque`; motor requires both caps; mouse requires `maxForce`.
|
|
470
|
+
Zero caps are valid. Unsupported fields and invalid nested values fail before
|
|
471
|
+
the native step.
|
|
472
|
+
|
|
473
|
+
Linear speeds use world units per second. Angular speeds use radians per
|
|
474
|
+
second. Force uses mass times world units per second squared. Torque uses mass
|
|
475
|
+
times world units squared per second squared.
|
|
476
|
+
|
|
477
|
+
Worlds expose sorted read-only `joints`, `jointState`, `jointTelemetry` and
|
|
478
|
+
`jointBreakEvents` arrays. Warm signatures are `bigint` values. Matching
|
|
479
|
+
normalized definitions retain warm state through `withPhysicsJoints2D`; changed
|
|
480
|
+
definitions reset state. Pass `{ resetState: true }` to reset a matching
|
|
481
|
+
definition. Definition edits clear latest telemetry and break events. Fluid
|
|
482
|
+
edits preserve joint state. Reactions report native endpoint-B mean force and
|
|
483
|
+
direct anchor couple, with full-step and substep durations. The mean uses the full tick duration. The default `KRTCP002` checkpoint codec preserves
|
|
484
|
+
joint `bigint` state, so do not JSON-round-trip a world.
|
|
485
|
+
|
|
486
|
+
A gear requires `sourceA`, `sourceB`, a finite nonzero `ratio`, a matching
|
|
487
|
+
`ratioUnit`, and explicit `phase`. Its equation is `qB + ratio * qA = phase`.
|
|
488
|
+
A positive break limit requires a source and endpoint selector. Gear telemetry
|
|
489
|
+
has four ordered `endpointReactions`. Narrow `entry.type` before reading a
|
|
490
|
+
primitive `reaction`. Source edits reset dependent gear warm state. Remove
|
|
491
|
+
gears in the same update that removes a source. See the SDK physics guide for
|
|
492
|
+
units, reaction semantics, and a checked example.
|
|
493
|
+
|
|
494
|
+
The core hydrostatic buoyancy helper supports spheres and oriented boxes under
|
|
495
|
+
a horizontal water plane. Full fluid, joint, 2D and cross-device parity remains
|
|
496
|
+
open. Native 2D joints remain in progress. These additions do not declare
|
|
497
|
+
Syncplay 1.0 complete. The capability ledger contains all 175 required feature
|
|
498
|
+
rows and separates source findings from behavioral, replay, device and
|
|
499
|
+
performance evidence.
|
|
500
|
+
|
|
501
|
+
See the SDK physics and migration pages before adopting these changes. The
|
|
502
|
+
default checkpoint codec is now `KRTCP002`. Physics trajectory changes require a
|
|
503
|
+
new game deterministic version. The provisional release checks remain open.
|
package/core/baker.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Generated. Declares the runtime exports of ./core/baker.
|
|
2
|
+
// Constants carry exact values, function parameters carry real names typed `any`.
|
|
3
|
+
// Regenerate: node scripts/generate-physics-declarations.mjs --write
|
|
4
|
+
|
|
5
|
+
export declare function assertKinetixProductContract(products: any): any;
|
|
6
|
+
export declare function assertKinetixRuntimeIdentityMatchesProducts(products: any, identity: any): any;
|
|
7
|
+
export declare function bakeKinetixEnvelope(envelope: any, installedProfiles: any): any;
|
|
8
|
+
export declare function deriveCustomRuntimeIdentity(options: any): any;
|
|
9
|
+
export declare function deriveKinetixRuntimeIdentity(products: any, runtimeContract?: any): any;
|
|
10
|
+
export declare const kinetixBakerVersion: "rundot.kinetix-baker.v1";
|
|
11
|
+
export declare const kinetixPhases: readonly ["initialization", "fixed-simulation", "post-simulation", "presentation-projection", "presentation"];
|
|
12
|
+
export declare function kinetixRuntimeModuleManifest(sourceRoot: any, relativePaths: any): any;
|
|
13
|
+
export declare function scanKinetixPayloadTree(value: any): any;
|
|
14
|
+
export declare function stableKinetixProductBytes(products: any): any;
|
|
15
|
+
export declare function stableKinetixSourceBytes(envelope: any): any;
|
|
16
|
+
export declare function validateInstalledKinetixProfile(profileId: any, profile: any): any;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Generated. Declares the runtime exports of ./core/box3d-probe.
|
|
2
|
+
// Constants carry exact values, function parameters carry real names typed `any`.
|
|
3
|
+
// Regenerate: node scripts/generate-physics-declarations.mjs --write
|
|
4
|
+
|
|
5
|
+
export declare const BOX3D_PROBE_ABI_VERSION: 1;
|
|
6
|
+
export declare const BOX3D_PROBE_BODY_COUNT: 128;
|
|
7
|
+
export declare const BOX3D_PROBE_BODY_STRIDE: 44;
|
|
8
|
+
export declare const BOX3D_PROBE_PERF_FRAMES: 1200;
|
|
9
|
+
export declare const BOX3D_PROBE_SCENARIO_ID: 1;
|
|
10
|
+
export declare const BOX3D_PROBE_SMOKE_FRAMES: 120;
|
|
11
|
+
export declare const BOX3D_PROBE_STEP_OPTIONS: Readonly<{
|
|
12
|
+
readonly "gravityY": -9.8;
|
|
13
|
+
readonly "dtTicks": 0.016666666666666666;
|
|
14
|
+
readonly "substeps": 4;
|
|
15
|
+
readonly "velocityIterations": 4;
|
|
16
|
+
}>;
|
|
17
|
+
export declare function benchmarkBodyOrder(bodies: any): any;
|
|
18
|
+
export declare function bridgeBodyFields(body: any): any;
|
|
19
|
+
export declare function commonBodyFields(body: any): any;
|
|
20
|
+
export declare function computeBox3dOracleChecksum(frameCount: any): any;
|
|
21
|
+
export declare function hashFloat32Values(values: any): any;
|
|
22
|
+
export declare function makeBodies(bodyCount?: any): any;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Generated. Declares the runtime exports of ./core/build-mobile-native.
|
|
2
|
+
// Constants carry exact values, function parameters carry real names typed `any`.
|
|
3
|
+
// Regenerate: node scripts/generate-physics-declarations.mjs --write
|
|
4
|
+
|
|
5
|
+
export declare const MOBILE_NATIVE_FILES: readonly unknown[];
|
|
6
|
+
export declare function getMobileNativeSourceManifest(): any;
|
|
7
|
+
export declare function getMobileNativeSourcePaths(): any;
|
|
8
|
+
export declare function writeMobileNativeSourceManifest(outputPath: any): any;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Generated. Declares the runtime exports of ./core/build-wasm-physics.
|
|
2
|
+
// Constants carry exact values, function parameters carry real names typed `any`.
|
|
3
|
+
// Regenerate: node scripts/generate-physics-declarations.mjs --write
|
|
4
|
+
|
|
5
|
+
export declare function buildWasmPhysics(options?: any): any;
|
|
6
|
+
export declare function buildWasmPhysics2D(options?: any): any;
|
|
7
|
+
export declare function buildWasmPhysicsExtended(options?: any): any;
|
|
8
|
+
export declare function getWasmNumericProfile(arg0?: any): any;
|
|
9
|
+
export declare function getWasmPhysicsSourceHashes(): any;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Generated. Declares the runtime exports of ./core/compiler.
|
|
2
|
+
// Constants carry exact values, function parameters carry real names typed `any`.
|
|
3
|
+
// Regenerate: node scripts/generate-physics-declarations.mjs --write
|
|
4
|
+
|
|
5
|
+
export declare function compileKinetixProject(arg0?: any): any;
|
|
6
|
+
export declare function compileTrustedKinetixSource(arg0: any): any;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Generated. Declares the runtime exports of ./core/deterministic-math.
|
|
2
|
+
// Constants carry exact values, function parameters carry real names typed `any`.
|
|
3
|
+
// Regenerate: node scripts/generate-physics-declarations.mjs --write
|
|
4
|
+
|
|
5
|
+
export declare const DETERMINISTIC_MATH_SOURCE: "(() => {\n if (globalThis.__deterministicMathInstalled) return;\n globalThis.__deterministicMathInstalled = true;\n\n const f64 = new Float64Array(1);\n const u32 = new Uint32Array(f64.buffer);\n // Little-endian assumed (x86_64/arm64); index 1 = high word.\n const HI = (x) => { f64[0] = x; return u32[1] | 0; };\n const LO = (x) => { f64[0] = x; return u32[0] | 0; };\n const fromWords = (hi, lo) => { u32[1] = hi >>> 0; u32[0] = lo >>> 0; return f64[0]; };\n const setHi = (x, hi) => { f64[0] = x; u32[1] = hi >>> 0; return f64[0]; };\n const setLo = (x, lo) => { f64[0] = x; u32[0] = lo >>> 0; return f64[0]; };\n\n const abs = Math.abs, sqrt = Math.sqrt, floor = Math.floor;\n\n const two1023 = 8.98846567431157953865e+307;\n function scalbn2(x, n) {\n let hx = HI(x), lx = LO(x);\n let k = (hx & 0x7ff00000) >> 20;\n if (k === 0) {\n if ((lx | (hx & 0x7fffffff)) === 0) return x;\n x *= 18014398509481984.0;\n hx = HI(x);\n k = ((hx & 0x7ff00000) >> 20) - 54;\n if (n < -50000) return 1e-300 * x;\n }\n if (k === 0x7ff) return x + x;\n k = k + n;\n if (k > 0x7fe) return 1e300 * (x > 0 ? 1e300 : -1e300);\n if (k > 0) return setHi(x, (hx & 0x800fffff) | (k << 20));\n if (k <= -54) {\n if (n > 50000) return 1e300 * (x > 0 ? 1e300 : -1e300);\n return 1e-300 * (x > 0 ? 1e-300 : -1e-300);\n }\n k += 54;\n x = setHi(x, (hx & 0x800fffff) | (k << 20));\n return x * 5.55112312578270211816e-17; // 2^-54\n }\n\n // ---- __kernel_sin / __kernel_cos / __kernel_tan (fdlibm) ----------------\n const S1 = -1.66666666666666324348e-01, S2 = 8.33333333332248946124e-03,\n S3 = -1.98412698298579493134e-04, S4 = 2.75573137070700676789e-06,\n S5 = -2.50507602534068634195e-08, S6 = 1.58969099521155010221e-10;\n function kernelSin(x, y, iy) {\n const z = x * x;\n const v = z * x;\n const r = S2 + z * (S3 + z * (S4 + z * (S5 + z * S6)));\n if (iy === 0) return x + v * (S1 + z * r);\n return x - ((z * (0.5 * y - v * r) - y) - v * S1);\n }\n const C1 = 4.16666666666666019037e-02, C2 = -1.38888888888741095749e-03,\n C3 = 2.48015872894767294178e-05, C4 = -2.75573143513906633035e-07,\n C5 = 2.08757232129817482790e-09, C6 = -1.13596475577881948265e-11;\n function kernelCos(x, y) {\n const z = x * x;\n const r = z * (C1 + z * (C2 + z * (C3 + z * (C4 + z * (C5 + z * C6)))));\n const hz = 0.5 * z;\n const w = 1.0 - hz;\n return w + (((1.0 - w) - hz) + (z * r - x * y));\n }\n const T = [\n 3.33333333333334091986e-01, 1.33333333333201242699e-01, 5.39682539762260521377e-02,\n 2.18694882948595424599e-02, 8.86323982359930005737e-03, 3.59207910759131235356e-03,\n 1.45620945432529025516e-03, 5.88041240820264096874e-04, 2.46463134818469906812e-04,\n 7.81794442939557092300e-05, 7.14072491382608190305e-05, -1.85586374855275456654e-05,\n 2.59073051863633712884e-05,\n ];\n const pio4 = 7.85398163397448278999e-01, pio4lo = 3.06161699786838301793e-17;\n function kernelTan(x, y, iy) {\n let z, r, v, w, s;\n const hx = HI(x);\n const ix = hx & 0x7fffffff;\n if (ix >= 0x3FE59428) { // |x| >= 0.6744\n if (hx < 0) { x = -x; y = -y; }\n z = pio4 - x;\n w = pio4lo - y;\n x = z + w; y = 0.0;\n }\n z = x * x;\n w = z * z;\n r = T[1] + w * (T[3] + w * (T[5] + w * (T[7] + w * (T[9] + w * T[11]))));\n v = z * (T[2] + w * (T[4] + w * (T[6] + w * (T[8] + w * (T[10] + w * T[12])))));\n s = z * x;\n r = y + z * (s * (r + v) + y);\n r += T[0] * s;\n w = x + r;\n if (ix >= 0x3FE59428) {\n v = iy;\n return (1 - ((hx >> 30) & 2)) * (v - 2.0 * (x - (w * w / (w + v) - r)));\n }\n if (iy === 1) return w;\n // compute -1/(x+r) accurately\n z = w;\n z = setLo(z, 0);\n v = r - (z - x);\n let t = -1.0 / w;\n let a = t;\n a = setLo(a, 0);\n s = 1.0 + a * z;\n return a + t * (s + a * v);\n }\n\n // ---- __rem_pio2 (fdlibm, incl. Payne-Hanek for large args) ---------------\n const twoOverPi = [\n 0xA2F983, 0x6E4E44, 0x1529FC, 0x2757D1, 0xF534DD, 0xC0DB62, 0x95993C, 0x439041,\n 0xFE5163, 0xABDEBB, 0xC561B7, 0x246E3A, 0x424DD2, 0xE00649, 0x2EEA09, 0xD1921C,\n 0xFE1DEB, 0x1CB129, 0xA73EE8, 0x8235F5, 0x2EBB44, 0x84E99C, 0x7026B4, 0x5F7E41,\n 0x3991D6, 0x398353, 0x39F49C, 0x845F8B, 0xBDF928, 0x3B1FF8, 0x97FFDE, 0x05980F,\n 0xEF2F11, 0x8B5A0A, 0x6D1F6D, 0x367ECF, 0x27CB09, 0xB74F46, 0x3F669E, 0x5FEA2D,\n 0x7527BA, 0xC7EBE5, 0xF17B3D, 0x0739F7, 0x8A5292, 0xEA6BFB, 0x5FB11F, 0x8D5D08,\n 0x560330, 0x46FC7B, 0x6BABF0, 0xCFBC20, 0x9AF436, 0x1DA9E3, 0x91615E, 0xE61B08,\n 0x659985, 0x5F14A0, 0x68408D, 0xFFD880, 0x4D7327, 0x310606, 0x1556CA, 0x73A8C9,\n 0x60E27B, 0xC08C6B,\n ];\n const PIo2 = [\n 1.57079625129699707031e+00, 7.54978941586159635335e-08, 5.39030252995776476554e-15,\n 3.28200341580791294123e-22, 1.27065575308067607349e-29, 1.22933308981111328932e-36,\n 2.73370053816464559624e-44, 2.16741683877804819444e-51,\n ];\n const two24 = 1.67772160000000000000e+07, twon24 = 5.96046447753906250000e-08;\n function kernelRemPio2(x, y, e0, nx) {\n // prec = 2 (double), jk = 4\n const jk = 4, jp = 4;\n let jx = nx - 1;\n let jv = ((e0 - 3) / 24) | 0; if (jv < 0) jv = 0;\n let q0 = e0 - 24 * (jv + 1);\n const f = new Array(20).fill(0);\n const q = new Array(20).fill(0);\n const iq = new Array(20).fill(0);\n const fw0 = new Array(20).fill(0);\n let i, j, k, m, n, ih, z, fw, carry;\n for (i = 0, j = jv - jx; i <= jx + jk; i++, j++) f[i] = j < 0 ? 0 : twoOverPi[j];\n for (i = 0; i <= jk; i++) {\n fw = 0;\n for (j = 0; j <= jx; j++) fw += x[j] * f[jx + i - j];\n q[i] = fw;\n }\n let jz = jk;\n let recomputeNeeded = true;\n while (recomputeNeeded) {\n recomputeNeeded = false;\n // distill q[] into iq[] reversingly\n for (i = 0, j = jz, z = q[jz]; j > 0; i++, j--) {\n fw = Math.floor(twon24 * z);\n iq[i] = (z - two24 * fw) | 0;\n z = q[j - 1] + fw;\n }\n z = scalbn2(z, q0);\n z -= 8.0 * floor(z * 0.125);\n n = z | 0;\n z -= n;\n ih = 0;\n if (q0 > 0) {\n i = (iq[jz - 1] >> (24 - q0));\n n += i;\n iq[jz - 1] -= i << (24 - q0);\n ih = iq[jz - 1] >> (23 - q0);\n } else if (q0 === 0) ih = iq[jz - 1] >> 23;\n else if (z >= 0.5) ih = 2;\n if (ih > 0) {\n n += 1; carry = 0;\n for (i = 0; i < jz; i++) {\n j = iq[i];\n if (carry === 0) {\n if (j !== 0) { carry = 1; iq[i] = 0x1000000 - j; }\n } else iq[i] = 0xffffff - j;\n }\n if (q0 > 0) {\n switch (q0) {\n case 1: iq[jz - 1] &= 0x7fffff; break;\n case 2: iq[jz - 1] &= 0x3fffff; break;\n }\n }\n if (ih === 2) {\n z = 1.0 - z;\n if (carry !== 0) z -= scalbn2(1.0, q0);\n }\n }\n if (z === 0) {\n j = 0;\n for (i = jz - 1; i >= jk; i--) j |= iq[i];\n if (j === 0) {\n for (k = 1; iq[jk - k] === 0; k++) { }\n for (i = jz + 1; i <= jz + k; i++) {\n f[jx + i] = twoOverPi[jv + i];\n for (j = 0, fw = 0; j <= jx; j++) fw += x[j] * f[jx + i - j];\n q[i] = fw;\n }\n jz += k;\n recomputeNeeded = true;\n continue;\n }\n }\n if (z === 0) {\n jz -= 1; q0 -= 24;\n while (iq[jz] === 0) { jz--; q0 -= 24; }\n } else {\n z = scalbn2(z, -q0);\n if (z >= two24) {\n fw = Math.floor(twon24 * z);\n iq[jz] = (z - two24 * fw) | 0;\n jz += 1; q0 += 24;\n iq[jz] = fw | 0;\n } else iq[jz] = z | 0;\n }\n fw = scalbn2(1.0, q0);\n for (i = jz; i >= 0; i--) { q[i] = fw * iq[i]; fw *= twon24; }\n for (i = jz; i >= 0; i--) {\n for (fw = 0, k = 0; k <= jp && k <= jz - i; k++) fw += PIo2[k] * q[i + k];\n fw0[jz - i] = fw;\n }\n // compress fw0 into y[] (prec 2)\n fw = 0;\n for (i = jz; i >= 0; i--) fw += fw0[i];\n y[0] = ih === 0 ? fw : -fw;\n fw = fw0[0] - fw;\n for (i = 1; i <= jz; i++) fw += fw0[i];\n y[1] = ih === 0 ? fw : -fw;\n }\n return n & 7;\n }\n\n const invpio2 = 6.36619772367581382433e-01;\n const pio2_1 = 1.57079632673412561417e+00, pio2_1t = 6.07710050650619224932e-11;\n const pio2_2 = 6.07710050630396597660e-11, pio2_2t = 2.02226624879595063154e-21;\n const pio2_3 = 2.02226624871116645580e-21, pio2_3t = 8.47842766036889956997e-32;\n const npio2_hw = [\n 0x3FF921FB, 0x400921FB, 0x4012D97C, 0x401921FB, 0x401F6A7A, 0x4022D97C,\n 0x4025FDBB, 0x402921FB, 0x402C463A, 0x402F6A7A, 0x4031475C, 0x4032D97C,\n 0x40346B9C, 0x4035FDBB, 0x40378FDB, 0x403921FB, 0x403AB41B, 0x403C463A,\n 0x403DD85A, 0x403F6A7A, 0x40407E4C, 0x4041475C, 0x4042106C, 0x4042D97C,\n 0x4043A28C, 0x40446B9C, 0x404534AC, 0x4045FDBB, 0x4046C6CB, 0x40478FDB,\n 0x404858EB, 0x404921FB,\n ];\n function remPio2(x, y) {\n const hx = HI(x);\n const ix = hx & 0x7fffffff;\n if (ix <= 0x3fe921fb) { y[0] = x; y[1] = 0; return 0; }\n if (ix < 0x4002d97c) { // |x| < 3pi/4\n if (hx > 0) {\n let z = x - pio2_1;\n if (ix !== 0x3ff921fb) { y[0] = z - pio2_1t; y[1] = (z - y[0]) - pio2_1t; }\n else { z -= pio2_2; y[0] = z - pio2_2t; y[1] = (z - y[0]) - pio2_2t; }\n return 1;\n }\n let z = x + pio2_1;\n if (ix !== 0x3ff921fb) { y[0] = z + pio2_1t; y[1] = (z - y[0]) + pio2_1t; }\n else { z += pio2_2; y[0] = z + pio2_2t; y[1] = (z - y[0]) + pio2_2t; }\n return -1;\n }\n if (ix <= 0x413921fb) { // |x| <= 2^19 pi/2\n const t = abs(x);\n const n = (t * invpio2 + 0.5) | 0;\n const fn = n;\n let r = t - fn * pio2_1;\n let w = fn * pio2_1t;\n if (n < 32 && ix !== npio2_hw[n - 1]) {\n y[0] = r - w;\n } else {\n const high = HI(x);\n let j = ix >> 20;\n y[0] = r - w;\n let i = j - (((HI(y[0])) >> 20) & 0x7ff);\n if (i > 16) {\n let t2 = r;\n w = fn * pio2_2;\n r = t2 - w;\n w = fn * pio2_2t - ((t2 - r) - w);\n y[0] = r - w;\n i = j - (((HI(y[0])) >> 20) & 0x7ff);\n if (i > 49) {\n let t3 = r;\n w = fn * pio2_3;\n r = t3 - w;\n w = fn * pio2_3t - ((t3 - r) - w);\n y[0] = r - w;\n }\n }\n }\n y[1] = (r - y[0]) - w;\n if (hx < 0) { y[0] = -y[0]; y[1] = -y[1]; return -n; }\n return n;\n }\n if (ix >= 0x7ff00000) { y[0] = y[1] = x - x; return 0; }\n // Payne-Hanek\n const lx = LO(x);\n const e0 = (ix >> 20) - 1046;\n let z = setHi(0, ix - (e0 << 20));\n z = setLo(z, lx);\n const tx = [0, 0, 0];\n for (let i = 0; i < 2; i++) { tx[i] = z | 0; z = (z - tx[i]) * two24; }\n tx[2] = z;\n let nx = 3;\n while (nx > 0 && tx[nx - 1] === 0) nx--;\n const n = kernelRemPio2(tx, y, e0, nx);\n if (hx < 0) { y[0] = -y[0]; y[1] = -y[1]; return -n; }\n return n;\n }\n\n function detSin(x) {\n const ix = HI(x) & 0x7fffffff;\n if (ix <= 0x3fe921fb) {\n if (ix < 0x3e400000) { if ((x | 0) === 0 && x === x) return x; }\n return kernelSin(x, 0, 0);\n }\n if (ix >= 0x7ff00000) return x - x;\n const y = [0, 0];\n const n = remPio2(x, y);\n switch (n & 3) {\n case 0: return kernelSin(y[0], y[1], 1);\n case 1: return kernelCos(y[0], y[1]);\n case 2: return -kernelSin(y[0], y[1], 1);\n default: return -kernelCos(y[0], y[1]);\n }\n }\n function detCos(x) {\n const ix = HI(x) & 0x7fffffff;\n if (ix <= 0x3fe921fb) {\n if (ix < 0x3e400000) return 1.0;\n return kernelCos(x, 0);\n }\n if (ix >= 0x7ff00000) return x - x;\n const y = [0, 0];\n const n = remPio2(x, y);\n switch (n & 3) {\n case 0: return kernelCos(y[0], y[1]);\n case 1: return -kernelSin(y[0], y[1], 1);\n case 2: return -kernelCos(y[0], y[1]);\n default: return kernelSin(y[0], y[1], 1);\n }\n }\n function detTan(x) {\n const ix = HI(x) & 0x7fffffff;\n if (ix <= 0x3fe921fb) {\n if (ix < 0x3e300000) { if ((x | 0) === 0 && x === x) return x; }\n return kernelTan(x, 0, 1);\n }\n if (ix >= 0x7ff00000) return x - x;\n const y = [0, 0];\n const n = remPio2(x, y);\n return kernelTan(y[0], y[1], 1 - ((n & 1) << 1));\n }\n\n // ---- log / log10 (fdlibm e_log) ------------------------------------------\n const ln2_hi = 6.93147180369123816490e-01, ln2_lo = 1.90821492927058770002e-10;\n const Lg1 = 6.666666666666735130e-01, Lg2 = 3.999999999940941908e-01,\n Lg3 = 2.857142874366239149e-01, Lg4 = 2.222219843214978396e-01,\n Lg5 = 1.818357216161805012e-01, Lg6 = 1.531383769920937332e-01,\n Lg7 = 1.479819860511658591e-01;\n const two54 = 1.80143985094819840000e+16;\n function detLog(x) {\n let hx = HI(x), lx = LO(x);\n let k = 0;\n if (hx < 0x00100000) {\n if (((hx & 0x7fffffff) | lx) === 0) return -Infinity;\n if (hx < 0) return (x - x) / 0;\n k -= 54; x *= two54; hx = HI(x);\n }\n if (hx >= 0x7ff00000) return x + x;\n k += (hx >> 20) - 1023;\n hx &= 0x000fffff;\n const i = (hx + 0x95f64) & 0x100000;\n x = setHi(x, hx | (i ^ 0x3ff00000));\n k += i >> 20;\n const f = x - 1.0;\n if ((0x000fffff & (2 + hx)) < 3) {\n if (f === 0) { if (k === 0) return 0; return k * ln2_hi + k * ln2_lo; }\n const R = f * f * (0.5 - 0.33333333333333333 * f);\n if (k === 0) return f - R;\n return k * ln2_hi - ((R - k * ln2_lo) - f);\n }\n const s = f / (2.0 + f);\n const dk = k;\n const z = s * s;\n const ii = hx - 0x6147a;\n const w = z * z;\n const jj = 0x6b851 - hx;\n const t1 = w * (Lg2 + w * (Lg4 + w * Lg6));\n const t2 = z * (Lg1 + w * (Lg3 + w * (Lg5 + w * Lg7)));\n const ij = ii | jj;\n const R = t2 + t1;\n if (ij > 0) {\n const hfsq = 0.5 * f * f;\n if (k === 0) return f - (hfsq - s * (hfsq + R));\n return dk * ln2_hi - ((hfsq - (s * (hfsq + R) + dk * ln2_lo)) - f);\n }\n if (k === 0) return f - s * (f - R);\n return dk * ln2_hi - ((s * (f - R) - dk * ln2_lo) - f);\n }\n const ivln10 = 4.34294481903251816668e-01;\n const log10_2hi = 3.01029995663611771306e-01, log10_2lo = 3.69423907715893078616e-13;\n function detLog10(x) {\n let hx = HI(x), lx = LO(x);\n let k = 0;\n if (hx < 0x00100000) {\n if (((hx & 0x7fffffff) | lx) === 0) return -Infinity;\n if (hx < 0) return (x - x) / 0;\n k -= 54; x *= two54; hx = HI(x);\n }\n if (hx >= 0x7ff00000) return x + x;\n k += (hx >> 20) - 1023;\n const i = (k & 0x80000000) >>> 31;\n hx = (hx & 0x000fffff) | ((0x3ff - i) << 20);\n const y = k + i;\n x = setHi(x, hx);\n const z = y * log10_2lo + ivln10 * detLog(x);\n return z + y * log10_2hi;\n }\n\n // ---- asin / acos (fdlibm) -------------------------------------------------\n const pio2_hi = 1.57079632679489655800e+00, pio2_lo = 6.12323399573676603587e-17;\n const pio4_hi = 7.85398163397448278999e-01;\n const pS0 = 1.66666666666666657415e-01, pS1 = -3.25565818622400915405e-01,\n pS2 = 2.01212532134862925881e-01, pS3 = -4.00555345006794114027e-02,\n pS4 = 7.91534994289814532176e-04, pS5 = 3.47933107596021167570e-05,\n qS1 = -2.40339491173441421878e+00, qS2 = 2.02094576023350569471e+00,\n qS3 = -6.88283971605453293030e-01, qS4 = 7.70381505559019352791e-02;\n function detAsin(x) {\n const hx = HI(x);\n const ix = hx & 0x7fffffff;\n if (ix >= 0x3ff00000) {\n if (((ix - 0x3ff00000) | LO(x)) === 0) return x * pio2_hi + x * pio2_lo;\n return (x - x) / (x - x);\n }\n if (ix < 0x3fe00000) {\n if (ix < 0x3e400000) return x;\n const t = x * x;\n const p = t * (pS0 + t * (pS1 + t * (pS2 + t * (pS3 + t * (pS4 + t * pS5)))));\n const q = 1.0 + t * (qS1 + t * (qS2 + t * (qS3 + t * qS4)));\n const w = p / q;\n return x + x * w;\n }\n let w = 1.0 - abs(x);\n let t = w * 0.5;\n let p = t * (pS0 + t * (pS1 + t * (pS2 + t * (pS3 + t * (pS4 + t * pS5)))));\n let q = 1.0 + t * (qS1 + t * (qS2 + t * (qS3 + t * qS4)));\n const s = sqrt(t);\n if (ix >= 0x3FEF3333) {\n w = p / q;\n t = pio2_hi - (2.0 * (s + s * w) - pio2_lo);\n } else {\n w = s;\n w = setLo(w, 0);\n const c = (t - w * w) / (s + w);\n const r = p / q;\n p = 2.0 * s * r - (pio2_lo - 2.0 * c);\n q = pio4_hi - 2.0 * w;\n t = pio4_hi - (p - q);\n }\n return hx > 0 ? t : -t;\n }\n function detAcos(x) {\n const hx = HI(x);\n const ix = hx & 0x7fffffff;\n if (ix >= 0x3ff00000) {\n if (((ix - 0x3ff00000) | LO(x)) === 0) return hx > 0 ? 0.0 : Math.PI;\n return (x - x) / (x - x);\n }\n if (ix < 0x3fe00000) {\n if (ix <= 0x3c600000) return pio2_hi + pio2_lo;\n const z = x * x;\n const p = z * (pS0 + z * (pS1 + z * (pS2 + z * (pS3 + z * (pS4 + z * pS5)))));\n const q = 1.0 + z * (qS1 + z * (qS2 + z * (qS3 + z * qS4)));\n const r = p / q;\n return pio2_hi - (x - (pio2_lo - x * r));\n }\n if (hx < 0) {\n const z = (1.0 + x) * 0.5;\n const p = z * (pS0 + z * (pS1 + z * (pS2 + z * (pS3 + z * (pS4 + z * pS5)))));\n const q = 1.0 + z * (qS1 + z * (qS2 + z * (qS3 + z * qS4)));\n const s = sqrt(z);\n const r = p / q;\n const w = r * s - pio2_lo;\n return Math.PI - 2.0 * (s + w);\n }\n const z = (1.0 - x) * 0.5;\n const s = sqrt(z);\n let df = s;\n df = setLo(df, 0);\n const c = (z - df * df) / (s + df);\n const p = z * (pS0 + z * (pS1 + z * (pS2 + z * (pS3 + z * (pS4 + z * pS5)))));\n const q = 1.0 + z * (qS1 + z * (qS2 + z * (qS3 + z * qS4)));\n const r = p / q;\n const w = r * s + c;\n return 2.0 * (df + w);\n }\n\n // ---- expm1 (fdlibm s_expm1) ----------------------------------------------\n const o_threshold = 7.09782712893383973096e+02;\n const invln2 = 1.44269504088896338700e+00;\n const Q1 = -3.33333333333331316428e-02, Q2 = 1.58730158725481460165e-03,\n Q3 = -7.93650757867487942473e-05, Q4 = 4.00821782732936239552e-06,\n Q5 = -2.01099218183624371326e-07;\n function detExpm1(x) {\n const hx = HI(x);\n const xsb = hx & 0x80000000;\n let y = xsb === 0 ? x : -x;\n const ix = hx & 0x7fffffff;\n if (ix >= 0x4043687A) {\n if (ix >= 0x40862E42) {\n if (ix >= 0x7ff00000) {\n if (((ix & 0xfffff) | LO(x)) !== 0) return x + x;\n return xsb === 0 ? x : -1.0;\n }\n if (x > o_threshold) return Infinity;\n }\n if (xsb !== 0) return -1.0 + 1e-300 * 1e-300 * 0; // x < -56*ln2: -1 (tiny inexact ignored)\n }\n let k, t, c = 0, hi, lo;\n if (ix > 0x3fd62e42) {\n if (ix < 0x3FF0A2B2) {\n if (xsb === 0) { hi = x - 6.93147180369123816490e-01; lo = 1.90821492927058770002e-10; k = 1; }\n else { hi = x + 6.93147180369123816490e-01; lo = -1.90821492927058770002e-10; k = -1; }\n } else {\n k = (invln2 * x + (xsb === 0 ? 0.5 : -0.5)) | 0;\n t = k;\n hi = x - t * 6.93147180369123816490e-01;\n lo = t * 1.90821492927058770002e-10;\n }\n x = hi - lo;\n c = (hi - x) - lo;\n } else if (ix < 0x3c900000) {\n return x;\n } else k = 0;\n const hfx = 0.5 * x;\n const hxs = x * hfx;\n const r1 = 1.0 + hxs * (Q1 + hxs * (Q2 + hxs * (Q3 + hxs * (Q4 + hxs * Q5))));\n t = 3.0 - r1 * hfx;\n let e = hxs * ((r1 - t) / (6.0 - x * t));\n if (k === 0) return x - (x * e - hxs);\n e = (x * (e - c) - c);\n e -= hxs;\n if (k === -1) return 0.5 * (x - e) - 0.5;\n if (k === 1) {\n if (x < -0.25) return -2.0 * (e - (x + 0.5));\n return 1.0 + 2.0 * (x - e);\n }\n if (k <= -2 || k > 56) {\n y = 1.0 - (e - x);\n if (k === 1024) y = y * 2.0 * two1023;\n else y = y * scalbn2(1.0, k);\n return y - 1.0;\n }\n t = scalbn2(1.0, -k);\n if (k < 20) {\n y = (x - e + (1 - t)) * scalbn2(1.0, k);\n } else {\n y = (x - (e + t) + 1) * scalbn2(1.0, k);\n }\n return y;\n }\n\n // ---- exp (fdlibm e_exp — native exp diverges cross-engine on rare inputs)\n const halF = [0.5, -0.5];\n const u_threshold = -7.45133219101941108420e+02;\n const ln2HI = [6.93147180369123816490e-01, -6.93147180369123816490e-01];\n const ln2LO = [1.90821492927058770002e-10, -1.90821492927058770002e-10];\n const P1 = 1.66666666666666019037e-01, P2 = -2.77777777770155933842e-03,\n P3 = 6.61375632143793436117e-05, P4 = -1.65339022054652515390e-06,\n P5 = 4.13813679705723846039e-08;\n const twom1000 = 9.33263618503218878990e-302;\n function detExp(x) {\n let hx = HI(x);\n const xsb = (hx >> 31) & 1;\n hx &= 0x7fffffff;\n if (hx >= 0x40862E42) {\n if (hx >= 0x7ff00000) {\n if (((hx & 0xfffff) | LO(x)) !== 0) return x + x;\n return xsb === 0 ? x : 0.0;\n }\n if (x > o_threshold) return Infinity;\n if (x < u_threshold) return 0;\n }\n let k = 0, hi = 0, lo = 0, t;\n if (hx > 0x3fd62e42) {\n if (hx < 0x3FF0A2B2) { hi = x - ln2HI[xsb]; lo = ln2LO[xsb]; k = 1 - xsb - xsb; }\n else {\n k = (invln2 * x + halF[xsb]) | 0;\n t = k;\n hi = x - t * ln2HI[0];\n lo = t * ln2LO[0];\n }\n x = hi - lo;\n } else if (hx < 0x3e300000) {\n return 1.0 + x;\n }\n t = x * x;\n const c = x - t * (P1 + t * (P2 + t * (P3 + t * (P4 + t * P5))));\n if (k === 0) return 1.0 - ((x * c) / (c - 2.0) - x);\n let y = 1.0 - ((lo - (x * c) / (2.0 - c)) - hi);\n if (k >= -1021) return setHi(y, HI(y) + (k << 20));\n y = setHi(y, HI(y) + ((k + 1000) << 20));\n return y * twom1000;\n }\n\n // ---- sinh / cosh / tanh from expm1 + deterministic exp -------------------\n const nativeExp = detExp;\n function detSinh(x) {\n const hx = HI(x);\n const ix = hx & 0x7fffffff;\n if (ix >= 0x7ff00000) return x + x;\n const h = hx < 0 ? -0.5 : 0.5;\n if (ix < 0x40360000) {\n if (ix < 0x3e300000) return x;\n const t = detExpm1(abs(x));\n if (ix < 0x3ff00000) return h * (2.0 * t - t * t / (t + 1.0));\n return h * (t + t / (t + 1.0));\n }\n if (ix < 0x40862E42) return h * nativeExp(abs(x));\n const lx = LO(x);\n if (ix < 0x408633CE || (ix === 0x408633CE && lx <= 0x8fb9f87d)) {\n const w = nativeExp(0.5 * abs(x));\n const t = h * w;\n return t * w;\n }\n return x * 1e307 * 1e307;\n }\n function detCosh(x) {\n const ix = HI(x) & 0x7fffffff;\n if (ix >= 0x7ff00000) return x * x;\n if (ix < 0x3fd62e43) {\n const t = detExpm1(abs(x));\n const w = 1.0 + t;\n if (ix < 0x3c800000) return w;\n return 1.0 + (t * t) / (w + w);\n }\n if (ix < 0x40360000) {\n const t = nativeExp(abs(x));\n return 0.5 * t + 0.5 / t;\n }\n if (ix < 0x40862E42) return 0.5 * nativeExp(abs(x));\n const lx = LO(x);\n if (ix < 0x408633CE || (ix === 0x408633CE && lx <= 0x8fb9f87d)) {\n const w = nativeExp(0.5 * abs(x));\n return (0.5 * w) * w;\n }\n return 1e307 * 1e307;\n }\n function detTanh(x) {\n const hx = HI(x);\n const ix = hx & 0x7fffffff;\n if (ix >= 0x7ff00000) {\n if (hx >= 0) return 1.0 / x + 1.0;\n return 1.0 / x - 1.0;\n }\n let z;\n if (ix < 0x40360000) {\n if (ix < 0x3c800000) return x * (1.0 + x);\n if (ix >= 0x3ff00000) {\n const t = detExpm1(2.0 * abs(x));\n z = 1.0 - 2.0 / (t + 2.0);\n } else {\n const t = detExpm1(-2.0 * abs(x));\n z = -t / (t + 2.0);\n }\n } else z = 1.0 - 1e-300;\n return hx >= 0 ? z : -z;\n }\n\n // ---- atan / atan2 (fdlibm s_atan / e_atan2) -------------------------------\n const atanhi = [\n 4.63647609000806093515e-01, 7.85398163397448278999e-01,\n 9.82793723247329054082e-01, 1.57079632679489655800e+00,\n ];\n const atanlo = [\n 2.26987774529616870924e-17, 3.06161699786838301793e-17,\n 1.39033110312309984516e-17, 6.12323399573676603587e-17,\n ];\n const aT = [\n 3.33333333333329318027e-01, -1.99999999998764832476e-01, 1.42857142725034663711e-01,\n -1.11111104054623557880e-01, 9.09088713343650656196e-02, -7.69187620504482999495e-02,\n 6.66107313738753120669e-02, -5.83357013379057348645e-02, 4.97687799461593236017e-02,\n -3.65315727442169155270e-02, 1.62858201153657823623e-02,\n ];\n function detAtan(x) {\n const hx = HI(x);\n const ix = hx & 0x7fffffff;\n if (ix >= 0x44100000) {\n if (ix > 0x7ff00000 || (ix === 0x7ff00000 && LO(x) !== 0)) return x + x;\n return hx > 0 ? atanhi[3] + atanlo[3] : -atanhi[3] - atanlo[3];\n }\n let id;\n if (ix < 0x3fdc0000) {\n if (ix < 0x3e200000) return x;\n id = -1;\n } else {\n x = abs(x);\n if (ix < 0x3ff30000) {\n if (ix < 0x3fe60000) { id = 0; x = (2.0 * x - 1.0) / (2.0 + x); }\n else { id = 1; x = (x - 1.0) / (x + 1.0); }\n } else {\n if (ix < 0x40038000) { id = 2; x = (x - 1.5) / (1.0 + 1.5 * x); }\n else { id = 3; x = -1.0 / x; }\n }\n }\n const z = x * x;\n const w = z * z;\n const s1 = z * (aT[0] + w * (aT[2] + w * (aT[4] + w * (aT[6] + w * (aT[8] + w * aT[10])))));\n const s2 = w * (aT[1] + w * (aT[3] + w * (aT[5] + w * (aT[7] + w * aT[9]))));\n if (id < 0) return x - x * (s1 + s2);\n const zz = atanhi[id] - ((x * (s1 + s2) - atanlo[id]) - x);\n return hx < 0 ? -zz : zz;\n }\n const tiny_atan2 = 1.0e-300;\n const pi_o_4 = 7.8539816339744827900e-01, pi_o_2 = 1.5707963267948965580e+00;\n const detPi = 3.1415926535897931160e+00, pi_lo = 1.2246467991473531772e-16;\n function detAtan2(y, x) {\n const hx = HI(x), lx = LO(x), hy = HI(y), ly = LO(y);\n const ix = hx & 0x7fffffff, iy = hy & 0x7fffffff;\n if ((ix | ((lx | -lx) >>> 31)) > 0x7ff00000 || (iy | ((ly | -ly) >>> 31)) > 0x7ff00000) return x + y;\n if (hx === 0x3ff00000 && lx === 0) return detAtan(y);\n const m = ((hy >> 31) & 1) | ((hx >> 30) & 2);\n if ((iy | ly) === 0) {\n switch (m) {\n case 0: case 1: return y;\n case 2: return detPi + tiny_atan2;\n default: return -detPi - tiny_atan2;\n }\n }\n if ((ix | lx) === 0) return hy < 0 ? -pi_o_2 - tiny_atan2 : pi_o_2 + tiny_atan2;\n if (ix === 0x7ff00000) {\n if (iy === 0x7ff00000) {\n switch (m) {\n case 0: return pi_o_4 + tiny_atan2;\n case 1: return -pi_o_4 - tiny_atan2;\n case 2: return 3.0 * pi_o_4 + tiny_atan2;\n default: return -3.0 * pi_o_4 - tiny_atan2;\n }\n } else {\n switch (m) {\n case 0: return 0.0;\n case 1: return -0.0;\n case 2: return detPi + tiny_atan2;\n default: return -detPi - tiny_atan2;\n }\n }\n }\n if (iy === 0x7ff00000) return hy < 0 ? -pi_o_2 - tiny_atan2 : pi_o_2 + tiny_atan2;\n const k = (iy - ix) >> 20;\n let z;\n if (k > 60) z = pi_o_2 + 0.5 * pi_lo;\n else if (hx < 0 && k < -60) z = 0.0;\n else z = detAtan(abs(y / x));\n switch (m) {\n case 0: return z;\n case 1: return -z;\n case 2: return detPi - (z - pi_lo);\n default: return (z - pi_lo) - detPi;\n }\n }\n\n // ---- log1p (fdlibm s_log1p) -----------------------------------------------\n function detLog1p(x) {\n const hx = HI(x);\n const ax = hx & 0x7fffffff;\n let k = 1, f = 0, hu = 0, c = 0, u;\n if (hx < 0x3FDA827A) {\n if (ax >= 0x3ff00000) {\n if (x === -1.0) return -Infinity;\n return (x - x) / (x - x);\n }\n if (ax < 0x3e200000) {\n if (ax < 0x3c900000) return x;\n return x - x * x * 0.5;\n }\n if (hx > 0 || hx <= (0xbfd2bec3 | 0)) { k = 0; f = x; hu = 1; }\n }\n if (k !== 0) {\n if (hx < 0x43400000) {\n u = 1.0 + x;\n hu = HI(u);\n k = (hu >> 20) - 1023;\n c = k > 0 ? 1.0 - (u - x) : x - (u - 1.0);\n c /= u;\n } else {\n u = x;\n hu = HI(u);\n k = (hu >> 20) - 1023;\n c = 0;\n }\n hu &= 0x000fffff;\n if (hu < 0x6a09e) {\n u = setHi(u, hu | 0x3ff00000);\n } else {\n k += 1;\n u = setHi(u, hu | 0x3fe00000);\n hu = (0x00100000 - hu) >> 2;\n }\n f = u - 1.0;\n }\n const hfsq = 0.5 * f * f;\n let R, s, z;\n if (hu === 0) {\n if (f === 0) {\n if (k === 0) return 0;\n c += k * ln2_lo;\n return k * ln2_hi + c;\n }\n R = hfsq * (1.0 - 0.66666666666666666 * f);\n if (k === 0) return f - R;\n return k * ln2_hi - ((R - (k * ln2_lo + c)) - f);\n }\n s = f / (2.0 + f);\n z = s * s;\n R = z * (Lg1 + z * (Lg2 + z * (Lg3 + z * (Lg4 + z * (Lg5 + z * (Lg6 + z * Lg7))))));\n if (k === 0) return f - (hfsq - s * (hfsq + R));\n return k * ln2_hi - ((hfsq - (s * (hfsq + R) + (k * ln2_lo + c))) - f);\n }\n\n // ---- asinh / acosh / atanh (fdlibm, via deterministic log/log1p/sqrt) ----\n const det_ln2 = 6.93147180559945286227e-01;\n function detAsinh(x) {\n const hx = HI(x);\n const ix = hx & 0x7fffffff;\n if (ix >= 0x7ff00000) return x + x;\n if (ix < 0x3e300000) return x;\n let w;\n const t = abs(x);\n if (ix > 0x41b00000) w = detLog(t) + det_ln2;\n else if (ix > 0x40000000) w = detLog(2.0 * t + 1.0 / (sqrt(t * t + 1.0) + t));\n else { const xx = t * t; w = detLog1p(t + xx / (1.0 + sqrt(1.0 + xx))); }\n return hx > 0 ? w : -w;\n }\n function detAcosh(x) {\n const hx = HI(x);\n if (hx < 0x3ff00000) return (x - x) / (x - x);\n if (hx >= 0x41b00000) {\n if (hx >= 0x7ff00000) return x + x;\n return detLog(x) + det_ln2;\n }\n if (((hx - 0x3ff00000) | LO(x)) === 0) return 0;\n if (hx > 0x40000000) {\n const t = x * x;\n return detLog(2.0 * x - 1.0 / (x + sqrt(t - 1.0)));\n }\n const t = x - 1.0;\n return detLog1p(t + sqrt(2.0 * t + t * t));\n }\n function detAtanh(x) {\n const hx = HI(x);\n const ix = hx & 0x7fffffff;\n if (ix > 0x3ff00000 || (ix === 0x3ff00000 && LO(x) !== 0)) return (x - x) / (x - x);\n if (ix === 0x3ff00000 && LO(x) === 0) return x / 0;\n if (ix < 0x3e300000) return x;\n const t0 = abs(x);\n let t;\n if (ix < 0x3fe00000) {\n const t2 = t0 + t0;\n t = 0.5 * detLog1p(t2 + t2 * t0 / (1.0 - t0));\n } else {\n t = 0.5 * detLog1p((t0 + t0) / (1.0 - t0));\n }\n return hx >= 0 ? t : -t;\n }\n\n // ---- log2 (FreeBSD e_log2 + k_log1p kernel) -------------------------------\n // Added 2026-07-09: JavaScriptCore disagrees bitwise with V8 on log2, cbrt\n // and hypot (5k-input battery); V8 13.x vs 14.x had agreed, so these three\n // stayed native until the JSC port measured them.\n const ivln2hi = 1.44269504072144627571e+00, ivln2lo = 1.67517131648865118353e-10;\n function kLog1p(f) {\n const s = f / (2.0 + f);\n const z = s * s;\n const w = z * z;\n const t1 = w * (Lg2 + w * (Lg4 + w * Lg6));\n const t2 = z * (Lg1 + w * (Lg3 + w * (Lg5 + w * Lg7)));\n const hfsq = 0.5 * f * f;\n return s * (hfsq + (t2 + t1));\n }\n\n function detLog2(x) {\n let hx = HI(x), lx = LO(x);\n let k = 0;\n if (hx < 0x00100000) {\n if (((hx & 0x7fffffff) | lx) === 0) return -Infinity;\n if (hx < 0) return (x - x) / 0;\n k -= 54; x *= two54; hx = HI(x); lx = LO(x);\n }\n if (hx >= 0x7ff00000) return x + x;\n if (hx === 0x3ff00000 && lx === 0) return 0.0;\n k += (hx >> 20) - 1023;\n hx &= 0x000fffff;\n const i = (hx + 0x95f64) & 0x100000;\n x = setHi(x, hx | (i ^ 0x3ff00000));\n k += i >> 20;\n const y = k;\n const f = x - 1.0;\n const hfsq = 0.5 * f * f;\n const r = kLog1p(f);\n let hi = f - hfsq;\n hi = setLo(hi, 0);\n const lo = (f - hi) - hfsq + r;\n let valHi = hi * ivln2hi;\n let valLo = (lo + hi) * ivln2lo + lo * ivln2hi;\n const w = y + valHi;\n valLo += (y - w) + valHi;\n return valLo + w;\n }\n\n // ---- cbrt (FreeBSD s_cbrt) ------------------------------------------------\n const cbrtB1 = 715094163, cbrtB2 = 696219795;\n const cbrtP0 = 1.87595182427177009643, cbrtP1 = -1.88497979543377169875,\n cbrtP2 = 1.621429720105354466140, cbrtP3 = -0.758397934778766047437,\n cbrtP4 = 0.145996192886612446982;\n\n function detCbrt(x) {\n let hx = HI(x);\n const sign = hx & 0x80000000;\n hx &= 0x7fffffff;\n if (hx >= 0x7ff00000) return x + x;\n let t;\n if (hx < 0x00100000) {\n if ((hx | LO(x)) === 0) return x;\n t = two54 * x;\n t = setHi(t, (sign | ((((HI(t) & 0x7fffffff) / 3) | 0) + cbrtB2)) >>> 0);\n } else {\n t = fromWords((sign | (((hx / 3) | 0) + cbrtB1)) >>> 0, 0);\n }\n const r0 = (t * t) * (t / x);\n t *= cbrtP0 + r0 * (cbrtP1 + r0 * (cbrtP2 + r0 * (cbrtP3 + r0 * cbrtP4)));\n // round t to 23 bits, away from zero: bits = (bits + 0x80000000) & ~0x3fffffff\n let tHi = HI(t), tLo = LO(t) >>> 0;\n tHi = (tHi + (tLo >= 0x80000000 ? 1 : 0)) | 0;\n tLo = (tLo + 0x80000000) >>> 0;\n t = fromWords(tHi >>> 0, tLo & 0xc0000000);\n const s = t * t;\n let r = x / s;\n const w = t + t;\n r = (r - t) / (w + r);\n return t + t * r;\n }\n\n // ---- hypot (FreeBSD e_hypot, folded left for arity > 2) -------------------\n function detHypot2(x, y) {\n let ha = HI(x) & 0x7fffffff;\n let hb = HI(y) & 0x7fffffff;\n let a, b;\n if (hb > ha) { a = y; b = x; const j = ha; ha = hb; hb = j; } else { a = x; b = y; }\n a = abs(a); b = abs(b);\n if (ha - hb > 0x3c00000) return a + b;\n let k = 0;\n if (ha > 0x5f300000) {\n if (ha >= 0x7ff00000) {\n let w = abs(x + 0.0) - abs(y + 0.0);\n if (((ha & 0xfffff) | LO(a)) === 0) w = a;\n if ((((hb ^ 0x7ff00000) | 0) | LO(b)) === 0) w = b;\n return w;\n }\n ha -= 0x25800000; hb -= 0x25800000; k += 600;\n a = setHi(a, ha >>> 0);\n b = setHi(b, hb >>> 0);\n }\n if (hb < 0x20b00000) {\n if (hb <= 0x000fffff) {\n if ((hb | LO(b)) === 0) return a;\n const scale = fromWords(0x7fd00000, 0);\n b *= scale;\n a *= scale;\n k -= 1022;\n ha = HI(a); hb = HI(b);\n } else {\n ha += 0x25800000; hb += 0x25800000; k -= 600;\n a = setHi(a, ha >>> 0);\n b = setHi(b, hb >>> 0);\n }\n }\n let w = a - b;\n if (w > b) {\n const t1 = fromWords(ha >>> 0, 0);\n const t2 = a - t1;\n w = sqrt(t1 * t1 - (b * (-b) - t2 * (a + t1)));\n } else {\n a = a + a;\n const y1 = fromWords(hb >>> 0, 0);\n const y2 = b - y1;\n const t1 = fromWords((ha + 0x00100000) >>> 0, 0);\n const t2 = a - t1;\n w = sqrt(t1 * y1 - (w * (-w) - (t1 * y2 + t2 * b)));\n }\n if (k !== 0) {\n const scale = setHi(1.0, (HI(1.0) + (k << 20)) >>> 0);\n return scale * w;\n }\n return w;\n }\n\n function detHypot(...values) {\n // Left fold of the pairwise kernel: deterministic on every engine; for\n // arity > 2 this is NOT the same rounding as a simultaneous algorithm,\n // which is exactly why it must be pinned here.\n let w = 0.0;\n for (let i = 0; i < values.length; i += 1) w = detHypot2(w, +values[i]);\n return w;\n }\n\n Math.exp = detExp;\n Math.atan = detAtan;\n Math.atan2 = detAtan2;\n Math.log1p = detLog1p;\n Math.asinh = detAsinh;\n Math.acosh = detAcosh;\n Math.atanh = detAtanh;\n Math.sin = detSin;\n Math.cos = detCos;\n Math.tan = detTan;\n Math.log = detLog;\n Math.log10 = detLog10;\n Math.asin = detAsin;\n Math.acos = detAcos;\n Math.sinh = detSinh;\n Math.cosh = detCosh;\n Math.tanh = detTanh;\n Math.expm1 = detExpm1;\n Math.log2 = detLog2;\n Math.cbrt = detCbrt;\n Math.hypot = detHypot;\n})();";
|
|
6
|
+
export declare function installDeterministicMath(): any;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated. Declares the runtime exports of ./core/envelope.
|
|
2
|
+
// Constants carry exact values, function parameters carry real names typed `any`.
|
|
3
|
+
// Regenerate: node scripts/generate-physics-declarations.mjs --write
|
|
4
|
+
|
|
5
|
+
export declare const kinetixDomains: readonly ["simulation", "presentation", "binding"];
|
|
6
|
+
export declare function kinetixEnvelopeDigest(envelope: any): any;
|
|
7
|
+
export declare const kinetixEnvelopeVersion: "rundot.kinetix-envelope.v1";
|
|
8
|
+
export declare const kinetixReferenceKinds: readonly ["entity", "component", "prefab", "prefab-local-entity", "prefab-local-component", "asset", "scene"];
|
|
9
|
+
export declare function stableKinetixEnvelopeBytes(envelope: any): any;
|
|
10
|
+
export declare function validateKinetixEnvelope(envelope: any): any;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Generated. Declares the runtime exports of ./core/f64-bits.
|
|
2
|
+
// Constants carry exact values, function parameters carry real names typed `any`.
|
|
3
|
+
// Regenerate: node scripts/generate-physics-declarations.mjs --write
|
|
4
|
+
|
|
5
|
+
export declare function f64FromHex(hex: any): any;
|
|
6
|
+
export declare function hexFromF64(value: any): any;
|
package/core/index.d.ts
CHANGED
|
@@ -60,6 +60,9 @@ export {
|
|
|
60
60
|
setPhysicsBodyVelocity,
|
|
61
61
|
shapeCastDeterministicPhysics3D,
|
|
62
62
|
shapeCastPhysics,
|
|
63
|
+
shapeCastPhysicsDetailed,
|
|
64
|
+
calculatePhysicsBuoyancy,
|
|
65
|
+
shapeCastDeterministicPhysics3DDetailed,
|
|
63
66
|
stepPhysicsWorld,
|
|
64
67
|
stepDeterministicPhysicsWorld3D,
|
|
65
68
|
} from './physics';
|
|
@@ -70,6 +73,9 @@ export type {
|
|
|
70
73
|
KinetixPhysicsContactDetail,
|
|
71
74
|
KinetixPhysicsContactEvent,
|
|
72
75
|
KinetixPhysicsHit,
|
|
76
|
+
KinetixPhysicsDetailedHit,
|
|
77
|
+
KinetixPhysicsBuoyancyOptions,
|
|
78
|
+
KinetixPhysicsBuoyancyResult,
|
|
73
79
|
KinetixPhysicsJointCacheEntry,
|
|
74
80
|
KinetixPhysicsOverlapQuery,
|
|
75
81
|
KinetixPhysicsQuaternion,
|
|
@@ -277,6 +283,8 @@ export function deriveCustomRuntimeIdentity(
|
|
|
277
283
|
): import('./runtime').KinetixRuntimeIdentity;
|
|
278
284
|
export const kinetixBakerVersion: string;
|
|
279
285
|
export const kinetixPhases: readonly string[];
|
|
286
|
+
/** The three product kinds a Kinetix package may declare. */
|
|
287
|
+
export const kinetixProductKinds: readonly ['simulation', 'presentation', 'binding'];
|
|
280
288
|
|
|
281
289
|
export function createKinetixWorld(options: {
|
|
282
290
|
worldId: string;
|