bak
This commit is contained in:
1 parent
6b6157d786
commit
3ef5fb5a2d
19 files changed
+1244
-94
No files matched your search
@@ -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 }
|
||||
}
|
||||
Reference in new issue
Block a user