new VisualStim(options)
Base class for all visual stimuli.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
- Mixes In:
- WindowMixin
- Source:
Extends
- MinimalStim
Members
contains
Determine whether an object is inside the bounding box of the stimulus.
- Source:
refresh
Force a refresh of the stimulus.
refresh() is called, in particular, when the Window is resized.
- Source:
setOri
Setter for the orientation attribute.
- Source:
setPos
Setter for the position attribute.
- Source:
setSize
Setter for the size attribute.
- Source:
Methods
(protected) _estimateBoundingBox()
Estimate the bounding box.
- Source:
(protected) _onChange(withPixiopt, withBoundingBoxopt) → {function}
Generate a callback that prepares updates to the stimulus.
This is typically called in the constructor of a stimulus, when attributes are added with _addAttribute.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
withPixi |
boolean |
<optional> |
false | whether or not the PIXI representation must also be updated |
withBoundingBox |
boolean |
<optional> |
false | whether or not to immediately estimate the bounding box |
- Source:
Returns:
- Type
- function
(protected) contains() → {PIXI.Rectangle}
Get the bounding box in pixel coordinates
- Source:
Returns:
the bounding box, in pixel coordinates
- Type
- PIXI.Rectangle