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

x/remapper/src/deps.ts>three.Clock

A framework for Beat Saber map scripting.
Go to Latest
class three.Clock
import { three } from "https://deno.land/x/remapper@2.1.0/src/deps.ts";
const { Clock } = three;

Object for keeping track of time.

see src/core/Clock.js

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.