FORGE. BackgroundRenderer

new BackgroundRenderer(viewer, target, options, typeopt)

FORGE.BackgroundRenderer BackgroundRenderer class.
Parameters:
Name Type Attributes Description
viewer FORGE.Viewer viewer reference
target THREE.WebGLRenderTarget render target
options SceneMediaOptionsConfig the options for the cubemap
type string <optional>
The type of the object as long as many other object inherits from this one.
Source:

Extends

Members

(readonly) alive :boolean

Get the alive flag value of the object.
Type:
  • boolean
Inherited From:
Source:

(readonly) className :string

Get the class name of the object.
Type:
  • string
Inherited From:
Source:

data :*

Get and set any custom data you want to associate to this object.
Type:
  • *
Inherited From:
Source:

debug :boolean

Get and set the debug flag.
Type:
  • boolean
Inherited From:
Source:

displayObject :string

Get/Set background renderer displayObject.
Type:
  • string
Source:

frustum :THREE.Frustum

Get camera frustum.
Type:
  • THREE.Frustum
Source:

(readonly) onDestroy :FORGE.EventDispatcher

Get the onDestroy FORGE.EventDispatcher, this event is emitted at the end of the destroy sequence.
Type:
Inherited From:
Source:

renderTarget :THREE.WebGLRenderTarget

Get background render target.
Type:
  • THREE.WebGLRenderTarget
Source:

scene :THREE.Scene

Get background scene.
Type:
  • THREE.Scene
Source:

(readonly) tags :Array

Get the tags associated to this object.
Type:
  • Array
Inherited From:
Source:

textureSize :FORGE.Size

Get texture size.
Type:
Source:

(readonly) uid :string

Get the uid of the object.
Type:
  • string
Inherited From:
Source:

warning :boolean

Get and set the warning flag.
Type:
  • boolean
Inherited From:
Source:

Methods

destroy()

Destroy sequence.
Overrides:
Source:

isObjectInFrustum(object)

Check if some 3D object is interesecting the rendering frustum.
Parameters:
Name Type Description
object THREE.Object3D 3D object
Source:

isObjectInScene(object)

Check if some 3D object is in the scene
Parameters:
Name Type Description
object THREE.Object3D 3D object
Source:

log(value)

Basic log method, log a string in the console if debug is enabled.
Parameters:
Name Type Description
value * The value you want to log in the console.
Inherited From:
Source:

render(camera)

Render routine.
Parameters:
Name Type Description
camera THREE.PerspectiveCamera perspective camera with mesh rendering, N/A with shader rendering (null)
Source:

setSize(size)

Update size (resolution)
Parameters:
Name Type Description
size FORGE.Size size [px]
Source:

update()

Update routine.
Source:

updateAfterViewChange()

Update after view change
Source:
To Do:
  • change name of this method to be more generic (used by init and ) Should be overriden by subclass

warn(valuenullable)

Basic warn method, log a warn string in the console if warning is enabled.
Parameters:
Name Type Attributes Description
value string | Object <nullable>
The value you want to warn in the console.
Inherited From:
Source:

FORGE. BackgroundRenderer

Members
Methods