@scenoco-three/editor 0.6.0 → 0.7.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.
Files changed (76) hide show
  1. package/README.md +31 -44
  2. package/bin/serve.js +37 -0
  3. package/dist/editor.js +12521 -0
  4. package/package.json +26 -34
  5. package/dist/cli/index.d.ts +0 -2
  6. package/dist/cli/index.js +0 -56
  7. package/dist-app/assets/EffectComposer-lekj9UUq.js +0 -1
  8. package/dist-app/assets/GLTFLoader-C2lUhzim.js +0 -1
  9. package/dist-app/assets/OutputPass-DZtd342R.js +0 -72
  10. package/dist-app/assets/Pass-BP3b3hlf.js +0 -1
  11. package/dist-app/assets/RenderPass-BjVchlYg.js +0 -1
  12. package/dist-app/assets/ShaderPass-DMXLcV9X.js +0 -24
  13. package/dist-app/assets/SkeletonUtils-Cxy_owx9.js +0 -1
  14. package/dist-app/assets/index-AxOpglZ-.css +0 -1
  15. package/dist-app/assets/index-D-Iq7tix.js +0 -4135
  16. package/dist-app/assets/inter-CaiW00F8.js +0 -1
  17. package/dist-app/assets/registry-BOM35tSr.js +0 -1433
  18. package/dist-app/assets/worker-_Lh8Vt-i.js +0 -1270
  19. package/dist-app/examples/breakout/assets/geometry/ball.geometry.xml +0 -1
  20. package/dist-app/examples/breakout/assets/geometry/brick.geometry.xml +0 -1
  21. package/dist-app/examples/breakout/assets/geometry/floor-sensor.geometry.xml +0 -1
  22. package/dist-app/examples/breakout/assets/geometry/paddle.geometry.xml +0 -1
  23. package/dist-app/examples/breakout/assets/geometry/wall-side.geometry.xml +0 -1
  24. package/dist-app/examples/breakout/assets/geometry/wall-top.geometry.xml +0 -1
  25. package/dist-app/examples/breakout/assets/materials/ball.material.xml +0 -1
  26. package/dist-app/examples/breakout/assets/materials/brick-firm.material.xml +0 -1
  27. package/dist-app/examples/breakout/assets/materials/brick-hard.material.xml +0 -1
  28. package/dist-app/examples/breakout/assets/materials/brick-soft.material.xml +0 -1
  29. package/dist-app/examples/breakout/assets/materials/paddle.material.xml +0 -10
  30. package/dist-app/examples/breakout/assets/materials/wall.material.xml +0 -1
  31. package/dist-app/examples/breakout/assets/render/neon.render.xml +0 -14
  32. package/dist-app/examples/breakout/assets/scenes/arena.prefab.xml +0 -68
  33. package/dist-app/examples/breakout/assets/scenes/brick.prefab.xml +0 -15
  34. package/dist-app/examples/breakout/assets/scenes/hud.scene.xml +0 -56
  35. package/dist-app/examples/breakout/assets/scenes/level-1.scene.xml +0 -36
  36. package/dist-app/examples/breakout/assets/scenes/level-2.scene.xml +0 -36
  37. package/dist-app/examples/breakout/assets/scenes/level-3.scene.xml +0 -36
  38. package/dist-app/examples/castle/assets/geometry/capsule.geometry.xml +0 -3
  39. package/dist-app/examples/castle/assets/geometry/cone.geometry.xml +0 -2
  40. package/dist-app/examples/castle/assets/geometry/cube.geometry.xml +0 -3
  41. package/dist-app/examples/castle/assets/geometry/cylinder.geometry.xml +0 -3
  42. package/dist-app/examples/castle/assets/geometry/plane.geometry.xml +0 -4
  43. package/dist-app/examples/castle/assets/geometry/quad.geometry.xml +0 -3
  44. package/dist-app/examples/castle/assets/geometry/sphere.geometry.xml +0 -2
  45. package/dist-app/examples/castle/assets/materials/grass.material.xml +0 -1
  46. package/dist-app/examples/castle/assets/materials/roof.material.xml +0 -1
  47. package/dist-app/examples/castle/assets/materials/stone.material.xml +0 -1
  48. package/dist-app/examples/castle/assets/materials/wood.material.xml +0 -1
  49. package/dist-app/examples/castle/assets/scenes/main.scene.xml +0 -25
  50. package/dist-app/examples/collector/assets/geometry/capsule.geometry.xml +0 -3
  51. package/dist-app/examples/collector/assets/geometry/cone.geometry.xml +0 -2
  52. package/dist-app/examples/collector/assets/geometry/cube.geometry.xml +0 -3
  53. package/dist-app/examples/collector/assets/geometry/cylinder.geometry.xml +0 -3
  54. package/dist-app/examples/collector/assets/geometry/plane.geometry.xml +0 -4
  55. package/dist-app/examples/collector/assets/geometry/quad.geometry.xml +0 -3
  56. package/dist-app/examples/collector/assets/geometry/sphere.geometry.xml +0 -2
  57. package/dist-app/examples/collector/assets/materials/crate.material.xml +0 -1
  58. package/dist-app/examples/collector/assets/materials/depot.material.xml +0 -1
  59. package/dist-app/examples/collector/assets/materials/ground.material.xml +0 -1
  60. package/dist-app/examples/collector/assets/materials/player.material.xml +0 -1
  61. package/dist-app/examples/collector/assets/scenes/crate.prefab.xml +0 -9
  62. package/dist-app/examples/collector/assets/scenes/main.scene.xml +0 -83
  63. package/dist-app/examples/playable/assets/geometry/capsule.geometry.xml +0 -3
  64. package/dist-app/examples/playable/assets/geometry/cone.geometry.xml +0 -2
  65. package/dist-app/examples/playable/assets/geometry/cube.geometry.xml +0 -3
  66. package/dist-app/examples/playable/assets/geometry/cylinder.geometry.xml +0 -3
  67. package/dist-app/examples/playable/assets/geometry/plane.geometry.xml +0 -4
  68. package/dist-app/examples/playable/assets/geometry/quad.geometry.xml +0 -3
  69. package/dist-app/examples/playable/assets/geometry/sphere.geometry.xml +0 -2
  70. package/dist-app/examples/playable/assets/materials/ground.material.xml +0 -1
  71. package/dist-app/examples/playable/assets/materials/target.material.xml +0 -2
  72. package/dist-app/examples/playable/assets/scenes/main.scene.xml +0 -53
  73. package/dist-app/examples/playable/assets/scenes/target.prefab.xml +0 -9
  74. package/dist-app/examples.json +0 -68
  75. package/dist-app/index.html +0 -14
  76. package/dist-app/model.json +0 -1
@@ -1 +0,0 @@
1
- <SphereGeometry radius="0.32" widthSegments="28" heightSegments="20" />
@@ -1 +0,0 @@
1
- <BoxGeometry width="2.4" height="0.8" depth="0.7" />
@@ -1 +0,0 @@
1
- <BoxGeometry width="19.5" height="0.5" depth="0.5" />
@@ -1 +0,0 @@
1
- <BoxGeometry width="3.2" height="0.45" depth="0.7" />
@@ -1 +0,0 @@
1
- <BoxGeometry width="0.5" height="16" depth="0.9" />
@@ -1 +0,0 @@
1
- <BoxGeometry width="19.5" height="0.5" depth="0.9" />
@@ -1 +0,0 @@
1
- <MeshStandardMaterial color="#fef3c7" emissive="#f59e0b" emissiveIntensity="1.4" roughness="0.15" metalness="0.2" />
@@ -1 +0,0 @@
1
- <MeshStandardMaterial color="#c084fc" emissive="#6d28d9" emissiveIntensity="0.9" roughness="0.3" metalness="0.25" />
@@ -1 +0,0 @@
1
- <MeshStandardMaterial color="#fb7185" emissive="#9f1239" emissiveIntensity="1" roughness="0.25" metalness="0.35" />
@@ -1 +0,0 @@
1
- <MeshStandardMaterial color="#22d3ee" emissive="#0e7490" emissiveIntensity="0.9" roughness="0.3" metalness="0.25" />
@@ -1,10 +0,0 @@
1
- <!-- The paddle glows on its own, wherever it is.
2
-
3
- What decides whether something blooms is its emissive colour **in linear space** times
4
- `emissiveIntensity`, against the `<Bloom threshold>`. #0d9488 at 1.1 came to 0.33 with the
5
- threshold at 1, so the paddle never glowed by itself — it only lit up when it drove through
6
- the warm light that used to sit at the centre of the field. A brighter teal at 1.3 comes to
7
- 0.86: over the threshold, so it glows at both ends of its travel, and under white, so the
8
- surface keeps its colour instead of clipping. -->
9
- <MeshStandardMaterial color="#5eead4" emissive="#2dd4bf" emissiveIntensity="1.3"
10
- roughness="0.2" metalness="0.5" />
@@ -1 +0,0 @@
1
- <MeshStandardMaterial color="#243352" emissive="#0b1224" emissiveIntensity="0.6" roughness="0.7" metalness="0.3" />
@@ -1,14 +0,0 @@
1
- <!-- The look every level shares: a filmic curve so the emissive bricks do not clip flat, a haze
2
- at the far end of the field, and enough bloom to make them read as neon rather than plastic.
3
-
4
- Each child is one thing that decides how the frame looks, and it is on because the element
5
- is here — there is no value that means "off". Tuning the game's look is this one file.
6
-
7
- `threshold` is the one to understand: it is how bright a pixel has to be before it glows,
8
- where 1 is white. At 1 only what is brighter than white blooms, which in this scene was the
9
- ball and nothing else. At 0.5 the emissive paddle and the lit brick faces come in too. -->
10
- <Render>
11
- <Fog color="#05070d" near="20" far="46" />
12
- <ToneMapping curve="ACESFilmicToneMapping" exposure="1.05" />
13
- <Bloom strength="0.5" radius="0.45" threshold="0.5" />
14
- </Render>
@@ -1,68 +0,0 @@
1
- <!-- The furniture every level shares: the walls that bounce, the paddle, the ball, and the
2
- sensor across the floor. Only the bricks change from level to level, so only the bricks are
3
- written three times. -->
4
- <Group>
5
- <!-- Walls. Restitution 1 and no friction: a Breakout ball leaves a wall as fast as it
6
- arrived and with the mirror angle, which is what makes the rally readable. -->
7
- <Mesh id="wallLeft" position="x: -9.5; y: 7.5"
8
- geometry="../geometry/wall-side.geometry.xml" material="../materials/wall.material.xml">
9
- <Components>
10
- <RigidBody2D kind="static" />
11
- <BoxCollider2D halfExtents="x: 0.25; y: 8" restitution="1" friction="0" />
12
- </Components>
13
- </Mesh>
14
-
15
- <Mesh id="wallRight" position="x: 9.5; y: 7.5"
16
- geometry="../geometry/wall-side.geometry.xml" material="../materials/wall.material.xml">
17
- <Components>
18
- <RigidBody2D kind="static" />
19
- <BoxCollider2D halfExtents="x: 0.25; y: 8" restitution="1" friction="0" />
20
- </Components>
21
- </Mesh>
22
-
23
- <Mesh id="wallTop" position="y: 15.75"
24
- geometry="../geometry/wall-top.geometry.xml" material="../materials/wall.material.xml">
25
- <Components>
26
- <RigidBody2D kind="static" />
27
- <BoxCollider2D halfExtents="x: 9.75; y: 0.25" restitution="1" friction="0" />
28
- </Components>
29
- </Mesh>
30
-
31
- <!-- Kinematic: the controller moves the node and the body follows, so the paddle shoves the
32
- ball rather than being shoved by it. -->
33
- <Mesh id="paddle" position="y: 1"
34
- geometry="../geometry/paddle.geometry.xml" material="../materials/paddle.material.xml">
35
- <!-- The paddle's own glow, and a child of the paddle so it travels with it. It used to sit
36
- in the level document at x=0, which meant the paddle only lit up in the middle of the
37
- field: the light was static and the paddle drove in and out of its pool. A light is a
38
- node, so the tree is where that is said. -->
39
- <PointLight color="#fbbf24" intensity="4" distance="11" decay="2" position="y: 0.9; z: 1.2" />
40
- <Components>
41
- <Paddle speed="16" halfRange="7.4" />
42
- <RigidBody2D kind="kinematic" />
43
- <BoxCollider2D halfExtents="x: 1.6; y: 0.225" restitution="1" friction="0" />
44
- </Components>
45
- </Mesh>
46
-
47
- <!-- `bullet` so a fast ball cannot tunnel through a brick between two steps. -->
48
- <Mesh id="ballBody" position="y: 1.62"
49
- geometry="../geometry/ball.geometry.xml" material="../materials/ball.material.xml">
50
- <Components>
51
- <!-- The id is on the component, because that is what a level overrides:
52
- `<Override target="#ball" speed="18" />` makes level three faster than level one
53
- without a second copy of this document. -->
54
- <Ball id="ball" paddle="#paddle" steer="62" speed="15" />
55
- <RigidBody2D kind="dynamic" bullet="true" gravityScale="0" linearDamping="0" />
56
- <CircleCollider2D radius="0.32" restitution="1" friction="0" density="1" />
57
- </Components>
58
- </Mesh>
59
-
60
- <!-- A sensor, not a wall: it reports the overlap and lets the ball fall through. -->
61
- <Mesh id="floor" position="y: -0.6" visible="false"
62
- geometry="../geometry/floor-sensor.geometry.xml" material="../materials/wall.material.xml">
63
- <Components>
64
- <RigidBody2D kind="static" />
65
- <BoxCollider2D halfExtents="x: 9.75; y: 0.25" isSensor="true" />
66
- </Components>
67
- </Mesh>
68
- </Group>
@@ -1,15 +0,0 @@
1
- <!-- One brick, all three tiers.
2
-
3
- A level says how tough this one is with a single override — `<Override target="#brick"
4
- hits="2" />` — and the look follows: the three materials are named here once, and shared by
5
- every brick of that tier. -->
6
- <Mesh id="body" geometry="../geometry/brick.geometry.xml" material="../materials/brick-soft.material.xml">
7
- <Components>
8
- <Brick id="brick" hits="1"
9
- soft="../materials/brick-soft.material.xml"
10
- firm="../materials/brick-firm.material.xml"
11
- hard="../materials/brick-hard.material.xml" />
12
- <RigidBody2D kind="static" />
13
- <BoxCollider2D halfExtents="x: 1.2; y: 0.4" restitution="1" friction="0" />
14
- </Components>
15
- </Mesh>
@@ -1,56 +0,0 @@
1
- <!-- The HUD, and the run it reports on: score, lives, level.
2
-
3
- A scene of its own, loaded alongside the level and marked dontDestroyOnLoad, so nothing in
4
- it is rebuilt when a level is. That is what keeps the score across a level change — no
5
- module-scope singleton, no copying state across the seam.
6
-
7
- It is also the one place that knows the game has three levels, and it can be: no level
8
- imports this scene, so naming them here is not a cycle. -->
9
- <Scene dontDestroyOnLoad="true">
10
- <!-- A <Canvas> sizes itself to the camera above it, and this scene draws over the level
11
- without clearing it — so the HUD is the last thing composited, whatever the level does. -->
12
- <PerspectiveCamera id="camera" fov="45" near="0.1" far="100">
13
- <Canvas color="#e2e8f0" fontWeight="bold">
14
- <!-- Top bar: score on the left, level in the middle, lives on the right. -->
15
- <Panel anchor="stretchTop" height="58" background="#0d1526" opacity="0.94"
16
- layout="horizontal" alignX="between" alignY="center" padding="16">
17
- <Panel layout="horizontal" alignY="center" gap="8">
18
- <Text text="SCORE" fontSize="11" color="#5b7089" />
19
- <Text id="score" text="00000" fontSize="22" color="#5eead4" />
20
- </Panel>
21
-
22
- <Panel layout="horizontal" alignY="center" gap="10">
23
- <Panel width="6" height="6" radius="3" background="#5eead4" />
24
- <Text id="level" text="1/3" fontSize="11" color="#8fa3bd" />
25
- <Panel width="6" height="6" radius="3" background="#5eead4" />
26
- </Panel>
27
-
28
- <!-- Lives as pips rather than a glyph: the default font has no ♥, and a missing glyph
29
- draws as a tofu box. A rectangle is a rectangle everywhere. -->
30
- <Panel layout="horizontal" alignY="center" gap="8">
31
- <Text text="LIVES" fontSize="11" color="#5b7089" />
32
- <Panel layout="horizontal" alignY="center" gap="7">
33
- <Panel id="life1" width="11" height="11" radius="6" background="#fb7185" />
34
- <Panel id="life2" width="11" height="11" radius="6" background="#fb7185" />
35
- <Panel id="life3" width="11" height="11" radius="6" background="#fb7185" />
36
- </Panel>
37
- </Panel>
38
- </Panel>
39
-
40
- <!-- Between rounds. `Progress` switches it off while the ball is in play. -->
41
- <Panel id="banner" anchor="stretch" background="#030509" opacity="0.82"
42
- layout="vertical" alignX="center" alignY="center" gap="16">
43
- <Text id="headline" text="" fontSize="46" color="#f8fafc" textAlign="center" />
44
- <Text id="hint" text="" fontSize="15" color="#7f96b3" fontWeight="normal" textAlign="center" />
45
- </Panel>
46
-
47
- <Components>
48
- <Progress levels="[level-1.scene.xml, level-2.scene.xml, level-3.scene.xml]"
49
- startingLives="3" pointsPerHit="50"
50
- scoreText="#score" levelText="#level"
51
- life1="#life1" life2="#life2" life3="#life3"
52
- banner="#banner" headline="#headline" hint="#hint" />
53
- </Components>
54
- </Canvas>
55
- </PerspectiveCamera>
56
- </Scene>
@@ -1,36 +0,0 @@
1
- <!-- NEON GRID
2
- A digit in the wall's map is how many hits that brick takes — 1, 2 or 3 — and anything
3
- else is a gap. Toughness is the only thing a level says about a brick: one prefab, and
4
- the material follows from the number. -->
5
- <Scene camera="#camera" background="#05070d" render="../render/neon.render.xml">
6
- <Systems>
7
- <!-- No gravity: the ball keeps whatever speed it was given. -->
8
- <Physics2D gravity="x: 0; y: 0" />
9
- <GameState levelName="NEON GRID" />
10
- </Systems>
11
-
12
- <AmbientLight color="#93c5fd" intensity="1.1" />
13
- <!-- Key light from the front-right, a cool rim from behind-left: enough shape on a flat field
14
- of boxes to read as depth without hiding anything. -->
15
- <DirectionalLight color="#fff7ed" intensity="2.6" position="x: 6; y: 14; z: 16" />
16
- <DirectionalLight color="#38bdf8" intensity="1.2" position="x: -10; y: 4; z: -8" />
17
- <PerspectiveCamera id="camera" near="0.1" far="200" position="y: 8.5; z: 24">
18
- <Components>
19
- <!-- Keeps the whole 21 x 19.5 playfield on screen at any window shape: the fov is derived
20
- from the frame, so a narrow phone letterboxes instead of cropping the side walls. -->
21
- <CameraFit mode="contain" width="21" height="19.5" distance="24" />
22
- </Components>
23
- </PerspectiveCamera>
24
-
25
- <Prefab src="arena.prefab.xml">
26
- <Override target="#ball" speed="14" />
27
- </Prefab>
28
-
29
- <!-- The wall. The map is the data, and the loop that places it is a component —
30
- repetition is logic, not thirty elements that differ by two numbers. -->
31
- <Group position="y: 13.9">
32
- <Components>
33
- <BrickField brick="brick.prefab.xml" rows="[1111111, 1111111, .11111.]" />
34
- </Components>
35
- </Group>
36
- </Scene>
@@ -1,36 +0,0 @@
1
- <!-- FORTRESS
2
- A digit in the wall's map is how many hits that brick takes — 1, 2 or 3 — and anything
3
- else is a gap. Toughness is the only thing a level says about a brick: one prefab, and
4
- the material follows from the number. -->
5
- <Scene camera="#camera" background="#05070d" render="../render/neon.render.xml">
6
- <Systems>
7
- <!-- No gravity: the ball keeps whatever speed it was given. -->
8
- <Physics2D gravity="x: 0; y: 0" />
9
- <GameState levelName="FORTRESS" />
10
- </Systems>
11
-
12
- <AmbientLight color="#93c5fd" intensity="1.1" />
13
- <!-- Key light from the front-right, a cool rim from behind-left: enough shape on a flat field
14
- of boxes to read as depth without hiding anything. -->
15
- <DirectionalLight color="#fff7ed" intensity="2.6" position="x: 6; y: 14; z: 16" />
16
- <DirectionalLight color="#38bdf8" intensity="1.2" position="x: -10; y: 4; z: -8" />
17
- <PerspectiveCamera id="camera" near="0.1" far="200" position="y: 8.5; z: 24">
18
- <Components>
19
- <!-- Keeps the whole 21 x 19.5 playfield on screen at any window shape: the fov is derived
20
- from the frame, so a narrow phone letterboxes instead of cropping the side walls. -->
21
- <CameraFit mode="contain" width="21" height="19.5" distance="24" />
22
- </Components>
23
- </PerspectiveCamera>
24
-
25
- <Prefab src="arena.prefab.xml">
26
- <Override target="#ball" speed="16" />
27
- </Prefab>
28
-
29
- <!-- The wall. The map is the data, and the loop that places it is a component —
30
- repetition is logic, not thirty elements that differ by two numbers. -->
31
- <Group position="y: 14.4">
32
- <Components>
33
- <BrickField brick="brick.prefab.xml" rows="[.22222., 2111112, 2133312, 2111112, .22222.]" />
34
- </Components>
35
- </Group>
36
- </Scene>
@@ -1,36 +0,0 @@
1
- <!-- GAUNTLET
2
- A digit in the wall's map is how many hits that brick takes — 1, 2 or 3 — and anything
3
- else is a gap. Toughness is the only thing a level says about a brick: one prefab, and
4
- the material follows from the number. -->
5
- <Scene camera="#camera" background="#05070d" render="../render/neon.render.xml">
6
- <Systems>
7
- <!-- No gravity: the ball keeps whatever speed it was given. -->
8
- <Physics2D gravity="x: 0; y: 0" />
9
- <GameState levelName="GAUNTLET" />
10
- </Systems>
11
-
12
- <AmbientLight color="#93c5fd" intensity="1.1" />
13
- <!-- Key light from the front-right, a cool rim from behind-left: enough shape on a flat field
14
- of boxes to read as depth without hiding anything. -->
15
- <DirectionalLight color="#fff7ed" intensity="2.6" position="x: 6; y: 14; z: 16" />
16
- <DirectionalLight color="#38bdf8" intensity="1.2" position="x: -10; y: 4; z: -8" />
17
- <PerspectiveCamera id="camera" near="0.1" far="200" position="y: 8.5; z: 24">
18
- <Components>
19
- <!-- Keeps the whole 21 x 19.5 playfield on screen at any window shape: the fov is derived
20
- from the frame, so a narrow phone letterboxes instead of cropping the side walls. -->
21
- <CameraFit mode="contain" width="21" height="19.5" distance="24" />
22
- </Components>
23
- </PerspectiveCamera>
24
-
25
- <Prefab src="arena.prefab.xml">
26
- <Override target="#ball" speed="18" />
27
- </Prefab>
28
-
29
- <!-- The wall. The map is the data, and the loop that places it is a component —
30
- repetition is logic, not thirty elements that differ by two numbers. -->
31
- <Group position="y: 14.4">
32
- <Components>
33
- <BrickField brick="brick.prefab.xml" rows="[3.3.3.3, .2.2.2., 1111111, .2.2.2., 3.3.3.3]" />
34
- </Components>
35
- </Group>
36
- </Scene>
@@ -1,3 +0,0 @@
1
- <!-- A capsule 1 across and 2 tall overall, as Unity's is: a 1-tall barrel with a
2
- hemisphere on each end. -->
3
- <CapsuleGeometry radius="0.5" height="1" capSegments="8" radialSegments="16" />
@@ -1,2 +0,0 @@
1
- <!-- A cone 1 across and 1 tall, point up. -->
2
- <ConeGeometry radius="0.5" height="1" radialSegments="32" />
@@ -1,3 +0,0 @@
1
- <!-- A cube, 1 x 1 x 1. Scale the mesh to size it:
2
- <Mesh geometry="../geometry/cube.geometry.xml" material="…" scale="x: 8; y: 4; z: 1" /> -->
3
- <BoxGeometry width="1" height="1" depth="1" />
@@ -1,3 +0,0 @@
1
- <!-- A cylinder 1 across and 2 tall, as Unity's is, standing on Y.
2
- Two tall: scale="y: 3" makes it 6 tall, not 3. -->
3
- <CylinderGeometry radiusTop="0.5" radiusBottom="0.5" height="2" radialSegments="32" />
@@ -1,4 +0,0 @@
1
- <!-- A 10 x 10 sheet — Unity's plane size — standing upright in XY.
2
- A ground is this one laid flat:
3
- <Mesh geometry="../geometry/plane.geometry.xml" material="…" eulerAngles="x: -90" scale="6" /> -->
4
- <PlaneGeometry width="10" height="10" />
@@ -1,3 +0,0 @@
1
- <!-- A 1 x 1 sheet, standing upright in XY and facing +Z, as three.js builds it.
2
- Lay it flat with eulerAngles="x: -90" on the mesh. -->
3
- <PlaneGeometry width="1" height="1" />
@@ -1,2 +0,0 @@
1
- <!-- A sphere 1 across — radius 0.5, as Unity's is. -->
2
- <SphereGeometry radius="0.5" widthSegments="32" heightSegments="16" />
@@ -1 +0,0 @@
1
- <MeshStandardMaterial color="#4e7a3a" roughness="1" metalness="0" />
@@ -1 +0,0 @@
1
- <MeshStandardMaterial color="#8c3b3b" roughness="0.7" metalness="0.05" />
@@ -1 +0,0 @@
1
- <MeshStandardMaterial color="#9aa3ad" roughness="0.85" metalness="0.05" />
@@ -1 +0,0 @@
1
- <MeshStandardMaterial color="#6b4a2f" roughness="0.9" metalness="0" />
@@ -1,25 +0,0 @@
1
- <!-- An empty field, lit, with a camera looking at the middle of it.
2
-
3
- The shapes to build with are in assets/geometry — the primitives, sized as Unity sizes them.
4
- A mesh names one and `scale` says how big this one is:
5
-
6
- cube 1 x 1 x 1
7
- sphere 1 across
8
- cylinder 1 across, 2 tall — scale="y: 3" is 6 tall, not 3
9
- capsule 1 across, 2 tall
10
- cone 1 across, 1 tall
11
- quad 1 x 1, standing upright
12
- plane 10 x 10, standing upright — lay it flat with eulerAngles="x: -90"
13
-
14
- A node's position is the middle of it, so a wall 4 tall standing on the ground is at y: 2. -->
15
- <Scene camera="#camera" background="#8fb7d9">
16
- <PerspectiveCamera id="camera" fov="45" near="0.1" far="400"
17
- position="x: 18; y: 13; z: 20" eulerAngles="x: -24; y: 42" />
18
-
19
- <AmbientLight color="#cfe3f5" intensity="0.8" />
20
- <DirectionalLight color="#fff4e0" intensity="2.2" position="x: 12; y: 20; z: 8" />
21
-
22
- <!-- The ground: the 10 x 10 plane, laid flat and scaled to 60 across. -->
23
- <Mesh geometry="../geometry/plane.geometry.xml" material="../materials/grass.material.xml"
24
- eulerAngles="x: -90" scale="6" />
25
- </Scene>
@@ -1,3 +0,0 @@
1
- <!-- A capsule 1 across and 2 tall overall, as Unity's is: a 1-tall barrel with a
2
- hemisphere on each end. -->
3
- <CapsuleGeometry radius="0.5" height="1" capSegments="8" radialSegments="16" />
@@ -1,2 +0,0 @@
1
- <!-- A cone 1 across and 1 tall, point up. -->
2
- <ConeGeometry radius="0.5" height="1" radialSegments="32" />
@@ -1,3 +0,0 @@
1
- <!-- A cube, 1 x 1 x 1. Scale the mesh to size it:
2
- <Mesh geometry="../geometry/cube.geometry.xml" material="…" scale="x: 8; y: 4; z: 1" /> -->
3
- <BoxGeometry width="1" height="1" depth="1" />
@@ -1,3 +0,0 @@
1
- <!-- A cylinder 1 across and 2 tall, as Unity's is, standing on Y.
2
- Two tall: scale="y: 3" makes it 6 tall, not 3. -->
3
- <CylinderGeometry radiusTop="0.5" radiusBottom="0.5" height="2" radialSegments="32" />
@@ -1,4 +0,0 @@
1
- <!-- A 10 x 10 sheet — Unity's plane size — standing upright in XY.
2
- A ground is this one laid flat:
3
- <Mesh geometry="../geometry/plane.geometry.xml" material="…" eulerAngles="x: -90" scale="6" /> -->
4
- <PlaneGeometry width="10" height="10" />
@@ -1,3 +0,0 @@
1
- <!-- A 1 x 1 sheet, standing upright in XY and facing +Z, as three.js builds it.
2
- Lay it flat with eulerAngles="x: -90" on the mesh. -->
3
- <PlaneGeometry width="1" height="1" />
@@ -1,2 +0,0 @@
1
- <!-- A sphere 1 across — radius 0.5, as Unity's is. -->
2
- <SphereGeometry radius="0.5" widthSegments="32" heightSegments="16" />
@@ -1 +0,0 @@
1
- <MeshStandardMaterial color="#f0b429" roughness="0.5" metalness="0.05" />
@@ -1 +0,0 @@
1
- <MeshStandardMaterial color="#3ddc84" roughness="0.6" metalness="0" />
@@ -1 +0,0 @@
1
- <MeshStandardMaterial color="#2a3646" roughness="1" metalness="0" />
@@ -1 +0,0 @@
1
- <MeshStandardMaterial color="#4ea3ff" roughness="0.4" metalness="0.1" />
@@ -1,9 +0,0 @@
1
- <!-- One crate. The root element IS the node, so a scattered crate is a real mesh with no wrapper
2
- — which is what lets the carrier `attach` it straight onto the stack. -->
3
- <Mesh geometry="../geometry/cube.geometry.xml" material="../materials/crate.material.xml"
4
- position="y: 0.2" scale="0.4">
5
- <Components>
6
- <Pickup value="1" spin="60" />
7
- <BoxCollider halfExtents="x: 0.25; y: 0.25; z: 0.25" isSensor="true" />
8
- </Components>
9
- </Mesh>
@@ -1,83 +0,0 @@
1
- <!-- Collector: walk with the thumb stick or WASD, sweep up crates, run them to the pad.
2
-
3
- One mechanic, thirty seconds, no menu. Everything that decides the run is on <Run>; the
4
- level is a floor, a depot and a <Scatter> that keeps the crates topped up.
5
-
6
- The joystick lives on the camera, so it draws over the whole scene and is positioned in the
7
- camera's own space — see src/Joystick.ts for why it is nodes rather than UI. -->
8
- <Scene camera="#camera" background="#0b1016">
9
- <Systems>
10
- <Run duration="30" quota="10" />
11
- <Collision />
12
- <UIRenderer />
13
- </Systems>
14
-
15
- <AmbientLight color="#9fb6d4" intensity="1.2" />
16
- <DirectionalLight color="#fff2d8" intensity="2.6" position="x: 6; y: 12; z: 5" />
17
-
18
- <!-- Looking down at the field from behind. <CameraFit> keeps the same 20 x 20 of level on
19
- screen whatever shape the ad slot is. -->
20
- <PerspectiveCamera id="camera" near="0.1" far="200" position="y: 15; z: 13" eulerAngles="x: -49">
21
- <Components>
22
- <CameraFit mode="contain" width="13" height="13" distance="20" />
23
- <Joystick id="stick" base="#stickBase" knob="#stickKnob" reach="70" />
24
- </Components>
25
-
26
- <Canvas>
27
- <!-- The stick. Two round panels the component moves under the thumb and turns off when
28
- nothing is held. `radius` is half the width, which is what makes a panel a circle. -->
29
- <Panel id="stickBase" anchor="topLeft" width="140" height="140" radius="70"
30
- background="#e8f0ff" opacity="0.16" />
31
- <Panel id="stickKnob" anchor="topLeft" width="58" height="58" radius="29"
32
- background="#ffffff" opacity="0.45" />
33
-
34
- <Panel anchor="stretchTop" height="76" layout="horizontal" alignX="between"
35
- alignY="center" padding="20" background="#000000" opacity="0.35">
36
- <Text id="time" text="30" fontSize="30" color="#f0b429" />
37
- <Text id="score" text="0 / 10" fontSize="24" color="#e6edf6" />
38
- </Panel>
39
-
40
- <Panel anchor="bottom" y="28" width="320" height="40" layout="vertical" alignX="center">
41
- <Text id="carry" text="" fontSize="20" color="#9fb6d4" />
42
- </Panel>
43
-
44
- <Panel anchor="center" width="360" height="80" layout="vertical" alignX="center" alignY="center">
45
- <Text id="banner" text="" fontSize="40" color="#ffffff" />
46
- </Panel>
47
- </Canvas>
48
- </PerspectiveCamera>
49
-
50
- <!-- The level. -->
51
- <Mesh geometry="../geometry/plane.geometry.xml" material="../materials/ground.material.xml"
52
- eulerAngles="x: -90" scale="1.3" />
53
-
54
- <!-- The drop-off, in the middle where every run passes through. -->
55
- <Mesh id="depot" geometry="../geometry/cylinder.geometry.xml"
56
- material="../materials/depot.material.xml" position="y: 0.05" scale="x: 3; y: 0.05; z: 3">
57
- <Components>
58
- <Depot />
59
- <SphereCollider radius="0.55" isSensor="true" />
60
- </Components>
61
- </Mesh>
62
-
63
- <Mesh id="player" geometry="../geometry/capsule.geometry.xml"
64
- material="../materials/player.material.xml" position="x: 3; y: 0.5; z: 3" scale="0.5">
65
- <Components>
66
- <Mover speed="6" turn="720" bounds="x: 5.5; y: 0; z: 5.5" />
67
- <Carrier id="carrier" capacity="12" spacing="0.42" offset="0.55" />
68
- <SphereCollider radius="0.7" isSensor="true" />
69
- </Components>
70
- </Mesh>
71
-
72
- <Group id="crates">
73
- <Components>
74
- <Scatter crate="crate.prefab.xml" count="12" area="x: 5.2; y: 0; z: 5.2" clearance="2.2" />
75
- </Components>
76
- </Group>
77
-
78
- <Group id="hud">
79
- <Components>
80
- <Hud timeText="#time" scoreText="#score" carryText="#carry" banner="#banner" carrier="#carrier" />
81
- </Components>
82
- </Group>
83
- </Scene>
@@ -1,3 +0,0 @@
1
- <!-- A capsule 1 across and 2 tall overall, as Unity's is: a 1-tall barrel with a
2
- hemisphere on each end. -->
3
- <CapsuleGeometry radius="0.5" height="1" capSegments="8" radialSegments="16" />
@@ -1,2 +0,0 @@
1
- <!-- A cone 1 across and 1 tall, point up. -->
2
- <ConeGeometry radius="0.5" height="1" radialSegments="32" />
@@ -1,3 +0,0 @@
1
- <!-- A cube, 1 x 1 x 1. Scale the mesh to size it:
2
- <Mesh geometry="../geometry/cube.geometry.xml" material="…" scale="x: 8; y: 4; z: 1" /> -->
3
- <BoxGeometry width="1" height="1" depth="1" />
@@ -1,3 +0,0 @@
1
- <!-- A cylinder 1 across and 2 tall, as Unity's is, standing on Y.
2
- Two tall: scale="y: 3" makes it 6 tall, not 3. -->
3
- <CylinderGeometry radiusTop="0.5" radiusBottom="0.5" height="2" radialSegments="32" />
@@ -1,4 +0,0 @@
1
- <!-- A 10 x 10 sheet — Unity's plane size — standing upright in XY.
2
- A ground is this one laid flat:
3
- <Mesh geometry="../geometry/plane.geometry.xml" material="…" eulerAngles="x: -90" scale="6" /> -->
4
- <PlaneGeometry width="10" height="10" />
@@ -1,3 +0,0 @@
1
- <!-- A 1 x 1 sheet, standing upright in XY and facing +Z, as three.js builds it.
2
- Lay it flat with eulerAngles="x: -90" on the mesh. -->
3
- <PlaneGeometry width="1" height="1" />
@@ -1,2 +0,0 @@
1
- <!-- A sphere 1 across — radius 0.5, as Unity's is. -->
2
- <SphereGeometry radius="0.5" widthSegments="32" heightSegments="16" />
@@ -1 +0,0 @@
1
- <MeshStandardMaterial color="#1b2130" roughness="1" metalness="0" />
@@ -1,2 +0,0 @@
1
- <MeshStandardMaterial color="#f0b429" roughness="0.35" metalness="0.1"
2
- emissive="#7a4a00" emissiveIntensity="0.5" />