feat: smart animation mode

This commit is contained in:
Asaki Yuki 2026-01-26 15:35:55 +07:00
parent 7534a613cb
commit 1114828000
11 changed files with 207 additions and 44 deletions

View file

@ -4,6 +4,7 @@ import { UI } from "../components/UI.js"
import { AnimType } from "../types/enums/AnimType.js"
import { Renderer } from "../types/enums/Renderer.js"
import { Type } from "../types/enums/Type.js"
import { isBuildMode } from "./Configuration.js"
type Element = UI<Type, Renderer | null> | AnimationKeyframe<AnimType>
interface FileInterface {
@ -16,6 +17,7 @@ export class Memory extends Class {
protected static files: Files = new Map<string, FileInterface>()
public static add(element: UI<Type, Renderer | null> | AnimationKeyframe<AnimType>) {
if (!isBuildMode) return
let file = Memory.files.get(element.path)
if (!file) {