PortalComponent

PortalComponent

Renders to the texture of the host object

Constructor

new PortalComponent(camera, heightopt, options, overrideMaterialopt)

Parameters:
Name Type Attributes Default Description
camera Camera

The camera used for rendering

height number <optional>
200

Height of the texture to render to (the width is calculated automatically from the camera's aspect ratio)

options Object
Properties
Name Type Attributes Default Description
autoUpdate boolean <optional>
true

If set to true then updating is done every frame, otherwise updating is done only when solicited via the requestUpdate method

preciseRecursion boolean <optional>
false

By default the "portal depth" (the number of portals seen through a portal) is of 4. By enabling this option the limitation disappears, but at the cost of using more memory.

overrideMaterial Material <optional>
null

Optional override material to use when rendering to the host object

Members

camera :Camera

target :RenderTarget

Methods

requestUpdate()

Requests a rendering to be done to the material of the host object