# new RayPicking()
- Source:
Extends
Classes
Members
# __uid__ :number
- Source:
- Inherited From:
Type:
- number
# camera :clay.Camera
- Source:
Target camera
Type:
# renderer :clay.Renderer
- Source:
Target renderer
Type:
# scene :clay.Scene
- Source:
Target scene
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, forcePickAllopt) → {clay.picking.RayPicking~Intersection}
- Source:
Pick the nearest intersection object in the scene
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
x |
number | Mouse position x |
||
y |
number | Mouse position y |
||
forcePickAll |
boolean |
<optional> |
false
|
ignore ignorePicking |
Returns:
# pickAll(x, y, outputopt, forcePickAllopt) → {Array.<clay.picking.RayPicking~Intersection>}
- Source:
Pick all intersection objects, wich will be sorted from near to far
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
x |
number | Mouse position x |
||
y |
number | Mouse position y |
||
output |
Array |
<optional> |
||
forcePickAll |
boolean |
<optional> |
false
|
ignore ignorePicking |
Returns:
- Type
- Array.<clay.picking.RayPicking~Intersection>
# 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 |