Skip to content
M2O Scripting APIScripting reference
Global objectClient APIGenerated

RenderTarget

const RenderTarget: object

Defined in: client/api.d.ts:861

Offscreen surfaces the engine can sample. A render target is a real engine texture, so binding its name with Material.setTexture turns any world material into a live screen: security monitors, scoreboards on a wall, dynamic billboards, vehicle dashboards.

create(width, height, options?): RenderTargetSurface | null

Creates a render target owned by the calling client resource. Returns null if the size is out of range or the video memory budget is spent.

number

Target width in pixels, at most 2048.

number

Target height in pixels, at most 2048.

RenderTargetOptions

RenderTargetSurface | null

destroyAll(): void

Destroys every render target owned by the calling resource.

void

getUsage(): RenderTargetUsage

Reports how much video memory render targets currently hold.

RenderTargetUsage

isAvailable(): boolean

Checks whether the texture registry and the renderer are up.

boolean