house/protocols/schemas/shapes.prs

48 lines
1.3 KiB
Plaintext
Raw Normal View History

2023-01-05 09:49:19 +00:00
version 1 .
2023-01-05 14:47:27 +00:00
Sprite = <sprite @name string @shape Shape> .
2023-01-05 21:03:35 +00:00
Shape = Mesh / Light / Scale / Move / Rotate / @many [Shape ...] / Texture / Color / Name / Floor / Nonphysical / CSG .
Mesh = Sphere / Box / Ground .
2023-01-05 14:47:27 +00:00
Sphere = <sphere> .
Box = <box> .
Light = <hemispheric-light @v Vector3> .
Ground = <ground @size Vector2> .
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 =
/ @simple <texture @path string @shape Shape>
/ @uv <texture @path string @scale Vector2 @offset Vector2 @shape Shape>
2023-01-05 15:55:27 +00:00
/ @uvAlpha <texture @path string @scale Vector2 @offset Vector2 @alpha double @shape Shape>
2023-01-05 14:47:27 +00:00
.
Color =
/ @opaque <color @r double @g double @b double @shape Shape>
/ @transparent <color @r double @g double @b double @alpha double @shape Shape>
.
Name = <name @base string @shape Shape> .
Floor = <floor @shape Shape> .
2023-01-05 15:45:19 +00:00
Nonphysical = <nonphysical @shape Shape> .
2023-01-05 21:03:35 +00:00
CSG = <csg @expr CSGExpr> .
CSGExpr =
/ <mesh @shape Shape>
/ <subtract @base CSGExpr @more [CSGExpr ...]>
/ <union @shapes [CSGExpr ...]>
/ <intersect @shapes [CSGExpr ...]>
/ <invert @shape CSGExpr>
.