We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e06c783 commit 3e1888dCopy full SHA for 3e1888d
1 file changed
README.md
@@ -37,18 +37,18 @@ export const GameWorldState = defineFormat({
37
x: Type.Scalar8,
38
y: Type.Scalar8
39
},
40
- actions: Type.Bools // [ jump, attack ]
+ actions: Type.Bools // [jump, attack]
41
}
42
]
43
});
44
```
45
46
### Encode
47
48
-Formats can be encoded directly:
+Formats can then be encoded:
49
50
```ts
51
-let bytes = GameWorldState.encode({
+let bytes: Uint8Array = GameWorldState.encode({
52
frameNo: 50,
53
timeRemaining: 59.334,
54
players: [
@@ -69,7 +69,7 @@ bytes.byteLength
69
Or directly from objects:
70
71
72
-let bytes = GameWorldState.encode( world );
+let bytes: Uint8Array = GameWorldState.encode( world );
73
74
bytes.byteLength
75
// 16
0 commit comments