@ignifx/physics 0.6.1 → 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.
- package/dist/index.js +19 -6
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/skills/physics/SKILL.md +7 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ignifx/physics",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "ignifx 3D physics on Havok through Babylon Lite: rigidbodies, colliders, triggers, character controller, queries.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ignifx",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"typedoc-plugin-markdown": "^4.13.0",
|
|
46
46
|
"typescript-native": "npm:typescript@7.0.2",
|
|
47
47
|
"vitest": "^5.0.0",
|
|
48
|
-
"@ignifx/core": "0.
|
|
49
|
-
"@ignifx/terrain": "0.
|
|
48
|
+
"@ignifx/core": "0.7.0",
|
|
49
|
+
"@ignifx/terrain": "0.7.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"@babylonjs/havok": "^1.3.14",
|
|
53
53
|
"@babylonjs/lite": "1.27.0",
|
|
54
|
-
"@ignifx/core": "0.
|
|
54
|
+
"@ignifx/core": "0.7.0"
|
|
55
55
|
},
|
|
56
56
|
"ignifx": {
|
|
57
57
|
"extension": true,
|
package/skills/physics/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: physics
|
|
|
3
3
|
description: Adds 3D physics to an ignifx game with @ignifx/physics: Havok simulation on a separate headless scene, Rigidbody, box/sphere/capsule/mesh colliders, physics materials, triggers, CharacterController, raycasts and shape queries, the collision layer matrix, and render interpolation. Use when adding or editing 3D physics bodies, colliders, triggers, character movement, or physics queries in an ignifx project, or when the user mentions @ignifx/physics, Rigidbody, Havok, or collision layers.
|
|
4
4
|
license: Apache-2.0
|
|
5
5
|
metadata:
|
|
6
|
-
ignifx-version: "0.
|
|
6
|
+
ignifx-version: "0.7.0"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# @ignifx/physics
|
|
@@ -21,7 +21,7 @@ through, or has to be asked "what is under the crosshair".
|
|
|
21
21
|
|
|
22
22
|
## Environment
|
|
23
23
|
|
|
24
|
-
- Engine: ignifx `0.
|
|
24
|
+
- Engine: ignifx `0.7.0`; this package targets `@ignifx/core` `>=0.0.0 <1.0.0`.
|
|
25
25
|
- Peer dependencies: `@babylonjs/lite` (exactly `1.27.0`) and `@babylonjs/havok` (`^1.3.0`).
|
|
26
26
|
- Browsers, Electron, and Node. The Vite plugin copies `HavokPhysics.wasm` into the public asset
|
|
27
27
|
path, so the browser loads it from `assets/HavokPhysics.wasm`; under Node the extension reads the
|
|
@@ -144,7 +144,11 @@ entity's lossy scale when the shape is built; changing the scale afterwards need
|
|
|
144
144
|
`move(displacement)` from `fixedUpdate` (displacements accumulate), then read `isGrounded`,
|
|
145
145
|
`supportState`, `groundNormal`, and `velocity`. `setHeight(h, preserveFeet?)` crouches,
|
|
146
146
|
`teleport(position)` relocates, and `onCollided` reports every dynamic body the capsule pushed.
|
|
147
|
-
Gravity is **not** applied for you — a bare controller is purely kinematic.
|
|
147
|
+
Gravity is **not** applied for you — a bare controller is purely kinematic. `isGrounded` is true
|
|
148
|
+
on any surface up to `slopeLimit`, a `HeightfieldCollider` included; steeper reads
|
|
149
|
+
`supportState === "sliding"`. A controller pressed into an incline creeps down it (Lite's
|
|
150
|
+
character controller has no static friction), so cancel the down-slope part of a small ground-stick
|
|
151
|
+
push yourself, as `ThirdPersonController` does.
|
|
148
152
|
|
|
149
153
|
## Recipes
|
|
150
154
|
|