house/protocols/schemas/shapes.prs

59 lines
1.7 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-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
Mesh = Sphere / Box / Ground / Plane / External .
2023-01-05 14:47:27 +00:00
Sphere = <sphere> .
Box = <box> .
Ground = <ground @size Vector2> .
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
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> .
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]
/ @uvAlpha [@path string @scale Vector2 @offset Vector2 @alpha double]
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>
.
Sound = <sound @spec scene.SoundSpec @shape Shape> .
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>
/ <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 ...]>
2023-01-05 21:03:35 +00:00
/ <invert @shape CSGExpr>
.
2023-01-10 15:36:03 +00:00
Skybox = <skybox @path string> .