up Inquisit Language Reference

animation attribute

The animation attribute changes the position of a visual stimulus over time.

Member of

<button> <clock> <picture> <shape> <text> <video>

Syntax

/ animation = circle(duration, loopcount, start, end, xcenter, ycenter, radius)

or

/ animation = path(duration, loopcount, x1, y1, x2, y2, x3, y3, ...)

or

/ animation = points(duration, loopcount, x1, y1, x2, y2, x3, y3, ...)

or

/ animation = size(duration, loopcount, startwidth, startheight, scale1, scale2, scale3, ...)

or

/ animation = rotation(duration, loopcount, degrees1, degrees2, degrees3, ...)

Parameters

duration The duration in milliseconds of the entire animation.
loopcount The number of times the animation should loop, or -1 for continuous looping.
start The starting point on the circle as a percentage of the circular arc, ranging from 0 (top of the circle) to 100 (back to the top of the circle).
end The ending point on the circle as a percentage of the circular arc, ranging from 0 (top of the circle) to 100 (back to the top of the circle). If the end point is greater than or equal to the starting point, the direction is clockwise, otherwise direction is counter-clockwise.
startwidth The bounding width for the start of a size animation.
startheight The bounding height for the start of a size animation.
xcenter The horizontal coordinate of center point of the circle.
ycenter The vertical coordinate of the center of the circle.
radius The radius of the circle.
x1 The horizontal position.
y1 The vertical position.
x2 The horizontal position.
y2 The vertical position.
h1 The height.
w1 The width.
scale1 The factor to scale a size animation.
degrees1 The degrees of rotation for a rotation animation.

Remarks

The animation attribute enables the position of a stimulus to change throughout the course of a trial. The circle option moves the stimulus in a circle. The path option moves the stimulus on a continuous path across a set of given points. The points option repositions the stimulus across a set of discrete points. The size animation scales the stimulus larger or smaller based on a set of scale values. The rotation animation rotates the stimulus accordign to the specified degrees.

Examples

The following runs a repeating loop animation that moves a circle shape to move from the top-center to the bottom-center of the screen over 5 seconds.

<shape circle>
/ shape=circle
/ animation=path(5000, -1, 50%, 0%, 50%, 100%)
</shape>

The following runs an animation that moves a rectangle twice around a circular path that is centered on the screen with a radius half the height of the screen.

<shape circle>
/ shape=rectangle
/ animation=circle(5000, 2, 0, 100, 50%, 50%, 100%)
</shape>

The following runs a repeating loop animation that repositions a circle shape on two discrete points over a 5 second interval.

<shape circle>
/ shape=circle
/ animation=points(5000, -1, 50%, 0%, 50%, 100%)
</shape>

The following runs a repeating loop animation that doubles the size of a circle shape over a 5 second interval.

<shape circle>
/ shape=circle
/ animation=size(5000, -1, 20%, 20%, 1, 2)
</shape>

The following runs a repeating loop animation that spins a triangle shape 360 degrees over a 5 second interval.

<shape triangle>
/ shape=triangle
/ animation=rotation(5000, -1, 0, 360)
</shape>

Send comments on this topic:
Copyright Millisecond Software, LLC. All rights reserved.