castle-web-cli 0.4.237 → 0.4.239

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (239) hide show
  1. package/dist/bundle.d.ts +24 -0
  2. package/dist/bundle.js +447 -4
  3. package/dist/bundleLatin1.d.ts +6 -0
  4. package/dist/bundleLatin1.js +333 -0
  5. package/dist/castle-host/host.d.ts +10 -1
  6. package/dist/castle-host/host.js +133 -9
  7. package/dist/castleJson.d.ts +2 -0
  8. package/dist/castleJson.js +1 -0
  9. package/dist/deckExports.d.ts +35 -0
  10. package/dist/deckExports.js +365 -0
  11. package/dist/importCheckHook.d.ts +1 -0
  12. package/dist/importCheckHook.js +1 -1
  13. package/dist/index.js +21 -0
  14. package/dist/init.js +2 -1
  15. package/dist/multiplayerDoc.d.ts +1 -1
  16. package/dist/multiplayerDoc.js +9 -0
  17. package/dist/platformDoc.js +2 -1
  18. package/dist/playPagePolicy.d.ts +1 -0
  19. package/dist/playPagePolicy.js +8 -3
  20. package/dist/roomLogs.d.ts +39 -0
  21. package/dist/roomLogs.js +166 -0
  22. package/dist/save-deck.js +4 -0
  23. package/kits/base/CLAUDE.md +1 -0
  24. package/kits/base/castle.json +1 -1
  25. package/kits/base/sdk/README.md +113 -2
  26. package/kits/base/sdk/castle.d.ts +6 -2
  27. package/kits/base/sdk/castle.js +2 -0
  28. package/kits/base/sdk/commands.d.ts +56 -1
  29. package/kits/base/sdk/commands.js +29 -1
  30. package/kits/base/sdk/hub.d.ts +17 -0
  31. package/kits/base/sdk/hub.js +33 -9
  32. package/kits/base/sdk/localCache.d.ts +27 -0
  33. package/kits/base/sdk/localCache.js +115 -0
  34. package/kits/base/sdk/localCacheStore.d.ts +15 -0
  35. package/kits/base/sdk/localCacheStore.js +358 -0
  36. package/kits/base/sdk/multiplayer.js +30 -0
  37. package/kits/base/sdk/rooms.d.ts +11 -0
  38. package/kits/base/sdk/rooms.js +22 -0
  39. package/kits/base/sdk/store.d.ts +8 -2
  40. package/kits/base/sdk/store.js +5 -1
  41. package/kits/base/sdk/transport.d.ts +1 -0
  42. package/kits/base/sdk/transport.js +4 -5
  43. package/kits/hub-game/CLAUDE.md +22 -2
  44. package/kits/hub-game/castle.json +8 -5
  45. package/kits/hub-game/code/client/act.js +66 -91
  46. package/kits/hub-game/code/client/actCore.js +134 -0
  47. package/kits/hub-game/code/client/car.js +35 -0
  48. package/kits/hub-game/code/client/chrome.js +208 -381
  49. package/kits/hub-game/code/client/crowdNames.js +2 -2
  50. package/kits/hub-game/code/client/emoteWheel.js +109 -0
  51. package/kits/hub-game/code/client/hats.js +2 -0
  52. package/kits/hub-game/code/client/hookLayer.js +99 -48
  53. package/kits/hub-game/code/client/hostGo.js +77 -0
  54. package/kits/hub-game/code/client/hubControls.js +125 -0
  55. package/kits/hub-game/code/client/hubEntry.js +187 -0
  56. package/kits/hub-game/code/client/hudSurface.js +148 -0
  57. package/kits/hub-game/code/client/hudTree.js +96 -0
  58. package/kits/hub-game/code/client/idle.js +59 -13
  59. package/kits/hub-game/code/client/invites.js +13 -4
  60. package/kits/hub-game/code/client/menuIcons.js +8 -0
  61. package/kits/hub-game/code/client/menuRows.js +8 -2
  62. package/kits/hub-game/code/client/noTrips.js +38 -0
  63. package/kits/hub-game/code/client/qualityEntry.js +6 -1
  64. package/kits/hub-game/code/client/rehello.js +3 -1
  65. package/kits/hub-game/code/client/riders.js +26 -0
  66. package/kits/hub-game/code/client/role.js +79 -0
  67. package/kits/hub-game/code/client/safeLayout.js +32 -3
  68. package/kits/hub-game/code/client/sound.js +10 -3
  69. package/kits/hub-game/code/client/soundscape.js +2 -2
  70. package/kits/hub-game/code/client/soundscapeAmbience.js +38 -8
  71. package/kits/hub-game/code/client/soundscapeBaked.js +24 -5
  72. package/kits/hub-game/code/client/soundscapeCues.js +2 -1
  73. package/kits/hub-game/code/client/state.js +19 -0
  74. package/kits/hub-game/code/client/stuck.js +2 -1
  75. package/kits/hub-game/code/client/talkSurface.js +178 -0
  76. package/kits/hub-game/code/client/talkTree.js +238 -0
  77. package/kits/hub-game/code/client/tiers.js +8 -5
  78. package/kits/hub-game/code/client/uiDom.js +600 -0
  79. package/kits/hub-game/code/client/uiTree.js +359 -0
  80. package/kits/hub-game/code/client/vehicle.js +156 -0
  81. package/kits/hub-game/code/client/wear.js +27 -5
  82. package/kits/hub-game/code/client/worldLabels.js +13 -3
  83. package/kits/hub-game/code/client/yours.js +10 -3
  84. package/kits/hub-game/code/server/actors.js +4 -3
  85. package/kits/hub-game/code/server/analytics.js +61 -18
  86. package/kits/hub-game/code/server/decor.js +56 -16
  87. package/kits/hub-game/code/server/doorAnalytics.js +2 -5
  88. package/kits/hub-game/code/server/hub.js +261 -46
  89. package/kits/hub-game/code/server/idle.js +118 -5
  90. package/kits/hub-game/code/server/loadAbandon.js +2 -5
  91. package/kits/hub-game/code/server/manifest.js +46 -4
  92. package/kits/hub-game/code/server/npcs.js +4 -2
  93. package/kits/hub-game/code/server/players.js +3 -0
  94. package/kits/hub-game/code/server/role.js +142 -0
  95. package/kits/hub-game/code/server/standing.js +6 -4
  96. package/kits/hub-game/code/server/trackQueue.js +29 -0
  97. package/kits/hub-game/code/server/vehicle.js +126 -0
  98. package/kits/hub-game/code/shared/car.js +52 -0
  99. package/kits/hub-game/code/shared/deckFlags.js +34 -0
  100. package/kits/hub-game/code/shared/deviceClass.js +39 -0
  101. package/kits/hub-game/code/shared/expression.js +9 -0
  102. package/kits/hub-game/code/systems/hub.js +281 -86
  103. package/kits/hub-game/docs/analytics.md +15 -3
  104. package/kits/hub-game/docs/contract.md +352 -14
  105. package/kits/hub-game/docs/vehicle-preset.md +132 -0
  106. package/kits/hub-game/models/hats/baker-cap.pxmodel +89 -0
  107. package/kits/hub-game/models/hats/chef-toque.pxmodel +60 -0
  108. package/kits/hub-game/models/hats/delivery-cap.pxmodel +105 -0
  109. package/kits/hub-game/models/hats/fire-helmet.pxmodel +87 -0
  110. package/kits/hub-game/models/hats/hard-hat.pxmodel +71 -0
  111. package/kits/hub-game/models/hats/nurse-cap.pxmodel +61 -0
  112. package/kits/hub-game/models/hats/police-cap.pxmodel +105 -0
  113. package/kits/hub-game/models/hats/teacher-beret.pxmodel +52 -0
  114. package/kits/hub-game/models/role/square/top-apron.pxmodel +109 -0
  115. package/kits/hub-game/models/role/square/top-cardigan.pxmodel +141 -0
  116. package/kits/hub-game/models/role/square/top-coat.pxmodel +157 -0
  117. package/kits/hub-game/models/role/square/top-scrubs.pxmodel +93 -0
  118. package/kits/hub-game/models/role/square/top-tabard.pxmodel +109 -0
  119. package/kits/hub-game/models/role/square/top-vest.pxmodel +109 -0
  120. package/kits/hub-game/models/role/tool-bag.pxmodel +75 -0
  121. package/kits/hub-game/models/role/tool-bell.pxmodel +71 -0
  122. package/kits/hub-game/models/role/tool-hose.pxmodel +60 -0
  123. package/kits/hub-game/models/role/tool-parcel.pxmodel +61 -0
  124. package/kits/hub-game/models/role/tool-torch.pxmodel +55 -0
  125. package/kits/hub-game/models/role/tool-tray.pxmodel +75 -0
  126. package/kits/hub-game/models/role/top-apron.pxmodel +70 -0
  127. package/kits/hub-game/models/role/top-cardigan.pxmodel +102 -0
  128. package/kits/hub-game/models/role/top-coat.pxmodel +79 -0
  129. package/kits/hub-game/models/role/top-scrubs.pxmodel +54 -0
  130. package/kits/hub-game/models/role/top-tabard.pxmodel +70 -0
  131. package/kits/hub-game/models/role/top-vest.pxmodel +70 -0
  132. package/kits/hub-game/package-lock.json +1 -1
  133. package/kits/hub-game/package.json +1 -1
  134. package/kits/hub-game/scripts/check.mjs +7 -4
  135. package/kits/hub-game/scripts/fixtures/car-vectors.json +279 -0
  136. package/kits/hub-game/scripts/fixtures/decor-keyless-draw.json +2 -1
  137. package/kits/hub-game/scripts/fixtures/hud-surface.json +670 -0
  138. package/kits/hub-game/scripts/fixtures/talk-surface.json +3930 -0
  139. package/kits/hub-game/scripts/gen-hats.mjs +46 -2
  140. package/kits/hub-game/scripts/gen-role.mjs +80 -0
  141. package/kits/hub-game/scripts/test-act-core.mjs +167 -0
  142. package/kits/hub-game/scripts/test-actions-client.mjs +34 -0
  143. package/kits/hub-game/scripts/test-actors.mjs +48 -0
  144. package/kits/hub-game/scripts/test-analytics.mjs +100 -6
  145. package/kits/hub-game/scripts/test-apply-deck.mjs +122 -0
  146. package/kits/hub-game/scripts/test-back-visibility.mjs +3 -1
  147. package/kits/hub-game/scripts/test-ballot.mjs +2 -0
  148. package/kits/hub-game/scripts/test-car.mjs +43 -0
  149. package/kits/hub-game/scripts/test-decor-client.mjs +2 -1
  150. package/kits/hub-game/scripts/test-decor.mjs +77 -0
  151. package/kits/hub-game/scripts/test-device-class.mjs +83 -0
  152. package/kits/hub-game/scripts/test-door-analytics.mjs +1 -1
  153. package/kits/hub-game/scripts/test-emote-wheel.mjs +374 -0
  154. package/kits/hub-game/scripts/test-hats.mjs +5 -4
  155. package/kits/hub-game/scripts/test-host-go.mjs +265 -0
  156. package/kits/hub-game/scripts/test-hub-controls.mjs +108 -0
  157. package/kits/hub-game/scripts/test-hub-entry.mjs +531 -0
  158. package/kits/hub-game/scripts/test-hub-ops.mjs +103 -0
  159. package/kits/hub-game/scripts/test-hub-trip.mjs +20 -1
  160. package/kits/hub-game/scripts/test-hud-clear.mjs +12 -2
  161. package/kits/hub-game/scripts/test-hud-rate.mjs +6 -2
  162. package/kits/hub-game/scripts/test-hud-surface.mjs +272 -0
  163. package/kits/hub-game/scripts/test-idle.mjs +347 -1
  164. package/kits/hub-game/scripts/test-interest-cells.mjs +8 -1
  165. package/kits/hub-game/scripts/test-invites-client.mjs +42 -1
  166. package/kits/hub-game/scripts/test-load-abandon.mjs +2 -2
  167. package/kits/hub-game/scripts/test-manifest.mjs +30 -0
  168. package/kits/hub-game/scripts/test-menu-client.mjs +1 -1
  169. package/kits/hub-game/scripts/test-no-trips.mjs +42 -0
  170. package/kits/hub-game/scripts/test-placement-cache.mjs +1 -1
  171. package/kits/hub-game/scripts/test-quality.mjs +13 -0
  172. package/kits/hub-game/scripts/test-rehello.mjs +258 -3
  173. package/kits/hub-game/scripts/test-resume-pose-server.mjs +203 -0
  174. package/kits/hub-game/scripts/test-resync.mjs +196 -0
  175. package/kits/hub-game/scripts/test-role-client.mjs +427 -0
  176. package/kits/hub-game/scripts/test-role.mjs +350 -0
  177. package/kits/hub-game/scripts/test-safe-layout.mjs +50 -1
  178. package/kits/hub-game/scripts/test-soundscape.mjs +124 -7
  179. package/kits/hub-game/scripts/test-standing.mjs +15 -1
  180. package/kits/hub-game/scripts/test-talk-surface.mjs +296 -0
  181. package/kits/hub-game/scripts/test-tiers.mjs +13 -0
  182. package/kits/hub-game/scripts/test-track-queue.mjs +64 -0
  183. package/kits/hub-game/scripts/test-ui-dom-dom.mjs +96 -0
  184. package/kits/hub-game/scripts/test-ui-tree.mjs +711 -0
  185. package/kits/hub-game/scripts/test-vehicle-client.mjs +168 -0
  186. package/kits/hub-game/scripts/test-vehicle.mjs +135 -0
  187. package/kits/hub-game/scripts/test-world-labels.mjs +40 -0
  188. package/kits/hub-game/scripts/test-yours.mjs +33 -0
  189. package/kits/hub-game/tools/hubScene/export.mjs +613 -0
  190. package/kits/hub-game/tools/hubScene/hubdata.mjs +921 -0
  191. package/kits/hub-game/tools/hubScene/merge-root.mjs +39 -0
  192. package/kits/hub-game/tools/hubScene/nodeworld.mjs +227 -0
  193. package/kits/hub-game/tools/hubScene/test/export-fixture.mjs +810 -0
  194. package/kits/hub-game/tools/hubScene/test/fixture.json +637 -0
  195. package/kits/hub-game/tools/hubScene/test/paint-export.mjs +40 -0
  196. package/kits/hub-game/tools/hubScene/test/upload.test.mjs +655 -0
  197. package/kits/hub-game/tools/hubScene/upload.mjs +636 -0
  198. package/kits/hub-game/tools/hubScene/validate-manifest.mjs +301 -0
  199. package/kits/multiplayer-3d/castle.json +4 -4
  200. package/kits/multiplayer-3d/code/client/resumeGate.js +30 -2
  201. package/kits/multiplayer-3d/code/client/steer.js +3 -1
  202. package/kits/multiplayer-3d/code/systems/multiplayer.js +30 -2
  203. package/kits/multiplayer-3d/package-lock.json +1 -1
  204. package/kits/multiplayer-3d/scripts/test-resume-gate.mjs +74 -2
  205. package/kits/physics-3d/CLAUDE.md +1 -1
  206. package/kits/physics-3d/behaviors/Player.jsx +37 -27
  207. package/kits/physics-3d/castle.json +2 -2
  208. package/kits/physics-3d/docs/engine-geometry-memory.md +23 -0
  209. package/kits/physics-3d/engine3d/memoryprofile.js +17 -0
  210. package/kits/physics-3d/engine3d/playerRun.js +6 -1
  211. package/kits/physics-3d/engine3d/pxmodel.js +6 -1
  212. package/kits/physics-3d/engine3d/world3d.js +6 -3
  213. package/kits/physics-3d/package.json +1 -1
  214. package/kits/physics-3d/play/behaviors/Player.js +40 -28
  215. package/kits/physics-3d/scripts/test-memory-profile.mjs +237 -0
  216. package/kits/physics-3d/systems/physics3d.js +5 -2
  217. package/kits/real-time/castle.json +2 -2
  218. package/kits/real-time/code/client/messages.js +5 -0
  219. package/kits/real-time/code/server/session.js +28 -1
  220. package/kits/real-time/package-lock.json +1 -1
  221. package/package.json +5 -4
  222. package/vendor/three/LICENSE +21 -0
  223. package/vendor/three/build/three.core.js +58773 -0
  224. package/vendor/three/build/three.module.js +18251 -0
  225. package/vendor/three/examples/jsm/controls/OrbitControls.js +1860 -0
  226. package/vendor/three/examples/jsm/controls/TransformControls.js +1918 -0
  227. package/vendor/three/examples/jsm/exporters/GLTFExporter.js +3595 -0
  228. package/vendor/three/examples/jsm/geometries/RoundedBoxGeometry.js +216 -0
  229. package/vendor/three/examples/jsm/math/MeshSurfaceSampler.js +315 -0
  230. package/vendor/three/examples/jsm/postprocessing/EffectComposer.js +363 -0
  231. package/vendor/three/examples/jsm/postprocessing/MaskPass.js +195 -0
  232. package/vendor/three/examples/jsm/postprocessing/OutputPass.js +139 -0
  233. package/vendor/three/examples/jsm/postprocessing/Pass.js +191 -0
  234. package/vendor/three/examples/jsm/postprocessing/RenderPass.js +183 -0
  235. package/vendor/three/examples/jsm/postprocessing/ShaderPass.js +135 -0
  236. package/vendor/three/examples/jsm/shaders/CopyShader.js +52 -0
  237. package/vendor/three/examples/jsm/shaders/OutputShader.js +103 -0
  238. package/vendor/three/examples/jsm/utils/BufferGeometryUtils.js +1435 -0
  239. package/vendor/three/package.json +134 -0
@@ -0,0 +1,79 @@
1
+ {
2
+ "format": "pxmodel",
3
+ "name": "top-coat",
4
+ "triangles": 900,
5
+ "look": {
6
+ "outline": 0.012,
7
+ "outlineColor": "#241a2e",
8
+ "rim": 0.3,
9
+ "ao": 0.4
10
+ },
11
+ "parts": [
12
+ {
13
+ "id": "body",
14
+ "kind": "lathe",
15
+ "segments": 20,
16
+ "profile": [
17
+ [
18
+ 0.2,
19
+ 0
20
+ ],
21
+ [
22
+ 0.216,
23
+ 0
24
+ ],
25
+ [
26
+ 0.216,
27
+ 0.2
28
+ ],
29
+ [
30
+ 0.2,
31
+ 0.2
32
+ ]
33
+ ],
34
+ "color": "#3aa0d8",
35
+ "flat": true
36
+ },
37
+ {
38
+ "id": "reflect",
39
+ "kind": "lathe",
40
+ "segments": 20,
41
+ "profile": [
42
+ [
43
+ 0.2,
44
+ 0.04
45
+ ],
46
+ [
47
+ 0.216,
48
+ 0.04
49
+ ],
50
+ [
51
+ 0.216,
52
+ 0.065
53
+ ],
54
+ [
55
+ 0.2,
56
+ 0.065
57
+ ]
58
+ ],
59
+ "color": "#c9ccd6",
60
+ "flat": true
61
+ },
62
+ {
63
+ "id": "zip",
64
+ "kind": "box",
65
+ "size": [
66
+ 0.018,
67
+ 0.2,
68
+ 0.012
69
+ ],
70
+ "position": [
71
+ 0,
72
+ 0.1,
73
+ 0.224
74
+ ],
75
+ "color": "#2b2b33",
76
+ "flat": true
77
+ }
78
+ ]
79
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "format": "pxmodel",
3
+ "name": "top-scrubs",
4
+ "triangles": 900,
5
+ "look": {
6
+ "outline": 0.012,
7
+ "outlineColor": "#241a2e",
8
+ "rim": 0.3,
9
+ "ao": 0.4
10
+ },
11
+ "parts": [
12
+ {
13
+ "id": "body",
14
+ "kind": "lathe",
15
+ "segments": 20,
16
+ "profile": [
17
+ [
18
+ 0.2,
19
+ 0
20
+ ],
21
+ [
22
+ 0.216,
23
+ 0
24
+ ],
25
+ [
26
+ 0.216,
27
+ 0.2
28
+ ],
29
+ [
30
+ 0.2,
31
+ 0.2
32
+ ]
33
+ ],
34
+ "color": "#3aa0d8",
35
+ "flat": true
36
+ },
37
+ {
38
+ "id": "pocket",
39
+ "kind": "box",
40
+ "size": [
41
+ 0.09,
42
+ 0.07,
43
+ 0.018
44
+ ],
45
+ "position": [
46
+ 0.085,
47
+ 0.08,
48
+ 0.224
49
+ ],
50
+ "color": "#f4f6fa",
51
+ "flat": true
52
+ }
53
+ ]
54
+ }
@@ -0,0 +1,70 @@
1
+ {
2
+ "format": "pxmodel",
3
+ "name": "top-tabard",
4
+ "triangles": 900,
5
+ "look": {
6
+ "outline": 0.012,
7
+ "outlineColor": "#241a2e",
8
+ "rim": 0.3,
9
+ "ao": 0.4
10
+ },
11
+ "parts": [
12
+ {
13
+ "id": "body",
14
+ "kind": "lathe",
15
+ "segments": 20,
16
+ "profile": [
17
+ [
18
+ 0.2,
19
+ 0
20
+ ],
21
+ [
22
+ 0.216,
23
+ 0
24
+ ],
25
+ [
26
+ 0.216,
27
+ 0.2
28
+ ],
29
+ [
30
+ 0.2,
31
+ 0.2
32
+ ]
33
+ ],
34
+ "color": "#3aa0d8",
35
+ "flat": true
36
+ },
37
+ {
38
+ "id": "panel",
39
+ "kind": "box",
40
+ "size": [
41
+ 0.3,
42
+ 0.2,
43
+ 0.02
44
+ ],
45
+ "position": [
46
+ 0,
47
+ 0.1,
48
+ 0.224
49
+ ],
50
+ "color": "#3aa0d8",
51
+ "flat": true
52
+ },
53
+ {
54
+ "id": "stripe",
55
+ "kind": "box",
56
+ "size": [
57
+ 0.28,
58
+ 0.035,
59
+ 0.016
60
+ ],
61
+ "position": [
62
+ 0,
63
+ 0.14,
64
+ 0.23800000000000002
65
+ ],
66
+ "color": "#f4f6fa",
67
+ "flat": true
68
+ }
69
+ ]
70
+ }
@@ -0,0 +1,70 @@
1
+ {
2
+ "format": "pxmodel",
3
+ "name": "top-vest",
4
+ "triangles": 900,
5
+ "look": {
6
+ "outline": 0.012,
7
+ "outlineColor": "#241a2e",
8
+ "rim": 0.3,
9
+ "ao": 0.4
10
+ },
11
+ "parts": [
12
+ {
13
+ "id": "body",
14
+ "kind": "lathe",
15
+ "segments": 20,
16
+ "profile": [
17
+ [
18
+ 0.2,
19
+ 0
20
+ ],
21
+ [
22
+ 0.216,
23
+ 0
24
+ ],
25
+ [
26
+ 0.216,
27
+ 0.2
28
+ ],
29
+ [
30
+ 0.2,
31
+ 0.2
32
+ ]
33
+ ],
34
+ "color": "#3aa0d8",
35
+ "flat": true
36
+ },
37
+ {
38
+ "id": "zip",
39
+ "kind": "box",
40
+ "size": [
41
+ 0.018,
42
+ 0.19,
43
+ 0.012
44
+ ],
45
+ "position": [
46
+ 0,
47
+ 0.1,
48
+ 0.224
49
+ ],
50
+ "color": "#2b2b33",
51
+ "flat": true
52
+ },
53
+ {
54
+ "id": "badge",
55
+ "kind": "box",
56
+ "size": [
57
+ 0.065,
58
+ 0.065,
59
+ 0.016
60
+ ],
61
+ "position": [
62
+ 0.09,
63
+ 0.145,
64
+ 0.224
65
+ ],
66
+ "color": "#e3c35a",
67
+ "flat": true
68
+ }
69
+ ]
70
+ }
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "../../sdk": {
36
36
  "name": "castle-web-sdk",
37
- "version": "0.4.49",
37
+ "version": "0.4.50",
38
38
  "dev": true,
39
39
  "devDependencies": {
40
40
  "eslint": "^9.0.0",
@@ -5,7 +5,7 @@
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "precheck": "node scripts/test-back-visibility.mjs && node scripts/test-landscape-layout.mjs && node scripts/test-safe-layout.mjs && node scripts/test-action-observers.mjs && node scripts/test-crowd-names.mjs && node scripts/test-default-environment.mjs && node scripts/test-default-environment-root.mjs",
8
- "check": "eslint . && npm run test:anonymous-entry && node scripts/test-manifest.mjs && node scripts/test-push-visit.mjs && node scripts/test-act.mjs && node scripts/test-act-client.mjs && node scripts/test-loading-cover.mjs && node scripts/test-frame-batch.mjs && node scripts/test-invites.mjs && node scripts/test-invites-client.mjs && node scripts/test-analytics.mjs && node scripts/test-door-analytics.mjs && node scripts/test-fps-telemetry.mjs && node scripts/test-load-abandon.mjs && node scripts/test-build.mjs && node scripts/test-decor.mjs && node scripts/test-actions.mjs && node scripts/test-resume-action-order.mjs && node scripts/test-actions-client.mjs && node scripts/test-action-layout.mjs && node scripts/test-ask-slot.mjs && node scripts/test-placement-cache.mjs && node scripts/test-ask.mjs && node scripts/test-ask-client.mjs && node scripts/test-menu.mjs && node scripts/test-menu-client.mjs && node scripts/test-companion.mjs && node scripts/test-companion-chat.mjs && node scripts/test-companion-client.mjs && node scripts/test-visibility.mjs && node scripts/test-rehello.mjs && node scripts/test-resume-pose.mjs && node scripts/test-resume-held.mjs && node scripts/test-arrival-pose.mjs && node scripts/test-arrival-pose-server.mjs && node scripts/test-arrival-pose-server.mjs clinic && node scripts/test-arrival-pose-server.mjs cove && node scripts/test-arrival-pose-server.mjs fishing && node scripts/test-arrival-pose-server.mjs plot && node scripts/test-arrival-pose-server.mjs runway && POSE_REPLACE=1 node scripts/test-arrival-pose-server.mjs && POSE_REPLACE=1 node scripts/test-arrival-pose-server.mjs clinic && POSE_REPLACE=1 node scripts/test-arrival-pose-server.mjs cove && POSE_REPLACE=1 node scripts/test-arrival-pose-server.mjs fishing && POSE_REPLACE=1 node scripts/test-arrival-pose-server.mjs plot && POSE_REPLACE=1 node scripts/test-arrival-pose-server.mjs runway && POSE_REPLACE=1 POSE_PLAIN=1 POSE_RESULT=1 node scripts/test-arrival-pose-server.mjs && POSE_LINE=1 node scripts/test-arrival-pose-server.mjs && node scripts/test-progress-reset.mjs && node scripts/test-decor-client.mjs && node scripts/test-yours.mjs && node scripts/test-yours-chrome.mjs && node scripts/test-npcs.mjs && node scripts/test-avatar.mjs && node scripts/test-avatar-colors.mjs && node scripts/test-avatar-models.mjs && node scripts/test-avatar-wire.mjs && node scripts/test-avatar-share.mjs && node scripts/test-far-avatars.mjs && node scripts/test-avatar-cap.mjs && node scripts/test-picker.mjs && node scripts/test-friend-bests.mjs && node scripts/test-hub-ops.mjs && node scripts/test-storage-limit.mjs && node scripts/test-hub-leaving.mjs && node scripts/test-standing.mjs && node scripts/test-observed.mjs && node scripts/test-actors.mjs && node scripts/test-grab.mjs && node scripts/test-grab-client.mjs && node scripts/test-grab-orbit.mjs && node scripts/test-idle.mjs && node scripts/test-emote-bubble.mjs && node scripts/test-shot.mjs && node scripts/test-vis.mjs && node scripts/test-keys.mjs && node scripts/test-attention.mjs && node scripts/test-hub-trip.mjs && node scripts/test-pack.mjs && node scripts/test-interest.mjs && node scripts/test-relations-among.mjs && node scripts/test-relations-refresh.mjs && node scripts/test-fresh-friends.mjs && node scripts/test-cells.mjs && node scripts/test-interest-cells.mjs && node scripts/test-interest-cap.mjs && node scripts/test-object-entry.mjs && node scripts/test-interest-client.mjs && node scripts/test-blocks.mjs && node scripts/test-ban-join.mjs && node scripts/test-door.mjs && node scripts/test-door-jump.mjs && node scripts/test-together.mjs && node scripts/test-party.mjs && node scripts/test-say.mjs && node scripts/test-ballot.mjs && node scripts/test-chat.mjs && node scripts/test-no-forms.mjs && node scripts/test-classic.mjs && node scripts/test-actor-budget.mjs && node scripts/test-quality.mjs && node scripts/test-high-only.mjs && node scripts/test-tiers.mjs && node scripts/test-tiers-render.mjs && node scripts/test-tier-cells.mjs && node scripts/test-hats.mjs && node scripts/test-try-on.mjs && node scripts/test-earned.mjs && node scripts/test-earned-client.mjs && node scripts/test-spin.mjs && node scripts/test-hud-clear.mjs && node scripts/test-labels.mjs && node scripts/test-world-labels.mjs && node scripts/test-pad-occupancy.mjs && node scripts/test-pad-cues.mjs && node scripts/test-stuck.mjs && node scripts/test-toast-band.mjs && node scripts/test-soundscape.mjs && node scripts/test-weakest-tier.mjs && node scripts/test-hud-rate.mjs && node --input-type=module -e \"const { bundleProject } = await import('../../cli/dist/bundle.js'); await bundleProject('.');\"",
8
+ "check": "eslint . && npm run test:anonymous-entry && node scripts/test-manifest.mjs && node scripts/test-push-visit.mjs && node scripts/test-act.mjs && node scripts/test-act-client.mjs && node scripts/test-act-core.mjs && node scripts/test-loading-cover.mjs && node scripts/test-frame-batch.mjs && node scripts/test-invites.mjs && node scripts/test-invites-client.mjs && node scripts/test-analytics.mjs && node scripts/test-device-class.mjs && node scripts/test-door-analytics.mjs && node scripts/test-fps-telemetry.mjs && node scripts/test-load-abandon.mjs && node scripts/test-track-queue.mjs && node scripts/test-build.mjs && node scripts/test-decor.mjs && node scripts/test-actions.mjs && node scripts/test-resume-action-order.mjs && node scripts/test-actions-client.mjs && node scripts/test-action-layout.mjs && node scripts/test-ask-slot.mjs && node scripts/test-placement-cache.mjs && node scripts/test-ask.mjs && node scripts/test-ask-client.mjs && node scripts/test-menu.mjs && node scripts/test-menu-client.mjs && node scripts/test-companion.mjs && node scripts/test-companion-chat.mjs && node scripts/test-companion-client.mjs && node scripts/test-visibility.mjs && node scripts/test-rehello.mjs && node scripts/test-resync.mjs && node scripts/test-resume-pose.mjs && node scripts/test-resume-held.mjs && node scripts/test-arrival-pose.mjs && node scripts/test-arrival-pose-server.mjs && node scripts/test-arrival-pose-server.mjs clinic && node scripts/test-arrival-pose-server.mjs cove && node scripts/test-arrival-pose-server.mjs fishing && node scripts/test-arrival-pose-server.mjs plot && node scripts/test-arrival-pose-server.mjs runway && POSE_REPLACE=1 node scripts/test-arrival-pose-server.mjs && POSE_REPLACE=1 node scripts/test-arrival-pose-server.mjs clinic && POSE_REPLACE=1 node scripts/test-arrival-pose-server.mjs cove && POSE_REPLACE=1 node scripts/test-arrival-pose-server.mjs fishing && POSE_REPLACE=1 node scripts/test-arrival-pose-server.mjs plot && POSE_REPLACE=1 node scripts/test-arrival-pose-server.mjs runway && POSE_REPLACE=1 POSE_PLAIN=1 POSE_RESULT=1 node scripts/test-arrival-pose-server.mjs && POSE_LINE=1 node scripts/test-arrival-pose-server.mjs && node scripts/test-resume-pose-server.mjs && node scripts/test-resume-pose-server.mjs same-layer && node scripts/test-progress-reset.mjs && node scripts/test-decor-client.mjs && node scripts/test-yours.mjs && node scripts/test-yours-chrome.mjs && node scripts/test-npcs.mjs && node scripts/test-avatar.mjs && node scripts/test-avatar-colors.mjs && node scripts/test-avatar-models.mjs && node scripts/test-avatar-wire.mjs && node scripts/test-avatar-share.mjs && node scripts/test-far-avatars.mjs && node scripts/test-avatar-cap.mjs && node scripts/test-picker.mjs && node scripts/test-friend-bests.mjs && node scripts/test-hub-ops.mjs && node scripts/test-storage-limit.mjs && node scripts/test-hub-leaving.mjs && node scripts/test-standing.mjs && node scripts/test-observed.mjs && node scripts/test-actors.mjs && node scripts/test-grab.mjs && node scripts/test-grab-client.mjs && node scripts/test-grab-orbit.mjs && node scripts/test-idle.mjs && node scripts/test-car.mjs && node scripts/test-vehicle.mjs && node scripts/test-vehicle-client.mjs && node scripts/test-emote-bubble.mjs && node scripts/test-emote-wheel.mjs && node scripts/test-shot.mjs && node scripts/test-vis.mjs && node scripts/test-keys.mjs && node scripts/test-attention.mjs && node scripts/test-hub-trip.mjs && node scripts/test-hub-entry.mjs && node scripts/test-host-go.mjs && node scripts/test-no-trips.mjs && node scripts/test-pack.mjs && node scripts/test-interest.mjs && node scripts/test-relations-among.mjs && node scripts/test-relations-refresh.mjs && node scripts/test-fresh-friends.mjs && node scripts/test-cells.mjs && node scripts/test-interest-cells.mjs && node scripts/test-interest-cap.mjs && node scripts/test-object-entry.mjs && node scripts/test-interest-client.mjs && node scripts/test-blocks.mjs && node scripts/test-ban-join.mjs && node scripts/test-door.mjs && node scripts/test-door-jump.mjs && node scripts/test-together.mjs && node scripts/test-hub-controls.mjs && node scripts/test-party.mjs && node scripts/test-say.mjs && node scripts/test-ballot.mjs && node scripts/test-chat.mjs && node scripts/test-no-forms.mjs && node scripts/test-classic.mjs && node scripts/test-actor-budget.mjs && node scripts/test-quality.mjs && node scripts/test-high-only.mjs && node scripts/test-tiers.mjs && node scripts/test-tiers-render.mjs && node scripts/test-tier-cells.mjs && node scripts/test-hats.mjs && node scripts/test-try-on.mjs && node scripts/test-role.mjs && node scripts/test-role-client.mjs && node scripts/test-earned.mjs && node scripts/test-earned-client.mjs && node scripts/test-spin.mjs && node scripts/test-hud-clear.mjs && node scripts/test-labels.mjs && node scripts/test-world-labels.mjs && node scripts/test-pad-occupancy.mjs && node scripts/test-pad-cues.mjs && node scripts/test-stuck.mjs && node scripts/test-toast-band.mjs && node scripts/test-soundscape.mjs && node scripts/test-weakest-tier.mjs && node scripts/test-hud-rate.mjs && node scripts/test-ui-tree.mjs && node scripts/test-hud-surface.mjs && node scripts/test-talk-surface.mjs && node scripts/test-apply-deck.mjs && node tools/hubScene/test/export-fixture.mjs && node --test tools/hubScene/test/upload.test.mjs && node --input-type=module -e \"const { bundleProject } = await import('../../cli/dist/bundle.js'); await bundleProject('.');\"",
9
9
  "format": "prettier --write \"code/**/*.js\" \"scripts/**/*.mjs\" castle.json package.json",
10
10
  "test:anonymous-entry": "node scripts/test-signin-client.mjs && node scripts/test-anonymous-entry.mjs"
11
11
  },
@@ -217,10 +217,13 @@ function checkScene(deckDir, id, place, errors, warnings, quality, qualityRefs)
217
217
  errors.push(`${where(id)}.arrival.actor "${place.arrival.actor}" is not an actor of ${place.scene}.`);
218
218
  }
219
219
  if (place.decor) {
220
- const origin = actors.find((a) => a.id === place.decor.grid.origin);
221
- const t = origin ? mergedComponents(deckDir, origin)?.Transform : null;
222
- if (!t || !['x', 'y', 'z'].every((key) => t[key] === undefined || Number.isFinite(t[key]))) {
223
- errors.push(`${where(id)}.decor.grid.origin must name an actor with a finite Transform in ${place.scene}.`);
220
+ const grids = [...(place.decor.grid ? [['grid', place.decor.grid]] : []), ...Object.entries(place.decor.grids ?? {}).map(([gridId, grid]) => [`grids.${gridId}`, grid])];
221
+ for (const [name, grid] of grids) {
222
+ const origin = actors.find((a) => a.id === grid.origin);
223
+ const t = origin ? mergedComponents(deckDir, origin)?.Transform : null;
224
+ if (!t || !['x', 'y', 'z'].every((key) => t[key] === undefined || Number.isFinite(t[key]))) {
225
+ errors.push(`${where(id)}.decor.${name}.origin must name an actor with a finite Transform in ${place.scene}.`);
226
+ }
224
227
  }
225
228
  }
226
229
  if (quality) {
@@ -0,0 +1,279 @@
1
+ {
2
+ "about": "stepCar(state, input, parseCar(cars[car]), dt) -> out; contract v1.160; shared with the native engine",
3
+ "cars": {
4
+ "default": {
5
+ "look": "car"
6
+ },
7
+ "bus": {
8
+ "look": "bus",
9
+ "length": 9,
10
+ "speed": 9,
11
+ "reverse": 3,
12
+ "accel": 3,
13
+ "brake": 8,
14
+ "turn": 0.9
15
+ }
16
+ },
17
+ "vectors": [
18
+ {
19
+ "car": "default",
20
+ "state": {
21
+ "speed": 0,
22
+ "heading": 0
23
+ },
24
+ "input": {
25
+ "forward": 1,
26
+ "steer": 0
27
+ },
28
+ "dt": 0.016666666666666666,
29
+ "out": {
30
+ "speed": 0.1,
31
+ "heading": 0
32
+ }
33
+ },
34
+ {
35
+ "car": "default",
36
+ "state": {
37
+ "speed": 0,
38
+ "heading": 0
39
+ },
40
+ "input": {
41
+ "forward": 1,
42
+ "steer": 0
43
+ },
44
+ "dt": 1,
45
+ "out": {
46
+ "speed": 6,
47
+ "heading": 0
48
+ }
49
+ },
50
+ {
51
+ "car": "default",
52
+ "state": {
53
+ "speed": 10,
54
+ "heading": 0
55
+ },
56
+ "input": {
57
+ "forward": -1,
58
+ "steer": 0
59
+ },
60
+ "dt": 0.5,
61
+ "out": {
62
+ "speed": 3,
63
+ "heading": 0
64
+ }
65
+ },
66
+ {
67
+ "car": "default",
68
+ "state": {
69
+ "speed": 1,
70
+ "heading": 0
71
+ },
72
+ "input": {
73
+ "forward": -1,
74
+ "steer": 0
75
+ },
76
+ "dt": 1,
77
+ "out": {
78
+ "speed": -4,
79
+ "heading": 0
80
+ }
81
+ },
82
+ {
83
+ "car": "default",
84
+ "state": {
85
+ "speed": 8,
86
+ "heading": 0
87
+ },
88
+ "input": {
89
+ "forward": 0,
90
+ "steer": 0
91
+ },
92
+ "dt": 1,
93
+ "out": {
94
+ "speed": 6,
95
+ "heading": 0
96
+ }
97
+ },
98
+ {
99
+ "car": "default",
100
+ "state": {
101
+ "speed": 0,
102
+ "heading": 0
103
+ },
104
+ "input": {
105
+ "forward": 0,
106
+ "steer": 1
107
+ },
108
+ "dt": 1,
109
+ "out": {
110
+ "speed": 0,
111
+ "heading": 0
112
+ }
113
+ },
114
+ {
115
+ "car": "default",
116
+ "state": {
117
+ "speed": 4,
118
+ "heading": 0
119
+ },
120
+ "input": {
121
+ "forward": 1,
122
+ "steer": 1
123
+ },
124
+ "dt": 1,
125
+ "out": {
126
+ "speed": 10,
127
+ "heading": -1.6
128
+ }
129
+ },
130
+ {
131
+ "car": "default",
132
+ "state": {
133
+ "speed": 2,
134
+ "heading": 1
135
+ },
136
+ "input": {
137
+ "forward": 1,
138
+ "steer": -0.5
139
+ },
140
+ "dt": 0.03333333333333333,
141
+ "out": {
142
+ "speed": 2.2,
143
+ "heading": 1.0146666666666666
144
+ }
145
+ },
146
+ {
147
+ "car": "default",
148
+ "state": {
149
+ "speed": -4,
150
+ "heading": 0
151
+ },
152
+ "input": {
153
+ "forward": -1,
154
+ "steer": 1
155
+ },
156
+ "dt": 1,
157
+ "out": {
158
+ "speed": -4,
159
+ "heading": 1.6
160
+ }
161
+ },
162
+ {
163
+ "car": "default",
164
+ "state": {
165
+ "speed": 0,
166
+ "heading": 0
167
+ },
168
+ "input": {
169
+ "forward": 1,
170
+ "steer": 0
171
+ },
172
+ "dt": 100,
173
+ "out": {
174
+ "speed": 12,
175
+ "heading": 0
176
+ }
177
+ },
178
+ {
179
+ "car": "default",
180
+ "state": {
181
+ "speed": 5,
182
+ "heading": 0
183
+ },
184
+ "input": {
185
+ "forward": 1,
186
+ "steer": 0,
187
+ "front": 1
188
+ },
189
+ "dt": 0.016666666666666666,
190
+ "out": {
191
+ "speed": 0,
192
+ "heading": 0
193
+ }
194
+ },
195
+ {
196
+ "car": "default",
197
+ "state": {
198
+ "speed": 0,
199
+ "heading": 0
200
+ },
201
+ "input": {
202
+ "forward": -1,
203
+ "steer": 0,
204
+ "front": 1
205
+ },
206
+ "dt": 1,
207
+ "out": {
208
+ "speed": -4,
209
+ "heading": 0
210
+ }
211
+ },
212
+ {
213
+ "car": "default",
214
+ "state": {
215
+ "speed": 0,
216
+ "heading": 0
217
+ },
218
+ "input": {
219
+ "forward": -1,
220
+ "steer": 0,
221
+ "back": 1
222
+ },
223
+ "dt": 1,
224
+ "out": {
225
+ "speed": 0,
226
+ "heading": 0
227
+ }
228
+ },
229
+ {
230
+ "car": "default",
231
+ "state": {
232
+ "speed": 3,
233
+ "heading": 0
234
+ },
235
+ "input": {
236
+ "forward": 1,
237
+ "steer": 0,
238
+ "front": 2.1
239
+ },
240
+ "dt": 0.016666666666666666,
241
+ "out": {
242
+ "speed": 3.1,
243
+ "heading": 0
244
+ }
245
+ },
246
+ {
247
+ "car": "bus",
248
+ "state": {
249
+ "speed": 0,
250
+ "heading": 0
251
+ },
252
+ "input": {
253
+ "forward": 1,
254
+ "steer": 1
255
+ },
256
+ "dt": 2,
257
+ "out": {
258
+ "speed": 6,
259
+ "heading": -1.8
260
+ }
261
+ },
262
+ {
263
+ "car": "bus",
264
+ "state": {
265
+ "speed": 9,
266
+ "heading": 2
267
+ },
268
+ "input": {
269
+ "forward": -0.5,
270
+ "steer": -1
271
+ },
272
+ "dt": 0.25,
273
+ "out": {
274
+ "speed": 7,
275
+ "heading": 2.225
276
+ }
277
+ }
278
+ ]
279
+ }
@@ -102,7 +102,8 @@
102
102
  "title": "Town",
103
103
  "text": "Welcome"
104
104
  },
105
- null
105
+ null,
106
+ 1000
106
107
  ],
107
108
  [
108
109
  "setPointers",