Documentation
¶
Overview ¶
Package layer represents a lottie layer.
Index ¶
- type Image
- type ImageT
- func (i *ImageT) GetAutoOrient() int
- func (i *ImageT) GetBlendMode() int
- func (i *ImageT) GetClass() string
- func (i *ImageT) GetDdd() int
- func (i *ImageT) GetHasMask() bool
- func (i *ImageT) GetInPoint() float64
- func (i *ImageT) GetInded() int
- func (i *ImageT) GetLayerName() string
- func (i *ImageT) GetName() string
- func (i *ImageT) GetOutPoint() float64
- func (i *ImageT) GetParent() int
- func (i *ImageT) GetRefID() string
- func (i *ImageT) GetStartTime() float64
- func (i *ImageT) GetTimeStretching() float64
- func (i *ImageT) GetTransform() *helpers.Transform
- func (s *ImageT) Type() Type
- type Layer
- type Null
- type NullT
- func (n *NullT) GetAutoOrient() int
- func (n *NullT) GetClass() string
- func (n *NullT) GetDdd() int
- func (n *NullT) GetInPoint() float64
- func (n *NullT) GetInd() int
- func (n *NullT) GetLayerName() string
- func (n *NullT) GetName() float64
- func (n *NullT) GetOutPoint() float64
- func (n *NullT) GetParent() int
- func (n *NullT) GetStartTime() float64
- func (n *NullT) GetTimeStretching() float64
- func (n *NullT) GetTransform() *helpers.Transform
- func (n *NullT) Type() Type
- type PreComp
- type PreCompT
- func (p *PreCompT) GetAutoOrient() int
- func (p *PreCompT) GetBlendMode() int
- func (p *PreCompT) GetClass() string
- func (p *PreCompT) GetDdd() int
- func (p *PreCompT) GetHasMask() bool
- func (p *PreCompT) GetInPoint() float64
- func (p *PreCompT) GetIndex() int
- func (p *PreCompT) GetLayerName() string
- func (p *PreCompT) GetName() string
- func (p *PreCompT) GetOutPoint() float64
- func (p *PreCompT) GetParent() int
- func (p *PreCompT) GetRefID() string
- func (p *PreCompT) GetStartTime() float64
- func (p *PreCompT) GetTimeMapping() float64
- func (p *PreCompT) GetTimeStretching() float64
- func (p *PreCompT) GetTransform() *helpers.Transform
- func (p *PreCompT) Type() Type
- type Shape
- type ShapeT
- func (s *ShapeT) GetAutoOrient() int
- func (s *ShapeT) GetBlendMode() int
- func (s *ShapeT) GetClass() string
- func (s *ShapeT) GetDdd() int
- func (s *ShapeT) GetHasMask() bool
- func (s *ShapeT) GetInPoint() float64
- func (s *ShapeT) GetIndex() int
- func (s *ShapeT) GetLayerName() string
- func (s *ShapeT) GetName() string
- func (s *ShapeT) GetOutPoint() float64
- func (s *ShapeT) GetParent() int
- func (s *ShapeT) GetShapes() (result []ls.Shape)
- func (s *ShapeT) GetStartTime() float64
- func (s *ShapeT) GetTimeStretching() float64
- func (s *ShapeT) GetTransform() *helpers.Transform
- func (s *ShapeT) Type() Type
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImageT ¶
type ImageT struct { // Auto-Orient along path AE property. AutoOrient *int `json:"ao,omitempty"` // Blend Mode BlendMode *int `json:"bm,omitempty"` // Parsed layer name used as html class on SVG/HTML renderer Class *string `json:"cl,omitempty"` // 3D layer flag Ddd *int `json:"ddd,omitempty"` // List of Effects Effects []json.RawMessage `json:"ef,omitempty"` // Boolean when layer has a mask. Will be deprecated in favor of checking maskProperties. HasMask *bool `json:"hasMask,omitempty"` // Layer index in AE. Used for parenting and expressions. Inded *int `json:"ind,omitempty"` // In Point of layer. Sets the initial frame of the layer. InPoint *float64 `json:"ip,omitempty"` // Transform properties Transform *helpers.Transform `json:"ks,omitempty"` // Parsed layer name used as html id on SVG/HTML renderer LayerName *string `json:"ln,omitempty"` // List of Masks MaskProperties []json.RawMessage `json:"maskProperties,omitempty"` // After Effects Layer Name. Used for expressions. Name *string `json:"nm,omitempty"` // Out Point of layer. Sets the final frame of the layer. OutPoint *float64 `json:"op,omitempty"` // Layer Parent. Uses ind of parent. Parent *int `json:"parent,omitempty"` // RefID pointing to the source image defined on 'assets' object RefID *string `json:"refId,omitempty"` // Layer Time Stretching TimeStretching *float64 `json:"sr,omitempty"` // Start Time of layer. Sets the start time of the layer. StartTime *float64 `json:"st,omitempty"` // Type of layer: Image. Ty Type `json:"ty,omitempty"` }
ImageT implements the Image and Layer interface.
func (*ImageT) GetAutoOrient ¶
GetAutoOrient returns the AutoOrient field if it's non-nil, zero value otherwise.
func (*ImageT) GetBlendMode ¶
GetBlendMode returns the BlendMode field if it's non-nil, zero value otherwise.
func (*ImageT) GetHasMask ¶
GetHasMask returns the HasMask field if it's non-nil, zero value otherwise.
func (*ImageT) GetInPoint ¶
GetInPoint returns the InPoint field if it's non-nil, zero value otherwise.
func (*ImageT) GetLayerName ¶
GetLayerName returns the LayerName field if it's non-nil, zero value otherwise.
func (*ImageT) GetOutPoint ¶
GetOutPoint returns the OutPoint field if it's non-nil, zero value otherwise.
func (*ImageT) GetParent ¶
GetParent returns the Parent field if it's non-nil, zero value otherwise.
func (*ImageT) GetStartTime ¶
GetStartTime returns the StartTime field if it's non-nil, zero value otherwise.
func (*ImageT) GetTimeStretching ¶
GetTimeStretching returns the TimeStretching field if it's non-nil, zero value otherwise.
func (*ImageT) GetTransform ¶
GetTransform returns the shape's transform.
type Layer ¶
type Layer interface { // GetTransform returns the shape's transform. GetTransform() *helpers.Transform // Type returns the layer's type. Type() Type }
Layer represents a lottie layer.
type NullT ¶
type NullT struct { // Auto-Orient along path AE property. AutoOrient *int `json:"ao,omitempty"` // Parsed layer name used as html class on SVG/HTML renderer Class *string `json:"cl,omitempty"` // 3D layer flag Ddd *int `json:"ddd,omitempty"` // List of Effects Effects []json.RawMessage `json:"ef,omitempty"` // Layer index in AE. Used for parenting and expressions. Ind *int `json:"ind,omitempty"` // In Point of layer. Sets the initial frame of the layer. InPoint *float64 `json:"ip,omitempty"` // Transform properties Transform *helpers.Transform `json:"ks,omitempty"` // Parsed layer name used as html id on SVG/HTML renderer LayerName *string `json:"ln,omitempty"` // After Effects Layer Name. Used for expressions. Name *float64 `json:"nm,omitempty"` // Out Point of layer. Sets the final frame of the layer. OutPoint *float64 `json:"op,omitempty"` // Layer Parent. Uses ind of parent. Parent *int `json:"parent,omitempty"` // Layer Time Stretching TimeStretching *float64 `json:"sr,omitempty"` // Start Time of layer. Sets the start time of the layer. StartTime *float64 `json:"st,omitempty"` // Type of layer: Null. Ty Type `json:"ty,omitempty"` }
NullT implements the Null and Layer interface.
func (*NullT) GetAutoOrient ¶
GetAutoOrient returns the AutoOrient field if it's non-nil, zero value otherwise.
func (*NullT) GetInPoint ¶
GetInPoint returns the InPoint field if it's non-nil, zero value otherwise.
func (*NullT) GetLayerName ¶
GetLayerName returns the LayerName field if it's non-nil, zero value otherwise.
func (*NullT) GetOutPoint ¶
GetOutPoint returns the OutPoint field if it's non-nil, zero value otherwise.
func (*NullT) GetStartTime ¶
GetStartTime returns the StartTime field if it's non-nil, zero value otherwise.
func (*NullT) GetTimeStretching ¶
GetTimeStretching returns the TimeStretching field if it's non-nil, zero value otherwise.
func (*NullT) GetTransform ¶
GetTransform returns the shape's transform.
type PreComp ¶
type PreComp interface { // GetTransform returns the shape's transform. GetTransform() *helpers.Transform // Type returns PreCompType. Type() Type }
PreComp represents a lottie preComp layer.
type PreCompT ¶
type PreCompT struct { // Auto-Orient along path AE property. AutoOrient *int `json:"ao,omitempty"` // Blend Mode BlendMode *int `json:"bm,omitempty"` // Parsed layer name used as html class on SVG/HTML renderer Class *string `json:"cl,omitempty"` // 3D layer flag Ddd *int `json:"ddd,omitempty"` // List of Effects Effects []json.RawMessage `json:"ef,omitempty"` // Boolean when layer has a mask. Will be deprecated in favor of checking maskProperties. HasMask *bool `json:"hasMask,omitempty"` // Layer index in AE. Used for parenting and expressions. Index *int `json:"ind,omitempty"` // In Point of layer. Sets the initial frame of the layer. InPoint *float64 `json:"ip,omitempty"` // Transform properties Transform *helpers.Transform `json:"ks,omitempty"` // Parsed layer name used as html id on SVG/HTML renderer LayerName *string `json:"ln,omitempty"` // List of Masks MaskProperties []json.RawMessage `json:"maskProperties,omitempty"` // After Effects Layer Name. Used for expressions. Name *string `json:"nm,omitempty"` // Out Point of layer. Sets the final frame of the layer. OutPoint *float64 `json:"op,omitempty"` // Layer Parent. Uses ind of parent. Parent *int `json:"parent,omitempty"` // RefID pointing to the source composition defined on 'assets' object RefID *string `json:"refId,omitempty"` // Layer Time Stretching TimeStretching *float64 `json:"sr,omitempty"` // Start Time of layer. Sets the start time of the layer. StartTime *float64 `json:"st,omitempty"` // Comp's Time remapping TimeMapping *float64 `json:"tm,omitempty"` // Type of layer: Precomp. Ty Type `json:"ty,omitempty"` }
PreCompT implements the PreComp and Layer interface.
func (*PreCompT) GetAutoOrient ¶
GetAutoOrient returns the AutoOrient field if it's non-nil, zero value otherwise.
func (*PreCompT) GetBlendMode ¶
GetBlendMode returns the BlendMode field if it's non-nil, zero value otherwise.
func (*PreCompT) GetHasMask ¶
GetHasMask returns the HasMask field if it's non-nil, zero value otherwise.
func (*PreCompT) GetInPoint ¶
GetInPoint returns the InPoint field if it's non-nil, zero value otherwise.
func (*PreCompT) GetLayerName ¶
GetLayerName returns the LayerName field if it's non-nil, zero value otherwise.
func (*PreCompT) GetOutPoint ¶
GetOutPoint returns the OutPoint field if it's non-nil, zero value otherwise.
func (*PreCompT) GetParent ¶
GetParent returns the Parent field if it's non-nil, zero value otherwise.
func (*PreCompT) GetStartTime ¶
GetStartTime returns the StartTime field if it's non-nil, zero value otherwise.
func (*PreCompT) GetTimeMapping ¶
GetTimeMapping returns the TimeMapping field if it's non-nil, zero value otherwise.
func (*PreCompT) GetTimeStretching ¶
GetTimeStretching returns the TimeStretching field if it's non-nil, zero value otherwise.
func (*PreCompT) GetTransform ¶
GetTransform returns the shape's transform.
type Shape ¶
type Shape interface { // GetIndex returns the shape index. GetIndex() int // GetName returns the shape name. GetName() string // GetShapes returns the list of shape items. GetShapes() []ls.Shape // GetTransform returns the shape's transform. GetTransform() *helpers.Transform // Type returns ShapeType. Type() Type }
Shape represents a lottie shape layer.
type ShapeT ¶
type ShapeT struct { // Auto-Orient along path AE property. AutoOrient *int `json:"ao,omitempty"` // Blend Mode BlendMode *int `json:"bm,omitempty"` // Parsed layer name used as html class on SVG/HTML renderer Class *string `json:"cl,omitempty"` // 3d layer flag Ddd *int `json:"ddd,omitempty"` // List of Effects Effects []json.RawMessage `json:"ef,omitempty"` // Boolean when layer has a mask. Will be deprecated in favor of checking maskProperties. HasMask *bool `json:"hasMask,omitempty"` // Layer index in AE. Used for parenting and expressions. Index *int `json:"ind,omitempty"` // In Point of layer. Sets the initial frame of the layer. InPoint *float64 `json:"ip,omitempty"` // Shape list of items. Shapes []json.RawMessage `json:"shapes,omitempty"` // Transform properties Transform *helpers.Transform `json:"ks,omitempty"` // Parsed layer name used as html id on SVG/HTML renderer LayerName *string `json:"ln,omitempty"` // List of Masks MaskProperties []json.RawMessage `json:"maskProperties,omitempty"` // After Effects Layer Name. Used for expressions. Name *string `json:"nm,omitempty"` // Out Point of layer. Sets the final frame of the layer. OutPoint *float64 `json:"op,omitempty"` // Layer Parent. Uses ind of parent. Parent *int `json:"parent,omitempty"` // Layer Time Stretching TimeStretching *float64 `json:"sr,omitempty"` // Start Time of layer. Sets the start time of the layer. StartTime *float64 `json:"st,omitempty"` // Type of layer: Shape. Ty Type `json:"ty,omitempty"` }
ShapeT implements the Shape and Layer interface.
func (*ShapeT) GetAutoOrient ¶
GetAutoOrient returns the AutoOrient field if it's non-nil, zero value otherwise.
func (*ShapeT) GetBlendMode ¶
GetBlendMode returns the BlendMode field if it's non-nil, zero value otherwise.
func (*ShapeT) GetHasMask ¶
GetHasMask returns the HasMask field if it's non-nil, zero value otherwise.
func (*ShapeT) GetInPoint ¶
GetInPoint returns the InPoint field if it's non-nil, zero value otherwise.
func (*ShapeT) GetLayerName ¶
GetLayerName returns the LayerName field if it's non-nil, zero value otherwise.
func (*ShapeT) GetOutPoint ¶
GetOutPoint returns the OutPoint field if it's non-nil, zero value otherwise.
func (*ShapeT) GetParent ¶
GetParent returns the Parent field if it's non-nil, zero value otherwise.
func (*ShapeT) GetStartTime ¶
GetStartTime returns the StartTime field if it's non-nil, zero value otherwise.
func (*ShapeT) GetTimeStretching ¶
GetTimeStretching returns the TimeStretching field if it's non-nil, zero value otherwise.
func (*ShapeT) GetTransform ¶
GetTransform returns the shape's transform.
type Type ¶
type Type int
Type identifies the type of lottie layer.
const ( // ImageType is a lottie image layer. ImageType Type = 2 )
const ( // NullType is a lottie null layer. NullType Type = 3 )
const ( // PreCompType is a lottie preComp layer. PreCompType Type = 0 )
const ( // ShapeType is a lottie shape layer. ShapeType Type = 4 )