|
@@ -91,7 +91,13 @@ watchEffect((onCleanup) => {
|
|
|
const am3d = amM.value.am;
|
|
|
if (!am3d) return;
|
|
|
const updateMat = () => {
|
|
|
- frame.mat = JSON.parse(JSON.stringify(am3d.getModelPose()));
|
|
|
+ if (
|
|
|
+ activeAttrib.value?.key === "frames" &&
|
|
|
+ focusAM.value!.frames[activeAttrib.value.ndx] === frame
|
|
|
+ ) {
|
|
|
+ console.log("setMat");
|
|
|
+ frame.mat = JSON.parse(JSON.stringify(am3d.getModelPose()));
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
am3d.bus.on("transformChanged", updateMat);
|
|
@@ -160,7 +166,8 @@ watch(activeAttrib, (_a, _b, onCleanup) => {
|
|
|
onCleanup(
|
|
|
watch(
|
|
|
() => [currentTime.value, cur.time, cur.time + (cur.duration || 0)],
|
|
|
- updateFocus
|
|
|
+ updateFocus,
|
|
|
+ { flush: "sync" }
|
|
|
)
|
|
|
);
|
|
|
});
|