PixelPicking

PixelPicking

# new PixelPicking()

Source:

Pixel picking is gpu based picking, which is fast and accurate. But not like ray picking, it can't get the intersection point and triangle.

Extends

Members

# __uid__ :number

Source:
Inherited From:
Type:
  • number

# downSampleRatio :number

Source:

Downsample ratio of hidden frame buffer

Type:
  • number

# renderer :clay.Renderer

Source:

Target renderer

Type:

Methods

# after(name, action, contextopt)

Source:
Inherited From:
Mixes In:

Alias of once('after' + name)

Parameters:
Name Type Attributes Description
name string
action function
context Object <optional>

# before(name, action, contextopt)

Source:
Inherited From:
Mixes In:

Alias of once('before' + name)

Parameters:
Name Type Attributes Description
name string
action function
context Object <optional>

# error(action, contextopt)

Source:
Inherited From:
Mixes In:

Alias of on('error')

Parameters:
Name Type Attributes Description
action function
context Object <optional>

# has(name, action) → {boolean}

Source:
Inherited From:
Mixes In:

If registered the event handler

Parameters:
Name Type Description
name string
action function
Returns:
Type
boolean

# off(action, contextopt)

Source:
Inherited From:
Mixes In:

Remove event listener

Parameters:
Name Type Attributes Description
action function
context Object <optional>

# on(name, action, contextopt)

Source:
Inherited From:
Mixes In:

Register event handler

Parameters:
Name Type Attributes Description
name string
action function
context Object <optional>

# once(name, action, contextopt)

Source:
Inherited From:
Mixes In:

Register event, event will only be triggered once and then removed

Parameters:
Name Type Attributes Description
name string
action function
context Object <optional>

# pick(x, y) → {clay.Node}

Source:

Pick the object

Parameters:
Name Type Description
x number

Mouse position x

y number

Mouse position y

Returns:
Type
clay.Node

# setPrecision(ratio)

Source:

Set picking presision

Parameters:
Name Type Description
ratio number

# success(action, contextopt)

Source:
Inherited From:
Mixes In:

Alias of on('success')

Parameters:
Name Type Attributes Description
action function
context Object <optional>

# trigger(name)

Source:
Inherited From:
Mixes In:

Trigger event

Parameters:
Name Type Description
name string

# update(ratio)

Source:

Update the picking framebuffer

Parameters:
Name Type Description
ratio number