mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-29 09:08:58 +00:00
Merge branch 'animation-clips-setup' of https://github.com/storytold/storyteller-bevy into animation-clips-setup
This commit is contained in:
@@ -50,7 +50,7 @@ export class AnimEditorElement extends LitElement {
|
|||||||
|
|
||||||
@state() keyframes : Record<string, Keyframe> = {};
|
@state() keyframes : Record<string, Keyframe> = {};
|
||||||
|
|
||||||
@state() selected_track : { track: string } | {outside_entity: string } | false = false;
|
@state() selectedTrack?: { track: string } | { outsideEntity: string };
|
||||||
|
|
||||||
trackCount(): number {
|
trackCount(): number {
|
||||||
return Object.keys(this.tracks).length;
|
return Object.keys(this.tracks).length;
|
||||||
@@ -253,8 +253,8 @@ export class AnimEditorElement extends LitElement {
|
|||||||
track_order_hashed[track] = index;
|
track_order_hashed[track] = index;
|
||||||
}
|
}
|
||||||
|
|
||||||
const selected = typeof this.selected_track === "object" && "track" in this.selected_track ? this.selected_track.track : false;
|
const selected = !isOutsideEntity(this.selectedTrack) && this.selectedTrack?.track || false;
|
||||||
const canAddSelected = typeof this.selected_track === "object" && "outside_entity" in this.selected_track ? this.selected_track.outside_entity : false;
|
const canAddSelected = isOutsideEntity(this.selectedTrack) && this.selectedTrack.outsideEntity || false;
|
||||||
|
|
||||||
let length = this.timelineEnd - this.timelineStart;
|
let length = this.timelineEnd - this.timelineStart;
|
||||||
let clip_start = (this.clipStart - this.timelineStart) / length;
|
let clip_start = (this.clipStart - this.timelineStart) / length;
|
||||||
|
|||||||
@@ -624,7 +624,7 @@ mod wasm {
|
|||||||
|
|
||||||
export interface UpdateKeyframes extends CustomEvent {
|
export interface UpdateKeyframes extends CustomEvent {
|
||||||
type: "update-keyframes",
|
type: "update-keyframes",
|
||||||
details: {
|
detail: {
|
||||||
added: Record<string, Keyframe>,
|
added: Record<string, Keyframe>,
|
||||||
removed: string[]
|
removed: string[]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user