version 1 .

Sprite = <sprite @name string @shape Shape> .

Shape = Mesh / Light / Scale / Move / Rotate / @many [Shape ...] / Texture / Color / Sound / Name / Floor / Nonphysical / Touchable / CSG / Skybox .

Mesh = Sphere / Box / Ground / Plane / External .

Sphere = <sphere> .
Box = <box> .
Ground = <ground @size Vector2> .
Plane = <plane> .
External = <external @path string> .

Light = <hemispheric-light @v Vector3> .

Vector2 = <v @x double @y double> .
Vector3 = <v @x double @y double @z double> .
Quaternion = <q @a double @b double @c double @d double> .

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 double]
.

Color =
/ @opaque <color @r double @g double @b double @shape Shape>
/ @transparent <color @r double @g double @b double @alpha double @shape Shape>
.

Sound = <sound @spec scene.SoundSpec @shape Shape> .

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 Vector3 @shape CSGExpr>
/ <move @v Vector3 @shape CSGExpr>
/ <rotate @v Vector3 @shape CSGExpr>
/ <subtract [@base CSGExpr @more CSGExpr ...]>
/ <union [@base CSGExpr @more CSGExpr ...]>
/ <intersect [@base CSGExpr @more CSGExpr ...]>
/ <invert @shape CSGExpr>
.

Skybox = <skybox @path string> .
