Documentation
¶
Overview ¶
Package shape represents a lottie shape.
Index ¶
- type Ellipse
- type EllipseT
- type Fill
- type FillT
- type GFill
- type GFillT
- type GStroke
- type GStrokeT
- type Group
- type GroupT
- type Merge
- type MergeT
- type Rect
- type RectT
- type Repeater
- type RepeaterT
- type Round
- type RoundT
- type Shape
- type ShapeT
- type Star
- type StarT
- type Stroke
- type StrokeT
- type Transform
- type TransformT
- type Trim
- type TrimT
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ellipse ¶
type Ellipse interface { // GetName gets the shape's name. GetName() string // GetPosition gets the shape's position. GetPosition() []float64 // GetSize gets the shape's size. GetSize() []float64 // Type returns EllipseType. Type() Type }
Ellipse represents a lottie shape/ellipse.
type EllipseT ¶
type EllipseT struct { // After Effect's Direction. Direction how the shape is drawn. Used for trim path for example. Direction *int `json:"d,omitempty"` // After Effect's Match Name. Used for expressions. MatchName *string `json:"mn,omitempty"` // After Effect's Name. Used for expressions. Name *string `json:"nm,omitempty"` // Ellipse's position Position json.RawMessage `json:"p,omitempty"` // Ellipse's size Size json.RawMessage `json:"s,omitempty"` // Shape content type. Ty *string `json:"ty,omitempty"` }
EllipseT implements the Ellipse interface.
func (*EllipseT) GetDirection ¶
GetDirection returns the Direction field if it's non-nil, zero value otherwise.
func (*EllipseT) GetMatchName ¶
GetMatchName returns the MatchName field if it's non-nil, zero value otherwise.
func (*EllipseT) GetPosition ¶
GetPosition returns the initial rotation of the transform.
type Fill ¶
type Fill interface { // GetColor returns an RGBA color (0-1). GetColor() [4]float64 // GetName returns the name of the fill. GetName() string // GetOpacity returns the opacity of the fill. GetOpacity() float64 // Type returns FillType. Type() Type }
Fill represents a lottie shape/fill.
type FillT ¶
type FillT struct { // Fill Color Color json.RawMessage `json:"c,omitempty"` // After Effect's Match Name. Used for expressions. MatchName *string `json:"mn,omitempty"` // After Effect's Name. Used for expressions. Name *string `json:"nm,omitempty"` // Fill Opacity Opacity json.RawMessage `json:"o,omitempty"` // Shape content type. Ty *string `json:"ty,omitempty"` }
FillT implements the Fill interface.
func (*FillT) GetMatchName ¶
GetMatchName returns the MatchName field if it's non-nil, zero value otherwise.
func (*FillT) GetOpacity ¶
GetOpacity returns the initial opacity of the transform.
type Group ¶
type Group interface { // GetShapes returns the shapes in the group. GetShapes() []Shape // Type returns GroupType. Type() Type }
Group represents a lottie shape/group.
type GroupT ¶
type GroupT struct { // Group list of shapes. Shapes []json.RawMessage `json:"it,omitempty"` // After Effect's Match Name. Used for expressions. MatchName *string `json:"mn,omitempty"` // After Effect's Name. Used for expressions. Name *string `json:"nm,omitempty"` // Group number of properties. Used for expressions. NumProperties *int `json:"np,omitempty"` // Shape content type. Ty *string `json:"ty,omitempty"` }
GroupT implements the Group interface.
func (*GroupT) GetMatchName ¶
GetMatchName returns the MatchName field if it's non-nil, zero value otherwise.
func (*GroupT) GetNumProperties ¶
GetNumProperties returns the NumProperties field if it's non-nil, zero value otherwise.
type Repeater ¶
type Repeater interface {
Type() Type
}
Repeater represents a lottie shape/repeater.
type Transform ¶
type Transform interface { InitialOpacity() float64 // InitialRotation returns the initial rotation of the transform. InitialRotation() float64 // InitialPosition returns the initial rotation of the transform. InitialPosition() []float64 // InitialScale returns the initial rotation of the transform. InitialScale() []float64 // Type returns TransformType. Type() Type }
Transform represents a lottie shape/transform.
type TransformT ¶
type TransformT struct { // Shape Transform Anchor Point AnchorPoint json.RawMessage `json:"a,omitempty"` // After Effect's Name. Used for expressions. Name *string `json:"nm,omitempty"` // Shape Transform Opacity Opacity json.RawMessage `json:"o,omitempty"` // Shape Transform Position Position json.RawMessage `json:"p,omitempty"` // Shape Transform Rotation Rotation json.RawMessage `json:"r,omitempty"` // Shape Transform Scale Scale json.RawMessage `json:"s,omitempty"` // Shape Transform Skew Axis SkewAxis json.RawMessage `json:"sa,omitempty"` // Shape Transform Skew Skew json.RawMessage `json:"sk,omitempty"` }
TransformT implements the Transform interface.
func (*TransformT) GetName ¶
func (t *TransformT) GetName() string
GetName returns the Name field if it's non-nil, zero value otherwise.
func (*TransformT) InitialOpacity ¶
func (t *TransformT) InitialOpacity() float64
InitialOpacity returns the initial opacity of the transform.
func (*TransformT) InitialPosition ¶
func (t *TransformT) InitialPosition() []float64
InitialPosition returns the initial rotation of the transform.
func (*TransformT) InitialRotation ¶
func (t *TransformT) InitialRotation() float64
InitialRotation returns the initial rotation of the transform.
func (*TransformT) InitialScale ¶
func (t *TransformT) InitialScale() []float64
InitialScale returns the initial rotation of the transform.
type Type ¶
type Type string
Type represents a shape type.
const ( // EllipseType represents a lottie shape/ellipse. EllipseType Type = "el" )
const ( // FillType represents a lottie shape/fill. FillType Type = "fl" )
const ( // GFillType represents a lottie shape/gFill. GFillType Type = "gf" )
const ( // GStrokeType represents a lottie shape/gStroke. GStrokeType Type = "gs" )
const ( // GroupType represents a lottie shape/group. GroupType Type = "gr" )
const ( // MergeType represents a lottie shape/merge. MergeType Type = "mm" )
const ( // RectType represents a lottie shape/rect. RectType Type = "rc" )
const ( // RepeaterType represents a lottie shape/repeater. RepeaterType Type = "rp" )
const ( // RoundType represents a lottie shape/round. RoundType Type = "rd" )
const ( // ShapeType represents a lottie shape/shape. ShapeType Type = "sh" )
const ( // StarType represents a lottie shape/star. StarType Type = "sr" )
const ( // StrokeType represents a lottie shape/stroke. StrokeType Type = "st" )
const ( // TransformType represents a lottie transform. TransformType Type = "tr" )
const ( // TrimType represents a lottie shape/trim. TrimType Type = "tm" )