Skip to main content

XRContext

@3dverse/livelink v0.8.10


@3dverse/livelink / XRContext

Class: XRContext

Defined in: livelink.js/sources/rendering/contexts/XRContext.ts:19

Extends

Constructors

new XRContext()

new XRContext(canvas, context_type, context_attributes?): XRContext

Defined in: livelink.js/sources/rendering/contexts/XRContext.ts:96

Parameters

canvas

Canvas

context_type

"webgl" | "webgl2"

context_attributes?

WebGLContextAttributes & object

Returns

XRContext

Overrides

ContextProvider.constructor

Properties

screen_distance

screen_distance: number = 25

Defined in: livelink.js/sources/rendering/contexts/XRContext.ts:48


scale_factor

scale_factor: number = 1

Defined in: livelink.js/sources/rendering/contexts/XRContext.ts:53


fake_alpha_enabled

fake_alpha_enabled: boolean = false

Defined in: livelink.js/sources/rendering/contexts/XRContext.ts:58

Accessors

native

Get Signature

get native(): WebGLRenderingContext | WebGL2RenderingContext

Defined in: livelink.js/sources/rendering/contexts/XRContext.ts:82

Returns

WebGLRenderingContext | WebGL2RenderingContext


frame_buffer

Set Signature

set frame_buffer(fb): void

Defined in: livelink.js/sources/rendering/contexts/XRContext.ts:89

Parameters
fb

WebGLFramebuffer

Returns

void


meta_data

Get Signature

get meta_data(): null | FrameMetaData

Defined in: livelink.js/sources/rendering/contexts/XRContext.ts:131

Returns

null | FrameMetaData

Methods

drawFrame()

drawFrame(frame): void

Defined in: livelink.js/sources/rendering/contexts/XRContext.ts:119

Parameters

frame
frame

OffscreenCanvas | VideoFrame

left

number

top

number

meta_data

FrameMetaData

Returns

void

Overrides

ContextProvider.drawFrame


drawXRFrame()

drawXRFrame(__namedParameters): void

Defined in: livelink.js/sources/rendering/contexts/XRContext.ts:138

Parameters

__namedParameters
xr_views

object[]

Returns

void


refreshSize()

refreshSize(): void

Defined in: livelink.js/sources/rendering/contexts/XRContext.ts:235

Returns

void

Overrides

ContextProvider.refreshSize


release()

release(): void

Defined in: livelink.js/sources/rendering/contexts/XRContext.ts:240

Returns

void

Overrides

ContextProvider.release