DP_05_Framer Studio

  • new PageComponent (page scrolling)

width: Screen.width

height: Screen.height

 

  • addPage    # name.addPage layername #name>layername
  • snapToPage #name.snapToPage layername #the ‘layername’ is the one should be at the first page when it’s loaded. #name.snapToPage layername, false #, false is to remove the animation of the snapToPage.

 

  • Layer.on “change: scale”, -> do something
  • Utils.modulate() #number translating from one range to another range ex) currency->another currency / Celcius->Fahrenheit
    • Utils.modulate(value#바꾸려하는대상, [0, 1]#원래 단위 1중 , [0, 0.5]#얼만큼 바꾸려하는 단위 )
    • ex) miles = 10
      km = Utils.modulate(miles, [0, 1], [0, 1.6]) #1km = 1.6miles
    • ex) num = Utils.modulate(2, [0, 1], [0, 100], false)
      print(num) #Output: 200 and this is default
      / num = Utils.modulate(2, [0,1], [0,100], true)
      print(num)  #Output: 100 한계를 100으로 정함
    • LayerA.on “change:y:, ->
      layerB.y = Utils.modulate this.y, [0, 1], [0, .5] #A가 움직일때 A의 0.5씩 움직임
      layerC.y = Utils.modulate this.y, [0, 1], [0, 2] #A가 움직일때 A의 2배씩 움직임
    • (for more info, http://share.framerjs.com/tpfhoi7aqo20/)

 

https://framer.cloud/suhya

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s