incanto 0.10.0 → 0.11.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/editor/index.html CHANGED
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Incanto Scene Editor</title>
7
7
  <link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><rect width='16' height='16' rx='3' fill='%236ee7dc'/><text x='8' y='12' text-anchor='middle' font-size='11' font-family='monospace' fill='%230e1018'>i</text></svg>" />
8
- <script type="module" crossorigin src="./assets/index-Dp_cYQx1.js"></script>
8
+ <script type="module" crossorigin src="./assets/index-DMCQXowF.js"></script>
9
9
  <link rel="modulepreload" crossorigin href="./assets/GameServer-C56iOUgF.js">
10
10
  <link rel="stylesheet" crossorigin href="./assets/index-D8QvwvOm.css">
11
11
  </head>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "incanto",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "Vibe-coding-first web game engine SDK — JSON-driven scenes on three.js",
5
5
  "keywords": [
6
6
  "game-engine",
@@ -56,9 +56,14 @@ character stays centered even while the camera is catching up or pulled in by a
56
56
  collision — no jitter.
57
57
 
58
58
  **Camera collision (spring arm).** For the orbit views (`free`/`quarter`/`side`)
59
- the camera won't clip through walls or the ground: each frame it raycasts from
60
- the eye toward the camera and, if a collider blocks the boom, smoothly pulls the
61
- camera in front of it (plus a ground backstop so it never drops below the floor).
59
+ the camera won't clip through walls or the ground: each frame it sweeps a small
60
+ SPHERE (not a thin ray — a ray that skims 10 cm over a wall reports "clear"
61
+ while the wall still fills the frame) from the eye toward the camera and, if a
62
+ collider blocks the boom, smoothly pulls the camera in front of it (plus a
63
+ ground backstop so it never drops below the floor).
64
+ Level-design corollary: walls you want the camera to respect must be TALLER
65
+ than the eye line (`player y + eyeHeight`, ~1.9 m for a default rig) — a
66
+ 1.8 m hedge is below the boom entirely and the camera will look over it.
62
67
  This is on by default (`cameraCollision: true`); set it `false` to get the old raw
63
68
  orbit. Only the STATIC/fixed world stops it — give walls/floors/terrain a
64
69
  `StaticBody3D` collider (collider-less meshes are invisible to the ray, same as to
@@ -173,6 +173,14 @@ const hit = physics.castRay(origin, dir, maxLen, excludeBody?, { staticOnly?: tr
173
173
 
174
174
  Exclude the shooter's own body when casting from inside it.
175
175
 
176
+ 3D also has a THICK ray — a sphere sweep — for probes where skimming matters
177
+ (the camera boom, ledge feelers):
178
+
179
+ ```ts
180
+ const hit = physics.castSphere(origin, dir, radius, maxLen, excludeBody?, { staticOnly?: true });
181
+ // → { distance, node } | null (distance = travel of the sphere CENTER)
182
+ ```
183
+
176
184
  ## Gamepad
177
185
 
178
186
  `engine.input.attachGamepad(engine)` polls the first connected pad every