Documentation ¶
Index ¶
- Variables
- type Animation
- type Atlas
- type AtlasAttachmentLoader
- type AtlasPage
- type AtlasRegion
- type Attachment
- type AttachmentLoader
- type AttachmentTimeline
- type Bone
- type BoneData
- type ColorTimeline
- type Curve
- type RegionAttachment
- type RotateTimeline
- type ScaleTimeline
- type Skeleton
- func (s *Skeleton) AttachmentBySlotIndex(index int, name string) Attachment
- func (s *Skeleton) AttachmentBySlotName(slot string, attachment string) Attachment
- func (s *Skeleton) FindAnimation(name string) *Animation
- func (s *Skeleton) FindBone(name string) (int, *Bone)
- func (s *Skeleton) FindSlot(name string) (int, *Slot)
- func (s *Skeleton) RootBone() *Bone
- func (s *Skeleton) SetAttachment(slotName, attachmentName string)
- func (s *Skeleton) SetSkin(skin *Skin)
- func (s *Skeleton) SetSkinByName(name string)
- func (s *Skeleton) SetToSetupPose()
- func (s *Skeleton) Update(dt float32)
- func (s *Skeleton) UpdateWorldTransform()
- type SkeletonData
- type Skin
- type Slot
- type SlotData
- type TextureFilter
- type TextureFormat
- type TextureLoader
- type TextureWrap
- type Timeline
- type TranslateTimeline
Constants ¶
This section is empty.
Variables ¶
View Source
var BoneYDown = false
Functions ¶
This section is empty.
Types ¶
type Animation ¶
type Animation struct {
// contains filtered or unexported fields
}
func NewAnimation ¶
type Atlas ¶
type Atlas struct { Pages []*AtlasPage Regions []*AtlasRegion // contains filtered or unexported fields }
func (*Atlas) FindRegion ¶
func (a *Atlas) FindRegion(name string) *AtlasRegion
* Returns the first region found with the specified name. This method uses string comparison to find the region, so the result * should be cached rather than calling this method multiple times. * @return The region, or null.
type AtlasAttachmentLoader ¶
type AtlasAttachmentLoader struct {
*Atlas
}
func (AtlasAttachmentLoader) NewAttachment ¶
func (a AtlasAttachmentLoader) NewAttachment(skin *Skin, _type, name string) (Attachment, error)
type AtlasPage ¶
type AtlasPage struct { Name string Format TextureFormat MinFilter TextureFilter MagFilter TextureFilter UWrap TextureWrap VWrap TextureWrap RendererObject interface{} Width, Height int }
type AtlasRegion ¶
type Attachment ¶
type Attachment interface {
Name() string
}
type AttachmentLoader ¶
type AttachmentLoader interface {
NewAttachment(skin *Skin, _type, name string) (Attachment, error)
}
type AttachmentTimeline ¶
type AttachmentTimeline struct {
// contains filtered or unexported fields
}
func NewAttachmentTimeline ¶
func NewAttachmentTimeline(l int) *AttachmentTimeline
func (*AttachmentTimeline) Apply ¶
func (t *AttachmentTimeline) Apply(skeleton *Skeleton, time, alpha float32)
type Bone ¶
type Bone struct { Data *BoneData X float32 Y float32 Rotation float32 ScaleX float32 ScaleY float32 M00 float32 M01 float32 M10 float32 M11 float32 WorldX float32 WorldY float32 WorldRotation float32 WorldScaleX float32 WorldScaleY float32 // contains filtered or unexported fields }
func (*Bone) SetToSetupPose ¶
func (b *Bone) SetToSetupPose()
func (*Bone) UpdateWorldTransform ¶
type BoneData ¶
type BoneData struct { Length float32 // contains filtered or unexported fields }
func NewBoneData ¶
type ColorTimeline ¶
type ColorTimeline struct {
// contains filtered or unexported fields
}
func NewColorTimeline ¶
func NewColorTimeline(l int) *ColorTimeline
func (*ColorTimeline) Apply ¶
func (t *ColorTimeline) Apply(skeleton *Skeleton, time, alpha float32)
type Curve ¶
type Curve struct {
// contains filtered or unexported fields
}
func (*Curve) SetStepped ¶
type RegionAttachment ¶
type RegionAttachment struct { X float32 Y float32 Rotation float32 ScaleX float32 ScaleY float32 Width float32 Height float32 RendererObject interface{} RegionOffsetX float32 RegionOffsetY float32 RegionWidth float32 RegionHeight float32 RegionOriginalWidth float32 RegionOriginalHeight float32 Uvs [8]float32 // contains filtered or unexported fields }
func NewRegionAttachment ¶
func NewRegionAttachment(name string) *RegionAttachment
func (RegionAttachment) Name ¶
func (a RegionAttachment) Name() string
func (*RegionAttachment) Update ¶
func (r *RegionAttachment) Update(slot *Slot) (verts [8]float32)
type RotateTimeline ¶
type RotateTimeline struct {
// contains filtered or unexported fields
}
func NewRotateTimeline ¶
func NewRotateTimeline(l int) *RotateTimeline
func (*RotateTimeline) Apply ¶
func (t *RotateTimeline) Apply(skeleton *Skeleton, time, alpha float32)
type ScaleTimeline ¶
type ScaleTimeline struct {
// contains filtered or unexported fields
}
func NewScaleTimeline ¶
func NewScaleTimeline(l int) *ScaleTimeline
func (*ScaleTimeline) Apply ¶
func (t *ScaleTimeline) Apply(skeleton *Skeleton, time, alpha float32)
type Skeleton ¶
type Skeleton struct { Bones []*Bone Slots []*Slot DrawOrder []*Slot X, Y float32 FlipX, FlipY bool DebugBones bool DebugSlots bool // contains filtered or unexported fields }
func NewSkeleton ¶
func NewSkeleton(skeletonData *SkeletonData) *Skeleton
func (*Skeleton) AttachmentBySlotIndex ¶
func (s *Skeleton) AttachmentBySlotIndex(index int, name string) Attachment
func (*Skeleton) AttachmentBySlotName ¶
func (s *Skeleton) AttachmentBySlotName(slot string, attachment string) Attachment
func (*Skeleton) FindAnimation ¶
func (*Skeleton) SetAttachment ¶
func (*Skeleton) SetSkinByName ¶
func (*Skeleton) SetToSetupPose ¶
func (s *Skeleton) SetToSetupPose()
func (*Skeleton) UpdateWorldTransform ¶
func (s *Skeleton) UpdateWorldTransform()
type SkeletonData ¶
type SkeletonData struct {
// contains filtered or unexported fields
}
func New ¶
func New(r io.Reader, scale float32, loader AttachmentLoader) (*SkeletonData, error)
func NewSkeletonData ¶
func NewSkeletonData() *SkeletonData
type Skin ¶
type Skin struct {
// contains filtered or unexported fields
}
func (*Skin) AddAttachment ¶
func (s *Skin) AddAttachment(slotIndex int, name string, attachment Attachment)
func (*Skin) Attachment ¶
func (s *Skin) Attachment(slotIndex int, name string) Attachment
type Slot ¶
type Slot struct { Bone *Bone R, G, B, A float32 Attachment Attachment // contains filtered or unexported fields }
func (*Slot) AttachmentTime ¶
func (*Slot) SetAttachment ¶
func (s *Slot) SetAttachment(attachment Attachment)
func (*Slot) SetAttachmentTime ¶
func (*Slot) SetToSetupPose ¶
func (s *Slot) SetToSetupPose()
type SlotData ¶
type SlotData struct {
// contains filtered or unexported fields
}
func NewSlotData ¶
type TextureFilter ¶
type TextureFilter int
const ( Nearest TextureFilter = iota Linear MipMap MipMapNearestNearest MipMapLinearNearest MipMapNearestLinear MipMapLinearLinear )
type TextureFormat ¶
type TextureFormat int
const ( Alpha TextureFormat = iota Intensity LuminanceAlpha RGB565 RGBA4444 RGB888 RGBA8888 )
type TextureLoader ¶
type TextureWrap ¶
type TextureWrap int
const ( MirroredRepeat TextureWrap = iota ClampToEdge Repeat )
type TranslateTimeline ¶
type TranslateTimeline struct {
// contains filtered or unexported fields
}
func NewTranslateTimeline ¶
func NewTranslateTimeline(l int) *TranslateTimeline
func (*TranslateTimeline) Apply ¶
func (t *TranslateTimeline) Apply(skeleton *Skeleton, time, alpha float32)
Click to show internal directories.
Click to hide internal directories.