Files
aego/asset/resolver.go
T
sanspie 515f4ca1b3 Stage 11a: animation (D333–D340, D344, D354–D357)
Clips (.aeanim) and controllers (.aectrl) with importers, AnimationPlayer and Animator with crossfades, root motion and events on fixed steps, rewind support. Editor: Animation panel (dope sheet, curves, record, preview, trajectory), Animator panel, sprite sheet slicer and flipbooks, Programming workspace, export panel redesign. Motion 2D ledge climb. 11c: the component and Create palette.
2026-10-25 15:31:22 +03:00

57 lines
1.3 KiB
Go

package asset
import (
"aego/core/ids"
"aego/render/mesh"
"aego/render/texture"
)
type ArtifactKind string
const (
ArtTexture ArtifactKind = "texture"
ArtAtlasPage ArtifactKind = "atlaspage"
ArtSpriteRegion ArtifactKind = "spriteregion"
ArtScene ArtifactKind = "scene"
ArtPrefab ArtifactKind = "prefab"
ArtMesh ArtifactKind = "mesh"
ArtScript ArtifactKind = "script"
ArtData ArtifactKind = "data"
ArtTable ArtifactKind = "table"
ArtPreset ArtifactKind = "preset"
ArtAudio ArtifactKind = "audio"
ArtAnim ArtifactKind = "anim"
ArtCtrl ArtifactKind = "animctrl"
)
type Reloaded struct {
ID ids.AssetID
Kind ArtifactKind
}
type Resolver interface {
Texture(id ids.AssetID) (texture.Region, bool)
Mesh(id ids.AssetID) (*mesh.Mesh, bool)
Scene(id ids.AssetID) ([]byte, bool)
Prefab(id ids.AssetID) ([]byte, bool)
Generation() uint32
Subscribe(fn func(Reloaded)) func()
}
type Decoder interface {
Decoded(id ids.AssetID, key string, build func() (any, error)) (any, error)
}
type AnimSource interface {
Anim(id ids.AssetID) ([]byte, bool)
}
type CtrlSource interface {
Controller(id ids.AssetID) ([]byte, bool)
}
type DataSource interface {
Data(id ids.AssetID) ([]byte, bool)
Table(id ids.AssetID) ([]byte, bool)
}