t3d. RenderTargetBack

Render Target that render to canvas element.

Constructor

new RenderTargetBack(view)

Parameters:
NameTypeDescription
viewHTMLCanvasElementThe canvas element which the Render Target rendered to.

Extends

Members

height :Number

The height of the render target.
Type:
  • Number

(readonly) isRenderTarget :Boolean

Type:
  • Boolean
Default Value
  • true

(readonly) isRenderTargetBack :Boolean

Type:
  • Boolean
Default Value
  • true

view :HTMLCanvasElement

The canvas element which the Render Target rendered to.
Type:
  • HTMLCanvasElement

width :Number

The width of the render target.
Type:
  • Number

Methods

addEventListener(type, listener, thisObjectopt)

Adds a listener to an event type.
Parameters:
NameTypeAttributesDefaultDescription
typeStringThe type of event to listen to.
listenerfunctionThe function that gets called when the event is fired.
thisObjectObject<optional>
thisThe Object of calling listener method.

dispatchEvent(event)

Fire an event.
Parameters:
NameTypeDescription
eventObjectThe event that gets fired.

dispose()

Dispatches a dispose event.

removeEventListener(type, listener, thisObjectopt)

Removes a listener from an event type.
Parameters:
NameTypeAttributesDefaultDescription
typeStringThe type of the listener that gets removed.
listenerfunctionThe listener function that gets removed.
thisObjectObject<optional>
thisthisObject - The Object of calling listener method.

resize(width, height) → {Boolean}

Resize the render target.
Parameters:
NameTypeDescription
widthNumberThe width of the render target.
heightNumberThe height of the render target.
Returns:
- If size changed.
Type: 
Boolean