reze-engine 0.69.7 → 0.69.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/dist/_dbg-loader.mjs +1100 -0
- package/dist/engine.d.ts +36 -0
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +81 -3
- package/dist/graph/compile.js +1 -1
- package/dist/graph/registry.d.ts.map +1 -1
- package/dist/graph/registry.js +19 -2
- package/dist/graph/slots.js +117 -117
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +7 -4
- package/dist/shaders/materials/common.d.ts +11 -1
- package/dist/shaders/materials/common.d.ts.map +1 -1
- package/dist/shaders/materials/common.js +571 -548
- package/dist/shaders/passes/particles.d.ts.map +1 -1
- package/dist/shaders/passes/particles.js +13 -2
- package/dist/shaders/passes/shadow.d.ts +1 -1
- package/dist/shaders/passes/shadow.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/engine.ts +21337 -21249
- package/src/graph/compile.ts +1 -1
- package/src/graph/registry.ts +20 -3
- package/src/graph/slots.ts +304 -304
- package/src/index.ts +1 -0
- package/src/model.ts +7 -4
- package/src/shaders/materials/common.ts +706 -682
- package/src/shaders/passes/particles.ts +14 -2
package/src/model.ts
CHANGED
|
@@ -3183,7 +3183,8 @@ export class Model {
|
|
|
3183
3183
|
for (const b of boneIndices) if (b >= 0 && b < n) this.physicsDriven[b] = 1
|
|
3184
3184
|
|
|
3185
3185
|
// Bones to recompute after a step: anything that INHERITS from a simulated
|
|
3186
|
-
// bone, everything under
|
|
3186
|
+
// bone or hangs under one, everything under those, and anything inheriting
|
|
3187
|
+
// from them in turn.
|
|
3187
3188
|
// Simulated bones themselves are deliberately excluded — their world matrix
|
|
3188
3189
|
// IS the simulation's output, and recomputing it from a local pose the
|
|
3189
3190
|
// simulation never wrote would throw the step away.
|
|
@@ -3198,7 +3199,9 @@ export class Model {
|
|
|
3198
3199
|
const ap = b.appendParentIndex
|
|
3199
3200
|
const inheritsAffected =
|
|
3200
3201
|
(b.appendRotate || b.appendMove) && ap !== undefined && ap >= 0 && ap < n && (this.physicsDriven[ap] || affected[ap])
|
|
3201
|
-
|
|
3202
|
+
// A plain child of a simulated bone — one with no body of its own, like
|
|
3203
|
+
// 瞳 inside Koishi's third eye — rides on the simulated world matrix.
|
|
3204
|
+
const parentAffected = b.parentIndex >= 0 && (affected[b.parentIndex] || this.physicsDriven[b.parentIndex])
|
|
3202
3205
|
if (inheritsAffected || parentAffected) {
|
|
3203
3206
|
affected[i] = 1
|
|
3204
3207
|
changed = true
|
|
@@ -3251,12 +3254,12 @@ export class Model {
|
|
|
3251
3254
|
applyPhysicsAppend(): void {
|
|
3252
3255
|
const order = this.physicsAppendOrder
|
|
3253
3256
|
const sources = this.physicsAppendSources
|
|
3254
|
-
if (!order || !
|
|
3257
|
+
if (!order || !this.appendRotOverride || !this.appendRotOverrideSet) return
|
|
3255
3258
|
const bones = this.skeleton.bones
|
|
3256
3259
|
const worldMats = this.runtimeSkeleton.worldMatrices
|
|
3257
3260
|
|
|
3258
3261
|
this.appendRotOverrideSet.fill(0)
|
|
3259
|
-
for (let s = 0; s < sources.length; s++) {
|
|
3262
|
+
for (let s = 0; sources && s < sources.length; s++) {
|
|
3260
3263
|
const i = sources[s]
|
|
3261
3264
|
const w = worldMats[i].values
|
|
3262
3265
|
const p = bones[i].parentIndex
|