FORGE. PickingDrawPass

new PickingDrawPass(viewer)

Picking draw pass 3D object picker based on additional draw passes rendering objects with a single color based on object ID Bottleneck: should be used carefully as it uses gl.readPixels to access render target texture syncing CPU and GPU
Parameters:
Name Type Description
viewer FORGE.Viewer viewer reference.
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:

material :THREE.RawShaderMaterial

Get material.
Type:
  • THREE.RawShaderMaterial
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 render target.
Type:
  • THREE.WebGLRenderTarget
Source:

(readonly) tags :Array

Get the tags associated to this object.
Type:
  • Array
Inherited From:
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

_colorFrom3DObject() → {THREE.Color}

Convert object into a color based on its unique identifier
Source:
Returns:
Type
THREE.Color

clear()

Clear draw pass. Release all references related to the scene
Source:

click()

Triggers the click method of the hovered object if exists.
Source:

destroy()

Destroy routine
Overrides:
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:

setSize(size)

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

start()

Stop picking
Source:

start()

Start picking
Source:

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. PickingDrawPass

Members
Methods