summaryrefslogtreecommitdiff
path: root/a.md
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-01-07 21:16:40 +0100
committermetamuffin <metamuffin@disroot.org>2025-01-07 21:16:40 +0100
commit3d156d75de3852dd36d0eeda33b17a2b6f10aa4a (patch)
tree4633e5934df9ff2519f422da96b64a045e5f7bb9 /a.md
parentd3e2f02f5f75afb6d6c62e77577452224e4a34a4 (diff)
downloadweareserver-3d156d75de3852dd36d0eeda33b17a2b6f10aa4a.tar
weareserver-3d156d75de3852dd36d0eeda33b17a2b6f10aa4a.tar.bz2
weareserver-3d156d75de3852dd36d0eeda33b17a2b6f10aa4a.tar.zst
new proto doc
Diffstat (limited to 'a.md')
-rw-r--r--a.md89
1 files changed, 0 insertions, 89 deletions
diff --git a/a.md b/a.md
deleted file mode 100644
index 22cccd4..0000000
--- a/a.md
+++ /dev/null
@@ -1,89 +0,0 @@
-## Protocol packets
-
-Vec is stored as `len:u32 *(data:T)`. All packets are preceeded by a u32
-indicating its length.
-
-```rs
-type Obj = [u8; 16]
-type Res = [u8; 32]
-00 connect(identity: u128)
-ff disconnect()
-01 request_resource(name: Res)
-02 respond_resource(data: Vec<u8>)
-03 add(id: Obj, prefab: Res)
-04 remove(id: Obj)
-05 position(id: Obj, pos: Vec3, rot: Vec3)
-06 pose(id: Obj, params: Vec<f32>)
-07 parent(parent: Obj, child: Obj)
-08 sound(id: Obj, data: Vec<u8>)
-09 prefab_index(res: Res)
-```
-
-## Resource formats
-
-### PrefabIndex
-
-```
-PrefabIndex = *(len_key:u16 len_value:u16 *(key:u8) *(value:u8))
-```
-
-Key is string with model name. Value is prefab resource.
-
-### Prefab
-
-```
-Prefab = *(pos:f32x3 mat:f32_3x3 part:Res<Part>)
-```
-
-### Part
-
-```
-Part = *(len_key:u16 len_value:u16 *(key:u8) *(value:u8))
-Attribute = 0x01 constant:f32 / 0x02 buffer:Res / 0x03 texture:Res<Texture>
-NewAttribute = flag:u8 constant:f32 buffer:Res texture:Res<Texture>
-```
-
-Combinations of g__, va__ and tex_* are multiplied except normal which is added.
-Defaults should be the identity for that operation, so default is 1 / white
-except normals are zero.
-
-| Key | Value Type | |
-| ---------------- | ------------- | ------------------ |
-| index | Resource | |
-| g_metallic | f32 | |
-| g_roughness | f32 | |
-| g_albedo | \[f32;3\] | |
-| g_transmission | f32 | |
-| g_emission | \[f32;3\] | |
-| va_position | [Resource; 3] | |
-| va_normal | [Resource; 3] | |
-| va_texcoord | [Resource; 2] | |
-| va_roughness | Resource | |
-| va_metallic | Resource | |
-| va_albedo | [Resource; 3] | |
-| va_transmission | Resource | |
-| va_emission | Resource | |
-| tex_normal | Resource | Use color channels |
-| tex_roughness | Resource | Use green channel |
-| tex_metallic | Resource | Use blue channel |
-| tex_albedo | Resource | Use color channels |
-| tex_transmission | Resource | Use alpha channel |
-| tex_emission | Resource | Use color channels |
-
-### Texture
-
-WebP
-
-### Shader
-
-glsl source, todo
-
-## Player tree
-
-- LowerTorso (2x leg tilt)
- - FootL
- - FootR
- - UpperTorso (2x arm tilt)
- - HandL (5x finger, 5x tilt)
- - HandR (5x finger, 5x tilt)
- - Head (2x brow, 2x eyelid, 2x eye, 3x mouth)