Skip to content

1681-engine / index / DayClock

Class: DayClock<P> ​

Defined in: src/ambient/DayClock.ts:67

Type Parameters ​

Type ParameterDefault type
P extends stringstring

Constructors ​

Constructor ​

ts
new DayClock<P>(options): DayClock<P>;

Defined in: src/ambient/DayClock.ts:76

Parameters ​

ParameterType
optionsDayClockOptions<P>

Returns ​

DayClock<P>

Methods ​

at() ​

ts
at(ms): DayState<P>;

Defined in: src/ambient/DayClock.ts:99

Parameters ​

ParameterType
msnumber

Returns ​

DayState<P>


hold() ​

ts
hold(phase): void;

Defined in: src/ambient/DayClock.ts:88

Holds the day at phase (0..1), or lets it run again with null.

Parameters ​

ParameterType
phasenumber | null

Returns ​

void


phaseAt() ​

ts
phaseAt(ms): number;

Defined in: src/ambient/DayClock.ts:93

Where the day stands at wall time ms (0..1).

Parameters ​

ParameterType
msnumber

Returns ​

number

Released under the MIT License.