Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/threejs_4_deno/src/Three.d.ts>Clock

A simple transformation of three.js for use within a Deno workflow
Go to Latest
class Clock
import { Clock } from "https://deno.land/x/threejs_4_deno@v121/src/Three.d.ts";

Object for keeping track of time.

Constructors

new
Clock(autoStart?: boolean)

Properties

autoStart: boolean

If set, starts the clock automatically when the first update is called.

elapsedTime: number

When the clock is running, It holds the time elapsed between the start of the clock to the previous update. This parameter is in seconds of three decimal places.

oldTime: number

When the clock is running, It holds the previous time from a update. This counted from the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC.

running: boolean

This property keeps track whether the clock is running or not.

startTime: number

When the clock is running, It holds the starttime of the clock. This counted from the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC.

Methods

getDelta(): number

Get the seconds passed since the last call to this method.

getElapsedTime(): number

Get the seconds passed since the clock started.

start(): void

Starts clock.

stop(): void

Stops clock.