Appearance
@tmrw-realityos/world • Docs
@tmrw-realityos/world / SurfaceApp
Class: abstract
SurfaceApp
Extended by
Constructors
new SurfaceApp()
new SurfaceApp():
SurfaceApp
Returns
Properties
ctx?
optional
ctx:CanvasRenderingContext2D
Defined in
world/surfaceApps/surfaceApp.ts:4
cursor
cursor:
vec2
Defined in
world/surfaceApps/surfaceApp.ts:5
fontsLoaded
fontsLoaded:
Set
<string
>
Defined in
world/surfaceApps/surfaceApp.ts:7
layerOffset
layerOffset:
vec3
Defined in
world/surfaceApps/surfaceApp.ts:6
Methods
draw()
abstract
draw(_canvas
,_ctx
,_cursor
):void
Parameters
• _canvas: HTMLCanvasElement
• _ctx: CanvasRenderingContext2D
• _cursor: vec2
Returns
void
Defined in
world/surfaceApps/surfaceApp.ts:9
drawButton()
drawButton(
label
,x
,y
,w
,h
):undefined
|boolean
Parameters
• label: string
• x: number
• y: number
• w: number
• h: number
Returns
undefined
| boolean
Defined in
world/surfaceApps/surfaceApp.ts:17
loadFont()
loadFont(
name
):void
Parameters
• name: string
Returns
void
Defined in
world/surfaceApps/surfaceApp.ts:42
onMouse()?
optional
onMouse(e
,cursor
):void
Parameters
• e: PointerEvent
• cursor: vec2
Returns
void
Defined in
world/surfaceApps/surfaceApp.ts:14
onUpdate()?
optional
onUpdate(dt
):void
Parameters
• dt: number
Returns
void