Class: RenderTargetCube

zen3d.RenderTargetCube(width, height)

new RenderTargetCube(width, height)

Render Target that render to cube texture.
Parameters:
Name Type Description
width number The width of the render target.
height number The height of the render target.
Source:

Extends

Members

activeCubeFace :number

The activeCubeFace property corresponds to a cube side (PX 0, NX 1, PY 2, NY 3, PZ 4, NZ 5).
Type:
  • number
Default Value:
  • 0
Source:

height :number

The height of the render target.
Type:
  • number
Inherited From:
Source:

width :number

The width of the render target.
Type:
  • number
Inherited From:
Source:

Methods

addEventListener(type, listener, thisObjectopt)

Adds a listener to an event type.
Parameters:
Name Type Attributes Default Description
type string The type of event to listen to.
listener function The function that gets called when the event is fired.
thisObject Object <optional>
this The Object of calling listener method.
Inherited From:
Source:

attach(target, attachmentopt)

Attach a texture(RTT) or renderbuffer to the framebuffer. Notice: For now, dynamic Attachment during rendering is not supported.
Parameters:
Name Type Attributes Default Description
target zen3d.TextureCube | zen3d.RenderBuffer
attachment zen3d.ATTACHMENT <optional>
zen3d.ATTACHMENT.COLOR_ATTACHMENT0
Source:

detach(attachmentopt)

Detach a or renderbuffer.
Parameters:
Name Type Attributes Default Description
attachment zen3d.ATTACHMENT <optional>
zen3d.ATTACHMENT.COLOR_ATTACHMENT0
Source:

dispatchEvent(event)

Fire an event type.
Parameters:
Name Type Description
event Object The event that gets fired.
Inherited From:
Source:

dispose()

Dispatches a dispose event.
Inherited From:
Source:

removeEventListener(type, listener, thisObjectopt)

Removes a listener from an event type.
Parameters:
Name Type Attributes Default Description
type string The type of the listener that gets removed.
listener function The listener function that gets removed.
thisObject Object <optional>
this thisObject - The Object of calling listener method.
Inherited From:
Source:

resize(width, height) → {boolean}

Resize the render target.
Parameters:
Name Type Description
width number The width of the render target.
height number The height of the render target.
Overrides:
Source:
Returns:
- If size changed.
Type
boolean