Construction parameters for ScenePhysics.

interface ScenePhysicsParams {
    autoCreateBodies?: boolean;
    gravity?: Vec3;
    rapier: any;
}

Properties

autoCreateBodies?: boolean

Whether to auto-create a default fixed-type body (cuboid sized to the object's world AABB) for every SceneObject that appears in the scene, including ones added later via onSceneObjectCreated. Default true.

When false, the engine creates no bodies on its own — the caller decides which objects participate in physics by calling ScenePhysics.setBody.

gravity?: Vec3

World gravity, in scene units per second². Defaults to a Z-up gravity of [0, 0, -9.81] to match the cityscape and other Z-up models in the demo set.

rapier: any

Initialised Rapier 3D module — typically the namespace returned by import RAPIER from "@dimforge/rapier3d-compat" after the WASM module has been loaded with await RAPIER.init().

Externally injected so the SDK does not bundle Rapier.