INNER CODE UNIT · JavaScript

Physics

MageStudio/Mage · src/physics/index.js:34

export class Physics extends EventDispatcher {
    constructor() {
        super();
        this.elements = [];
        this.isWorkerReady = false;
        this.state = PHYSICS_STATES.READY;
        // Debounce state for refreshOwningBody.
        this.pendingRefreshRoots = new Map();
        this.refreshTimer = null;
    }

    createWorker() {
        this.worker = new PhysicsWorker();
        this.workerReady = false;
        this.state = PHYSICS_STATES.READY;
        this.worker.onmessage = this.handleWorkerMessages;
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…