linearDotMask

 element objects

A mask consisting of dots moving with random linear motion on a transparent background. Various masks are possible ranging from direction coherence masks to more completely randomized masks. Dots move in straight lines with initial positions, directions, speeds, ages, and lifetimes randomized for each dot. If a dot reaches the edge of the mask area it wraps around to the opposite side. If a dot reaches the end of its lifetime it is replaced with new random position, velocity, and lifetime (and age 0).

Note that since masks are randomized and have a transparent background you can layer multiple masks on top of each other if you need one mask that has a mix of properties.

(Edge artifacts)

Minor artifacts at dot edges may be caused by the element display's default transparent background. These are usually insignificant. However, if you need to avoid them completely, you can set property backColor = <cds>"opaque"<cds> (okay if there is nothing for the element to occlude).

▸ Object ends on its own?

"Ends on its own" means ends automatically at that point. If an element can end on its own, you don't need to set end conditions for it in property end (unless you want it to maybe end earlier).

No—runs until any condition you set in property end.

Input properties
Record properties
linearDotMask
elements (see below)

size
numDots
dotDirection
dotSpeed
dotLifetime
dotSize
color

All visual elements
position
depth

nn_eyes
rotation
flipHorz
flipVert

colorMask
alpha
intensity
contrastMult
convolution
shader
filterOrder
filterGrayscale
filterResolutionMult
filterGamma

channelResolution
backColor
addDisplay

All visual elements
position

All adjuster elements have
adjust

All elements
start
end

startBuffer
endBuffer

vary
staircase

All objects
report
info

size

Default: square with sides 15 deg

A number that is side length for a square mask area, or a vector [width height] for a rectangle (deg).

numDots

Default: 250

Number of dots. Can = 0.

dotDirection

Default: <cd>[0 180]<cd> = dots move in random directions

Dot motion direction clockwise, 0 = right (deg). Or a vector [direction, delta] setting direction ± delta to randomize for each dot.

dotSpeed

Default: <cd>[2 1]<cd> = dots move randomized between 1–3 deg/sec

Dot speed (deg/sec). Or a vector [speed, delta] setting speed ± delta to randomize for each dot.

dotLifetime

Default: <cd>[1.5 0.5]<cd> = dots last randomized between 1–2 sec

Dot duration before being replaced (sec). <cd>inf<cd> = no limit. Or a vector [lifetime, delta] setting lifetime ± delta to randomize for each dot.

dotSize

Default: 0.2 deg

Dot diameter (deg).

color

Default: white

A 1×3 RGB vector with numbers between 0–1.

Adjustable properties

You can vary or allow the subject to adjust the following properties of an object of this type when it's running. If you need to make other properties adjustable, you can edit the element type code—see Element Type Programming Manual.

Adjustable properties

Adjustable properties

numDots
position
nn_eyes
rotation
colorMask
alpha
intensity
contrastMult

position
nn_eyes
rotation
colorMask
alpha
intensity
contrastMult
drawCodeVars

(None)

(None)

Input properties
Record properties

PsychBench uses record properties to record information during experiments. You can't set record properties but you can see them in experiment results using input property report.

linearDotMask
elements (see below)

All elements
startTime
endTime
duration
n_startFrame
n_endFrame
startLatencyBufferable
endLatencyBufferable