properties

package
v0.0.0-...-097d1aa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package properties represents properties in lottie files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MultiDimensionalOrMultiDimensionalKeyframed

func MultiDimensionalOrMultiDimensionalKeyframed(buf json.RawMessage) (*MultiDimensional, *MultiDimensionalKeyframed)

MultiDimensionalOrMultiDimensionalKeyframed returns either a MultiDimensional or a MultiDimensionalKeyframed.

func ValueOrValueKeyframed

func ValueOrValueKeyframed(buf json.RawMessage) (*Value, *ValueKeyframed)

ValueOrValueKeyframed returns either a Value or a ValueKeyframed.

Types

type In

type In struct {
	// bezier x axis
	X []float64 `json:"x,omitempty"`

	// bezier y axis
	Y []float64 `json:"y,omitempty"`
}

In represents a Bezier curve interpolation "in" value.

type MultiDimensional

type MultiDimensional struct {
	// Property Index. Used for expressions.
	Index *int `json:"ix,omitempty"`

	// Property Value
	Value []float64 `json:"k,omitempty"`

	// Property Expression. An AE expression that modifies the value.
	Expression *string `json:"x,omitempty"`
}

MultiDimensional represents a multi-dimensional property value.

func GetMultiDimensional

func GetMultiDimensional(buf json.RawMessage) (*MultiDimensional, error)

GetMultiDimensional returns a MultiDimensional if it exists.

func (*MultiDimensional) GetExpression

func (m *MultiDimensional) GetExpression() string

GetExpression returns the Expression field if it's non-nil, zero value otherwise.

func (*MultiDimensional) GetIndex

func (m *MultiDimensional) GetIndex() int

GetIndex returns the Index field if it's non-nil, zero value otherwise.

type MultiDimensionalKeyframed

type MultiDimensionalKeyframed struct {
	// Property Index. Used for expressions.
	Index *int `json:"ix,omitempty"`

	// Property Value keyframes
	Keyframes []*OffsetKeyframe `json:"k,omitempty"`

	// In Spatial Tangent. Only for spatial properties. Array of numbers.
	Ti []interface{} `json:"ti,omitempty"`

	// Out Spatial Tangent. Only for spatial properties. Array of numbers.
	To []interface{} `json:"to,omitempty"`

	// Property Expression. An AE expression that modifies the value.
	Expression *string `json:"x,omitempty"`
}

MultiDimensionalKeyframed represents keyframed multi-dimensional property values.

func GetMultiDimensionalKeyframed

func GetMultiDimensionalKeyframed(buf json.RawMessage) (*MultiDimensionalKeyframed, error)

GetMultiDimensionalKeyframed returns a MultiDimensionalKeyframed if it exists.

func (*MultiDimensionalKeyframed) GetExpression

func (m *MultiDimensionalKeyframed) GetExpression() string

GetExpression returns the Expression field if it's non-nil, zero value otherwise.

func (*MultiDimensionalKeyframed) GetIndex

func (m *MultiDimensionalKeyframed) GetIndex() int

GetIndex returns the Index field if it's non-nil, zero value otherwise.

type OffsetKeyframe

type OffsetKeyframe struct {

	// Bezier curve interpolation in value.
	In *In `json:"i,omitempty"`

	// Bezier curve interpolation out value.
	Out *Out `json:"o,omitempty"`

	// Start value of keyframe segment.
	StartValue []float64 `json:"s,omitempty"`

	// Start time of keyframe segment.
	StartTime *float64 `json:"t,omitempty"`
}

OffsetKeyframe represents a lottie offset keyframe.

func (*OffsetKeyframe) GetIn

func (o *OffsetKeyframe) GetIn() *In

GetIn returns the In field.

func (*OffsetKeyframe) GetOut

func (o *OffsetKeyframe) GetOut() *Out

GetOut returns the Out field.

func (*OffsetKeyframe) GetStartTime

func (o *OffsetKeyframe) GetStartTime() float64

GetStartTime returns the StartTime field if it's non-nil, zero value otherwise.

type Out

type Out struct {

	// bezier x axis. Array of numbers.
	X []float64 `json:"x,omitempty"`

	// bezier y axis. Array of numbers.
	Y []float64 `json:"y,omitempty"`
}

Out represents a Bezier curve interpolation "out" value.

type Value

type Value struct {
	// Property Index. Used for expressions.
	Index *int `json:"ix,omitempty"`

	// Property Value
	Value *float64 `json:"k,omitempty"`

	// Property Expression. An AE expression that modifies the value.
	Expression *string `json:"x,omitempty"`
}

Value represents a property value.

func GetValue

func GetValue(buf json.RawMessage) (*Value, error)

GetValue returns a Value if it exists.

func (*Value) GetExpression

func (v *Value) GetExpression() string

GetExpression returns the Expression field if it's non-nil, zero value otherwise.

func (*Value) GetIndex

func (v *Value) GetIndex() int

GetIndex returns the Index field if it's non-nil, zero value otherwise.

func (*Value) GetValue

func (v *Value) GetValue() float64

GetValue returns the Value field if it's non-nil, zero value otherwise.

type ValueKeyframe

type ValueKeyframe struct {
	// End value of keyframe segment.
	EndValues []float64 `json:"e,omitempty"`

	// Bezier curve interpolation "in" value.
	In *In `json:"i,omitempty"`

	// Names of keyframe.
	Name []string `json:"n,omitempty"`

	// Bezier curve interpolation "out" value.
	Out *Out `json:"o,omitempty"`

	// Start values of keyframe segment.
	StartValues []float64 `json:"s,omitempty"`

	// Start time of keyframe segment.
	StartTime *float64 `json:"t,omitempty"`
}

ValueKeyframe represents a keyframe value.

func (*ValueKeyframe) GetIn

func (v *ValueKeyframe) GetIn() *In

GetIn returns the In field.

func (*ValueKeyframe) GetOut

func (v *ValueKeyframe) GetOut() *Out

GetOut returns the Out field.

func (*ValueKeyframe) GetStartTime

func (v *ValueKeyframe) GetStartTime() float64

GetStartTime returns the StartTime field if it's non-nil, zero value otherwise.

type ValueKeyframed

type ValueKeyframed struct {
	// Property Index. Used for expressions.
	Index *int `json:"ix,omitempty"`

	// Property Value keyframes
	Values []*ValueKeyframe `json:"k,omitempty"`

	// Property Expression. An AE expression that modifies the value.
	Expression *string `json:"x,omitempty"`
}

ValueKeyframed represents keyframe values.

func GetValueKeyframed

func GetValueKeyframed(buf json.RawMessage) (*ValueKeyframed, error)

GetValueKeyframed returns a ValueKeyframed if it exists.

func (*ValueKeyframed) GetExpression

func (v *ValueKeyframed) GetExpression() string

GetExpression returns the Expression field if it's non-nil, zero value otherwise.

func (*ValueKeyframed) GetIndex

func (v *ValueKeyframed) GetIndex() int

GetIndex returns the Index field if it's non-nil, zero value otherwise.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL