INNER CODE UNIT · JavaScript

isStateReached

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

            const isStateReached = () => this.state === state;
            const check = () => {
                setTimeout(() => {
                    if (isStateReached()) {
                        resolve();
                    } else {
                        check();
                    }
                }, PHYSICS_STATE_TIMEOUT);
            };

            check();
        });
    }

    dispose() {
        if (Config.physics().enabled) {
            this.state = PHYSICS_STATES.TERMINATING;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…