This commit is contained in:
th committed 2026-04-20 00:07:08 +02:00
1 parent 6b6157d786
commit 3ef5fb5a2d
19 files changed
+1244 -94

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
import { computed, ref } from 'vue'
export interface KfSelectionKey {
layerId: string
kind: 'main' | 'position' | 'rotation'
keyframeId: string
}
const selectedKfs = ref<KfSelectionKey[]>([])
export function kfSelectionKey(k: KfSelectionKey): string {
return `${k.layerId}:${k.kind}:${k.keyframeId}`
}
const selectedKfSet = computed(() => {
const s = new Set<string>()
for (const k of selectedKfs.value) s.add(kfSelectionKey(k))
return s
})
export function useKfSelection() {
return { selectedKfs, selectedKfSet }
}