Skip to content

tickPhysics and timestep GC #129

Description

@ashconnell

the tickPhysics method instantiates a date object each tick, thrashing the GC. Three.js created a Clock utility which will help out a bit better

var clock = new THREE.Clock();
clock.start();

function tick () {
    requestAnimationFrame(tick);
    var delta = clock.getDelta(); // results in what you call a 'timestep'
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions