Constructor
new Rect(options)
- Source:
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
Extends
Methods
(protected) _estimateBoundingBox()
- Source:
- Inherited From:
Estimate the bounding box.
(protected) _getPixiPolygon() → {Object}
- Source:
- Overrides:
Get the PIXI polygon (in pixel units) corresponding to the vertices.
Returns:
the PIXI polygon corresponding to this stimulus vertices.
- Type
- Object
(protected) _getVertices_px() → {Array.<Array.<number>>}
- Source:
- Overrides:
Get the vertices in pixel units.
Returns:
the vertices (in pixel units)
- Type
- Array.<Array.<number>>
(protected) _updateIfNeeded()
- Source:
- Overrides:
Update the stimulus, if necessary.
(protected) _updateVertices()
- Source:
Update the vertices.
contains(object, units) → {boolean}
- Source:
- Inherited From:
Determine whether an object is inside the bounding box of the ShapeStim.
This is overridden in order to provide a finer inclusion test.
Parameters:
Name | Type | Description |
---|---|---|
object |
Object | the object |
units |
string | the units |
Returns:
whether or not the object is inside the bounding box of the ShapeStim
- Type
- boolean
setHeight(height, logopt)
- Source:
Setter for the height attribute.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
height |
number | the rectangle height |
||
log |
boolean |
<optional> |
false
|
whether of not to log |
setVertices(vertices, logopt)
- Source:
- Overrides:
Setter for the vertices attribute.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
vertices |
Array.<Array.<number>> | the vertices |
||
log |
boolean |
<optional> |
false
|
whether of not to log |
setWidth(width, logopt)
- Source:
Setter for the width attribute.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
width |
number | the rectangle width |
||
log |
boolean |
<optional> |
false
|
whether of not to log |