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/dist/3d.d.ts +14 -0
- package/dist/3d.js +3 -3
- package/dist/{create-game-Cq0Z41EQ.js → create-game-DZ_4Nfq8.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/{physics-3d-D8m2Hd-q.js → physics-3d-Br97Ans2.js} +33 -1
- package/dist/react.js +1 -1
- package/dist/{register-BP-kbijm.js → register-ysLR3WQS.js} +5 -1
- package/dist/test.js +3 -3
- package/editor/assets/{agent8--Cd_2Y95.js → agent8-BxNvAcLA.js} +1 -1
- package/editor/assets/{index-Dp_cYQx1.js → index-DMCQXowF.js} +45 -45
- package/editor/index.html +1 -1
- package/package.json +1 -1
- package/skills/incanto-3d-character.md +8 -3
- package/skills/incanto-physics-and-input.md +8 -0
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-
|
|
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
|
@@ -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
|
|
60
|
-
|
|
61
|
-
|
|
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
|