Class c3dl.Primitive
Defined in: primitive.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
| Method Attributes | Method Name and Description |
|---|---|
|
Can this object be picked when the user clicks on it? In some scripts using
the library, it may not make sense for wall, for example to be picked.
|
|
|
Will the Primitive be visible in the scene?
|
|
|
setPickable(isPickable)
Set whether this object should be included in picking tests.
|
|
|
setVisible(show)
Set the visibility state.
|
Method Detail
{bool}
getPickable()
Can this object be picked when the user clicks on it? In some scripts using
the library, it may not make sense for wall, for example to be picked. If the
object cannot be picked, it will not tested against the ray which is generated
then the user clicks the canvas, thus increasing performance.
- Returns:
- {bool} true if the object can be picked, false otherwise.
{boolean}
isVisible()
Will the Primitive be visible in the scene?
- Returns:
- {boolean} true if the object is rendered.
setPickable(isPickable)
Set whether this object should be included in picking tests. By omitting
objects which should not be interacted with, it can increase performance.
- Parameters:
- {bool} isPickable
- true if the object should be included in pikcing tests, false otherwise.
setVisible(show)
Set the visibility state.
- Parameters:
- {boolean} show
- Either a true or false value which will show or hide the object when rendering.