@volter/play 0.5.211 → 0.5.213
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.
- package/NOTICE +5 -5
- package/README.md +156 -172
- package/contributions/game-panel.tsx +807 -0
- package/contributions/levels.finder.ts +43 -0
- package/contributions/play.page.tsx +93 -0
- package/contributions/play.verbs.ts +74 -0
- package/contributions/std-level.document.tsx +477 -0
- package/dist-node/serving.mjs +695 -0
- package/package.json +277 -10
- package/serving/index.ts +13 -0
- package/serving/std-dev.ts +547 -0
- package/serving/std-scene-runtime.js +240 -0
- package/serving/std-scene.ts +240 -0
- package/src/editor-blender.ts +18 -0
- package/src/editor-threejs.ts +19 -0
- package/src/game-controls.ts +111 -0
- package/src/game-run.ts +165 -0
- package/src/game-view.tsx +219 -0
- package/src/play-clock.ts +62 -0
- package/src/play-log.ts +113 -114
- package/src/std-controls.ts +128 -0
- package/src/std-export.ts +120 -0
- package/src/std-game-adapter.ts +26 -0
- package/src/std-game.ts +967 -0
- package/src/std-level-files.ts +50 -0
- package/src/std-level.ts +107 -0
- package/src/std-view-bar.tsx +68 -0
- package/contributions/model-play.command.ts +0 -37
- package/contributions/model-play.service.tsx +0 -152
- package/src/camera-transition.ts +0 -87
- package/src/model-play.ts +0 -376
- package/src/play-materials.ts +0 -199
- package/src/play-script.ts +0 -841
package/package.json
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/play",
|
|
3
|
-
"
|
|
3
|
+
"publisher": "volter",
|
|
4
|
+
"version": "0.5.213",
|
|
5
|
+
"engines": {
|
|
6
|
+
"vscode": "^1.104.0"
|
|
7
|
+
},
|
|
4
8
|
"author": "Volter AI, Inc.",
|
|
5
9
|
"license": "Apache-2.0",
|
|
6
10
|
"type": "module",
|
|
7
|
-
"description": "Play
|
|
11
|
+
"description": "Play for a volter-ai/std game in Cyclotron: the game's own dev pages as std devices in the level's stage, the Game panel, a level's export on save and a level in code's document.",
|
|
8
12
|
"repository": {
|
|
9
13
|
"type": "git",
|
|
10
14
|
"url": "git+https://github.com/volter-ai/editor.git",
|
|
@@ -12,30 +16,293 @@
|
|
|
12
16
|
},
|
|
13
17
|
"files": [
|
|
14
18
|
"src",
|
|
19
|
+
"serving",
|
|
15
20
|
"contributions",
|
|
21
|
+
"dist-node",
|
|
16
22
|
"LICENSE",
|
|
17
23
|
"NOTICE"
|
|
18
24
|
],
|
|
19
25
|
"exports": {
|
|
20
26
|
"./contributions/*": "./contributions/*",
|
|
21
27
|
"./package.json": "./package.json",
|
|
22
|
-
"./play-
|
|
28
|
+
"./play-log": "./src/play-log.ts"
|
|
23
29
|
},
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
"extensionDependencies": [
|
|
31
|
+
"volter.@volter/editor-blender",
|
|
32
|
+
"volter.@volter/editor-threejs"
|
|
33
|
+
],
|
|
34
|
+
"contributes": {
|
|
35
|
+
"volter": {
|
|
36
|
+
"activationEvents": [
|
|
37
|
+
"onCustomEditor:volter.blender.model",
|
|
38
|
+
"onDocument:std-level"
|
|
39
|
+
],
|
|
40
|
+
"serving": [
|
|
41
|
+
"./dist-node/serving.mjs"
|
|
42
|
+
],
|
|
43
|
+
"page": [
|
|
44
|
+
"./contributions/play.page.tsx"
|
|
45
|
+
],
|
|
46
|
+
"editors": [
|
|
47
|
+
{
|
|
48
|
+
"document": "./contributions/std-level.document.tsx",
|
|
49
|
+
"kind": "std-level"
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"projectAdapters": [
|
|
53
|
+
{
|
|
54
|
+
"when": "std.json",
|
|
55
|
+
"module": "./src/std-game-adapter.ts"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"finders": [
|
|
59
|
+
{
|
|
60
|
+
"name": "stdLevelDocuments",
|
|
61
|
+
"module": "./contributions/levels.finder.ts"
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
"languageModelTools": [
|
|
66
|
+
{
|
|
67
|
+
"name": "play-log",
|
|
68
|
+
"tags": [
|
|
69
|
+
"volter"
|
|
70
|
+
],
|
|
71
|
+
"displayName": "Play log",
|
|
72
|
+
"modelDescription": "What the running std game's pages traced, each entry tagged with its player's slot, and Play's own lifecycle entries.",
|
|
73
|
+
"inputSchema": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"properties": {
|
|
76
|
+
"since": {
|
|
77
|
+
"type": "number",
|
|
78
|
+
"description": "Keep entries at or after this many game seconds."
|
|
79
|
+
},
|
|
80
|
+
"kind": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"description": "Keep one kind of entry."
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"required": [],
|
|
86
|
+
"additionalProperties": false
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"name": "play",
|
|
91
|
+
"tags": [
|
|
92
|
+
"volter"
|
|
93
|
+
],
|
|
94
|
+
"displayName": "Play control",
|
|
95
|
+
"modelDescription": "Control Play for the project's std game: state, play, stop, pause, resume or restart. Answers the game's state: play and restart answer once a player's page has joined the game (clock.running), or fail with why it did not start.",
|
|
96
|
+
"inputSchema": {
|
|
97
|
+
"type": "object",
|
|
98
|
+
"properties": {
|
|
99
|
+
"action": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"enum": [
|
|
102
|
+
"state",
|
|
103
|
+
"play",
|
|
104
|
+
"stop",
|
|
105
|
+
"pause",
|
|
106
|
+
"resume",
|
|
107
|
+
"restart"
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"required": [
|
|
112
|
+
"action"
|
|
113
|
+
],
|
|
114
|
+
"additionalProperties": false
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
],
|
|
118
|
+
"commands": [
|
|
119
|
+
{
|
|
120
|
+
"command": "volter.play",
|
|
121
|
+
"title": "play",
|
|
122
|
+
"category": "Play",
|
|
123
|
+
"volter": {
|
|
124
|
+
"derivedRefresh": "none",
|
|
125
|
+
"timeoutMs": 120000
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"command": "volter.play-log",
|
|
130
|
+
"title": "play-log",
|
|
131
|
+
"category": "Play",
|
|
132
|
+
"volter": {
|
|
133
|
+
"derivedRefresh": "none"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"command": "volter.play.state",
|
|
138
|
+
"title": "state",
|
|
139
|
+
"category": "Game"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"command": "volter.play.mode",
|
|
143
|
+
"title": "mode",
|
|
144
|
+
"category": "Game"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"command": "volter.play.game-mode",
|
|
148
|
+
"title": "Switch to Game Mode",
|
|
149
|
+
"category": "Game"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"command": "volter.play.animation-mode",
|
|
153
|
+
"title": "Switch to Animation Mode",
|
|
154
|
+
"category": "Game"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"command": "volter.play.play",
|
|
158
|
+
"title": "Play",
|
|
159
|
+
"category": "Game"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"command": "volter.play.stop",
|
|
163
|
+
"title": "Stop",
|
|
164
|
+
"category": "Game"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"command": "volter.play.pause",
|
|
168
|
+
"title": "Pause",
|
|
169
|
+
"category": "Game"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"command": "volter.play.resume",
|
|
173
|
+
"title": "Resume",
|
|
174
|
+
"category": "Game"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"command": "volter.play.step",
|
|
178
|
+
"title": "Step One Tick",
|
|
179
|
+
"category": "Game"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"command": "volter.play.speed",
|
|
183
|
+
"title": "speed",
|
|
184
|
+
"category": "Game"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"command": "volter.play.players",
|
|
188
|
+
"title": "players",
|
|
189
|
+
"category": "Game"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"command": "volter.play.autoplay",
|
|
193
|
+
"title": "autoplay",
|
|
194
|
+
"category": "Game"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"command": "volter.play.restart",
|
|
198
|
+
"title": "Restart",
|
|
199
|
+
"category": "Game"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"command": "volter.play.export",
|
|
203
|
+
"title": "export",
|
|
204
|
+
"category": "Game"
|
|
205
|
+
}
|
|
206
|
+
],
|
|
207
|
+
"menus": {
|
|
208
|
+
"commandPalette": [
|
|
209
|
+
{
|
|
210
|
+
"command": "volter.play",
|
|
211
|
+
"when": "false"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"command": "volter.play-log",
|
|
215
|
+
"when": "false"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"command": "volter.play.state",
|
|
219
|
+
"when": "false"
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"command": "volter.play.mode",
|
|
223
|
+
"when": "false"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"command": "volter.play.speed",
|
|
227
|
+
"when": "false"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"command": "volter.play.players",
|
|
231
|
+
"when": "false"
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"command": "volter.play.autoplay",
|
|
235
|
+
"when": "false"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"command": "volter.play.export",
|
|
239
|
+
"when": "false"
|
|
240
|
+
}
|
|
241
|
+
]
|
|
242
|
+
},
|
|
243
|
+
"configuration": {
|
|
244
|
+
"title": "Play",
|
|
245
|
+
"properties": {
|
|
246
|
+
"volter.play.players": {
|
|
247
|
+
"type": "integer",
|
|
248
|
+
"default": 1,
|
|
249
|
+
"minimum": 1,
|
|
250
|
+
"maximum": 8,
|
|
251
|
+
"scope": "window",
|
|
252
|
+
"description": "How many players a std game's Play starts: yours, and a bot playing the Game panel's goal for each other. One where unset. The Game panel's Players [-][+] and `play players <n>` write it to the project's settings (.vscode/settings.json), and a running game's players join or leave whenever it changes."
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
29
256
|
},
|
|
30
257
|
"dependencies": {
|
|
31
|
-
"
|
|
258
|
+
"zod": "^4.3.6"
|
|
32
259
|
},
|
|
33
260
|
"peerDependencies": {
|
|
34
261
|
"react": "^19.0.0",
|
|
35
262
|
"react-dom": "^19.0.0",
|
|
36
|
-
"three": "
|
|
263
|
+
"three": ">=0.186.0 <0.187.0",
|
|
264
|
+
"@volter/sdk": "0.5.213",
|
|
265
|
+
"@volter/project": "0.5.213",
|
|
266
|
+
"vite": "^6.4.3 || ^7.0.0 || ^8.0.0",
|
|
267
|
+
"@volter/live": "0.5.213",
|
|
268
|
+
"@volter/editor-blender": "0.1.152",
|
|
269
|
+
"@volter/editor-threejs": "0.5.213",
|
|
270
|
+
"@react-three/fiber": "^9.8.2",
|
|
271
|
+
"@react-three/rapier": "^2.2.0",
|
|
272
|
+
"postprocessing": "^6.39.5",
|
|
273
|
+
"@volter-ai/std": "^0.8.0"
|
|
274
|
+
},
|
|
275
|
+
"scripts": {
|
|
276
|
+
"typecheck": "tsc -p tsconfig.json",
|
|
277
|
+
"prepack": "npm run build",
|
|
278
|
+
"build": "node scripts/build-serving.mjs"
|
|
37
279
|
},
|
|
38
280
|
"publishConfig": {
|
|
39
281
|
"access": "public"
|
|
282
|
+
},
|
|
283
|
+
"devDependencies": {
|
|
284
|
+
"@volter/editor-blender": "0.1.152",
|
|
285
|
+
"@volter/editor-threejs": "0.5.213",
|
|
286
|
+
"@volter/live": "0.5.213",
|
|
287
|
+
"@volter/sdk": "0.5.213",
|
|
288
|
+
"esbuild": "0.25.12",
|
|
289
|
+
"typescript": "5.9.3"
|
|
290
|
+
},
|
|
291
|
+
"peerDependenciesMeta": {
|
|
292
|
+
"@volter/sdk": {
|
|
293
|
+
"optional": true
|
|
294
|
+
},
|
|
295
|
+
"@react-three/fiber": {
|
|
296
|
+
"optional": true
|
|
297
|
+
},
|
|
298
|
+
"@react-three/rapier": {
|
|
299
|
+
"optional": true
|
|
300
|
+
},
|
|
301
|
+
"postprocessing": {
|
|
302
|
+
"optional": true
|
|
303
|
+
},
|
|
304
|
+
"@volter-ai/std": {
|
|
305
|
+
"optional": true
|
|
306
|
+
}
|
|
40
307
|
}
|
|
41
308
|
}
|
package/serving/index.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@volter/play`'s server half (`package.json#contributes.volter.serving`): a std game's dev server as Play reaches it,
|
|
3
|
+
* and its level export's Node half (`std-dev.ts`); a std level's scene as a module of the game's own graph, which the
|
|
4
|
+
* level's document draws (`std-scene.ts`).
|
|
5
|
+
*/
|
|
6
|
+
import type { ProjectServingServices } from '@volter/sdk/session/project-serving';
|
|
7
|
+
import { stdDevPlugin } from './std-dev';
|
|
8
|
+
import { stdScenePlugin } from './std-scene';
|
|
9
|
+
|
|
10
|
+
export const servingPlugins = (services: ProjectServingServices): readonly unknown[] => [
|
|
11
|
+
stdDevPlugin(services),
|
|
12
|
+
stdScenePlugin(services),
|
|
13
|
+
];
|