Appearance
@tmrw-realityos/world • Docs
@tmrw-realityos/world / Clock
Class: Clock
Extends
Constructors
new Clock()
new Clock():
Clock
Returns
Overrides
Defined in
Properties
ctx?
optional
ctx:CanvasRenderingContext2D
Inherited from
Defined in
world/surfaceApps/surfaceApp.ts:4
cursor
cursor:
vec2
Overrides
Defined in
fontsLoaded
fontsLoaded:
Set
<string
>
Inherited from
Defined in
world/surfaceApps/surfaceApp.ts:7
hoverButton
hoverButton:
string
=""
Defined in
layerOffset
layerOffset:
vec3
Inherited from
Defined in
world/surfaceApps/surfaceApp.ts:6
mode
mode:
string
="analog"
Defined in
time
time:
number
[]
Defined in
Methods
draw()
draw(
canvas
,ctx
,cursor
):void
Parameters
• canvas: HTMLCanvasElement
• ctx: CanvasRenderingContext2D
• cursor: vec2
Returns
void
Overrides
Defined in
drawAnalog()
drawAnalog(
ctx
,radius
):void
Parameters
• ctx: CanvasRenderingContext2D
• radius: number
Returns
void
Defined in
drawButton()
drawButton(
label
,x
,y
,w
,h
):undefined
|boolean
Parameters
• label: string
• x: number
• y: number
• w: number
• h: number
Returns
undefined
| boolean
Inherited from
Defined in
world/surfaceApps/surfaceApp.ts:17
drawDigital()
drawDigital(
ctx
,radius
):void
Parameters
• ctx: CanvasRenderingContext2D
• radius: number
Returns
void
Defined in
world/surfaceApps/clock.ts:139
loadFont()
loadFont(
name
):void
Parameters
• name: string
Returns
void
Inherited from
Defined in
world/surfaceApps/surfaceApp.ts:42
onMouse()
onMouse(
e
,_cursor
):void
Parameters
• e: PointerEvent
• _cursor: vec2
Returns
void
Overrides
Defined in
world/surfaceApps/clock.ts:161
onUpdate()?
optional
onUpdate(dt
):void
Parameters
• dt: number
Returns
void