Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Animation ¶
type Animation struct {
Header AnimationHeader `json:"header"`
Entries []Entry `json:"entries"`
Size uint32 `json:"-"`
}
func LoadAnimation ¶
func LoadAnimation(r io.ReadSeeker) (*Animation, error)
type AnimationHeader ¶
type AnimationHeader struct {
Unk00 uint32 `json:"-"`
BoneCount uint32 `json:"boneCount"`
AnimationLength float32 `json:"length"`
Size uint32 `json:"-"`
HashesCount uint32 `json:"-"` // These may or may not be hashes
BeatCount uint32 `json:"-"` // but they're definitely 8 bytes
Hashes []stingray.Hash `json:"-"` // wide as far as I've seen
ResolvedHashes []string `json:"hashes"`
Beats []rawBeat `json:"-"`
ResolvedBeats []Beat `json:"beats"`
Unk02 uint16 `json:"unk02"`
TransformCompressions []InitialCompression `json:"transformCompressions"`
InitialTransforms []BoneInitialState `json:"initialTransforms"`
HashFloats []float32 `json:"hashFloats"`
}
type BoneInitialState ¶
type BoneInitialState struct {
InitialCompression
// contains filtered or unexported fields
}
func (*BoneInitialState) IsAdditive ¶
func (b *BoneInitialState) IsAdditive() bool
func (BoneInitialState) MarshalJSON ¶
func (b BoneInitialState) MarshalJSON() ([]byte, error)
func (*BoneInitialState) Position ¶
func (b *BoneInitialState) Position() mgl32.Vec3
func (*BoneInitialState) Rotation ¶
func (b *BoneInitialState) Rotation() mgl32.Quat
func (*BoneInitialState) Scale ¶
func (b *BoneInitialState) Scale() mgl32.Vec3
type EntryHeader ¶
type EntryHeader struct {
Kind EntryHeaderType
CompressedTimestamp uint16
UncompressedBone uint32
UncompressedTimestamp float32
}
func ReadEntryHeader ¶
func ReadEntryHeader(r io.Reader) (*EntryHeader, error)
func (*EntryHeader) Bone ¶
func (e *EntryHeader) Bone() uint16
func (EntryHeader) MarshalJSON ¶
func (e EntryHeader) MarshalJSON() ([]byte, error)
func (*EntryHeader) Subtype ¶
func (e *EntryHeader) Subtype() EntrySubtype
func (*EntryHeader) TimeMS ¶
func (e *EntryHeader) TimeMS() uint32
func (*EntryHeader) Type ¶
func (e *EntryHeader) Type() EntryType
type EntryHeaderType ¶
type EntryHeaderType uint16
func (*EntryHeaderType) Bone ¶
func (e *EntryHeaderType) Bone() uint16
func (*EntryHeaderType) TimeMS ¶
func (e *EntryHeaderType) TimeMS(bottom16 uint16) uint32
func (*EntryHeaderType) Type ¶
func (e *EntryHeaderType) Type() EntryType
type EntrySubtype ¶
type EntrySubtype uint16
const ( EntrySubtypeTimestamp EntrySubtype = 0x0002 EntrySubtypeTerminator EntrySubtype = 0x0003 EntrySubtypePosition EntrySubtype = 0x0004 EntrySubtypeRotation EntrySubtype = 0x0005 EntrySubtypeScale EntrySubtype = 0x0006 )
type InitialCompression ¶
type PackedQuaternion ¶
type PackedQuaternion uint32
func (*PackedQuaternion) First ¶
func (p *PackedQuaternion) First() float32
func (*PackedQuaternion) Largest ¶
func (p *PackedQuaternion) Largest() uint32
func (PackedQuaternion) MarshalJSON ¶
func (p PackedQuaternion) MarshalJSON() ([]byte, error)
func (*PackedQuaternion) Quaternion ¶
func (p *PackedQuaternion) Quaternion() mgl32.Quat
func (*PackedQuaternion) Second ¶
func (p *PackedQuaternion) Second() float32
func (*PackedQuaternion) Third ¶
func (p *PackedQuaternion) Third() float32
Click to show internal directories.
Click to hide internal directories.