Skip to content

Commit 3e1888d

Browse files
authored
Update README.md
1 parent e06c783 commit 3e1888d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,18 @@ export const GameWorldState = defineFormat({
3737
x: Type.Scalar8,
3838
y: Type.Scalar8
3939
},
40-
actions: Type.Bools // [ jump, attack ]
40+
actions: Type.Bools // [jump, attack]
4141
}
4242
]
4343
});
4444
```
4545

4646
### Encode
4747

48-
Formats can be encoded directly:
48+
Formats can then be encoded:
4949

5050
```ts
51-
let bytes = GameWorldState.encode({
51+
let bytes: Uint8Array = GameWorldState.encode({
5252
frameNo: 50,
5353
timeRemaining: 59.334,
5454
players: [
@@ -69,7 +69,7 @@ bytes.byteLength
6969
Or directly from objects:
7070

7171
```ts
72-
let bytes = GameWorldState.encode( world );
72+
let bytes: Uint8Array = GameWorldState.encode( world );
7373

7474
bytes.byteLength
7575
// 16

0 commit comments

Comments
 (0)