@theprototype/agent 1.61.0 → 1.64.0
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/README.md +1 -1
- package/catalog.json +1232 -72
- package/package.json +1 -1
- package/src/catalog.js +15 -9
package/catalog.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"format": 2,
|
|
4
4
|
"generator": {
|
|
5
5
|
"source": "tpAgent.tools() via core scripts/agent-tool-catalog.cjs, mapped by tools/agent/src/catalog.js",
|
|
6
|
-
"hostTools":
|
|
6
|
+
"hostTools": 83,
|
|
7
7
|
"dropped": []
|
|
8
8
|
},
|
|
9
9
|
"instructions": "You are building in the person's own open theprototype.app tab: a live, shared 3D scene. Every change shows for everyone in the session and can be undone.\nThis may be a VOICE conversation: answer in one or two short spoken sentences and say what changed in plain words (\"Added three trees by the fire\"). Never read out uuids, lists of numbers or JSON.\nIf a tool says the tab is closed or not connected, tell the person to open theprototype.app and press Connect Claude, then wait; do not retry in a loop.\nCall status first: it says whether you may edit (a viewer can only look).\nWhen the person says \"undo that\" or \"take that back\", call undo_last; if it refuses, say who changed what.\nYou act as this person in their own tab: status \"you\" is them (their peer id, name and role); the other users are everyone else.\nCall list_scene before editing so you use real uuids; batch many objects into one call.\nFor \"in front of me\", call where_are_users and build at the spots it gives, facing the person (face_user: true). For \"here\" or \"this\", build at the person's latest ping: at: {ping: \"latest\"}; ask them to ping (Ctrl+Alt+click, or Ping in the menu) if they have none.\nMotion and interaction are flow nodes (create_flow_nodes); call describe_node_types before wiring edges.\nTake a screenshot after each change to check your work.\nWhen asked what you can do here, call what_can_you_do and say its \"say\" line.",
|
|
@@ -1908,10 +1908,137 @@
|
|
|
1908
1908
|
"openWorldHint": false
|
|
1909
1909
|
}
|
|
1910
1910
|
},
|
|
1911
|
+
{
|
|
1912
|
+
"name": "create_path",
|
|
1913
|
+
"title": "Add a path to walk along",
|
|
1914
|
+
"description": "Add a Path object: a line through the scene that guards patrol, animals wander along or a camera rides. Points are WORLD positions; each point may also say how long to wait there, the speed and ease of the stretch after it, jump (skip straight to the next point), an event name fired on arrival (an On Path Event node hears it) and a facing to hold while waiting. walk: loop | pingpong | once | random. Hidden in Play unless show_in_play. walkers = object uuids that walk it at once (each gets a Path patrol node). Returns the path uuid; walk it later with create_flow_nodes pathpatrol {path: \"<uuid>\", offset}.\nTake a screenshot after each change to check your work.",
|
|
1915
|
+
"inputSchema": {
|
|
1916
|
+
"type": "object",
|
|
1917
|
+
"properties": {
|
|
1918
|
+
"points": {
|
|
1919
|
+
"type": "array",
|
|
1920
|
+
"minItems": 2,
|
|
1921
|
+
"maxItems": 200,
|
|
1922
|
+
"description": "at least 2: [x,y,z] or {pos: [x,y,z], wait?, speed?, ease?, jump?, event?, facing?}",
|
|
1923
|
+
"items": {
|
|
1924
|
+
"anyOf": [
|
|
1925
|
+
{
|
|
1926
|
+
"type": "array",
|
|
1927
|
+
"items": {
|
|
1928
|
+
"type": "number"
|
|
1929
|
+
},
|
|
1930
|
+
"minItems": 3,
|
|
1931
|
+
"maxItems": 3
|
|
1932
|
+
},
|
|
1933
|
+
{
|
|
1934
|
+
"type": "object",
|
|
1935
|
+
"properties": {
|
|
1936
|
+
"pos": {
|
|
1937
|
+
"type": "array",
|
|
1938
|
+
"items": {
|
|
1939
|
+
"type": "number"
|
|
1940
|
+
},
|
|
1941
|
+
"minItems": 3,
|
|
1942
|
+
"maxItems": 3
|
|
1943
|
+
},
|
|
1944
|
+
"wait": {
|
|
1945
|
+
"type": "number",
|
|
1946
|
+
"description": "seconds to stand at this point"
|
|
1947
|
+
},
|
|
1948
|
+
"speed": {
|
|
1949
|
+
"type": "number",
|
|
1950
|
+
"description": "m/s for the stretch AFTER this point (default: the path speed)"
|
|
1951
|
+
},
|
|
1952
|
+
"ease": {
|
|
1953
|
+
"type": "string",
|
|
1954
|
+
"enum": [
|
|
1955
|
+
"linear",
|
|
1956
|
+
"in",
|
|
1957
|
+
"out",
|
|
1958
|
+
"inout"
|
|
1959
|
+
],
|
|
1960
|
+
"description": "the stretch after this point: linear, in (speed up), out (slow down), inout"
|
|
1961
|
+
},
|
|
1962
|
+
"jump": {
|
|
1963
|
+
"type": "boolean",
|
|
1964
|
+
"description": "skip straight to the next point (no walking in between)"
|
|
1965
|
+
},
|
|
1966
|
+
"event": {
|
|
1967
|
+
"type": "string",
|
|
1968
|
+
"description": "a name fired when a walker arrives here"
|
|
1969
|
+
},
|
|
1970
|
+
"facing": {
|
|
1971
|
+
"type": "number",
|
|
1972
|
+
"description": "degrees of yaw to face while waiting (0 = +Z)"
|
|
1973
|
+
}
|
|
1974
|
+
},
|
|
1975
|
+
"required": [
|
|
1976
|
+
"pos"
|
|
1977
|
+
]
|
|
1978
|
+
}
|
|
1979
|
+
]
|
|
1980
|
+
}
|
|
1981
|
+
},
|
|
1982
|
+
"walk": {
|
|
1983
|
+
"type": "string",
|
|
1984
|
+
"enum": [
|
|
1985
|
+
"loop",
|
|
1986
|
+
"pingpong",
|
|
1987
|
+
"once",
|
|
1988
|
+
"random"
|
|
1989
|
+
],
|
|
1990
|
+
"description": "default loop"
|
|
1991
|
+
},
|
|
1992
|
+
"speed": {
|
|
1993
|
+
"type": "number",
|
|
1994
|
+
"description": "m/s, default 1.5"
|
|
1995
|
+
},
|
|
1996
|
+
"closed": {
|
|
1997
|
+
"type": "boolean",
|
|
1998
|
+
"description": "join the last point back to the first (3+ points)"
|
|
1999
|
+
},
|
|
2000
|
+
"smooth": {
|
|
2001
|
+
"type": "boolean",
|
|
2002
|
+
"description": "a smooth curve through the points (default) or straight lines"
|
|
2003
|
+
},
|
|
2004
|
+
"show_in_play": {
|
|
2005
|
+
"type": "boolean",
|
|
2006
|
+
"description": "draw the line while playing (default hidden)"
|
|
2007
|
+
},
|
|
2008
|
+
"seed": {
|
|
2009
|
+
"type": "number",
|
|
2010
|
+
"description": "random walk: which random order"
|
|
2011
|
+
},
|
|
2012
|
+
"name": {
|
|
2013
|
+
"type": "string"
|
|
2014
|
+
},
|
|
2015
|
+
"walkers": {
|
|
2016
|
+
"type": "array",
|
|
2017
|
+
"items": {
|
|
2018
|
+
"type": "string"
|
|
2019
|
+
},
|
|
2020
|
+
"description": "object uuids that walk this path now"
|
|
2021
|
+
},
|
|
2022
|
+
"offset": {
|
|
2023
|
+
"type": "number",
|
|
2024
|
+
"description": "walkers: seconds between each one along the path (spreads them out)"
|
|
2025
|
+
}
|
|
2026
|
+
},
|
|
2027
|
+
"required": [
|
|
2028
|
+
"points"
|
|
2029
|
+
]
|
|
2030
|
+
},
|
|
2031
|
+
"annotations": {
|
|
2032
|
+
"title": "Add a path to walk along",
|
|
2033
|
+
"readOnlyHint": false,
|
|
2034
|
+
"destructiveHint": false,
|
|
2035
|
+
"openWorldHint": false
|
|
2036
|
+
}
|
|
2037
|
+
},
|
|
1911
2038
|
{
|
|
1912
2039
|
"name": "set_material",
|
|
1913
2040
|
"title": "Change materials and textures",
|
|
1914
|
-
"description": "Make objects look finished: colour, roughness, metalness, emissive, opacity and texture maps, on many objects in one call. Maps take a library image hash or an https URL (https only, CORS-enabled, 16 MB, PNG/JPEG/WebP/GIF/AVIF; it becomes a library item first and is re-encoded like an upload; returned in assets). cc0 fetches a free CC0 material by id or name from Poly Haven (its texture names) or ambientCG (ids like \"Wood051\", \"Bricks076\", \"Metal032\", \"Ground037\"), or by words (\"brown planks\"); preset applies a named preset: one of Wood, Metal, Plastic, Glass, Stone, Rubber, Fish scales, Neon, or one the person saved (list_materials lists them all). faces gives just those faces their own new material slot. One undo step.\nTake a screenshot after each change to check your work.",
|
|
2041
|
+
"description": "Make objects look finished: colour, roughness, metalness, emissive, opacity and texture maps, on many objects in one call. Maps take a library image hash or an https URL (https only, CORS-enabled, 16 MB, PNG/JPEG/WebP/GIF/AVIF; it becomes a library item first and is re-encoded like an upload; returned in assets). cc0 fetches a free CC0 material by id or name from Poly Haven (its texture names) or ambientCG (ids like \"Wood051\", \"Bricks076\", \"Metal032\", \"Ground037\"), or by words (\"brown planks\"); preset applies a named preset: one of Wood, Metal, Plastic, Glass, Stone, Rubber, Fish scales, Neon, Water, or one the person saved (list_materials lists them all). faces gives just those faces their own new material slot. One undo step.\nTake a screenshot after each change to check your work.",
|
|
1915
2042
|
"inputSchema": {
|
|
1916
2043
|
"type": "object",
|
|
1917
2044
|
"properties": {
|
|
@@ -2028,7 +2155,7 @@
|
|
|
2028
2155
|
},
|
|
2029
2156
|
"preset": {
|
|
2030
2157
|
"type": "string",
|
|
2031
|
-
"description": "a preset: Wood, Metal, Plastic, Glass, Stone, Rubber, Fish scales, Neon, or a saved one list_materials names"
|
|
2158
|
+
"description": "a preset: Wood, Metal, Plastic, Glass, Stone, Rubber, Fish scales, Neon, Water, or a saved one list_materials names"
|
|
2032
2159
|
},
|
|
2033
2160
|
"cc0": {
|
|
2034
2161
|
"type": "string",
|
|
@@ -2058,7 +2185,7 @@
|
|
|
2058
2185
|
{
|
|
2059
2186
|
"name": "list_materials",
|
|
2060
2187
|
"title": "Read materials",
|
|
2061
|
-
"description": "What objects wear: per object its material slots (type, colour, numbers, which maps) and shader, plus the preset names (the starters Wood, Metal, Plastic, Glass, Stone, Rubber, Fish scales, Neon, and any the person saved) and shader keys. Read this before editing.",
|
|
2188
|
+
"description": "What objects wear: per object its material slots (type, colour, numbers, which maps) and shader, plus the preset names (the starters Wood, Metal, Plastic, Glass, Stone, Rubber, Fish scales, Neon, Water, and any the person saved) and shader keys. Read this before editing.",
|
|
2062
2189
|
"inputSchema": {
|
|
2063
2190
|
"type": "object",
|
|
2064
2191
|
"properties": {
|
|
@@ -2284,7 +2411,7 @@
|
|
|
2284
2411
|
{
|
|
2285
2412
|
"name": "set_post",
|
|
2286
2413
|
"title": "Change the post effects",
|
|
2287
|
-
"description": "The scene's post effects (bloom, huesaturation, brightnesscontrast, tonemapping, vignette, grain, chromaticaberration, ao, lut, pixelation, scanlines, dotscreen, smaa; get_post lists every param). effects: [{kind, params, enabled, at, remove}], matched to what is there by id or kind, so repeating a call does not stack a second bloom; replace: true drops the rest; the stack order is the order of effect. This changes the whole scene's look: the first call returns needsConfirm and the host is asked; repeat it with confirmId. One undo step. The answer says shownHere: false with a reason when this screen does not draw post effects (reason \"quality tier\" = the device turned them off to keep its frame rate, usual on a phone: the scene keeps them; say so, and offer to ask with set_quality).\nTake a screenshot after each change to check your work.",
|
|
2414
|
+
"description": "The scene's post effects (bloom, huesaturation, brightnesscontrast, tonemapping, vignette, grain, chromaticaberration, lensflare, godrays, volumetricfog, ao, lut, pixelation, scanlines, dotscreen, antialias {method: traa | smaa} — it replaces the older smaa; get_post lists every param). effects: [{kind, params, enabled, at, remove}], matched to what is there by id or kind, so repeating a call does not stack a second bloom; replace: true drops the rest; the stack order is the order of effect. This changes the whole scene's look: the first call returns needsConfirm and the host is asked; repeat it with confirmId. One undo step. The answer says shownHere: false with a reason when this screen does not draw post effects (reason \"quality tier\" = the device turned them off to keep its frame rate, usual on a phone: the scene keeps them; say so, and offer to ask with set_quality).\nTake a screenshot after each change to check your work.",
|
|
2288
2415
|
"inputSchema": {
|
|
2289
2416
|
"type": "object",
|
|
2290
2417
|
"properties": {
|
|
@@ -2353,6 +2480,41 @@
|
|
|
2353
2480
|
"openWorldHint": false
|
|
2354
2481
|
}
|
|
2355
2482
|
},
|
|
2483
|
+
{
|
|
2484
|
+
"name": "set_look_preset",
|
|
2485
|
+
"title": "Set look preset",
|
|
2486
|
+
"description": "A pro look in one step: preset product (Product shot: studio light, clean AO, neutral tone mapping), cinematic (low sun, volumetric fog, god rays, lens flare, film grain, ACES) or stylised (bright sky, punchy colour, AgX). Sets the sky + light, exposure, tone mapping and the post effects together as ONE undo step, saved in the scene; each device draws its own share (a phone marches less fog, a headset leaves fog / god rays / lens flare out). Replaces the scene's post effects. Changes the whole scene's look: the first call returns needsConfirm and the host is asked; repeat it with confirmId.\nTake a screenshot after each change to check your work.",
|
|
2487
|
+
"inputSchema": {
|
|
2488
|
+
"type": "object",
|
|
2489
|
+
"properties": {
|
|
2490
|
+
"preset": {
|
|
2491
|
+
"type": "string",
|
|
2492
|
+
"enum": [
|
|
2493
|
+
"product",
|
|
2494
|
+
"cinematic",
|
|
2495
|
+
"stylised"
|
|
2496
|
+
]
|
|
2497
|
+
},
|
|
2498
|
+
"confirmId": {
|
|
2499
|
+
"type": "string",
|
|
2500
|
+
"description": "the id a needsConfirm answer gave: repeat the call with it to get the host's answer and apply"
|
|
2501
|
+
},
|
|
2502
|
+
"wait": {
|
|
2503
|
+
"type": "number",
|
|
2504
|
+
"description": "with confirmId: seconds to wait for the answer (up to 60)"
|
|
2505
|
+
}
|
|
2506
|
+
},
|
|
2507
|
+
"required": [
|
|
2508
|
+
"preset"
|
|
2509
|
+
]
|
|
2510
|
+
},
|
|
2511
|
+
"annotations": {
|
|
2512
|
+
"title": "Set look preset",
|
|
2513
|
+
"readOnlyHint": false,
|
|
2514
|
+
"destructiveHint": true,
|
|
2515
|
+
"openWorldHint": false
|
|
2516
|
+
}
|
|
2517
|
+
},
|
|
2356
2518
|
{
|
|
2357
2519
|
"name": "set_quality",
|
|
2358
2520
|
"title": "Ask for higher quality on this device",
|
|
@@ -2390,6 +2552,60 @@
|
|
|
2390
2552
|
"openWorldHint": false
|
|
2391
2553
|
}
|
|
2392
2554
|
},
|
|
2555
|
+
{
|
|
2556
|
+
"name": "bake_light",
|
|
2557
|
+
"title": "Bake light",
|
|
2558
|
+
"description": "Bake light (Pro look): soft shadows in corners (AO) and light bouncing off walls, worked out once for every object that does not move (no physics body that moves, no flow or clip animation) and saved with the scene — everyone sees it, it undoes as one step. do: bake (the default; runs on this device, takes seconds; asks the host first like set_post), status (read: baked?, stale = things moved since, notes such as objects with overlapping UVs that got AO only), cancel, clear (remove it), strength (light 0-3, ao 0-1). quality: draft, normal, high. Bake AFTER the layout is final; bake again when status says stale. wait: seconds to wait for the result (default 60, max 120).\nTake a screenshot after each change to check your work.",
|
|
2559
|
+
"inputSchema": {
|
|
2560
|
+
"type": "object",
|
|
2561
|
+
"properties": {
|
|
2562
|
+
"do": {
|
|
2563
|
+
"type": "string",
|
|
2564
|
+
"enum": [
|
|
2565
|
+
"bake",
|
|
2566
|
+
"status",
|
|
2567
|
+
"cancel",
|
|
2568
|
+
"clear",
|
|
2569
|
+
"strength"
|
|
2570
|
+
]
|
|
2571
|
+
},
|
|
2572
|
+
"quality": {
|
|
2573
|
+
"type": "string",
|
|
2574
|
+
"enum": [
|
|
2575
|
+
"draft",
|
|
2576
|
+
"normal",
|
|
2577
|
+
"high"
|
|
2578
|
+
]
|
|
2579
|
+
},
|
|
2580
|
+
"light": {
|
|
2581
|
+
"type": "number",
|
|
2582
|
+
"minimum": 0,
|
|
2583
|
+
"maximum": 3,
|
|
2584
|
+
"description": "do strength: bounce light strength (1 = as baked)"
|
|
2585
|
+
},
|
|
2586
|
+
"ao": {
|
|
2587
|
+
"type": "number",
|
|
2588
|
+
"minimum": 0,
|
|
2589
|
+
"maximum": 1,
|
|
2590
|
+
"description": "do strength: corner shadow strength"
|
|
2591
|
+
},
|
|
2592
|
+
"confirmId": {
|
|
2593
|
+
"type": "string",
|
|
2594
|
+
"description": "the id a needsConfirm answer gave: repeat the call with it to get the host's answer and apply"
|
|
2595
|
+
},
|
|
2596
|
+
"wait": {
|
|
2597
|
+
"type": "number",
|
|
2598
|
+
"description": "with confirmId: seconds to wait for the answer (up to 60)"
|
|
2599
|
+
}
|
|
2600
|
+
}
|
|
2601
|
+
},
|
|
2602
|
+
"annotations": {
|
|
2603
|
+
"title": "Bake light",
|
|
2604
|
+
"readOnlyHint": false,
|
|
2605
|
+
"destructiveHint": true,
|
|
2606
|
+
"openWorldHint": false
|
|
2607
|
+
}
|
|
2608
|
+
},
|
|
2393
2609
|
{
|
|
2394
2610
|
"name": "get_post",
|
|
2395
2611
|
"title": "Read the post effects",
|
|
@@ -2939,13 +3155,13 @@
|
|
|
2939
3155
|
{
|
|
2940
3156
|
"name": "set_sky",
|
|
2941
3157
|
"title": "Change the sky and fog",
|
|
2942
|
-
"description": "The sky and the air: a look preset (studio, daylight, sunset, night, classic, clearsky, meadow, sunrise, starlight, photostudio), a sky image by name (clearsky, meadow, sunrise, starlight, photostudio; a search_assets HDRI id \"cc0:polyhaven/<id>\" (fetched into the library once) or \"lib:<hash>\"; or {hash} of an HDR in the library — upload your own .hdr / .exr with assets upload; never a URL) with rotation, intensity, blur and Sky quality (auto / standard / high / max, plus a minimum), a background colour or {top, bottom} gradient, fog ({color, near, far} in metres, or {color, density}; null = none) and exposure. \"Make it night\": preset night or hdri starlight + a dark fog. Changes the whole scene's look, so the host is asked first: it answers needsConfirm, then repeat with confirmId. One undo step.\nTake a screenshot after each change to check your work.",
|
|
3158
|
+
"description": "The sky and the air: a look preset (studio, daylight, sunset, night, classic, clearsky, meadow, sunrise, starlight, photostudio, product, cinematic, stylised), a sky image by name (clearsky, meadow, sunrise, starlight, photostudio; a search_assets HDRI id \"cc0:polyhaven/<id>\" (fetched into the library once) or \"lib:<hash>\"; or {hash} of an HDR in the library — upload your own .hdr / .exr with assets upload; never a URL) with rotation, intensity, blur and Sky quality (auto / standard / high / max, plus a minimum), a background colour or {top, bottom} gradient, fog ({color, near, far} in metres, or {color, density}; null = none) and exposure. \"Make it night\": preset night or hdri starlight + a dark fog. Changes the whole scene's look, so the host is asked first: it answers needsConfirm, then repeat with confirmId. One undo step.\nTake a screenshot after each change to check your work.",
|
|
2943
3159
|
"inputSchema": {
|
|
2944
3160
|
"type": "object",
|
|
2945
3161
|
"properties": {
|
|
2946
3162
|
"preset": {
|
|
2947
3163
|
"type": "string",
|
|
2948
|
-
"description": "studio, daylight, sunset, night, classic, clearsky, meadow, sunrise, starlight, photostudio"
|
|
3164
|
+
"description": "studio, daylight, sunset, night, classic, clearsky, meadow, sunrise, starlight, photostudio, product, cinematic, stylised"
|
|
2949
3165
|
},
|
|
2950
3166
|
"hdri": {
|
|
2951
3167
|
"type": [
|
|
@@ -3329,49 +3545,409 @@
|
|
|
3329
3545
|
}
|
|
3330
3546
|
},
|
|
3331
3547
|
{
|
|
3332
|
-
"name": "
|
|
3333
|
-
"title": "
|
|
3334
|
-
"description": "
|
|
3548
|
+
"name": "set_levels",
|
|
3549
|
+
"title": "Set levels",
|
|
3550
|
+
"description": "The game's ONE Levels table: the levels in play order, each {name, scene (a project scene), spawn (an object name to start at), goal}; keep = what carries from level to level (score, inventory, health, or \"var:<name>\" for a named variable; New game resets them); unlock = all | sequential. levels replaces the list, add appends, update [{id, …}] patches, remove [ids] drops, clear: true removes the table; no field reads it. The Go to level / Next level / Finish level nodes and portals use this same table. One undo step.\nTake a screenshot after each change to check your work.",
|
|
3335
3551
|
"inputSchema": {
|
|
3336
3552
|
"type": "object",
|
|
3337
3553
|
"properties": {
|
|
3338
|
-
"
|
|
3339
|
-
"type": "
|
|
3340
|
-
"
|
|
3554
|
+
"levels": {
|
|
3555
|
+
"type": "array",
|
|
3556
|
+
"items": {
|
|
3557
|
+
"type": "object",
|
|
3558
|
+
"properties": {
|
|
3559
|
+
"id": {
|
|
3560
|
+
"type": "string",
|
|
3561
|
+
"description": "a stable id (default: from the name)"
|
|
3562
|
+
},
|
|
3563
|
+
"name": {
|
|
3564
|
+
"type": "string"
|
|
3565
|
+
},
|
|
3566
|
+
"scene": {
|
|
3567
|
+
"type": "string",
|
|
3568
|
+
"description": "a project scene name: the level is that scene"
|
|
3569
|
+
},
|
|
3570
|
+
"spawn": {
|
|
3571
|
+
"type": "string",
|
|
3572
|
+
"description": "the name of an object to start at (a Checkpoint, a Portal or any marker), in the level's scene"
|
|
3573
|
+
},
|
|
3574
|
+
"goal": {
|
|
3575
|
+
"type": "string",
|
|
3576
|
+
"description": "one line the player reads"
|
|
3577
|
+
}
|
|
3578
|
+
}
|
|
3579
|
+
}
|
|
3341
3580
|
},
|
|
3342
|
-
"
|
|
3581
|
+
"add": {
|
|
3343
3582
|
"type": "array",
|
|
3344
3583
|
"items": {
|
|
3345
|
-
"type": "
|
|
3346
|
-
"
|
|
3347
|
-
"
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
"
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3584
|
+
"type": "object",
|
|
3585
|
+
"properties": {
|
|
3586
|
+
"id": {
|
|
3587
|
+
"type": "string",
|
|
3588
|
+
"description": "a stable id (default: from the name)"
|
|
3589
|
+
},
|
|
3590
|
+
"name": {
|
|
3591
|
+
"type": "string"
|
|
3592
|
+
},
|
|
3593
|
+
"scene": {
|
|
3594
|
+
"type": "string",
|
|
3595
|
+
"description": "a project scene name: the level is that scene"
|
|
3596
|
+
},
|
|
3597
|
+
"spawn": {
|
|
3598
|
+
"type": "string",
|
|
3599
|
+
"description": "the name of an object to start at (a Checkpoint, a Portal or any marker), in the level's scene"
|
|
3600
|
+
},
|
|
3601
|
+
"goal": {
|
|
3602
|
+
"type": "string",
|
|
3603
|
+
"description": "one line the player reads"
|
|
3604
|
+
}
|
|
3605
|
+
}
|
|
3606
|
+
}
|
|
3356
3607
|
},
|
|
3357
|
-
"
|
|
3608
|
+
"update": {
|
|
3358
3609
|
"type": "array",
|
|
3359
3610
|
"items": {
|
|
3360
|
-
"type": "
|
|
3361
|
-
"
|
|
3362
|
-
"
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3611
|
+
"type": "object",
|
|
3612
|
+
"properties": {
|
|
3613
|
+
"id": {
|
|
3614
|
+
"type": "string",
|
|
3615
|
+
"description": "a stable id (default: from the name)"
|
|
3616
|
+
},
|
|
3617
|
+
"name": {
|
|
3618
|
+
"type": "string"
|
|
3619
|
+
},
|
|
3620
|
+
"scene": {
|
|
3621
|
+
"type": "string",
|
|
3622
|
+
"description": "a project scene name: the level is that scene"
|
|
3623
|
+
},
|
|
3624
|
+
"spawn": {
|
|
3625
|
+
"type": "string",
|
|
3626
|
+
"description": "the name of an object to start at (a Checkpoint, a Portal or any marker), in the level's scene"
|
|
3627
|
+
},
|
|
3628
|
+
"goal": {
|
|
3629
|
+
"type": "string",
|
|
3630
|
+
"description": "one line the player reads"
|
|
3631
|
+
}
|
|
3632
|
+
}
|
|
3633
|
+
}
|
|
3369
3634
|
},
|
|
3370
|
-
"
|
|
3371
|
-
"type": "
|
|
3372
|
-
"
|
|
3373
|
-
|
|
3374
|
-
|
|
3635
|
+
"remove": {
|
|
3636
|
+
"type": "array",
|
|
3637
|
+
"items": {
|
|
3638
|
+
"type": "string"
|
|
3639
|
+
}
|
|
3640
|
+
},
|
|
3641
|
+
"keep": {
|
|
3642
|
+
"type": "array",
|
|
3643
|
+
"items": {
|
|
3644
|
+
"type": "string"
|
|
3645
|
+
}
|
|
3646
|
+
},
|
|
3647
|
+
"unlock": {
|
|
3648
|
+
"type": "string",
|
|
3649
|
+
"enum": [
|
|
3650
|
+
"all",
|
|
3651
|
+
"sequential"
|
|
3652
|
+
]
|
|
3653
|
+
},
|
|
3654
|
+
"clear": {
|
|
3655
|
+
"type": "boolean"
|
|
3656
|
+
}
|
|
3657
|
+
}
|
|
3658
|
+
},
|
|
3659
|
+
"annotations": {
|
|
3660
|
+
"title": "Set levels",
|
|
3661
|
+
"readOnlyHint": false,
|
|
3662
|
+
"destructiveHint": true,
|
|
3663
|
+
"openWorldHint": false
|
|
3664
|
+
}
|
|
3665
|
+
},
|
|
3666
|
+
{
|
|
3667
|
+
"name": "set_portal",
|
|
3668
|
+
"title": "Set portal",
|
|
3669
|
+
"description": "A Portal: a doorway that takes the player who walks through it somewhere else, ONE player at a time. Target: level (a Levels-table row id or name), or scene (a project scene) and / or spawn (an object name to arrive at), or back: true (where they came from). transition = fade | iris | card | none (VR always fades); loading = this portal's own loading screen. New: position or at; change one: object (uuid). What the game keeps (set_levels keep) carries through. One undo step.\nTake a screenshot after each change to check your work.",
|
|
3670
|
+
"inputSchema": {
|
|
3671
|
+
"type": "object",
|
|
3672
|
+
"properties": {
|
|
3673
|
+
"position": {
|
|
3674
|
+
"type": "array",
|
|
3675
|
+
"items": {
|
|
3676
|
+
"type": "number"
|
|
3677
|
+
},
|
|
3678
|
+
"minItems": 3,
|
|
3679
|
+
"maxItems": 3,
|
|
3680
|
+
"description": "its base [x, y, z] (a new one)"
|
|
3681
|
+
},
|
|
3682
|
+
"at": {
|
|
3683
|
+
"type": "object",
|
|
3684
|
+
"description": "placement like create_objects: {ping: \"latest\"} = at the person's ping"
|
|
3685
|
+
},
|
|
3686
|
+
"yaw": {
|
|
3687
|
+
"type": "number",
|
|
3688
|
+
"description": "turn in radians; its arrow points -Z at 0 (arriving players face the arrow)"
|
|
3689
|
+
},
|
|
3690
|
+
"face_user": {
|
|
3691
|
+
"type": "boolean"
|
|
3692
|
+
},
|
|
3693
|
+
"name": {
|
|
3694
|
+
"type": "string"
|
|
3695
|
+
},
|
|
3696
|
+
"object": {
|
|
3697
|
+
"type": "string",
|
|
3698
|
+
"description": "uuid of an existing one to change (leave out to place a new one)"
|
|
3699
|
+
},
|
|
3700
|
+
"show": {
|
|
3701
|
+
"type": "boolean",
|
|
3702
|
+
"description": "false = invisible in Play (still works): a trigger inside your own doorway"
|
|
3703
|
+
},
|
|
3704
|
+
"level": {
|
|
3705
|
+
"type": "string"
|
|
3706
|
+
},
|
|
3707
|
+
"scene": {
|
|
3708
|
+
"type": "string"
|
|
3709
|
+
},
|
|
3710
|
+
"spawn": {
|
|
3711
|
+
"type": "string"
|
|
3712
|
+
},
|
|
3713
|
+
"back": {
|
|
3714
|
+
"type": "boolean"
|
|
3715
|
+
},
|
|
3716
|
+
"transition": {
|
|
3717
|
+
"type": "string",
|
|
3718
|
+
"enum": [
|
|
3719
|
+
"fade",
|
|
3720
|
+
"iris",
|
|
3721
|
+
"card",
|
|
3722
|
+
"none"
|
|
3723
|
+
]
|
|
3724
|
+
},
|
|
3725
|
+
"loading": {
|
|
3726
|
+
"type": [
|
|
3727
|
+
"object",
|
|
3728
|
+
"null"
|
|
3729
|
+
],
|
|
3730
|
+
"properties": {
|
|
3731
|
+
"preset": {
|
|
3732
|
+
"type": "string",
|
|
3733
|
+
"enum": [
|
|
3734
|
+
"fade",
|
|
3735
|
+
"bar",
|
|
3736
|
+
"logo",
|
|
3737
|
+
"image",
|
|
3738
|
+
"item"
|
|
3739
|
+
]
|
|
3740
|
+
},
|
|
3741
|
+
"background": {
|
|
3742
|
+
"type": "string",
|
|
3743
|
+
"description": "#rrggbb"
|
|
3744
|
+
},
|
|
3745
|
+
"image": {
|
|
3746
|
+
"type": "string",
|
|
3747
|
+
"description": "an image URL or library item (the image preset)"
|
|
3748
|
+
},
|
|
3749
|
+
"logo": {
|
|
3750
|
+
"type": "string"
|
|
3751
|
+
},
|
|
3752
|
+
"textColor": {
|
|
3753
|
+
"type": "string"
|
|
3754
|
+
},
|
|
3755
|
+
"bar": {
|
|
3756
|
+
"type": "object",
|
|
3757
|
+
"properties": {
|
|
3758
|
+
"style": {
|
|
3759
|
+
"type": "string",
|
|
3760
|
+
"enum": [
|
|
3761
|
+
"thin",
|
|
3762
|
+
"thick"
|
|
3763
|
+
]
|
|
3764
|
+
},
|
|
3765
|
+
"color": {
|
|
3766
|
+
"type": "string"
|
|
3767
|
+
}
|
|
3768
|
+
}
|
|
3769
|
+
},
|
|
3770
|
+
"tips": {
|
|
3771
|
+
"type": "array",
|
|
3772
|
+
"items": {
|
|
3773
|
+
"type": "string"
|
|
3774
|
+
}
|
|
3775
|
+
},
|
|
3776
|
+
"title": {
|
|
3777
|
+
"type": "string"
|
|
3778
|
+
}
|
|
3779
|
+
}
|
|
3780
|
+
}
|
|
3781
|
+
}
|
|
3782
|
+
},
|
|
3783
|
+
"annotations": {
|
|
3784
|
+
"title": "Set portal",
|
|
3785
|
+
"readOnlyHint": false,
|
|
3786
|
+
"destructiveHint": true,
|
|
3787
|
+
"openWorldHint": false
|
|
3788
|
+
}
|
|
3789
|
+
},
|
|
3790
|
+
{
|
|
3791
|
+
"name": "set_checkpoint",
|
|
3792
|
+
"title": "Set checkpoint",
|
|
3793
|
+
"description": "A Checkpoint pad: stepping on it saves THAT player's progress there; after a fall (or Back to checkpoint, or reloading an exported game) they come back to it. New: position or at; change one: object (uuid). label = what the flash says. One undo step.\nTake a screenshot after each change to check your work.",
|
|
3794
|
+
"inputSchema": {
|
|
3795
|
+
"type": "object",
|
|
3796
|
+
"properties": {
|
|
3797
|
+
"position": {
|
|
3798
|
+
"type": "array",
|
|
3799
|
+
"items": {
|
|
3800
|
+
"type": "number"
|
|
3801
|
+
},
|
|
3802
|
+
"minItems": 3,
|
|
3803
|
+
"maxItems": 3,
|
|
3804
|
+
"description": "its base [x, y, z] (a new one)"
|
|
3805
|
+
},
|
|
3806
|
+
"at": {
|
|
3807
|
+
"type": "object",
|
|
3808
|
+
"description": "placement like create_objects: {ping: \"latest\"} = at the person's ping"
|
|
3809
|
+
},
|
|
3810
|
+
"yaw": {
|
|
3811
|
+
"type": "number",
|
|
3812
|
+
"description": "turn in radians; its arrow points -Z at 0 (arriving players face the arrow)"
|
|
3813
|
+
},
|
|
3814
|
+
"face_user": {
|
|
3815
|
+
"type": "boolean"
|
|
3816
|
+
},
|
|
3817
|
+
"name": {
|
|
3818
|
+
"type": "string"
|
|
3819
|
+
},
|
|
3820
|
+
"object": {
|
|
3821
|
+
"type": "string",
|
|
3822
|
+
"description": "uuid of an existing one to change (leave out to place a new one)"
|
|
3823
|
+
},
|
|
3824
|
+
"label": {
|
|
3825
|
+
"type": "string"
|
|
3826
|
+
},
|
|
3827
|
+
"show": {
|
|
3828
|
+
"type": "boolean",
|
|
3829
|
+
"description": "false = no message when reached (it still saves)"
|
|
3830
|
+
}
|
|
3831
|
+
}
|
|
3832
|
+
},
|
|
3833
|
+
"annotations": {
|
|
3834
|
+
"title": "Set checkpoint",
|
|
3835
|
+
"readOnlyHint": false,
|
|
3836
|
+
"destructiveHint": true,
|
|
3837
|
+
"openWorldHint": false
|
|
3838
|
+
}
|
|
3839
|
+
},
|
|
3840
|
+
{
|
|
3841
|
+
"name": "set_loading",
|
|
3842
|
+
"title": "Set loading",
|
|
3843
|
+
"description": "The loading screen every level change shows (only when the load takes a moment; at least 0.4 s once shown): preset fade | bar | logo | image | item, background, image, logo, bar {style, color}, tips (lines that rotate), title; clear: true = the default bar. Fields you leave out stay. Needs a Levels table (set_levels). No field reads it. One undo step.\nTake a screenshot after each change to check your work.",
|
|
3844
|
+
"inputSchema": {
|
|
3845
|
+
"type": "object",
|
|
3846
|
+
"properties": {
|
|
3847
|
+
"preset": {
|
|
3848
|
+
"type": "string",
|
|
3849
|
+
"enum": [
|
|
3850
|
+
"fade",
|
|
3851
|
+
"bar",
|
|
3852
|
+
"logo",
|
|
3853
|
+
"image",
|
|
3854
|
+
"item"
|
|
3855
|
+
]
|
|
3856
|
+
},
|
|
3857
|
+
"background": {
|
|
3858
|
+
"type": "string",
|
|
3859
|
+
"description": "#rrggbb"
|
|
3860
|
+
},
|
|
3861
|
+
"image": {
|
|
3862
|
+
"type": "string",
|
|
3863
|
+
"description": "an image URL or library item (the image preset)"
|
|
3864
|
+
},
|
|
3865
|
+
"logo": {
|
|
3866
|
+
"type": "string"
|
|
3867
|
+
},
|
|
3868
|
+
"textColor": {
|
|
3869
|
+
"type": "string"
|
|
3870
|
+
},
|
|
3871
|
+
"bar": {
|
|
3872
|
+
"type": "object",
|
|
3873
|
+
"properties": {
|
|
3874
|
+
"style": {
|
|
3875
|
+
"type": "string",
|
|
3876
|
+
"enum": [
|
|
3877
|
+
"thin",
|
|
3878
|
+
"thick"
|
|
3879
|
+
]
|
|
3880
|
+
},
|
|
3881
|
+
"color": {
|
|
3882
|
+
"type": "string"
|
|
3883
|
+
}
|
|
3884
|
+
}
|
|
3885
|
+
},
|
|
3886
|
+
"tips": {
|
|
3887
|
+
"type": "array",
|
|
3888
|
+
"items": {
|
|
3889
|
+
"type": "string"
|
|
3890
|
+
}
|
|
3891
|
+
},
|
|
3892
|
+
"title": {
|
|
3893
|
+
"type": "string"
|
|
3894
|
+
},
|
|
3895
|
+
"clear": {
|
|
3896
|
+
"type": "boolean"
|
|
3897
|
+
}
|
|
3898
|
+
}
|
|
3899
|
+
},
|
|
3900
|
+
"annotations": {
|
|
3901
|
+
"title": "Set loading",
|
|
3902
|
+
"readOnlyHint": false,
|
|
3903
|
+
"destructiveHint": true,
|
|
3904
|
+
"openWorldHint": false
|
|
3905
|
+
}
|
|
3906
|
+
},
|
|
3907
|
+
{
|
|
3908
|
+
"name": "search_assets",
|
|
3909
|
+
"title": "Find assets",
|
|
3910
|
+
"description": "Find assets to build with, by words and kind: models and prefabs to place, sounds, images, CC0 materials and HDRIs. Searches the shared library, the packs (models, and the sounds of the sound packs: pack:<name>/<file>), your prefabs and Poly Haven. Each result has an id, name, kind, source, licence, size when known, and how to use it. Read-only.",
|
|
3911
|
+
"inputSchema": {
|
|
3912
|
+
"type": "object",
|
|
3913
|
+
"properties": {
|
|
3914
|
+
"query": {
|
|
3915
|
+
"type": "string",
|
|
3916
|
+
"description": "words, e.g. \"pine tree\", \"wooden crate\", \"campfire crackle\"; empty lists everything of the kinds"
|
|
3917
|
+
},
|
|
3918
|
+
"kinds": {
|
|
3919
|
+
"type": "array",
|
|
3920
|
+
"items": {
|
|
3921
|
+
"type": "string",
|
|
3922
|
+
"enum": [
|
|
3923
|
+
"model",
|
|
3924
|
+
"material",
|
|
3925
|
+
"hdri",
|
|
3926
|
+
"sound",
|
|
3927
|
+
"image",
|
|
3928
|
+
"prefab"
|
|
3929
|
+
]
|
|
3930
|
+
},
|
|
3931
|
+
"description": "default all"
|
|
3932
|
+
},
|
|
3933
|
+
"sources": {
|
|
3934
|
+
"type": "array",
|
|
3935
|
+
"items": {
|
|
3936
|
+
"type": "string",
|
|
3937
|
+
"enum": [
|
|
3938
|
+
"library",
|
|
3939
|
+
"packs",
|
|
3940
|
+
"prefabs",
|
|
3941
|
+
"cc0"
|
|
3942
|
+
]
|
|
3943
|
+
},
|
|
3944
|
+
"description": "default all"
|
|
3945
|
+
},
|
|
3946
|
+
"limit": {
|
|
3947
|
+
"type": "integer",
|
|
3948
|
+
"minimum": 1,
|
|
3949
|
+
"maximum": 40,
|
|
3950
|
+
"description": "default 12"
|
|
3375
3951
|
}
|
|
3376
3952
|
}
|
|
3377
3953
|
},
|
|
@@ -4255,7 +4831,7 @@
|
|
|
4255
4831
|
{
|
|
4256
4832
|
"name": "logs",
|
|
4257
4833
|
"title": "Read the recent log",
|
|
4258
|
-
"description": "The page's recent log: errors, warnings, console lines and the toasts people saw, oldest first. Pass since (the \"now\" of the previous answer) for only what is new. status shows the newest few.",
|
|
4834
|
+
"description": "The page's recent log: errors, warnings, console lines, Announce lines (scope announce: in Edit an Announce node draws no banner, its line lands here with the node that said it) and the toasts people saw, oldest first. Pass since (the \"now\" of the previous answer) for only what is new. status shows the newest few.",
|
|
4259
4835
|
"inputSchema": {
|
|
4260
4836
|
"type": "object",
|
|
4261
4837
|
"properties": {
|
|
@@ -4365,6 +4941,42 @@
|
|
|
4365
4941
|
"openWorldHint": false
|
|
4366
4942
|
}
|
|
4367
4943
|
},
|
|
4944
|
+
{
|
|
4945
|
+
"name": "take_photo",
|
|
4946
|
+
"title": "Take a path-traced photo of the view",
|
|
4947
|
+
"description": "A PHOTO of the person's current view: a path-traced still (soft shadows, real reflections and glass), rendered in their tab while they keep working; their view never moves. It takes seconds to a minute: samples (1-2048, default 256) or seconds (2-600, default 60), whichever comes first. On a Quest or a weak phone a PC in the session renders it; with no PC it is a normal still and the answer says why. Post effects, flat text, particles and your own GLSL are not in a photo (notShown lists what was left out). save: true also files the PNG in the Library under Scene shots. Use it when the person asks for a photo, a render or a nice picture of the scene; for checking your work use screenshot.\nTake a screenshot after each change to check your work.",
|
|
4948
|
+
"inputSchema": {
|
|
4949
|
+
"type": "object",
|
|
4950
|
+
"properties": {
|
|
4951
|
+
"samples": {
|
|
4952
|
+
"type": "integer",
|
|
4953
|
+
"minimum": 1,
|
|
4954
|
+
"maximum": 2048,
|
|
4955
|
+
"description": "path-tracing samples (more = cleaner, slower; default 256)"
|
|
4956
|
+
},
|
|
4957
|
+
"seconds": {
|
|
4958
|
+
"type": "number",
|
|
4959
|
+
"minimum": 2,
|
|
4960
|
+
"maximum": 600,
|
|
4961
|
+
"description": "time limit in seconds (default 60)"
|
|
4962
|
+
},
|
|
4963
|
+
"denoise": {
|
|
4964
|
+
"type": "boolean",
|
|
4965
|
+
"description": "smooth the remaining noise (default true)"
|
|
4966
|
+
},
|
|
4967
|
+
"save": {
|
|
4968
|
+
"type": "boolean",
|
|
4969
|
+
"description": "also save the PNG to the Library under Scene shots/<scene> (default false)"
|
|
4970
|
+
}
|
|
4971
|
+
}
|
|
4972
|
+
},
|
|
4973
|
+
"annotations": {
|
|
4974
|
+
"title": "Take a path-traced photo of the view",
|
|
4975
|
+
"readOnlyHint": false,
|
|
4976
|
+
"destructiveHint": false,
|
|
4977
|
+
"openWorldHint": false
|
|
4978
|
+
}
|
|
4979
|
+
},
|
|
4368
4980
|
{
|
|
4369
4981
|
"name": "create_flow_nodes",
|
|
4370
4982
|
"title": "Add behaviour (flow) nodes",
|
|
@@ -4395,7 +5007,7 @@
|
|
|
4395
5007
|
},
|
|
4396
5008
|
"data": {
|
|
4397
5009
|
"type": "object",
|
|
4398
|
-
"description": "node params, e.g. spin {axis:\"y\",speed:2}; bounce {amplitude:0.5,speed:2}; pathpatrol {points:[[x,y,z],…]
|
|
5010
|
+
"description": "node params, e.g. spin {axis:\"y\",speed:2}; bounce {amplitude:0.5,speed:2}; pathpatrol {path:\"<Path object uuid from create_path>\", offset:0, face:true} (walks the Path: its waits/speeds/events live on the Path; legacy {points:[[x,y,z],…], speed, mode} still works); onpathevent {path, event} fires when a walker arrives at a point carrying that event; setcolor {color:\"#ff0000\"}; latch {initial:false}; delay {seconds:3}; sequence {delay1:0,delay2:0.5,delay3:0.5,delay4:0.5} (delays are CUMULATIVE). Omit for defaults."
|
|
4399
5011
|
}
|
|
4400
5012
|
},
|
|
4401
5013
|
"required": [
|
|
@@ -4518,7 +5130,7 @@
|
|
|
4518
5130
|
{
|
|
4519
5131
|
"name": "create_behaviour",
|
|
4520
5132
|
"title": "Add a code behaviour",
|
|
4521
|
-
"description": "Create a code behaviour: game logic (rules, waves, scoring, timers, win/lose) as ONE JavaScript module, run on the session authority and replicated. Prefer it over large node graphs for game rules. Linted before it is applied; problems come back with line numbers. The result names the node id and its sockets — wire them with create_flow_nodes (an On Click / On Enter into an input; an output into HUD Text, Visibility, Announce…).\nBEHAVIOURS (create_behaviour / edit_behaviour): game logic as ONE JavaScript module, run on ONE peer (the session authority); `state` replicates to everyone.\nexport default behaviour({ name, params: {k: literal | {value, min, max, step, unit}}, state: {plain JSON}, inputs: [names], outputs: [names], on: {event(payload) {...}}, ...methods });\ninputs: a trigger wired into input \"x\" runs on.x. outputs: a state field = a value output, any other name = an event fired by this.emit(\"name\").\nA behaviour does NOT move, rotate, recolour or hide objects (no such this.*): it drives effect nodes (spin, visibility, setcolor…) via its outputs. NO per-frame hook (no onTick/update): repeat with this.after(seconds, \"method\").\nthis: params, state, kit (also bare `kit`), after(seconds, \"method\", ...args) (survives the host leaving; counts PLAY time — it holds while the game is paused), cancel(key), rand(), randInt(a,b), pick(list), now(), find(glob) / findAll(glob) -> {uuid, name, pos, tags}, object, log() — always as this.find(…) etc. (only `kit` and the helpers are bare). Helpers: dist(a,b), clamp, lerp.\nevents: load (runs on EVERY peer when the behaviour loads — local, state read-only: register things there), start (once, on the authority); grabRequest({piece, distance, hand, refuse}) (runs on the grabbing peer, read-only: call refuse(reason)); any kit event as \"piece.event\" or roundStart, go, won, lost, paused, resumed, menu, levelSelected, scored, collected, allCollected, spawned, despawned, emptied, damaged, healed, died, revived, stuck, grabRefused. Entity payloads have entity.is(glob), entity.hasTag(t).\nkit calls: kit.round.start/win(reason)/lose(reason), kit.score.add(n), kit.spawner.spawn({kind, template: uuid, at, count, hp, mover: {speed}}), kit.health.damage(id, n), kit.mover.chase(kind, \"nearestPlayer\"), kit.rules.set({reach, jump}), kit.pickups.register({id, score, respawn, radius}) — register pickups in on.load (every peer must know them, or touching one does nothing), never in start.\nForbidden (the load is refused): Math.random, Date / Date.now, performance.now, localStorage, document/window/globalThis, fetch, eval, setTimeout/setInterval, import. Unknown this.* members, unknown events and hook-named methods nothing calls are refused too.\nEXAMPLE (passes the lint; wire a trigger into input gemTouched, output left into a HUD Text, timeUp into a Visibility or Announce):\nexport default behaviour({\n name: 'Countdown',\n params: { seconds: 30 },\n state: { left: 30, found: 0 },\n inputs: ['gemTouched'],\n outputs: ['left', 'found', 'timeUp'],\n on: {\n start() { this.state.left = this.params.seconds; this.after(1, 'tick'); },\n gemTouched() { this.state.found += 1; }\n },\n tick() {\n this.state.left -= 1;\n if (this.state.left > 0) this.after(1, 'tick');\n else this.emit('timeUp');\n }\n});\nTake a screenshot after each change to check your work.",
|
|
5133
|
+
"description": "Create a code behaviour: game logic (rules, waves, scoring, timers, win/lose) as ONE JavaScript module, run on the session authority and replicated. Prefer it over large node graphs for game rules. Linted before it is applied; problems come back with line numbers. The result names the node id and its sockets — wire them with create_flow_nodes (an On Click / On Enter into an input; an output into HUD Text, Visibility, Announce…).\nBEHAVIOURS (create_behaviour / edit_behaviour): game logic as ONE JavaScript module, run on ONE peer (the session authority); `state` replicates to everyone.\nexport default behaviour({ name, params: {k: literal | {value, min, max, step, unit}}, state: {plain JSON}, inputs: [names], outputs: [names], on: {event(payload) {...}}, ...methods });\ninputs: a trigger wired into input \"x\" runs on.x. outputs: a state field = a value output, any other name = an event fired by this.emit(\"name\").\nA behaviour does NOT move, rotate, recolour or hide objects (no such this.*): it drives effect nodes (spin, visibility, setcolor…) via its outputs. NO per-frame hook (no onTick/update): repeat with this.after(seconds, \"method\").\nthis: params, state, kit (also bare `kit`), after(seconds, \"method\", ...args) (survives the host leaving; counts PLAY time — it holds while the game is paused), cancel(key), rand(), randInt(a,b), pick(list), now(), find(glob) / findAll(glob) -> {uuid, name, pos, tags}, object, log() — always as this.find(…) etc. (only `kit` and the helpers are bare). Helpers: dist(a,b), clamp, lerp.\nevents: load (runs on EVERY peer when the behaviour loads — local, state read-only: register things there), start (once, on the authority); grabRequest({piece, distance, hand, refuse}) (runs on the grabbing peer, read-only: call refuse(reason)); any kit event as \"piece.event\" or roundStart, go, won, lost, paused, resumed, menu, levelSelected, scored, collected, allCollected, spawned, despawned, emptied, damaged, healed, died, revived, stuck, grabRefused. Entity payloads have entity.is(glob), entity.hasTag(t).\nkit calls: kit.round.start/win(reason)/lose(reason), kit.score.add(n), kit.spawner.spawn({kind, template: uuid, at, count, hp, mover: {speed}}), kit.health.damage(id, n), kit.mover.chase(kind, \"nearestPlayer\"), kit.rules.set({reach, jump}), kit.pickups.register({id, score, respawn, radius}) — register pickups in on.load (every peer must know them, or touching one does nothing), never in start.\nA handler that throws is rolled back (state, after() timers, emits; kit calls already sent stay) and its error names the handler. A refused kit call answers {refused: true, reason}.\nForbidden (the load is refused): Math.random, Date / Date.now, performance.now, localStorage, document/window/globalThis, fetch, eval, setTimeout/setInterval, import. Unknown this.* members, unknown events and hook-named methods nothing calls are refused too.\nEXAMPLE (passes the lint; wire a trigger into input gemTouched, output left into a HUD Text, timeUp into a Visibility or Announce):\nexport default behaviour({\n name: 'Countdown',\n params: { seconds: 30 },\n state: { left: 30, found: 0 },\n inputs: ['gemTouched'],\n outputs: ['left', 'found', 'timeUp'],\n on: {\n start() { this.state.left = this.params.seconds; this.after(1, 'tick'); },\n gemTouched() { this.state.found += 1; }\n },\n tick() {\n this.state.left -= 1;\n if (this.state.left > 0) this.after(1, 'tick');\n else this.emit('timeUp');\n }\n});\nTake a screenshot after each change to check your work.",
|
|
4522
5134
|
"inputSchema": {
|
|
4523
5135
|
"type": "object",
|
|
4524
5136
|
"properties": {
|
|
@@ -4623,7 +5235,7 @@
|
|
|
4623
5235
|
},
|
|
4624
5236
|
"sensor": {
|
|
4625
5237
|
"type": "boolean",
|
|
4626
|
-
"description": "true = a trigger volume: no collision response, fires On Enter/On Exit nodes"
|
|
5238
|
+
"description": "true = a trigger volume: no collision response, fires On Enter/On Exit nodes — for bodies AND for the player walking in (on every peer; set the node's who: player to react only to players)"
|
|
4627
5239
|
},
|
|
4628
5240
|
"group": {
|
|
4629
5241
|
"type": "string",
|
|
@@ -5500,6 +6112,7 @@
|
|
|
5500
6112
|
"mesh": "create_mesh",
|
|
5501
6113
|
"text": "create_text",
|
|
5502
6114
|
"import": "import_shape",
|
|
6115
|
+
"path": "create_path",
|
|
5503
6116
|
"shapes": "create_shapes"
|
|
5504
6117
|
},
|
|
5505
6118
|
"edit_shape": {
|
|
@@ -5526,12 +6139,15 @@
|
|
|
5526
6139
|
"sky": "set_sky",
|
|
5527
6140
|
"light": "set_light",
|
|
5528
6141
|
"environment": "get_environment",
|
|
5529
|
-
"quality": "set_quality"
|
|
6142
|
+
"quality": "set_quality",
|
|
6143
|
+
"preset": "set_look_preset",
|
|
6144
|
+
"bake": "bake_light"
|
|
5530
6145
|
},
|
|
5531
6146
|
"run": {
|
|
5532
6147
|
"inspect": "inspect_runtime",
|
|
5533
6148
|
"validate": "validate_scene",
|
|
5534
|
-
"logs": "logs"
|
|
6149
|
+
"logs": "logs",
|
|
6150
|
+
"photo": "take_photo"
|
|
5535
6151
|
},
|
|
5536
6152
|
"assets": {
|
|
5537
6153
|
"search": "search_assets",
|
|
@@ -5557,7 +6173,11 @@
|
|
|
5557
6173
|
},
|
|
5558
6174
|
"game_setup": {
|
|
5559
6175
|
"spawn": "place_spawn",
|
|
5560
|
-
"play_camera": "set_play_camera"
|
|
6176
|
+
"play_camera": "set_play_camera",
|
|
6177
|
+
"levels": "set_levels",
|
|
6178
|
+
"portal": "set_portal",
|
|
6179
|
+
"checkpoint": "set_checkpoint",
|
|
6180
|
+
"loading": "set_loading"
|
|
5561
6181
|
}
|
|
5562
6182
|
},
|
|
5563
6183
|
"tools": [
|
|
@@ -6289,7 +6909,7 @@
|
|
|
6289
6909
|
{
|
|
6290
6910
|
"name": "create_shape",
|
|
6291
6911
|
"title": "Make a shape",
|
|
6292
|
-
"description": "Make shapes the basic objects cannot: a lathe (a vase, a bowl, a lamp from a profile turned around an axis), a tube along a path (a rail, a pipe, a cable), an extruded outline (a sign, a star, a wall with a hole), a mesh from your own vertices (anything else), or text = 3D words (a sign, a title: flat, or solid with depth and a bevel; any bundled or Google Fonts font); import = a glTF / GLB / OBJ model file (base64, chunks or an https url) whose named parts come back as children animate_parts can move.\nCall it as {\"action\": \"lathe\", \"lathe\": {…its fields…}}; each action's fields and limits are in its object below.\nMany at once: {\"shapes\": [{\"action\": \"lathe\", \"lathe\": {…}}, …]} with no action — one call, one undo step.\nTake a screenshot after each change to check your work.",
|
|
6912
|
+
"description": "Make shapes the basic objects cannot: a lathe (a vase, a bowl, a lamp from a profile turned around an axis), a tube along a path (a rail, a pipe, a cable), an extruded outline (a sign, a star, a wall with a hole), a mesh from your own vertices (anything else), or text = 3D words (a sign, a title: flat, or solid with depth and a bevel; any bundled or Google Fonts font); path = a Path object guards patrol along (points with waits, speeds, jumps and events; walkers walk it at once); import = a glTF / GLB / OBJ model file (base64, chunks or an https url) whose named parts come back as children animate_parts can move.\nCall it as {\"action\": \"lathe\", \"lathe\": {…its fields…}}; each action's fields and limits are in its object below.\nMany at once: {\"shapes\": [{\"action\": \"lathe\", \"lathe\": {…}}, …]} with no action — one call, one undo step.\nTake a screenshot after each change to check your work.",
|
|
6293
6913
|
"inputSchema": {
|
|
6294
6914
|
"type": "object",
|
|
6295
6915
|
"properties": {
|
|
@@ -6301,7 +6921,8 @@
|
|
|
6301
6921
|
"extrude",
|
|
6302
6922
|
"mesh",
|
|
6303
6923
|
"text",
|
|
6304
|
-
"import"
|
|
6924
|
+
"import",
|
|
6925
|
+
"path"
|
|
6305
6926
|
],
|
|
6306
6927
|
"description": "What to do. Put its fields in the object named after the action."
|
|
6307
6928
|
},
|
|
@@ -6971,12 +7592,129 @@
|
|
|
6971
7592
|
},
|
|
6972
7593
|
"description": "Bring in a 3D model file: glTF 2.0 (.glb, or .gltf JSON with everything embedded) or Wavefront .obj, as data (base64; for a big file send chunk: {id, index, total} parts, each a multiple of 4 base64 characters) or an https url (public addresses only, ≤ 25 MB; the file is copied into the library first, so the scene never needs the address again). Named sub-meshes become named children, returned in parts with uuids, so animate_parts can move them (a lid, a wheel, a door). position / rotation (radians) / scale as create_objects; with parentUuid they are the group's own space. castShadow / receiveShadow apply to every mesh in it. A model is data: nothing in it runs, and a file that points at outside files is refused. One undo step; everyone sees it."
|
|
6973
7594
|
},
|
|
6974
|
-
"
|
|
6975
|
-
"type": "
|
|
6976
|
-
"
|
|
6977
|
-
|
|
6978
|
-
|
|
6979
|
-
|
|
7595
|
+
"path": {
|
|
7596
|
+
"type": "object",
|
|
7597
|
+
"properties": {
|
|
7598
|
+
"points": {
|
|
7599
|
+
"type": "array",
|
|
7600
|
+
"minItems": 2,
|
|
7601
|
+
"maxItems": 200,
|
|
7602
|
+
"description": "at least 2: [x,y,z] or {pos: [x,y,z], wait?, speed?, ease?, jump?, event?, facing?}",
|
|
7603
|
+
"items": {
|
|
7604
|
+
"anyOf": [
|
|
7605
|
+
{
|
|
7606
|
+
"type": "array",
|
|
7607
|
+
"items": {
|
|
7608
|
+
"type": "number"
|
|
7609
|
+
},
|
|
7610
|
+
"minItems": 3,
|
|
7611
|
+
"maxItems": 3
|
|
7612
|
+
},
|
|
7613
|
+
{
|
|
7614
|
+
"type": "object",
|
|
7615
|
+
"properties": {
|
|
7616
|
+
"pos": {
|
|
7617
|
+
"type": "array",
|
|
7618
|
+
"items": {
|
|
7619
|
+
"type": "number"
|
|
7620
|
+
},
|
|
7621
|
+
"minItems": 3,
|
|
7622
|
+
"maxItems": 3
|
|
7623
|
+
},
|
|
7624
|
+
"wait": {
|
|
7625
|
+
"type": "number",
|
|
7626
|
+
"description": "seconds to stand at this point"
|
|
7627
|
+
},
|
|
7628
|
+
"speed": {
|
|
7629
|
+
"type": "number",
|
|
7630
|
+
"description": "m/s for the stretch AFTER this point (default: the path speed)"
|
|
7631
|
+
},
|
|
7632
|
+
"ease": {
|
|
7633
|
+
"type": "string",
|
|
7634
|
+
"enum": [
|
|
7635
|
+
"linear",
|
|
7636
|
+
"in",
|
|
7637
|
+
"out",
|
|
7638
|
+
"inout"
|
|
7639
|
+
],
|
|
7640
|
+
"description": "the stretch after this point: linear, in (speed up), out (slow down), inout"
|
|
7641
|
+
},
|
|
7642
|
+
"jump": {
|
|
7643
|
+
"type": "boolean",
|
|
7644
|
+
"description": "skip straight to the next point (no walking in between)"
|
|
7645
|
+
},
|
|
7646
|
+
"event": {
|
|
7647
|
+
"type": "string",
|
|
7648
|
+
"description": "a name fired when a walker arrives here"
|
|
7649
|
+
},
|
|
7650
|
+
"facing": {
|
|
7651
|
+
"type": "number",
|
|
7652
|
+
"description": "degrees of yaw to face while waiting (0 = +Z)"
|
|
7653
|
+
}
|
|
7654
|
+
},
|
|
7655
|
+
"required": [
|
|
7656
|
+
"pos"
|
|
7657
|
+
]
|
|
7658
|
+
}
|
|
7659
|
+
]
|
|
7660
|
+
}
|
|
7661
|
+
},
|
|
7662
|
+
"walk": {
|
|
7663
|
+
"type": "string",
|
|
7664
|
+
"enum": [
|
|
7665
|
+
"loop",
|
|
7666
|
+
"pingpong",
|
|
7667
|
+
"once",
|
|
7668
|
+
"random"
|
|
7669
|
+
],
|
|
7670
|
+
"description": "default loop"
|
|
7671
|
+
},
|
|
7672
|
+
"speed": {
|
|
7673
|
+
"type": "number",
|
|
7674
|
+
"description": "m/s, default 1.5"
|
|
7675
|
+
},
|
|
7676
|
+
"closed": {
|
|
7677
|
+
"type": "boolean",
|
|
7678
|
+
"description": "join the last point back to the first (3+ points)"
|
|
7679
|
+
},
|
|
7680
|
+
"smooth": {
|
|
7681
|
+
"type": "boolean",
|
|
7682
|
+
"description": "a smooth curve through the points (default) or straight lines"
|
|
7683
|
+
},
|
|
7684
|
+
"show_in_play": {
|
|
7685
|
+
"type": "boolean",
|
|
7686
|
+
"description": "draw the line while playing (default hidden)"
|
|
7687
|
+
},
|
|
7688
|
+
"seed": {
|
|
7689
|
+
"type": "number",
|
|
7690
|
+
"description": "random walk: which random order"
|
|
7691
|
+
},
|
|
7692
|
+
"name": {
|
|
7693
|
+
"type": "string"
|
|
7694
|
+
},
|
|
7695
|
+
"walkers": {
|
|
7696
|
+
"type": "array",
|
|
7697
|
+
"items": {
|
|
7698
|
+
"type": "string"
|
|
7699
|
+
},
|
|
7700
|
+
"description": "object uuids that walk this path now"
|
|
7701
|
+
},
|
|
7702
|
+
"offset": {
|
|
7703
|
+
"type": "number",
|
|
7704
|
+
"description": "walkers: seconds between each one along the path (spreads them out)"
|
|
7705
|
+
}
|
|
7706
|
+
},
|
|
7707
|
+
"required": [
|
|
7708
|
+
"points"
|
|
7709
|
+
],
|
|
7710
|
+
"description": "Add a Path object: a line through the scene that guards patrol, animals wander along or a camera rides. Points are WORLD positions; each point may also say how long to wait there, the speed and ease of the stretch after it, jump (skip straight to the next point), an event name fired on arrival (an On Path Event node hears it) and a facing to hold while waiting. walk: loop | pingpong | once | random. Hidden in Play unless show_in_play. walkers = object uuids that walk it at once (each gets a Path patrol node). Returns the path uuid; walk it later with create_flow_nodes pathpatrol {path: \"<uuid>\", offset}."
|
|
7711
|
+
},
|
|
7712
|
+
"shapes": {
|
|
7713
|
+
"type": "array",
|
|
7714
|
+
"minItems": 1,
|
|
7715
|
+
"maxItems": 50,
|
|
7716
|
+
"items": {
|
|
7717
|
+
"type": "object",
|
|
6980
7718
|
"properties": {
|
|
6981
7719
|
"action": {
|
|
6982
7720
|
"type": "string",
|
|
@@ -7578,7 +8316,9 @@
|
|
|
7578
8316
|
"sky",
|
|
7579
8317
|
"light",
|
|
7580
8318
|
"environment",
|
|
7581
|
-
"quality"
|
|
8319
|
+
"quality",
|
|
8320
|
+
"preset",
|
|
8321
|
+
"bake"
|
|
7582
8322
|
],
|
|
7583
8323
|
"description": "What to do. Put its fields in the object named after the action."
|
|
7584
8324
|
},
|
|
@@ -7698,7 +8438,7 @@
|
|
|
7698
8438
|
},
|
|
7699
8439
|
"preset": {
|
|
7700
8440
|
"type": "string",
|
|
7701
|
-
"description": "a preset: Wood, Metal, Plastic, Glass, Stone, Rubber, Fish scales, Neon, or a saved one list_materials names"
|
|
8441
|
+
"description": "a preset: Wood, Metal, Plastic, Glass, Stone, Rubber, Fish scales, Neon, Water, or a saved one list_materials names"
|
|
7702
8442
|
},
|
|
7703
8443
|
"cc0": {
|
|
7704
8444
|
"type": "string",
|
|
@@ -7717,7 +8457,7 @@
|
|
|
7717
8457
|
"required": [
|
|
7718
8458
|
"objects"
|
|
7719
8459
|
],
|
|
7720
|
-
"description": "Make objects look finished: colour, roughness, metalness, emissive, opacity and texture maps, on many objects in one call. Maps take a library image hash or an https URL (https only, CORS-enabled, 16 MB, PNG/JPEG/WebP/GIF/AVIF; it becomes a library item first and is re-encoded like an upload; returned in assets). cc0 fetches a free CC0 material by id or name from Poly Haven (its texture names) or ambientCG (ids like \"Wood051\", \"Bricks076\", \"Metal032\", \"Ground037\"), or by words (\"brown planks\"); preset applies a named preset: one of Wood, Metal, Plastic, Glass, Stone, Rubber, Fish scales, Neon, or one the person saved (set_look {action: 'list_materials'} lists them all). faces gives just those faces their own new material slot. One undo step."
|
|
8460
|
+
"description": "Make objects look finished: colour, roughness, metalness, emissive, opacity and texture maps, on many objects in one call. Maps take a library image hash or an https URL (https only, CORS-enabled, 16 MB, PNG/JPEG/WebP/GIF/AVIF; it becomes a library item first and is re-encoded like an upload; returned in assets). cc0 fetches a free CC0 material by id or name from Poly Haven (its texture names) or ambientCG (ids like \"Wood051\", \"Bricks076\", \"Metal032\", \"Ground037\"), or by words (\"brown planks\"); preset applies a named preset: one of Wood, Metal, Plastic, Glass, Stone, Rubber, Fish scales, Neon, Water, or one the person saved (set_look {action: 'list_materials'} lists them all). faces gives just those faces their own new material slot. One undo step."
|
|
7721
8461
|
},
|
|
7722
8462
|
"list_materials": {
|
|
7723
8463
|
"type": "object",
|
|
@@ -7744,7 +8484,7 @@
|
|
|
7744
8484
|
"maximum": 200
|
|
7745
8485
|
}
|
|
7746
8486
|
},
|
|
7747
|
-
"description": "What objects wear: per object its material slots (type, colour, numbers, which maps) and shader, plus the preset names (the starters Wood, Metal, Plastic, Glass, Stone, Rubber, Fish scales, Neon, and any the person saved) and shader keys. Read this before editing."
|
|
8487
|
+
"description": "What objects wear: per object its material slots (type, colour, numbers, which maps) and shader, plus the preset names (the starters Wood, Metal, Plastic, Glass, Stone, Rubber, Fish scales, Neon, Water, and any the person saved) and shader keys. Read this before editing."
|
|
7748
8488
|
},
|
|
7749
8489
|
"get_material": {
|
|
7750
8490
|
"type": "object",
|
|
@@ -7948,7 +8688,7 @@
|
|
|
7948
8688
|
"description": "with confirmId: seconds to wait for the answer (up to 60)"
|
|
7949
8689
|
}
|
|
7950
8690
|
},
|
|
7951
|
-
"description": "The scene's post effects (bloom, huesaturation, brightnesscontrast, tonemapping, vignette, grain, chromaticaberration, ao, lut, pixelation, scanlines, dotscreen, smaa; set_look {action: 'get_post'} lists every param). effects: [{kind, params, enabled, at, remove}], matched to what is there by id or kind, so repeating a call does not stack a second bloom; replace: true drops the rest; the stack order is the order of effect. This changes the whole scene's look: the first call returns needsConfirm and the host is asked; repeat it with confirmId. One undo step. The answer says shownHere: false with a reason when this screen does not draw post effects (reason \"quality tier\" = the device turned them off to keep its frame rate, usual on a phone: the scene keeps them; say so, and offer to ask with set_look {action: 'quality'})."
|
|
8691
|
+
"description": "The scene's post effects (bloom, huesaturation, brightnesscontrast, tonemapping, vignette, grain, chromaticaberration, lensflare, godrays, volumetricfog, ao, lut, pixelation, scanlines, dotscreen, antialias {method: traa | smaa} — it replaces the older smaa; set_look {action: 'get_post'} lists every param). effects: [{kind, params, enabled, at, remove}], matched to what is there by id or kind, so repeating a call does not stack a second bloom; replace: true drops the rest; the stack order is the order of effect. This changes the whole scene's look: the first call returns needsConfirm and the host is asked; repeat it with confirmId. One undo step. The answer says shownHere: false with a reason when this screen does not draw post effects (reason \"quality tier\" = the device turned them off to keep its frame rate, usual on a phone: the scene keeps them; say so, and offer to ask with set_look {action: 'quality'})."
|
|
7952
8692
|
},
|
|
7953
8693
|
"get_post": {
|
|
7954
8694
|
"type": "object",
|
|
@@ -8083,7 +8823,7 @@
|
|
|
8083
8823
|
"properties": {
|
|
8084
8824
|
"preset": {
|
|
8085
8825
|
"type": "string",
|
|
8086
|
-
"description": "studio, daylight, sunset, night, classic, clearsky, meadow, sunrise, starlight, photostudio"
|
|
8826
|
+
"description": "studio, daylight, sunset, night, classic, clearsky, meadow, sunrise, starlight, photostudio, product, cinematic, stylised"
|
|
8087
8827
|
},
|
|
8088
8828
|
"hdri": {
|
|
8089
8829
|
"type": [
|
|
@@ -8189,7 +8929,7 @@
|
|
|
8189
8929
|
"description": "with confirmId: seconds to wait for the answer (up to 60)"
|
|
8190
8930
|
}
|
|
8191
8931
|
},
|
|
8192
|
-
"description": "The sky and the air: a look preset (studio, daylight, sunset, night, classic, clearsky, meadow, sunrise, starlight, photostudio), a sky image by name (clearsky, meadow, sunrise, starlight, photostudio; a assets {action: 'search'} HDRI id \"cc0:polyhaven/<id>\" (fetched into the library once) or \"lib:<hash>\"; or {hash} of an HDR in the library — upload your own .hdr / .exr with assets upload; never a URL) with rotation, intensity, blur and Sky quality (auto / standard / high / max, plus a minimum), a background colour or {top, bottom} gradient, fog ({color, near, far} in metres, or {color, density}; null = none) and exposure. \"Make it night\": preset night or hdri starlight + a dark fog. Changes the whole scene's look, so the host is asked first: it answers needsConfirm, then repeat with confirmId. One undo step."
|
|
8932
|
+
"description": "The sky and the air: a look preset (studio, daylight, sunset, night, classic, clearsky, meadow, sunrise, starlight, photostudio, product, cinematic, stylised), a sky image by name (clearsky, meadow, sunrise, starlight, photostudio; a assets {action: 'search'} HDRI id \"cc0:polyhaven/<id>\" (fetched into the library once) or \"lib:<hash>\"; or {hash} of an HDR in the library — upload your own .hdr / .exr with assets upload; never a URL) with rotation, intensity, blur and Sky quality (auto / standard / high / max, plus a minimum), a background colour or {top, bottom} gradient, fog ({color, near, far} in metres, or {color, density}; null = none) and exposure. \"Make it night\": preset night or hdri starlight + a dark fog. Changes the whole scene's look, so the host is asked first: it answers needsConfirm, then repeat with confirmId. One undo step."
|
|
8193
8933
|
},
|
|
8194
8934
|
"light": {
|
|
8195
8935
|
"type": "object",
|
|
@@ -8352,6 +9092,75 @@
|
|
|
8352
9092
|
}
|
|
8353
9093
|
},
|
|
8354
9094
|
"description": "Ask the person to raise THIS device's quality (their Settings ▸ Scene ▸ Performance ▸ Quality preset). Use it when set_look {action: 'post'} / set_look {action: 'get_post'} / screenshot say shownHere false or postEffects \"unavailable\" with reason \"quality tier\": a phone turns post effects off to keep its frame rate. The person gets a card on their own screen (Allow / Keep) and answers; nothing changes until they allow, nothing changes on anyone else's device, nothing goes into the scene. The first call returns needsConfirm; call again with confirmId (and wait) for the answer. level: high (full quality, post effects on), medium, auto (the device decides), restore (put back what it was before you asked; no question). Suggest it out loud first: \"Your phone hides the glow to stay smooth; shall I ask it for high quality?\""
|
|
9095
|
+
},
|
|
9096
|
+
"preset": {
|
|
9097
|
+
"type": "object",
|
|
9098
|
+
"properties": {
|
|
9099
|
+
"preset": {
|
|
9100
|
+
"type": "string",
|
|
9101
|
+
"enum": [
|
|
9102
|
+
"product",
|
|
9103
|
+
"cinematic",
|
|
9104
|
+
"stylised"
|
|
9105
|
+
]
|
|
9106
|
+
},
|
|
9107
|
+
"confirmId": {
|
|
9108
|
+
"type": "string",
|
|
9109
|
+
"description": "the id a needsConfirm answer gave: repeat the call with it to get the host's answer and apply"
|
|
9110
|
+
},
|
|
9111
|
+
"wait": {
|
|
9112
|
+
"type": "number",
|
|
9113
|
+
"description": "with confirmId: seconds to wait for the answer (up to 60)"
|
|
9114
|
+
}
|
|
9115
|
+
},
|
|
9116
|
+
"required": [
|
|
9117
|
+
"preset"
|
|
9118
|
+
],
|
|
9119
|
+
"description": "A pro look in one step: preset product (Product shot: studio light, clean AO, neutral tone mapping), cinematic (low sun, volumetric fog, god rays, lens flare, film grain, ACES) or stylised (bright sky, punchy colour, AgX). Sets the sky + light, exposure, tone mapping and the post effects together as ONE undo step, saved in the scene; each device draws its own share (a phone marches less fog, a headset leaves fog / god rays / lens flare out). Replaces the scene's post effects. Changes the whole scene's look: the first call returns needsConfirm and the host is asked; repeat it with confirmId."
|
|
9120
|
+
},
|
|
9121
|
+
"bake": {
|
|
9122
|
+
"type": "object",
|
|
9123
|
+
"properties": {
|
|
9124
|
+
"do": {
|
|
9125
|
+
"type": "string",
|
|
9126
|
+
"enum": [
|
|
9127
|
+
"bake",
|
|
9128
|
+
"status",
|
|
9129
|
+
"cancel",
|
|
9130
|
+
"clear",
|
|
9131
|
+
"strength"
|
|
9132
|
+
]
|
|
9133
|
+
},
|
|
9134
|
+
"quality": {
|
|
9135
|
+
"type": "string",
|
|
9136
|
+
"enum": [
|
|
9137
|
+
"draft",
|
|
9138
|
+
"normal",
|
|
9139
|
+
"high"
|
|
9140
|
+
]
|
|
9141
|
+
},
|
|
9142
|
+
"light": {
|
|
9143
|
+
"type": "number",
|
|
9144
|
+
"minimum": 0,
|
|
9145
|
+
"maximum": 3,
|
|
9146
|
+
"description": "do strength: bounce light strength (1 = as baked)"
|
|
9147
|
+
},
|
|
9148
|
+
"ao": {
|
|
9149
|
+
"type": "number",
|
|
9150
|
+
"minimum": 0,
|
|
9151
|
+
"maximum": 1,
|
|
9152
|
+
"description": "do strength: corner shadow strength"
|
|
9153
|
+
},
|
|
9154
|
+
"confirmId": {
|
|
9155
|
+
"type": "string",
|
|
9156
|
+
"description": "the id a needsConfirm answer gave: repeat the call with it to get the host's answer and apply"
|
|
9157
|
+
},
|
|
9158
|
+
"wait": {
|
|
9159
|
+
"type": "number",
|
|
9160
|
+
"description": "with confirmId: seconds to wait for the answer (up to 60)"
|
|
9161
|
+
}
|
|
9162
|
+
},
|
|
9163
|
+
"description": "Bake light (Pro look): soft shadows in corners (AO) and light bouncing off walls, worked out once for every object that does not move (no physics body that moves, no flow or clip animation) and saved with the scene — everyone sees it, it undoes as one step. do: bake (the default; runs on this device, takes seconds; asks the host first like set_look {action: 'post'}), status (read: baked?, stale = things moved since, notes such as objects with overlapping UVs that got AO only), cancel, clear (remove it), strength (light 0-3, ao 0-1). quality: draft, normal, high. Bake AFTER the layout is final; bake again when status says stale. wait: seconds to wait for the result (default 60, max 120)."
|
|
8355
9164
|
}
|
|
8356
9165
|
},
|
|
8357
9166
|
"required": [
|
|
@@ -8368,7 +9177,7 @@
|
|
|
8368
9177
|
{
|
|
8369
9178
|
"name": "run",
|
|
8370
9179
|
"title": "See and check what the game does",
|
|
8371
|
-
"description": "What the game does when it runs: inspect = when each event and action last fired, the game state and variables, errors, and why a node did not fire (pass node or object); validate = what would not work when someone presses Play, each with its fix; logs = the tab's recent errors, warnings and toasts.\nCall it as {\"action\": \"inspect\", \"inspect\": {…its fields…}}; each action's fields and limits are in its object below.\nTake a screenshot after each change to check your work.",
|
|
9180
|
+
"description": "What the game does when it runs: inspect = when each event and action last fired, the game state and variables, errors, and why a node did not fire (pass node or object); validate = what would not work when someone presses Play, each with its fix; logs = the tab's recent errors, warnings and toasts; photo = a path-traced still of the person's view (a PC peer renders it for a Quest), optionally saved to the Library.\nCall it as {\"action\": \"inspect\", \"inspect\": {…its fields…}}; each action's fields and limits are in its object below.\nTake a screenshot after each change to check your work.",
|
|
8372
9181
|
"inputSchema": {
|
|
8373
9182
|
"type": "object",
|
|
8374
9183
|
"properties": {
|
|
@@ -8377,7 +9186,8 @@
|
|
|
8377
9186
|
"enum": [
|
|
8378
9187
|
"inspect",
|
|
8379
9188
|
"validate",
|
|
8380
|
-
"logs"
|
|
9189
|
+
"logs",
|
|
9190
|
+
"photo"
|
|
8381
9191
|
],
|
|
8382
9192
|
"description": "What to do. Put its fields in the object named after the action."
|
|
8383
9193
|
},
|
|
@@ -8430,7 +9240,33 @@
|
|
|
8430
9240
|
"description": "most lines (default 40)"
|
|
8431
9241
|
}
|
|
8432
9242
|
},
|
|
8433
|
-
"description": "The page's recent log: errors, warnings, console lines and the toasts people saw, oldest first. Pass since (the \"now\" of the previous answer) for only what is new. status shows the newest few."
|
|
9243
|
+
"description": "The page's recent log: errors, warnings, console lines, Announce lines (scope announce: in Edit an Announce node draws no banner, its line lands here with the node that said it) and the toasts people saw, oldest first. Pass since (the \"now\" of the previous answer) for only what is new. status shows the newest few."
|
|
9244
|
+
},
|
|
9245
|
+
"photo": {
|
|
9246
|
+
"type": "object",
|
|
9247
|
+
"properties": {
|
|
9248
|
+
"samples": {
|
|
9249
|
+
"type": "integer",
|
|
9250
|
+
"minimum": 1,
|
|
9251
|
+
"maximum": 2048,
|
|
9252
|
+
"description": "path-tracing samples (more = cleaner, slower; default 256)"
|
|
9253
|
+
},
|
|
9254
|
+
"seconds": {
|
|
9255
|
+
"type": "number",
|
|
9256
|
+
"minimum": 2,
|
|
9257
|
+
"maximum": 600,
|
|
9258
|
+
"description": "time limit in seconds (default 60)"
|
|
9259
|
+
},
|
|
9260
|
+
"denoise": {
|
|
9261
|
+
"type": "boolean",
|
|
9262
|
+
"description": "smooth the remaining noise (default true)"
|
|
9263
|
+
},
|
|
9264
|
+
"save": {
|
|
9265
|
+
"type": "boolean",
|
|
9266
|
+
"description": "also save the PNG to the Library under Scene shots/<scene> (default false)"
|
|
9267
|
+
}
|
|
9268
|
+
},
|
|
9269
|
+
"description": "A PHOTO of the person's current view: a path-traced still (soft shadows, real reflections and glass), rendered in their tab while they keep working; their view never moves. It takes seconds to a minute: samples (1-2048, default 256) or seconds (2-600, default 60), whichever comes first. On a Quest or a weak phone a PC in the session renders it; with no PC it is a normal still and the answer says why. Post effects, flat text, particles and your own GLSL are not in a photo (notShown lists what was left out). save: true also files the PNG in the Library under Scene shots. Use it when the person asks for a photo, a render or a nice picture of the scene; for checking your work use screenshot."
|
|
8434
9270
|
}
|
|
8435
9271
|
},
|
|
8436
9272
|
"required": [
|
|
@@ -9550,8 +10386,8 @@
|
|
|
9550
10386
|
},
|
|
9551
10387
|
{
|
|
9552
10388
|
"name": "game_setup",
|
|
9553
|
-
"title": "Game setup: spawn
|
|
9554
|
-
"description": "How the game starts: spawn = where Play starts and which way the player faces; play_camera = first person walking or flying (speed, jump, eye height) and openingView = where the editor camera starts when the scene opens.\nCall it as {\"action\": \"spawn\", \"spawn\": {…its fields…}}; each action's fields and limits are in its object below.\nTake a screenshot after each change to check your work.",
|
|
10389
|
+
"title": "Game setup: spawn, play camera, levels, portals, checkpoints, loading",
|
|
10390
|
+
"description": "How the game starts: spawn = where Play starts and which way the player faces; play_camera = first person walking or flying (speed, jump, eye height) and openingView = where the editor camera starts when the scene opens; levels = the game's one Levels table (order, scene or spawn point, goals) and what carries from level to level (score, inventory, health, named variables); portal = a doorway to a level, scene or spot (one player at a time, with a fade / iris / card); checkpoint = a pad that saves the player's progress; loading = the loading screen a level change shows.\nCall it as {\"action\": \"spawn\", \"spawn\": {…its fields…}}; each action's fields and limits are in its object below.\nTake a screenshot after each change to check your work.",
|
|
9555
10391
|
"inputSchema": {
|
|
9556
10392
|
"type": "object",
|
|
9557
10393
|
"properties": {
|
|
@@ -9559,7 +10395,11 @@
|
|
|
9559
10395
|
"type": "string",
|
|
9560
10396
|
"enum": [
|
|
9561
10397
|
"spawn",
|
|
9562
|
-
"play_camera"
|
|
10398
|
+
"play_camera",
|
|
10399
|
+
"levels",
|
|
10400
|
+
"portal",
|
|
10401
|
+
"checkpoint",
|
|
10402
|
+
"loading"
|
|
9563
10403
|
],
|
|
9564
10404
|
"description": "What to do. Put its fields in the object named after the action."
|
|
9565
10405
|
},
|
|
@@ -9657,6 +10497,326 @@
|
|
|
9657
10497
|
}
|
|
9658
10498
|
},
|
|
9659
10499
|
"description": "How Play looks and where the editor opens. mode: first = first person through the player's eyes, walking (fly: true to fly) with speed, jumpHeight, eyeHeight, gravity — a Character Controller node in the scene graph, changed in place on a second call; none = the default Play camera. third / orbit / fixed are not Play cameras yet (the answer says what to use instead). openingView (H6): where the editor camera starts when the scene opens — {position, target}, \"spawn\" (behind the player), \"frame\" (the whole scene) or null; saved with the scene, nobody's view moves now."
|
|
10500
|
+
},
|
|
10501
|
+
"levels": {
|
|
10502
|
+
"type": "object",
|
|
10503
|
+
"properties": {
|
|
10504
|
+
"levels": {
|
|
10505
|
+
"type": "array",
|
|
10506
|
+
"items": {
|
|
10507
|
+
"type": "object",
|
|
10508
|
+
"properties": {
|
|
10509
|
+
"id": {
|
|
10510
|
+
"type": "string",
|
|
10511
|
+
"description": "a stable id (default: from the name)"
|
|
10512
|
+
},
|
|
10513
|
+
"name": {
|
|
10514
|
+
"type": "string"
|
|
10515
|
+
},
|
|
10516
|
+
"scene": {
|
|
10517
|
+
"type": "string",
|
|
10518
|
+
"description": "a project scene name: the level is that scene"
|
|
10519
|
+
},
|
|
10520
|
+
"spawn": {
|
|
10521
|
+
"type": "string",
|
|
10522
|
+
"description": "the name of an object to start at (a Checkpoint, a Portal or any marker), in the level's scene"
|
|
10523
|
+
},
|
|
10524
|
+
"goal": {
|
|
10525
|
+
"type": "string",
|
|
10526
|
+
"description": "one line the player reads"
|
|
10527
|
+
}
|
|
10528
|
+
}
|
|
10529
|
+
}
|
|
10530
|
+
},
|
|
10531
|
+
"add": {
|
|
10532
|
+
"type": "array",
|
|
10533
|
+
"items": {
|
|
10534
|
+
"type": "object",
|
|
10535
|
+
"properties": {
|
|
10536
|
+
"id": {
|
|
10537
|
+
"type": "string",
|
|
10538
|
+
"description": "a stable id (default: from the name)"
|
|
10539
|
+
},
|
|
10540
|
+
"name": {
|
|
10541
|
+
"type": "string"
|
|
10542
|
+
},
|
|
10543
|
+
"scene": {
|
|
10544
|
+
"type": "string",
|
|
10545
|
+
"description": "a project scene name: the level is that scene"
|
|
10546
|
+
},
|
|
10547
|
+
"spawn": {
|
|
10548
|
+
"type": "string",
|
|
10549
|
+
"description": "the name of an object to start at (a Checkpoint, a Portal or any marker), in the level's scene"
|
|
10550
|
+
},
|
|
10551
|
+
"goal": {
|
|
10552
|
+
"type": "string",
|
|
10553
|
+
"description": "one line the player reads"
|
|
10554
|
+
}
|
|
10555
|
+
}
|
|
10556
|
+
}
|
|
10557
|
+
},
|
|
10558
|
+
"update": {
|
|
10559
|
+
"type": "array",
|
|
10560
|
+
"items": {
|
|
10561
|
+
"type": "object",
|
|
10562
|
+
"properties": {
|
|
10563
|
+
"id": {
|
|
10564
|
+
"type": "string",
|
|
10565
|
+
"description": "a stable id (default: from the name)"
|
|
10566
|
+
},
|
|
10567
|
+
"name": {
|
|
10568
|
+
"type": "string"
|
|
10569
|
+
},
|
|
10570
|
+
"scene": {
|
|
10571
|
+
"type": "string",
|
|
10572
|
+
"description": "a project scene name: the level is that scene"
|
|
10573
|
+
},
|
|
10574
|
+
"spawn": {
|
|
10575
|
+
"type": "string",
|
|
10576
|
+
"description": "the name of an object to start at (a Checkpoint, a Portal or any marker), in the level's scene"
|
|
10577
|
+
},
|
|
10578
|
+
"goal": {
|
|
10579
|
+
"type": "string",
|
|
10580
|
+
"description": "one line the player reads"
|
|
10581
|
+
}
|
|
10582
|
+
}
|
|
10583
|
+
}
|
|
10584
|
+
},
|
|
10585
|
+
"remove": {
|
|
10586
|
+
"type": "array",
|
|
10587
|
+
"items": {
|
|
10588
|
+
"type": "string"
|
|
10589
|
+
}
|
|
10590
|
+
},
|
|
10591
|
+
"keep": {
|
|
10592
|
+
"type": "array",
|
|
10593
|
+
"items": {
|
|
10594
|
+
"type": "string"
|
|
10595
|
+
}
|
|
10596
|
+
},
|
|
10597
|
+
"unlock": {
|
|
10598
|
+
"type": "string",
|
|
10599
|
+
"enum": [
|
|
10600
|
+
"all",
|
|
10601
|
+
"sequential"
|
|
10602
|
+
]
|
|
10603
|
+
},
|
|
10604
|
+
"clear": {
|
|
10605
|
+
"type": "boolean"
|
|
10606
|
+
}
|
|
10607
|
+
},
|
|
10608
|
+
"description": "The game's ONE Levels table: the levels in play order, each {name, scene (a project scene), spawn (an object name to start at), goal}; keep = what carries from level to level (score, inventory, health, or \"var:<name>\" for a named variable; New game resets them); unlock = all | sequential. levels replaces the list, add appends, update [{id, …}] patches, remove [ids] drops, clear: true removes the table; no field reads it. The Go to level / Next level / Finish level nodes and portals use this same table. One undo step."
|
|
10609
|
+
},
|
|
10610
|
+
"portal": {
|
|
10611
|
+
"type": "object",
|
|
10612
|
+
"properties": {
|
|
10613
|
+
"position": {
|
|
10614
|
+
"type": "array",
|
|
10615
|
+
"items": {
|
|
10616
|
+
"type": "number"
|
|
10617
|
+
},
|
|
10618
|
+
"minItems": 3,
|
|
10619
|
+
"maxItems": 3,
|
|
10620
|
+
"description": "its base [x, y, z] (a new one)"
|
|
10621
|
+
},
|
|
10622
|
+
"at": {
|
|
10623
|
+
"type": "object",
|
|
10624
|
+
"description": "placement like create_objects: {ping: \"latest\"} = at the person's ping"
|
|
10625
|
+
},
|
|
10626
|
+
"yaw": {
|
|
10627
|
+
"type": "number",
|
|
10628
|
+
"description": "turn in radians; its arrow points -Z at 0 (arriving players face the arrow)"
|
|
10629
|
+
},
|
|
10630
|
+
"face_user": {
|
|
10631
|
+
"type": "boolean"
|
|
10632
|
+
},
|
|
10633
|
+
"name": {
|
|
10634
|
+
"type": "string"
|
|
10635
|
+
},
|
|
10636
|
+
"object": {
|
|
10637
|
+
"type": "string",
|
|
10638
|
+
"description": "uuid of an existing one to change (leave out to place a new one)"
|
|
10639
|
+
},
|
|
10640
|
+
"show": {
|
|
10641
|
+
"type": "boolean",
|
|
10642
|
+
"description": "false = invisible in Play (still works): a trigger inside your own doorway"
|
|
10643
|
+
},
|
|
10644
|
+
"level": {
|
|
10645
|
+
"type": "string"
|
|
10646
|
+
},
|
|
10647
|
+
"scene": {
|
|
10648
|
+
"type": "string"
|
|
10649
|
+
},
|
|
10650
|
+
"spawn": {
|
|
10651
|
+
"type": "string"
|
|
10652
|
+
},
|
|
10653
|
+
"back": {
|
|
10654
|
+
"type": "boolean"
|
|
10655
|
+
},
|
|
10656
|
+
"transition": {
|
|
10657
|
+
"type": "string",
|
|
10658
|
+
"enum": [
|
|
10659
|
+
"fade",
|
|
10660
|
+
"iris",
|
|
10661
|
+
"card",
|
|
10662
|
+
"none"
|
|
10663
|
+
]
|
|
10664
|
+
},
|
|
10665
|
+
"loading": {
|
|
10666
|
+
"type": [
|
|
10667
|
+
"object",
|
|
10668
|
+
"null"
|
|
10669
|
+
],
|
|
10670
|
+
"properties": {
|
|
10671
|
+
"preset": {
|
|
10672
|
+
"type": "string",
|
|
10673
|
+
"enum": [
|
|
10674
|
+
"fade",
|
|
10675
|
+
"bar",
|
|
10676
|
+
"logo",
|
|
10677
|
+
"image",
|
|
10678
|
+
"item"
|
|
10679
|
+
]
|
|
10680
|
+
},
|
|
10681
|
+
"background": {
|
|
10682
|
+
"type": "string",
|
|
10683
|
+
"description": "#rrggbb"
|
|
10684
|
+
},
|
|
10685
|
+
"image": {
|
|
10686
|
+
"type": "string",
|
|
10687
|
+
"description": "an image URL or library item (the image preset)"
|
|
10688
|
+
},
|
|
10689
|
+
"logo": {
|
|
10690
|
+
"type": "string"
|
|
10691
|
+
},
|
|
10692
|
+
"textColor": {
|
|
10693
|
+
"type": "string"
|
|
10694
|
+
},
|
|
10695
|
+
"bar": {
|
|
10696
|
+
"type": "object",
|
|
10697
|
+
"properties": {
|
|
10698
|
+
"style": {
|
|
10699
|
+
"type": "string",
|
|
10700
|
+
"enum": [
|
|
10701
|
+
"thin",
|
|
10702
|
+
"thick"
|
|
10703
|
+
]
|
|
10704
|
+
},
|
|
10705
|
+
"color": {
|
|
10706
|
+
"type": "string"
|
|
10707
|
+
}
|
|
10708
|
+
}
|
|
10709
|
+
},
|
|
10710
|
+
"tips": {
|
|
10711
|
+
"type": "array",
|
|
10712
|
+
"items": {
|
|
10713
|
+
"type": "string"
|
|
10714
|
+
}
|
|
10715
|
+
},
|
|
10716
|
+
"title": {
|
|
10717
|
+
"type": "string"
|
|
10718
|
+
}
|
|
10719
|
+
}
|
|
10720
|
+
}
|
|
10721
|
+
},
|
|
10722
|
+
"description": "A Portal: a doorway that takes the player who walks through it somewhere else, ONE player at a time. Target: level (a Levels-table row id or name), or scene (a project scene) and / or spawn (an object name to arrive at), or back: true (where they came from). transition = fade | iris | card | none (VR always fades); loading = this portal's own loading screen. New: position or at; change one: object (uuid). What the game keeps (game_setup {action: 'levels'} keep) carries through. One undo step."
|
|
10723
|
+
},
|
|
10724
|
+
"checkpoint": {
|
|
10725
|
+
"type": "object",
|
|
10726
|
+
"properties": {
|
|
10727
|
+
"position": {
|
|
10728
|
+
"type": "array",
|
|
10729
|
+
"items": {
|
|
10730
|
+
"type": "number"
|
|
10731
|
+
},
|
|
10732
|
+
"minItems": 3,
|
|
10733
|
+
"maxItems": 3,
|
|
10734
|
+
"description": "its base [x, y, z] (a new one)"
|
|
10735
|
+
},
|
|
10736
|
+
"at": {
|
|
10737
|
+
"type": "object",
|
|
10738
|
+
"description": "placement like create_objects: {ping: \"latest\"} = at the person's ping"
|
|
10739
|
+
},
|
|
10740
|
+
"yaw": {
|
|
10741
|
+
"type": "number",
|
|
10742
|
+
"description": "turn in radians; its arrow points -Z at 0 (arriving players face the arrow)"
|
|
10743
|
+
},
|
|
10744
|
+
"face_user": {
|
|
10745
|
+
"type": "boolean"
|
|
10746
|
+
},
|
|
10747
|
+
"name": {
|
|
10748
|
+
"type": "string"
|
|
10749
|
+
},
|
|
10750
|
+
"object": {
|
|
10751
|
+
"type": "string",
|
|
10752
|
+
"description": "uuid of an existing one to change (leave out to place a new one)"
|
|
10753
|
+
},
|
|
10754
|
+
"label": {
|
|
10755
|
+
"type": "string"
|
|
10756
|
+
},
|
|
10757
|
+
"show": {
|
|
10758
|
+
"type": "boolean",
|
|
10759
|
+
"description": "false = no message when reached (it still saves)"
|
|
10760
|
+
}
|
|
10761
|
+
},
|
|
10762
|
+
"description": "A Checkpoint pad: stepping on it saves THAT player's progress there; after a fall (or Back to checkpoint, or reloading an exported game) they come back to it. New: position or at; change one: object (uuid). label = what the flash says. One undo step."
|
|
10763
|
+
},
|
|
10764
|
+
"loading": {
|
|
10765
|
+
"type": "object",
|
|
10766
|
+
"properties": {
|
|
10767
|
+
"preset": {
|
|
10768
|
+
"type": "string",
|
|
10769
|
+
"enum": [
|
|
10770
|
+
"fade",
|
|
10771
|
+
"bar",
|
|
10772
|
+
"logo",
|
|
10773
|
+
"image",
|
|
10774
|
+
"item"
|
|
10775
|
+
]
|
|
10776
|
+
},
|
|
10777
|
+
"background": {
|
|
10778
|
+
"type": "string",
|
|
10779
|
+
"description": "#rrggbb"
|
|
10780
|
+
},
|
|
10781
|
+
"image": {
|
|
10782
|
+
"type": "string",
|
|
10783
|
+
"description": "an image URL or library item (the image preset)"
|
|
10784
|
+
},
|
|
10785
|
+
"logo": {
|
|
10786
|
+
"type": "string"
|
|
10787
|
+
},
|
|
10788
|
+
"textColor": {
|
|
10789
|
+
"type": "string"
|
|
10790
|
+
},
|
|
10791
|
+
"bar": {
|
|
10792
|
+
"type": "object",
|
|
10793
|
+
"properties": {
|
|
10794
|
+
"style": {
|
|
10795
|
+
"type": "string",
|
|
10796
|
+
"enum": [
|
|
10797
|
+
"thin",
|
|
10798
|
+
"thick"
|
|
10799
|
+
]
|
|
10800
|
+
},
|
|
10801
|
+
"color": {
|
|
10802
|
+
"type": "string"
|
|
10803
|
+
}
|
|
10804
|
+
}
|
|
10805
|
+
},
|
|
10806
|
+
"tips": {
|
|
10807
|
+
"type": "array",
|
|
10808
|
+
"items": {
|
|
10809
|
+
"type": "string"
|
|
10810
|
+
}
|
|
10811
|
+
},
|
|
10812
|
+
"title": {
|
|
10813
|
+
"type": "string"
|
|
10814
|
+
},
|
|
10815
|
+
"clear": {
|
|
10816
|
+
"type": "boolean"
|
|
10817
|
+
}
|
|
10818
|
+
},
|
|
10819
|
+
"description": "The loading screen every level change shows (only when the load takes a moment; at least 0.4 s once shown): preset fade | bar | logo | image | item, background, image, logo, bar {style, color}, tips (lines that rotate), title; clear: true = the default bar. Fields you leave out stay. Needs a Levels table (game_setup {action: 'levels'}). No field reads it. One undo step."
|
|
9660
10820
|
}
|
|
9661
10821
|
},
|
|
9662
10822
|
"required": [
|
|
@@ -9664,7 +10824,7 @@
|
|
|
9664
10824
|
]
|
|
9665
10825
|
},
|
|
9666
10826
|
"annotations": {
|
|
9667
|
-
"title": "Game setup: spawn
|
|
10827
|
+
"title": "Game setup: spawn, play camera, levels, portals, checkpoints, loading",
|
|
9668
10828
|
"readOnlyHint": false,
|
|
9669
10829
|
"destructiveHint": true,
|
|
9670
10830
|
"openWorldHint": false
|
|
@@ -9822,7 +10982,7 @@
|
|
|
9822
10982
|
},
|
|
9823
10983
|
"data": {
|
|
9824
10984
|
"type": "object",
|
|
9825
|
-
"description": "node params, e.g. spin {axis:\"y\",speed:2}; bounce {amplitude:0.5,speed:2}; pathpatrol {points:[[x,y,z],…]
|
|
10985
|
+
"description": "node params, e.g. spin {axis:\"y\",speed:2}; bounce {amplitude:0.5,speed:2}; pathpatrol {path:\"<Path object uuid from create_path>\", offset:0, face:true} (walks the Path: its waits/speeds/events live on the Path; legacy {points:[[x,y,z],…], speed, mode} still works); onpathevent {path, event} fires when a walker arrives at a point carrying that event; setcolor {color:\"#ff0000\"}; latch {initial:false}; delay {seconds:3}; sequence {delay1:0,delay2:0.5,delay3:0.5,delay4:0.5} (delays are CUMULATIVE). Omit for defaults."
|
|
9826
10986
|
}
|
|
9827
10987
|
},
|
|
9828
10988
|
"required": [
|
|
@@ -9945,7 +11105,7 @@
|
|
|
9945
11105
|
{
|
|
9946
11106
|
"name": "create_behaviour",
|
|
9947
11107
|
"title": "Add a code behaviour",
|
|
9948
|
-
"description": "Create a code behaviour: game logic (rules, waves, scoring, timers, win/lose) as ONE JavaScript module, run on the session authority and replicated. Prefer it over large node graphs for game rules. Linted before it is applied; problems come back with line numbers. The result names the node id and its sockets — wire them with create_flow_nodes (an On Click / On Enter into an input; an output into HUD Text, Visibility, Announce…).\nBEHAVIOURS (create_behaviour / edit_behaviour): game logic as ONE JavaScript module, run on ONE peer (the session authority); `state` replicates to everyone.\nexport default behaviour({ name, params: {k: literal | {value, min, max, step, unit}}, state: {plain JSON}, inputs: [names], outputs: [names], on: {event(payload) {...}}, ...methods });\ninputs: a trigger wired into input \"x\" runs on.x. outputs: a state field = a value output, any other name = an event fired by this.emit(\"name\").\nA behaviour does NOT move, rotate, recolour or hide objects (no such this.*): it drives effect nodes (spin, visibility, setcolor…) via its outputs. NO per-frame hook (no onTick/update): repeat with this.after(seconds, \"method\").\nthis: params, state, kit (also bare `kit`), after(seconds, \"method\", ...args) (survives the host leaving; counts PLAY time — it holds while the game is paused), cancel(key), rand(), randInt(a,b), pick(list), now(), find(glob) / findAll(glob) -> {uuid, name, pos, tags}, object, log() — always as this.find(…) etc. (only `kit` and the helpers are bare). Helpers: dist(a,b), clamp, lerp.\nevents: load (runs on EVERY peer when the behaviour loads — local, state read-only: register things there), start (once, on the authority); grabRequest({piece, distance, hand, refuse}) (runs on the grabbing peer, read-only: call refuse(reason)); any kit event as \"piece.event\" or roundStart, go, won, lost, paused, resumed, menu, levelSelected, scored, collected, allCollected, spawned, despawned, emptied, damaged, healed, died, revived, stuck, grabRefused. Entity payloads have entity.is(glob), entity.hasTag(t).\nkit calls: kit.round.start/win(reason)/lose(reason), kit.score.add(n), kit.spawner.spawn({kind, template: uuid, at, count, hp, mover: {speed}}), kit.health.damage(id, n), kit.mover.chase(kind, \"nearestPlayer\"), kit.rules.set({reach, jump}), kit.pickups.register({id, score, respawn, radius}) — register pickups in on.load (every peer must know them, or touching one does nothing), never in start.\nForbidden (the load is refused): Math.random, Date / Date.now, performance.now, localStorage, document/window/globalThis, fetch, eval, setTimeout/setInterval, import. Unknown this.* members, unknown events and hook-named methods nothing calls are refused too.\nEXAMPLE (passes the lint; wire a trigger into input gemTouched, output left into a HUD Text, timeUp into a Visibility or Announce):\nexport default behaviour({\n name: 'Countdown',\n params: { seconds: 30 },\n state: { left: 30, found: 0 },\n inputs: ['gemTouched'],\n outputs: ['left', 'found', 'timeUp'],\n on: {\n start() { this.state.left = this.params.seconds; this.after(1, 'tick'); },\n gemTouched() { this.state.found += 1; }\n },\n tick() {\n this.state.left -= 1;\n if (this.state.left > 0) this.after(1, 'tick');\n else this.emit('timeUp');\n }\n});\nTake a screenshot after each change to check your work.",
|
|
11108
|
+
"description": "Create a code behaviour: game logic (rules, waves, scoring, timers, win/lose) as ONE JavaScript module, run on the session authority and replicated. Prefer it over large node graphs for game rules. Linted before it is applied; problems come back with line numbers. The result names the node id and its sockets — wire them with create_flow_nodes (an On Click / On Enter into an input; an output into HUD Text, Visibility, Announce…).\nBEHAVIOURS (create_behaviour / edit_behaviour): game logic as ONE JavaScript module, run on ONE peer (the session authority); `state` replicates to everyone.\nexport default behaviour({ name, params: {k: literal | {value, min, max, step, unit}}, state: {plain JSON}, inputs: [names], outputs: [names], on: {event(payload) {...}}, ...methods });\ninputs: a trigger wired into input \"x\" runs on.x. outputs: a state field = a value output, any other name = an event fired by this.emit(\"name\").\nA behaviour does NOT move, rotate, recolour or hide objects (no such this.*): it drives effect nodes (spin, visibility, setcolor…) via its outputs. NO per-frame hook (no onTick/update): repeat with this.after(seconds, \"method\").\nthis: params, state, kit (also bare `kit`), after(seconds, \"method\", ...args) (survives the host leaving; counts PLAY time — it holds while the game is paused), cancel(key), rand(), randInt(a,b), pick(list), now(), find(glob) / findAll(glob) -> {uuid, name, pos, tags}, object, log() — always as this.find(…) etc. (only `kit` and the helpers are bare). Helpers: dist(a,b), clamp, lerp.\nevents: load (runs on EVERY peer when the behaviour loads — local, state read-only: register things there), start (once, on the authority); grabRequest({piece, distance, hand, refuse}) (runs on the grabbing peer, read-only: call refuse(reason)); any kit event as \"piece.event\" or roundStart, go, won, lost, paused, resumed, menu, levelSelected, scored, collected, allCollected, spawned, despawned, emptied, damaged, healed, died, revived, stuck, grabRefused. Entity payloads have entity.is(glob), entity.hasTag(t).\nkit calls: kit.round.start/win(reason)/lose(reason), kit.score.add(n), kit.spawner.spawn({kind, template: uuid, at, count, hp, mover: {speed}}), kit.health.damage(id, n), kit.mover.chase(kind, \"nearestPlayer\"), kit.rules.set({reach, jump}), kit.pickups.register({id, score, respawn, radius}) — register pickups in on.load (every peer must know them, or touching one does nothing), never in start.\nA handler that throws is rolled back (state, after() timers, emits; kit calls already sent stay) and its error names the handler. A refused kit call answers {refused: true, reason}.\nForbidden (the load is refused): Math.random, Date / Date.now, performance.now, localStorage, document/window/globalThis, fetch, eval, setTimeout/setInterval, import. Unknown this.* members, unknown events and hook-named methods nothing calls are refused too.\nEXAMPLE (passes the lint; wire a trigger into input gemTouched, output left into a HUD Text, timeUp into a Visibility or Announce):\nexport default behaviour({\n name: 'Countdown',\n params: { seconds: 30 },\n state: { left: 30, found: 0 },\n inputs: ['gemTouched'],\n outputs: ['left', 'found', 'timeUp'],\n on: {\n start() { this.state.left = this.params.seconds; this.after(1, 'tick'); },\n gemTouched() { this.state.found += 1; }\n },\n tick() {\n this.state.left -= 1;\n if (this.state.left > 0) this.after(1, 'tick');\n else this.emit('timeUp');\n }\n});\nTake a screenshot after each change to check your work.",
|
|
9949
11109
|
"inputSchema": {
|
|
9950
11110
|
"type": "object",
|
|
9951
11111
|
"properties": {
|
|
@@ -10050,7 +11210,7 @@
|
|
|
10050
11210
|
},
|
|
10051
11211
|
"sensor": {
|
|
10052
11212
|
"type": "boolean",
|
|
10053
|
-
"description": "true = a trigger volume: no collision response, fires On Enter/On Exit nodes"
|
|
11213
|
+
"description": "true = a trigger volume: no collision response, fires On Enter/On Exit nodes — for bodies AND for the player walking in (on every peer; set the node's who: player to react only to players)"
|
|
10054
11214
|
},
|
|
10055
11215
|
"group": {
|
|
10056
11216
|
"type": "string",
|