|
@@ -126,7 +126,6 @@ export const addFrame = (
|
|
([map, exists]) => {
|
|
([map, exists]) => {
|
|
if (!map?.am) return;
|
|
if (!map?.am) return;
|
|
if (exists && !map.frames[data.id]) {
|
|
if (exists && !map.frames[data.id]) {
|
|
- console.error('addFrame', am.title, data)
|
|
|
|
map.frames[data.id] = map.am.addFrame(data);
|
|
map.frames[data.id] = map.am.addFrame(data);
|
|
} else if (!exists && map.frames[data.id]) {
|
|
} else if (!exists && map.frames[data.id]) {
|
|
map.frames[data.id].destroy();
|
|
map.frames[data.id].destroy();
|
|
@@ -183,7 +182,6 @@ export const addAction = (
|
|
([map, exists]) => {
|
|
([map, exists]) => {
|
|
if (!map?.am) return;
|
|
if (!map?.am) return;
|
|
if (exists && !map.actions[data.id]) {
|
|
if (exists && !map.actions[data.id]) {
|
|
- console.error('addAction', am.title, data)
|
|
|
|
map.actions[data.id] = map.am.addAction(data);
|
|
map.actions[data.id] = map.am.addAction(data);
|
|
} else if (!exists && map.actions[data.id]) {
|
|
} else if (!exists && map.actions[data.id]) {
|
|
map.actions[data.id].destroy();
|
|
map.actions[data.id].destroy();
|
|
@@ -266,7 +264,6 @@ export const addPath = (
|
|
watchEffect(() => amMap[key]?.paths[data.id]?.changeReverse(data.reverse)),
|
|
watchEffect(() => amMap[key]?.paths[data.id]?.changeReverse(data.reverse)),
|
|
watchEffect(() => amMap[key]?.paths[data.id]?.changeDuration(data.duration)),
|
|
watchEffect(() => amMap[key]?.paths[data.id]?.changeDuration(data.duration)),
|
|
watchEffect(() => {
|
|
watchEffect(() => {
|
|
- console.error(path.value, pathData.value)
|
|
|
|
path.value &&amMap[key]?.paths[data.id]?.changePath(path.value)
|
|
path.value &&amMap[key]?.paths[data.id]?.changePath(path.value)
|
|
})
|
|
})
|
|
);
|
|
);
|
|
@@ -313,7 +310,6 @@ export const addSubtitle = (data: AnimationModelSubtitle) => {
|
|
([map, exists]) => {
|
|
([map, exists]) => {
|
|
if (!map?.am) return;
|
|
if (!map?.am) return;
|
|
if (exists && !map.subtitles[data.id]) {
|
|
if (exists && !map.subtitles[data.id]) {
|
|
- console.error('add subtitle', am.title, data)
|
|
|
|
map.subtitles[data.id] = mount(
|
|
map.subtitles[data.id] = mount(
|
|
document.querySelector("#app")!,
|
|
document.querySelector("#app")!,
|
|
Subtitle,
|
|
Subtitle,
|
|
@@ -472,7 +468,6 @@ export const associationAnimation = (sdk: SDK, el: HTMLDivElement) => {
|
|
for (const am of added) {
|
|
for (const am of added) {
|
|
const am3d = amMap[am.id]
|
|
const am3d = amMap[am.id]
|
|
if (!am3d || !am3d.am) continue;
|
|
if (!am3d || !am3d.am) continue;
|
|
- console.error('global-frame', am3d.am)
|
|
|
|
const frame = am3d.am!.addFrame({
|
|
const frame = am3d.am!.addFrame({
|
|
id: uuid(),
|
|
id: uuid(),
|
|
mat: am.mat || am3d.am.getModelPose(),
|
|
mat: am.mat || am3d.am.getModelPose(),
|
|
@@ -486,7 +481,6 @@ export const associationAnimation = (sdk: SDK, el: HTMLDivElement) => {
|
|
console.log('set-global-frame', am.mat)
|
|
console.log('set-global-frame', am.mat)
|
|
}),
|
|
}),
|
|
() => {
|
|
() => {
|
|
- console.error('destroy-global-frame', am3d.am)
|
|
|
|
frame.destroy();
|
|
frame.destroy();
|
|
am3d.globalFrame = undefined;
|
|
am3d.globalFrame = undefined;
|
|
delete cleanupMap[am.id]
|
|
delete cleanupMap[am.id]
|