Engine API Reference - v2.22.0-beta.28
    Preparing search index...

    Class AmmoPhysicsWorldAlpha

    The Ammo.js (Bullet) physics backend. The Ammo global must be available when the world is constructed - load the library first, then supply the backend to the application:

    WasmModule.setConfig('Ammo', {
    glueUrl: 'ammo.wasm.js',
    wasmUrl: 'ammo.wasm.wasm',
    fallbackUrl: 'ammo.js'
    });
    await new Promise((resolve) => {
    WasmModule.getInstance('Ammo', () => resolve());
    });

    const options = new AppOptions();
    options.physicsWorld = new AmmoPhysicsWorld();

    When AppOptions#physicsWorld is omitted, the engine creates this backend automatically once application libraries have loaded, if the Ammo global is present.

    Hierarchy (View Summary)

    Index
    nativeWorld: any