-
Notifications
You must be signed in to change notification settings - Fork 0
/
animation-grammar
35 lines (32 loc) · 1.36 KB
/
animation-grammar
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# This file represents the grammar used by the 3D Particle Viewer.
# It is a work in progress and likely to change in the future.
# For now this is in line with the existing generated json files.
# Define all (environment) variables and properties used by the field.
properties: (object)
|
| # Representing the dimensions of the field, in coordinates.
|- width: (int)
|- height: (int)
|- depth: (int)
# An object of all molecules and which type the molecule is.
molecules: (object)
|
| # It's ID is preferably a number starting from 0.
|- (id) molecule: (object)
|
| # The value of type has to be defined in the program itself. This happens in particle-viewer.molecules.js.
| # Current possible values: Protein, ProteinMerged.
|- type: (string)
# Every item in the animation array represents one "frame" (step).
# The engine will take care of the animations between them.
# Molecules not present in the animation will not be displayed on the screen until present again.
# This way you can "merge" two molecules together by hiding them both and showing a new, different molecule on the screen.
# A simple example of this is in short_collision.json.
animation: (array)
|
| # one step in the animation
|- animation[i]: (object)
|
| # Contains the new coordinates for molecule (id) at step i in the animation.
| # example: [10, 11, 6]
|- (id) animation: (array)