@combos-fun/plugin-cannon 0.0.7 → 0.0.9
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/agent-skill.md +4 -13
- package/package.json +8 -6
package/agent-skill.md
CHANGED
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
# `@combos-fun/plugin-cannon` — Agent notes
|
|
2
2
|
|
|
3
|
-
3D physics for Combos Fun. Wraps `cannon-es` ^0.20 and exposes a
|
|
4
|
-
`Physics3DSystem` plus a `Physics3D` Component that auto-syncs
|
|
5
|
-
`positionX/Y/Z` and `rotationX/Y/Z` to sibling 3D render components every
|
|
6
|
-
frame.
|
|
3
|
+
3D physics for Combos Fun. Wraps `cannon-es` ^0.20 and exposes a `Physics3DSystem` plus a `Physics3D` Component that auto-syncs `positionX/Y/Z` and `rotationX/Y/Z` to sibling 3D render components every frame.
|
|
7
4
|
|
|
8
|
-
Pattern mirrors `plugin-matterjs` (2D): Component stores params, System
|
|
9
|
-
observes + delegates to engine, engine manages `CANNON.World`.
|
|
5
|
+
Pattern mirrors `plugin-matterjs` (2D): Component stores params, System observes + delegates to engine, engine manages `CANNON.World`.
|
|
10
6
|
|
|
11
7
|
## When to read
|
|
12
8
|
|
|
13
|
-
Read for any 3D physics task: gravity, collisions, rigid bodies, ground
|
|
14
|
-
planes, cylinders / spheres, body-mesh sync.
|
|
9
|
+
Read for any 3D physics task: gravity, collisions, rigid bodies, ground planes, cylinders / spheres, body-mesh sync.
|
|
15
10
|
|
|
16
11
|
## Public API
|
|
17
12
|
|
|
@@ -51,11 +46,7 @@ import {
|
|
|
51
46
|
|
|
52
47
|
Synced public fields (read each `update`):
|
|
53
48
|
|
|
54
|
-
`positionX`, `positionY`, `positionZ`, `rotationX`, `rotationY`,
|
|
55
|
-
`rotationZ`. The system writes these back to **all sibling components**
|
|
56
|
-
on the same `GameObject` that have those fields (duck-type check). So
|
|
57
|
-
`Physics3D` + `Graphics3D` on the same node stay in sync without custom
|
|
58
|
-
glue code.
|
|
49
|
+
`positionX`, `positionY`, `positionZ`, `rotationX`, `rotationY`, `rotationZ`. The system writes these back to **all sibling components** on the same `GameObject` that have those fields (duck-type check). So `Physics3D` + `Graphics3D` on the same node stay in sync without custom glue code.
|
|
59
50
|
|
|
60
51
|
`body: CANNON.Body` is injected by the engine after the body is created.
|
|
61
52
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@combos-fun/plugin-cannon",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.9",
|
|
4
|
+
"description": "3D physics",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/plugin-cannon.esm.js",
|
|
7
7
|
"bundle": "CombosFun.plugin.cannon",
|
|
@@ -27,15 +27,17 @@
|
|
|
27
27
|
"types": "dist/plugin-cannon.d.ts",
|
|
28
28
|
"keywords": [
|
|
29
29
|
"combos-fun",
|
|
30
|
-
"
|
|
31
|
-
"physics",
|
|
30
|
+
"cannon-es",
|
|
32
31
|
"3d",
|
|
33
|
-
"
|
|
32
|
+
"physics",
|
|
33
|
+
"collision",
|
|
34
|
+
"rigid-body",
|
|
35
|
+
"gravity"
|
|
34
36
|
],
|
|
35
37
|
"author": "sun668 <q947692259@gmail.com>",
|
|
36
38
|
"dependencies": {
|
|
37
39
|
"cannon-es": "^0.20.0",
|
|
38
|
-
"@combos-fun/engine": "0.0.
|
|
40
|
+
"@combos-fun/engine": "0.0.9"
|
|
39
41
|
},
|
|
40
42
|
"scripts": {
|
|
41
43
|
"build": "node ../../scripts/build-package.mjs"
|