72 lines
2.2 KiB
Plaintext
72 lines
2.2 KiB
Plaintext
version 1 .
|
|
|
|
Sprite = <sprite @name string @formals [symbol ...] @shape Shape> .
|
|
Variable = <variable @spriteName string @variable symbol @value any> .
|
|
|
|
Shape = Mesh / Light / Scale / Move / Rotate / @many [Shape ...] / Texture / Color / Sound / Name / Floor / Nonphysical / Touchable / CSG / Skybox .
|
|
|
|
Mesh = Sphere / Box / Ground / Plane / External / @turtle turtle.Shape .
|
|
|
|
Sphere = <sphere> .
|
|
Box = <box> .
|
|
Ground = <ground> .
|
|
Plane = <plane> .
|
|
External = <external @path string> .
|
|
|
|
Light = <hemispheric-light @v Vector3> .
|
|
|
|
DoubleValue = @immediate double / @reference symbol .
|
|
|
|
ImmediateVector2 = <v @x DoubleValue @y DoubleValue> .
|
|
ImmediateVector3 = <v @x DoubleValue @y DoubleValue @z DoubleValue> .
|
|
ImmediateQuaternion = <q @a DoubleValue @b DoubleValue @c DoubleValue @d DoubleValue> .
|
|
|
|
LiteralVector3 = <v @x double @y double @z double> .
|
|
|
|
Vector2 = @immediate ImmediateVector2 / @reference symbol .
|
|
Vector3 = @immediate ImmediateVector3 / @reference symbol .
|
|
Quaternion = @immediate ImmediateQuaternion / @reference symbol .
|
|
|
|
Scale = <scale @v Vector3 @shape Shape> .
|
|
Move = <move @v Vector3 @shape Shape> .
|
|
Rotate = @euler <rotate @v Vector3 @shape Shape> / @quaternion <rotate @q Quaternion @shape Shape> .
|
|
|
|
Texture = <texture @spec TextureSpec @shape Shape> .
|
|
TextureSpec =
|
|
/ @simple [@path string]
|
|
/ @uv [@path string @scale Vector2 @offset Vector2]
|
|
/ @uvAlpha [@path string @scale Vector2 @offset Vector2 @alpha DoubleValue]
|
|
.
|
|
|
|
Color =
|
|
/ @opaque <color @r DoubleValue @g DoubleValue @b DoubleValue @shape Shape>
|
|
/ @transparent <color @r DoubleValue @g DoubleValue @b DoubleValue @alpha DoubleValue @shape Shape>
|
|
.
|
|
|
|
Sound = <sound @spec SoundSpec @shape Shape> .
|
|
SoundSpec =
|
|
/ @stream <stream @url string>
|
|
/ @loop <loop @url string>
|
|
.
|
|
|
|
Name = <name @base string @shape Shape> .
|
|
|
|
Floor = <floor @shape Shape> .
|
|
Nonphysical = <nonphysical @shape Shape> .
|
|
Touchable = <touchable @shape Shape> .
|
|
|
|
CSG = <csg @expr CSGExpr> .
|
|
|
|
CSGExpr =
|
|
/ <mesh @shape Mesh>
|
|
/ <scale @v LiteralVector3 @shape CSGExpr>
|
|
/ <move @v LiteralVector3 @shape CSGExpr>
|
|
/ <rotate @v LiteralVector3 @shape CSGExpr>
|
|
/ <subtract [@base CSGExpr @more CSGExpr ...]>
|
|
/ <union [@base CSGExpr @more CSGExpr ...]>
|
|
/ <intersect [@base CSGExpr @more CSGExpr ...]>
|
|
/ <invert @shape CSGExpr>
|
|
.
|
|
|
|
Skybox = <skybox @path string> .
|