Documentation
¶
Overview ¶
Package res provides functionality for loading resources from figure part and furni libraries.
Index ¶
- type Animation
- type AnimationLayer
- type Asset
- type AssetLibrary
- type Assets
- type Color
- type ColorLayer
- type Dimensions
- type FrameSequence
- type FurniAssetSpec
- type FurniLibrary
- type FurniLibraryLoader
- type Index
- type Layer
- type LibraryManager
- type Logic
- type Manifest
- type Model
- type ParticleSystem
- type Visualization
- type VisualizationData
- type Visualizations
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Animation ¶
type Animation struct {
Id int
TransitionTo *Animation
Layers map[int]*AnimationLayer
}
type AnimationLayer ¶
type AnimationLayer struct {
Id int
LoopCount int
FrameRepeat int
Random int
FrameSequences []FrameSequence // A list of frame sequences.
}
type Asset ¶
type Asset struct {
Name string // The asset's name.
Source *Asset // The source asset.
FlipH bool // Whether the asset is flipped horizontally.
FlipV bool // Whether the asset is flipped vertically.
Offset image.Point // The asset's image offset.
Bounds image.Rectangle
Image image.Image // The asset's image.
}
func (*Asset) SourceImage ¶
type AssetLibrary ¶
type AssetLibrary interface {
Name() string
Asset(name string) (*Asset, error)
Assets() []string
AssetExists(name string) bool
}
func LoadFigureLibrarySwf ¶
func LoadFigureLibrarySwf(swf *swfx.Swf) (lib AssetLibrary, err error)
type Assets ¶
func (*Assets) UnmarshalBytes ¶
type Color ¶
type Color struct {
Id int
Layers map[int]*ColorLayer
}
type ColorLayer ¶
type Dimensions ¶
type FrameSequence ¶
type FrameSequence []int
FrameSequence represents a list of frame IDs for an animation.
type FurniAssetSpec ¶
type FurniAssetSpec struct {
Name string
Size int
Layer int // The layer index. A negative value represents the `sd` (shadow) layer.
Direction int
Frame int // The frame index.
}
FurniAssetSpec represents an asset specifier for a furni library.
func (*FurniAssetSpec) String ¶
func (spec *FurniAssetSpec) String() string
type FurniLibrary ¶
type FurniLibrary interface {
AssetLibrary
Index() *Index
Manifest() *Manifest
Logic() *Logic
Visualizations() map[int]*Visualization
}
func LoadFurniLibraryNitro ¶
func LoadFurniLibraryNitro(archive nitro.Archive) (furniLibrary FurniLibrary, err error)
func LoadFurniLibrarySwf ¶
func LoadFurniLibrarySwf(swf *swfx.Swf) (furniLibrary FurniLibrary, err error)
type FurniLibraryLoader ¶
type FurniLibraryLoader interface {
Load() (FurniLibrary, error)
}
type Index ¶
An Index describes the furni visualization and logic types.
func (*Index) UnmarshalBytes ¶
type LibraryManager ¶
type LibraryManager interface {
Library(name string) AssetLibrary
Libraries() []string
LibraryExists(name string) bool
AddLibrary(AssetLibrary) bool
}
func NewManager ¶
func NewManager() LibraryManager
type Logic ¶
type Logic struct {
Type string
Model *Model
ParticleSystems map[int]*ParticleSystem // Particle systems mapped by size.
}
func (*Logic) UnmarshalBytes ¶
type Model ¶
type Model struct {
Dimensions Dimensions
Directions []int
}
type ParticleSystem ¶
type ParticleSystem struct {
Size int
}
type Visualization ¶
type VisualizationData ¶
type VisualizationData struct {
Type string // The furni type for the visualization.
Visualizations Visualizations // A map of visualizations by size.
}
func (*VisualizationData) UnmarshalBytes ¶
func (visualizationData *VisualizationData) UnmarshalBytes(b []byte) (err error)
type Visualizations ¶
type Visualizations map[int]*Visualization
Click to show internal directories.
Click to hide internal directories.