The animation syntax used by nVision Animator

 

Animator has a few methods of altering the animation. One of them is to write animation code in the code window. This is the syntax it uses to define animations. To see the examples in full colour, cut and paste the code into the code window

 

 
A few notes first
 

Any line in the code window beginning with a hyphen (-) is a comment. The process of adding a comment mark at the beginning of a line of code is referred to as commenting out. It is very useful when you want to remove an item temporarily, without deleting it. In the following example, only the yellow square will be shown.

To select an item in the drawing area, add an asterisk (*) to the beginning of the line. The yellow square below will be selected, and displayed with resize marks.

 
The basics
 

There are two types of creation in Animator, which are a drawing - a still image - or an animation.

Here is the first part of the default drawing created by selecting File -> New -> Drawing from the menu.

And here are the first four lines of the default animation created by selecting File -> New -> Animation from the menu.

The syntax items of note here are animation, drawing and layer. An animation contains a number of layers, and each layer has a sequence of drawings. Each drawing has a start and end frame, and drawings in the same layer cannot overlap their frames.

A frame is a throwback to film, but still relevant in animation as we are still drawing in frames.

The astute viewer will have noticed another entry in the menu under File -> New, which is Project. A project is a sequential list of animations, where each animation is a scene or part of a scene. I shall write more on this later when considering workflow.

 
Shape Primitives
 

A primitive is the basic building block of an animation, and can be a shape, a line, text, an image, audio or video. The following list shows all of the shape primitives

The following shapes are also allowed: septagon, heptagon, octagon, nonagon, enneagon, decagon, undecagon, hendecagon, duodecagon, dodecagon, triskaidecagon

An alternative to background is to add a sky

 
Making it move
 

Before getting onto the more complex primitive types, let's see how to make them move. The simplest way is to add a move command after the primitive

Paste this into the code window, and click the green play button

Movements, or transforms, as they are more correctly known are applied to the previous primitive. Listing three transforms after a primitive apply all three transforms to it when animated.

There are many more types of movement, but first, a look at colours.

 
Colouring
 

Colours are defined either by their name (see this link) or by their rgb colour values.

argb (alpha or transparency, red, green, blue) and rgb are no different in use. If there are three numbers in the brackets, Animator will read it as rgb, if there are 4, it will be read as argb.

 
Gradient colours
 

Gradient colours are added after the initial colour entry. Here are some examples. Colour may be spelled the english or american way, colour or color.

 
Lines, curves and polygons>
 

I must confess that the polygon and closedcurve have proven most useful in my own animations. Here are a few examples of lines, curves, closedcurves and polygons. All shapes use the same coordinates, but have been moved on the screen so they can all be seen.

 
Moving lines, curves and polygons
 

LineLine types are moved using the move points transform.

 
More
 

The information so far has introduced the main primitives and movement methods. There is a lot more to come, so check back in a few days, when I hope to have posted more.

 
Reserved words
 

Here is a full list of the words used in the animation syntax. they will be described more fully at a later date.

Reserved word Description
0 TBA
#
about
across
addin/plugin/add-in/plug-in/add in/plug in
alias
animation/film/program
arrow
aspectratio
at
audio
background
backwards
big/large
bigger/larger
bilinear
bold
border
bordercolour +
borderwidth
bottom
bottomleft
canvas
centre/center/middle
centrebottom
centretop
circle 
circumference
clear crop
closed
cm
colourmatrix
complement
credits
crop
curve
curve
dash
dashdot
dashdotdot
decagon
default folder
deg
diameter
directionallight
dither
dot
dot
double
down
ellipse
exclude
exclude/not
export
external
fade in/fadein
fadeout/fade out
fillcolour +
fixaspectratio
fixcentre/fixcenter
flatten
font
frame
framerate
frames
gapx
gapy
ghost
gradient centrepoint
gradientangle +
gradientcentre +
gradientcolour +
gradientscale
grid
grouped
half
hdtv
heightstep
hexagon
hide/hidden
hole 
huge/massive/gigantic/enormous
image/bitmap/file
in
innersize
intensity
italic
left
leftcentre
line
linecolour +
linewidth
location
logquick/log quick
logslow/log slow
loop
margin
marginleft/leftmargin/marginx/xmargin
matrix
move
movepoints/move points
next frame
noborder
nonagon/enneagon
ntsc
octagon
odd
offset
offsetx +
pal
pc
pentagon
perspective
picture/drawing/clip/frame
pie
play
point
points
polygon
project
pt
px
radius
rectangle
remove
repeat
resize
rgb/argb
right
rightcentre
rotate
rotation
round
secam
septagon/heptagon
sequence
set invisible
shadow
shear
sigma
size
sky
small/little
smaller/littler
spc/s%
speed
spx
square
squarelaw
squarequick/square quick
squareslow/square slow
star
startangle
steps
sweepangle
tension
tension
text/writing
textbordercolour +
textborderwidth +
textcolour +
textsize
the
this/here
tile
tiny/minute
title
titles
to
to
top
topright
transform
triangle
triskaidecagon
undecagon/dodecagon
union
unit 
video
videoframes
warp
width
width step
winding
xagon
xor
xstep
ystep
zero