Skip to content

@tmrw-realityos/worldDocs


@tmrw-realityos/world / Components / Surface

Class: Surface

Surface component

Extends

Constructors

new Surface()

new Surface(): Surface

Returns

Surface

Overrides

BaseComponent.constructor

Defined in

world/components/surface.ts:52

Properties

canvas?

optional canvas: HTMLCanvasElement

Defined in

world/components/surface.ts:34


cursor

cursor: vec2

Defined in

world/components/surface.ts:35


enabled

enabled: boolean = true

Inherited from

BaseComponent.enabled

Defined in

world/components.ts:7


index

index: number

Defined in

world/components/surface.ts:32


isVisible

isVisible: boolean = true

Defined in

world/components/surface.ts:37


mustSave

mustSave: boolean = true

Inherited from

BaseComponent.mustSave

Defined in

world/components.ts:8


parent?

optional parent: ComponentsContainer

Inherited from

BaseComponent.parent

Defined in

world/components.ts:14


proxyNodeName

proxyNodeName: string = ""

Defined in

world/components/surface.ts:31


tv

tv: boolean = true

Defined in

world/components/surface.ts:38


uid

uid: string = ""

Inherited from

BaseComponent.uid

Defined in

world/components.ts:9


allowSurface

static allowSurface: boolean = true

Defined in

world/components/surface.ts:50


compName

static compName: string = "Surface"

Overrides

BaseComponent.compName

Defined in

world/components/surface.ts:28


emissiveFactor

static emissiveFactor: vec3

Defined in

world/components/surface.ts:49


lastIndex

static lastIndex: number = 0

Defined in

world/components/surface.ts:29

Accessors

entity

get entity(): undefined | Entity

set entity(_v): void

Parameters

_v: Entity

Returns

undefined | Entity

Inherited from

BaseComponent.entity

Defined in

world/components.ts:24

Methods

configure()

configure(o): void

Parameters

o

o.proxy_node: string

Returns

void

Overrides

BaseComponent.configure

Defined in

world/components/surface.ts:274


drawApp()

drawApp(canvas, ctx): void

Parameters

canvas: HTMLCanvasElement

ctx: CanvasRenderingContext2D

Returns

void

Defined in

world/components/surface.ts:240


getCompName()

getCompName(): string

Returns

string

Inherited from

BaseComponent.getCompName

Defined in

world/components.ts:11


getTargetNode()

getTargetNode(): undefined | Node

Returns

undefined | Node

Defined in

world/components/surface.ts:103


onAdded()

onAdded(): void

Returns

void

Overrides

BaseComponent.onAdded

Defined in

world/components/surface.ts:58


onClick()?

optional onClick(): void

Returns

void

Inherited from

BaseComponent.onClick

Defined in

world/components.ts:19


onDrawGizmos()

onDrawGizmos(renderer): void

Parameters

renderer: RendererInterface

Returns

void

Defined in

world/components/surface.ts:278


onMouse()

onMouse(e): void

Parameters

e: PointerEvent

Returns

void

Defined in

world/components/surface.ts:84


onRay()

onRay(ray): void

Parameters

ray: Ray

Returns

void

Defined in

world/components/surface.ts:89


onRemoved()

onRemoved(): void

Returns

void

Overrides

BaseComponent.onRemoved

Defined in

world/components/surface.ts:77


onUpdate()?

optional onUpdate(dt): void

Parameters

dt: number

Returns

void

Inherited from

BaseComponent.onUpdate

Defined in

world/components.ts:20


preRender()

preRender(camera): void

Parameters

camera: Camera

Returns

void

Defined in

world/components/surface.ts:120


serialize()

serialize(): void

Returns

void

Inherited from

BaseComponent.serialize

Defined in

world/components.ts:17


updateCanvas()

updateCanvas(camera): void

Parameters

camera: Camera

Returns

void

Defined in

world/components/surface.ts:186


setEmissiveFactor()

static setEmissiveFactor(v): void

Parameters

v: number | vec3

Returns

void

Defined in

world/components/surface.ts:294