A helper function to initialize the physics components.
PlayCanvas Application instance
Jolt Physics initialization settings.
// load-jolt.mjsimport { ScriptType } from 'playcanvas';import { init } from './physics.dbg.mjs';export class LoadJolt extends ScriptType { async initialize() { await init(this.app, { useSharedArrayBuffer: true, fixedStep: 1 / 45, useWebWorker: true }); this.app.fire('physics:ready'); }} Copy
// load-jolt.mjsimport { ScriptType } from 'playcanvas';import { init } from './physics.dbg.mjs';export class LoadJolt extends ScriptType { async initialize() { await init(this.app, { useSharedArrayBuffer: true, fixedStep: 1 / 45, useWebWorker: true }); this.app.fire('physics:ready'); }}
A helper function to initialize the physics components.