Skip to content

Commit d8aadd9

Browse files
eviK88tbimprob
authored andcommitted
Change snapshot from txt to json (#33)
1 parent 385d76a commit d8aadd9

File tree

3 files changed

+78
-60
lines changed

3 files changed

+78
-60
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ begin to send a simple command to the client every few seconds.
5151

5252
## Snapshot
5353

54-
The snapshot exists in both text and binary format in the `snapshots` folder. There is no script
55-
to generate the snapshot as the snapshot was written by hand in the text format, but it's possible
56-
to make simple changes to the text format and regenerate the binary snapshot from it. To update the
54+
The snapshot exists in both json and binary format in the `snapshots` folder. There is no script
55+
to generate the snapshot as the snapshot was written by hand in the json format, but it's possible
56+
to make simple changes to the json format and regenerate the binary snapshot from it. To update the
5757
binary snapshot after making a change, run the following command:
5858

5959
```
60-
spatial project history snapshot convert --input-format=text --input=snapshots/default.txt --output-format=binary --output=snapshots/default.snapshot
60+
spatial project history snapshot convert --input-format=text --input=snapshots/default.json --output-format=binary --output=snapshots/default.snapshot
6161
```

snapshots/default.json

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"__entity_id": "1",
3+
"improbable.EntityAcl": {
4+
"component_write_acl": [
5+
{
6+
"key": 54,
7+
"value": {
8+
"attribute_set": [
9+
{
10+
"attribute": [
11+
"physics"
12+
]
13+
}
14+
]
15+
}
16+
},
17+
{
18+
"key": 50,
19+
"value": {
20+
"attribute_set": [
21+
{
22+
"attribute": [
23+
"physics"
24+
]
25+
}
26+
]
27+
}
28+
},
29+
{
30+
"key": 1000,
31+
"value": {
32+
"attribute_set": [
33+
{
34+
"attribute": [
35+
"physics"
36+
]
37+
}
38+
]
39+
}
40+
}
41+
],
42+
"read_acl": {
43+
"attribute_set": [
44+
{
45+
"attribute": [
46+
"physics"
47+
]
48+
},
49+
{
50+
"attribute": [
51+
"client_direct"
52+
]
53+
},
54+
{
55+
"attribute": [
56+
"client_vtable"
57+
]
58+
}
59+
]
60+
}
61+
},
62+
"improbable.Persistence": {},
63+
"improbable.Position": {
64+
"coords": {
65+
"x": 0.0,
66+
"y": 0.0,
67+
"z": 0.0
68+
}
69+
},
70+
"sample.ClientData": {
71+
"input_state": 0.5
72+
},
73+
"sample.Login": {}
74+
}

snapshots/default.txt

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)