house/protocols/schemas/shapes.prs

72 lines
2.2 KiB
Plaintext
Raw Normal View History

2023-01-05 09:49:19 +00:00
version 1 .
2023-01-05 14:47:27 +00:00
2023-02-03 23:05:06 +00:00
Sprite = <sprite @name string @formals [symbol ...] @shape Shape> .
Variable = <variable @spriteName string @variable symbol @value any> .
2023-01-05 14:47:27 +00:00
2023-01-12 15:05:59 +00:00
Shape = Mesh / Light / Scale / Move / Rotate / @many [Shape ...] / Texture / Color / Sound / Name / Floor / Nonphysical / Touchable / CSG / Skybox .
2023-01-05 21:03:35 +00:00
2023-02-13 16:39:13 +00:00
Mesh = Sphere / Box / Ground / Plane / External / @turtle turtle.Shape .
2023-01-05 14:47:27 +00:00
Sphere = <sphere> .
Box = <box> .
2023-02-03 23:05:06 +00:00
Ground = <ground> .
Plane = <plane> .
External = <external @path string> .
2023-01-06 12:12:59 +00:00
Light = <hemispheric-light @v Vector3> .
2023-01-05 14:47:27 +00:00
2023-02-03 23:05:06 +00:00
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 .
2023-01-05 14:47:27 +00:00
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> .
2023-01-06 11:16:42 +00:00
Texture = <texture @spec TextureSpec @shape Shape> .
TextureSpec =
/ @simple [@path string]
/ @uv [@path string @scale Vector2 @offset Vector2]
2023-02-03 23:05:06 +00:00
/ @uvAlpha [@path string @scale Vector2 @offset Vector2 @alpha DoubleValue]
2023-01-05 14:47:27 +00:00
.
Color =
2023-02-03 23:05:06 +00:00
/ @opaque <color @r DoubleValue @g DoubleValue @b DoubleValue @shape Shape>
/ @transparent <color @r DoubleValue @g DoubleValue @b DoubleValue @alpha DoubleValue @shape Shape>
2023-01-05 14:47:27 +00:00
.
2023-02-02 20:58:53 +00:00
Sound = <sound @spec SoundSpec @shape Shape> .
SoundSpec =
/ @stream <stream @url string>
/ @loop <loop @url string>
.
2023-01-12 15:05:59 +00:00
2023-01-05 14:47:27 +00:00
Name = <name @base string @shape Shape> .
Floor = <floor @shape Shape> .
2023-01-05 15:45:19 +00:00
Nonphysical = <nonphysical @shape Shape> .
2023-01-06 14:09:46 +00:00
Touchable = <touchable @shape Shape> .
2023-01-05 21:03:35 +00:00
CSG = <csg @expr CSGExpr> .
CSGExpr =
2023-01-10 21:04:38 +00:00
/ <mesh @shape Mesh>
2023-02-03 23:05:06 +00:00
/ <scale @v LiteralVector3 @shape CSGExpr>
/ <move @v LiteralVector3 @shape CSGExpr>
/ <rotate @v LiteralVector3 @shape CSGExpr>
2023-01-10 21:04:38 +00:00
/ <subtract [@base CSGExpr @more CSGExpr ...]>
/ <union [@base CSGExpr @more CSGExpr ...]>
/ <intersect [@base CSGExpr @more CSGExpr ...]>
2023-01-05 21:03:35 +00:00
/ <invert @shape CSGExpr>
.
2023-01-10 15:36:03 +00:00
Skybox = <skybox @path string> .