pelican-engine 0.3.12 → 0.3.13
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/AGENTS.md +23 -3
- package/distribution.json +13 -13
- package/docs/STATUS.md +3 -3
- package/docs/api/REFERENCE.md +102 -92
- package/docs/api/index.json +104 -93
- package/docs/npm/GAME-AUTHOR.md +23 -3
- package/engine.manifest.json +1 -1
- package/lib/physics/index.js +25 -0
- package/lib/runtime/host.js +1 -0
- package/lib/sdk/index.d.ts +10 -3
- package/lib/sdk/index.js +1 -1
- package/lib/simulation/rope-plugin.js +187 -15
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -137,15 +137,35 @@ all earlier automatic ropes from that phase; the host tick may still have other
|
|
|
137
137
|
partial changes and must be recovered from a known-good checkpoint. The source
|
|
138
138
|
checkout includes `examples/rope-particles`.
|
|
139
139
|
|
|
140
|
+
To bind a rope to existing dynamic sphere bodies, create it with `autoStep: true`
|
|
141
|
+
and `bodyColliders: [{ id: "rope-collider-id", entity: "body-id" }]`. After the
|
|
142
|
+
rigid-body physics phase, the host samples each bound sphere's actual collider
|
|
143
|
+
center and radius, steps the rope, and applies the resulting normal projection
|
|
144
|
+
impulse to the body. That impulse changes body velocity; displacement responds on
|
|
145
|
+
the next body step. Bindings require live dynamic non-trigger spheres and unique
|
|
146
|
+
collider ids and body entities within each rope. Do not use a bound collider id
|
|
147
|
+
in `setColliders`; its manual planes and spheres remain separate. A destroyed body
|
|
148
|
+
is unbound at the next automatic step, and a new entity with the same id is not
|
|
149
|
+
implicitly rebound. Bindings are saved with Host snapshots.
|
|
150
|
+
|
|
151
|
+
Do not manually apply the same contact's reaction when using a body binding: the
|
|
152
|
+
host already applies it. A native failure can still leave the host tick partially
|
|
153
|
+
changed, so restore a known-good checkpoint. This is delayed sampled coupling and
|
|
154
|
+
is not a complete physics solver: body velocity/effective mass, friction,
|
|
155
|
+
continuous collision and coupled substeps are not included. It has not been
|
|
156
|
+
runtime or snapshot validated.
|
|
157
|
+
|
|
140
158
|
For each latest-tick contact, `reactionImpulse` and `reactionAngularImpulse`
|
|
141
159
|
report the opposite impulse produced by the particle's position projections,
|
|
142
160
|
and its moment about the world origin. These optional fields are absent when
|
|
143
|
-
restoring older contact snapshots.
|
|
161
|
+
restoring older contact snapshots. Contacts from unbound manual colliders do not
|
|
162
|
+
automatically act on a rigid body.
|
|
144
163
|
For an explicitly mapped dynamic body, game code can read its actual world center
|
|
145
164
|
of mass via `ctx.physics.centerOfMass(id)`, apply the linear impulse, and apply
|
|
146
165
|
`reactionAngularImpulse - centerOfMass × reactionImpulse` as torque impulse.
|
|
147
166
|
Apply each contact at most once for its `tick`; repeated `inspect` calls return
|
|
148
|
-
the same contacts. The source checkout
|
|
167
|
+
the same contacts. The source checkout's `examples/rope-reaction` uses the
|
|
168
|
+
automatic binding instead.
|
|
149
169
|
|
|
150
170
|
This sampled, manually applied reaction is delayed and uses positional correction,
|
|
151
171
|
not a coupled contact solver: it omits body velocity/effective mass, friction and
|
|
@@ -154,7 +174,7 @@ operations and is not transactional if a tick fails; recover from a known-good
|
|
|
154
174
|
checkpoint. It must not be represented as complete two-way rigid-body interaction.
|
|
155
175
|
|
|
156
176
|
This is an unverified development-stage increment, not complete rope physics:
|
|
157
|
-
there is no built-in rope mesh,
|
|
177
|
+
there is no built-in rope mesh, general rigid-body coupling, segment or self collision,
|
|
158
178
|
or tearing. Moving entities to particle positions is not a rope renderer or
|
|
159
179
|
coupled physics. Plane normals must be unit length; `offset` is the signed
|
|
160
180
|
normal distance from the origin. Host intervals must be between 1/1000 and
|
package/distribution.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "pelican.npm-distribution",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.13",
|
|
4
4
|
"files": {
|
|
5
|
-
"AGENTS.md": "
|
|
5
|
+
"AGENTS.md": "8609edbd3ff882cc12a448b44f064a0241295e06d2b51f2dc674a92d1d7c4e1f",
|
|
6
6
|
"CONTRIBUTING.md": "0ffad5d841d90f319fc50a75b81d3c0ad6dab8d5d9bec2846c65c7f8358d5a50",
|
|
7
7
|
"docs/AI-WORKFLOW.md": "aa992686df93f791795f6f3fce01713d812eea6a1b9556f07411ac5847278efa",
|
|
8
|
-
"docs/api/index.json": "
|
|
9
|
-
"docs/api/REFERENCE.md": "
|
|
8
|
+
"docs/api/index.json": "3cd876657860e0b3f1f3d0c0c6d348c7ffaf3fe894cf8ba50eedb6c42f026b8e",
|
|
9
|
+
"docs/api/REFERENCE.md": "4e45c32451506aff95f94dda37b8c685400ddfb92245adf13ae92f576d42e2da",
|
|
10
10
|
"docs/ARCHITECTURE.md": "3184b73592d466390e7793b1cf39bbb80d6052b523fba7e7cb377b5207074627",
|
|
11
11
|
"docs/assets/pelican-mark.svg": "407b10cd7e292ea83cf5dba4046fb2f01c7d566a14014c55deda3a2984562b4d",
|
|
12
12
|
"docs/CAPABILITIES.md": "92950817497d8c63db07830db96dc93c877befa8d038320feed1ae1f1a053cb1",
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
"docs/GETTING-STARTED.md": "5519ebe4e513e8ae4517c04948ee9dc70bcb1e3d04a65d468a6537c838502663",
|
|
15
15
|
"docs/GRAPHICS-GUIDE.md": "e3d0f7df6189ca3f88d81af5ffaf393f5d6bf39b9e66167bb2f64b39194b514c",
|
|
16
16
|
"docs/npm/DISTRIBUTION.md": "ff25e039921a85ba253c27608c77ed614a036117d7a04f908a78d1e3ed3f19ef",
|
|
17
|
-
"docs/npm/GAME-AUTHOR.md": "
|
|
17
|
+
"docs/npm/GAME-AUTHOR.md": "8609edbd3ff882cc12a448b44f064a0241295e06d2b51f2dc674a92d1d7c4e1f",
|
|
18
18
|
"docs/PELICAN-MIGRATION.md": "c5d6ab8e5186f4d36720a0a01d1a7e4157a5d386c5400e2db99571a7d10a1e49",
|
|
19
19
|
"docs/PHYSICS-LIFECYCLE-ISSUE.md": "cc78917462de4e7e9b68e77c742192ce213b4be5b516d2ba943251fff46977ac",
|
|
20
20
|
"docs/RENDER-BACKENDS.md": "d981ea94742a835d028db37d536fb7fba05102e37bc6274a37baf74f5034b954",
|
|
21
21
|
"docs/ROADMAP.md": "29ac1c54f36064e23c17cfe7f549d6860889257a57d1227e322958aa9c281568",
|
|
22
|
-
"docs/STATUS.md": "
|
|
22
|
+
"docs/STATUS.md": "bb0d0e62fb501d7a9dcedc68edb4d1cc37010aa44a174ee07b2d8d0608e05222",
|
|
23
23
|
"docs/THIRD-PARTY-NOTICES.md": "58f9b72e2b4dfaaaf2a4c08b9bde9ecef3d2b7e7d65fccd782ed54f39fa76fdc",
|
|
24
|
-
"engine.manifest.json": "
|
|
24
|
+
"engine.manifest.json": "d2f94f6527b46bc681e3fe9e921f4833fac7bcf12b238217fe84835d2bfa0f88",
|
|
25
25
|
"lib/assets/audio.js": "6facdce4e053afd172af5b9407569b035169844ea17b49f93f8b67f72b78895f",
|
|
26
26
|
"lib/assets/errors.js": "70572678655c6e53179d31920d71f29882d373a0e12d560220bb0fc2cd74f2cc",
|
|
27
27
|
"lib/assets/glb.js": "b808479a36299c154db97f50c16863a3b5a2c61f725e66bf01d01a5f62a288a5",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"lib/experiments/world/types.js": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
|
|
52
52
|
"lib/experiments/world/world.js": "e335a96b1a2b217b69077f8e4b01aed7fd54b87e39bd5ac4138555d27ad9afe1",
|
|
53
53
|
"lib/navigation/index.js": "5ee447333ff2152b1f08b34a68e16dd058448b0a4d2f8b3eae0fb8e76f52a1a9",
|
|
54
|
-
"lib/physics/index.js": "
|
|
54
|
+
"lib/physics/index.js": "714bb1d2a7b9eef0776af2623f0964d3b19a220824a8e26a0ec24327c2c2436d",
|
|
55
55
|
"lib/protocol/index.js": "875c9f7ba4e67adc182aa177bc5017da0907ff9c584ba523021a219b26e38c89",
|
|
56
56
|
"lib/renderer/acceleration.js": "50ccafc9bc5b463470a23cffbdff8dc1a29a77bada44d21caf1eb0c3f9de2c65",
|
|
57
57
|
"lib/renderer/browser.js": "0ef885517bef24b12a68e898d274643f5a8ee164d1956c27dc470a9a6c5a431e",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"lib/runtime/error.js": "544d52d5426c53266c902e7b5afda1ea76a84ac12b6027879aed647423acbbad",
|
|
105
105
|
"lib/runtime/events.js": "e1d8fd5005be19d7a26d51023b97245318bce4b777748562d5e453b10f0faefe",
|
|
106
106
|
"lib/runtime/game-services.js": "a026966789aca4c45a5303950f7bc757cc6c12f223cbeaba13f6d514cac8575b",
|
|
107
|
-
"lib/runtime/host.js": "
|
|
107
|
+
"lib/runtime/host.js": "b4012d63dc2a5ffb9a32840801848f590e842e8eee5f2ec4f5f1ffb718e7477c",
|
|
108
108
|
"lib/runtime/material-parameters.js": "c535afa5ff3d92f399da142a45f22541598e374b6a8e4051a65f8f20dd8fb970",
|
|
109
109
|
"lib/runtime/plugins.js": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
|
|
110
110
|
"lib/runtime/postprocess-contract.js": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
|
|
@@ -123,9 +123,9 @@
|
|
|
123
123
|
"lib/runtime/world.js": "c43621fbaca8bd2b0d6477a96e60e895312f0f7b1eb97614b6e4f9b716129ea1",
|
|
124
124
|
"lib/schema/index.js": "594429eecb4494c4af2f3d04537be3211f2c9297a1fc555bbba5d028d8627965",
|
|
125
125
|
"lib/sdk/graph-values.js": "a58c00f127cb82aba5fd2824981942844e06d9a59a88a05e35d1d3df2fc7ed2f",
|
|
126
|
-
"lib/sdk/index.d.ts": "
|
|
127
|
-
"lib/sdk/index.js": "
|
|
128
|
-
"lib/simulation/rope-plugin.js": "
|
|
126
|
+
"lib/sdk/index.d.ts": "78196f514e088a9b0fe0f6dbf4bda544fe238a4e8dd7d1835588a9efdfadafe6",
|
|
127
|
+
"lib/sdk/index.js": "1176ce3b3d208919f7fe0db5f1b945928e4e52ad70932bcb9347e28584e67c4d",
|
|
128
|
+
"lib/simulation/rope-plugin.js": "4f098bb4da706969a7b35fd4143b8a55a025222d52a759ecdaa7d3390ab0e4f1",
|
|
129
129
|
"lib/simulation/rope.js": "0304f637696364dcc21c21f1f274cf2ba9c7dd2276073322071ba5f238fe34c1",
|
|
130
130
|
"lib/tools/api-index.js": "6aedc153a0ce8eaf18239b0368a76a8ae8e4397bd8e6cdf571889bc39265be5d",
|
|
131
131
|
"lib/tools/browser-session.js": "1fa7f78d4752d8a59a55dc2283b4d42cd1df230f0d5a5dc80c6d78ade45b4cdb",
|
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
"licenses/undici-types/LICENSE": "a6db8096b2707bc0102d256917d4d33f298ba36d8c3f25de067a2b5bb379db27",
|
|
198
198
|
"licenses/uniq/LICENSE": "e67aed7df22dc8031e4fcf5338fe91cb33e3817e5c58a99a2a2802eea9069791",
|
|
199
199
|
"licenses/vite/LICENSE.md": "a22152baa1aef74402443008e767e7c689a524c0909d19b0431d97f5ab066a13",
|
|
200
|
-
"package.json": "
|
|
200
|
+
"package.json": "fb9075ef4dec1793d1b5c1752a93a4fb855e9f0bdc98fbe90c4abe3a68893492",
|
|
201
201
|
"README.md": "ff25e039921a85ba253c27608c77ed614a036117d7a04f908a78d1e3ed3f19ef",
|
|
202
202
|
"web/index.html": "d89d6a5b5be3beae3627a8ed506ac308b165d264fb8696be3afd79fcca2f26ee"
|
|
203
203
|
}
|
package/docs/STATUS.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## 版本与发布
|
|
4
4
|
|
|
5
|
-
- 当前版本为 `0.3.
|
|
5
|
+
- 当前版本为 `0.3.13`,包、锁文件、引擎、SDK、编译器和示例中的版本保持一致。下一项功能完成后统一递增并推送;相同版本不能重复发布。
|
|
6
6
|
- 推送主线会通过 GitHub Actions 和 npm 可信发布更新 `latest`;GitHub Release 用于记录里程碑。历史版本和旧标签保持原样,不代表当前源码通过。
|
|
7
7
|
- 当前按用户要求仅允许编译和构建,不运行测试、浏览器、GPU、性能或其他验证。普通版本号不意味着运行行为、硬件或完整引擎已验收。
|
|
8
8
|
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
- 动态光追、路径追踪、受控图形计算和 WebGL2 回退已有研发实现,但当前源码的完整画质、性能、兼容性和资源生命周期未验证,不能称为完整首发。
|
|
13
13
|
- 刚体首步前删除存在已知缺陷;历史候选存在旧快照兼容及危险历史回放风险,不得通过修改夹具或在主进程回放危险历史掩盖。有关背景与原始证据保留在历史任务文档中。
|
|
14
14
|
- 正交网格导航新增批量障碍更新接口;它只处理单个网格的阻挡状态,不等于世界流送、实体变换或物理联动。该增量尚未进行运行行为验证。
|
|
15
|
-
- CPU
|
|
16
|
-
-
|
|
15
|
+
- CPU 粒子绳索已接入 `ctx.ropes` 和 Host 快照,支持手动或自动固定步进。显式绑定的动态非触发球体可在物理阶段后被采样,并接收绳索投影产生的反冲量;其他采样球体/平面仍为单向。尚无绳索网格渲染、完整双向求解、绳段/自碰撞或撕裂。该增量尚未进行运行行为或快照兼容验证。
|
|
16
|
+
- 接触反冲量可手动映射到其他刚体;球体绑定的自动反应仍是延迟采样,不含刚体有效质量、速度反馈、摩擦或连续碰撞,不代表完整双向耦合。接口和示例尚未执行运行或快照验证。
|
|
17
17
|
- 布料、绳索、软体、流体、连续世界、导航、动画、音频和其他首发能力仍需按各自依赖完成,不能把独立候选或局部实现写成整项完成。
|
|
18
18
|
|
|
19
19
|
## 单线接续
|