Skip to content
Permalink
Browse files

Change the parameters to Animation

  • Loading branch information
nvh committed Sep 15, 2016
1 parent be9f7c9 commit c8c03616d02797f7fe51956cc87d03412257fb2b
Showing with 17 additions and 21 deletions.
  1. +10 −21 framer/Animation.coffee
  2. +7 −0 framer/Defaults.coffee
@@ -39,29 +39,18 @@ evaluateRelativeProperty = (target, k, v) ->
# is not compatible and causes problems.
class exports.Animation extends BaseClass

constructor: (options={}) ->

options = Defaults.getDefaults "Animation", options

super options

@options = _.clone _.defaults options,
layer: null
properties: {}
curve: "linear"
curveOptions: {}
time: 1
repeat: 0
delay: 0
debug: false
colorModel: "husl"
animate: true
looping: false

if options.origin
constructor: (parameters={},options={}) ->
_.defaults(options, parameters.options)

delete parameters.options
@options = _.cloneDeep Defaults.getDefaults "Animation", options
super parameters
@layer = parameters.layer ? null
@properties = Animation.filterAnimatableProperties(parameters)

if parameters.origin
console.warn "Animation.origin: please use layer.originX and layer.originY"

@options.properties = Animation.filterAnimatableProperties(@options.properties)
@_parseAnimatorOptions()
@_originalState = @_currentState()
@_repeatCounter = @options.repeat
@@ -15,7 +15,14 @@ Originals =
Animation:
# curve: "spring(400,40,0)" # Or, the Cemre-Curve
curve: "ease"
curveOptions: {}
time: 1
repeat: 0
delay: 0
debug: false
colorModel: "husl"
animate: true
looping: false
Context:
perspective: 0
perspectiveOriginX: 0.5

0 comments on commit c8c0361

Please sign in to comment.
You can’t perform that action at this time.