|
@@ -14,7 +14,7 @@
|
|
|
@change-frame-action="(f) => (frameAction = f.action)"
|
|
|
class="animation-right"
|
|
|
v-model:activeAttrib="activeAttrib"
|
|
|
- @add-frame="add('frames')"
|
|
|
+ @add-frame="add('frames', { duration: 0 })"
|
|
|
@add-path="(preset) => add('paths', { reverse: false, ...preset })"
|
|
|
@add-subtitle="add('subtitles', { content: '', background: '#fff' })"
|
|
|
@add-action="(preset) => add('actions', preset)"
|
|
@@ -91,7 +91,6 @@ watchEffect((onCleanup) => {
|
|
|
const am3d = amM.value.am;
|
|
|
if (!am3d) return;
|
|
|
const updateMat = () => {
|
|
|
- console.log("update mat", frame.id);
|
|
|
frame.mat = JSON.parse(JSON.stringify(am3d.getModelPose()));
|
|
|
};
|
|
|
|
|
@@ -148,6 +147,8 @@ watch(activeAttrib, (_a, _b, onCleanup) => {
|
|
|
const cur = focusAM.value![activeAttrib.value.key][activeAttrib.value.ndx];
|
|
|
const updateFocus = () => {
|
|
|
const rang = [cur.time, cur.time + (cur.duration || 0)];
|
|
|
+
|
|
|
+ console.log(rang, cur, cur.time);
|
|
|
if (currentTime.value < rang[0] || currentTime.value > rang[1]) {
|
|
|
activeAttrib.value = undefined;
|
|
|
}
|
|
@@ -180,6 +181,7 @@ const add = <T extends Active["key"]>(
|
|
|
...preset,
|
|
|
} as any);
|
|
|
if (key === "frames") {
|
|
|
+ console.log(preset, item);
|
|
|
asyncOper(
|
|
|
focusAM.value!,
|
|
|
(am3d) => (item.mat = JSON.parse(JSON.stringify(am3d.getModelPose())))
|