spine-html 1.23.0 → 3.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 +4 -3
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
package/dist/index.js
CHANGED
|
@@ -3530,6 +3530,7 @@ function applyConstraints(bones, world, active, records, previous = null, applie
|
|
|
3530
3530
|
if (changed.length > 0) repose(state, changed, inWorld);
|
|
3531
3531
|
snap(i, "after");
|
|
3532
3532
|
}
|
|
3533
|
+
settled?.(state);
|
|
3533
3534
|
return state.world;
|
|
3534
3535
|
}
|
|
3535
3536
|
function planShape(c) {
|
|
@@ -4231,7 +4232,7 @@ function posedBoneStep(doc, timelines, t, plant, constraints, sliders, step) {
|
|
|
4231
4232
|
const setupRecords = constraintRecords(doc);
|
|
4232
4233
|
const records = pathDeformed(doc, posedRecords(setupRecords, constraints, t), timelines, t, plant);
|
|
4233
4234
|
const previous = setupRecords.some((r) => r.kind === "path") ? applyConstraints(doc.bones, (plant.evaluate ?? worldTransforms)(doc.bones, active), active, plant.constraints ? plant.constraints(setupRecords) : setupRecords, null, void 0, void 0, void 0, solverRules(plant.solver)) : null;
|
|
4234
|
-
world = applyConstraints(bones, initialWorld, active, plant.constraints ? plant.constraints(records) : records, previous, sliders, void 0, void 0, solverRules(plant.solver));
|
|
4235
|
+
world = applyConstraints(bones, initialWorld, active, plant.constraints ? plant.constraints(records) : records, previous, sliders, void 0, plant.readLocals === void 0 ? void 0 : (state) => plant.readLocals?.(state.bones, sliders ?? []), solverRules(plant.solver));
|
|
4235
4236
|
if (stage !== void 0) stage.end("constraints");
|
|
4236
4237
|
}
|
|
4237
4238
|
for (const b of bones) if (world.get(b.name) === void 0) throw new CoreInputError(`the evaluator returned no transform for bone "${b.name}"`);
|
|
@@ -4252,7 +4253,7 @@ function steppedLocals(doc, bones, plant, records, physicsKeyed, t, sliders, ste
|
|
|
4252
4253
|
stage.begin("constraints");
|
|
4253
4254
|
}
|
|
4254
4255
|
const stepped = stepPhysicsRecords(records(), physicsKeyed, t, active, step.ctx, step.before);
|
|
4255
|
-
const world = applyConstraints(bones, initialWorld, active, plant.constraints ? plant.constraints(stepped) : stepped, null, sliders, step.ctx, void 0, solverRules(plant.solver));
|
|
4256
|
+
const world = applyConstraints(bones, initialWorld, active, plant.constraints ? plant.constraints(stepped) : stepped, null, sliders, step.ctx, plant.readLocals === void 0 ? void 0 : (state) => plant.readLocals?.(state.bones, sliders ?? []), solverRules(plant.solver));
|
|
4256
4257
|
if (stage !== void 0) stage.end("constraints");
|
|
4257
4258
|
for (const b of bones) if (world.get(b.name) === void 0) throw new CoreInputError(`the evaluator returned no transform for bone "${b.name}"`);
|
|
4258
4259
|
return { bones, world, active, round: plant.round ?? gridRound };
|
|
@@ -4967,7 +4968,7 @@ function poseSetup(doc, plant = {}, physics) {
|
|
|
4967
4968
|
if (bonesWhy === null) {
|
|
4968
4969
|
const active = activeBones(doc);
|
|
4969
4970
|
const records = constraintRecords(doc);
|
|
4970
|
-
setupWorld = applyConstraints(doc.bones, evaluate(doc.bones, active), active, plant.constraints ? plant.constraints(records) : records, null, applied, physics, void 0, solverRules(plant.solver));
|
|
4971
|
+
setupWorld = applyConstraints(doc.bones, evaluate(doc.bones, active), active, plant.constraints ? plant.constraints(records) : records, null, applied, physics, plant.readLocals === void 0 ? void 0 : (state) => plant.readLocals?.(state.bones, applied), solverRules(plant.solver));
|
|
4971
4972
|
const world = setupWorld;
|
|
4972
4973
|
bones = doc.bones.map((b) => {
|
|
4973
4974
|
const t = world.get(b.name);
|