Class: VisualStim

visual.VisualStim(options)

new VisualStim(options)

Base class for all visual stimuli.
Parameters:
Name Type Description
options Object
Properties
Name Type Attributes Default Description
name String the name used when logging messages from this stimulus
win Window the associated Window
units string <optional>
"height" the units of the stimulus (e.g. for size, position, vertices)
ori number <optional>
0.0 the orientation (in degrees)
opacity number <optional>
1.0 the opacity
depth number <optional>
0 the depth (i.e. the z order)
pos Array.<number> <optional>
[0, 0] the position of the center of the stimulus
size number <optional>
1.0 the size
clipMask PIXI.Graphics <optional>
null the clip mask
autoDraw boolean <optional>
false whether or not the stimulus should be automatically drawn on every frame flip
autoLog boolean <optional>
false whether or not to log
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