For, Array

디자이너를 위한 코드 with Framer #4
세번째 글을 쓰고 조금 늦어진 감이 있지만, 4번째 글을 시작해보기로 하자. 전에 조건문에 대해서 설명할 때 조금 날림으로 해버린 감이 없지 않아 있어서 잠깐 조건문에 대해서 간단하게 부연 설명을 해보려고 한다.medium.com

 

https://medium.com/@jiyongahn/%EB%94%94%EC%9E%90%EC%9D%B4%EB%84%88%EB%A5%BC-%EC%9C%84%ED%95%9C-%EC%BD%94%EB%93%9C-with-framer-5-c7200dad0e26#.o5vk9eaws

 

 

iGold = new Framer.DeviceView();
 iGold.setupContext();
iGold.contentScale = 1

screenWidth = 750
screenHeight = 1330

background = new BackgroundLayer
  backgroundColor: "#e9e9e9"

status = new Layer
   width: Screen.width
   height: 40
  backgroundColor: "#E8EDF1"

listframe = new ScrollComponent
   width: 600
   height: 600
   x: Align.center
   y: Align.center
   borderRadius: 15
   parent: background
  backgroundColor: "#5583f6"

item = 160
listframe.scrollHorizontal = false

Menu_list = []

for j in [0..2]
   for i in [0..2]
     Menu_item = new Layer
       x: 20 + i*190
       y: 20 + j*190
       width: 180
       height: 180
       borderRadius: 12
       backgroundColor: ((j % 2) == 0) ? "red" : "green"
      parent: listframe.content

    # if ((j % 2) == 0)
     #   Menu_item.backgroundColor = "red"
     # else
     #   Menu_item.backgroundColor = "green"
     Menu_list.push(Menu_item);

 

iGold = new Framer.DeviceView();
iGold.setupContext();
iGold.contentScale = 1

screenWidth = 750
screenHeight = 1330

appFrame = new Layer
  width: screenWidth
  height: screenHeight
  backgroundColor: 'white'

page1 = new Layer
  width: screenWidth
  height: screenHeight
  backgroundColor: 'white'
appFrame.addChild(page1);

header = new Layer
  width: screenWidth
  height: 100
  backgroundColor: 'transparent'
page1.addChild(header);

title = new Layer
  html: 'S H O P'
  color: 'black'
  style:
    textAlign: 'center'
    lineHeight: '60px'
    fontSize: '30px'
  height: 50
  backgroundColor: 'transparent'
header.addChild(title);
title.center()

menuButton = new Layer
  width: 60
  height: 60
  x: 20
  backgroundColor: 'transparent'
header.addChild(menuButton)
menuButton.centerY()

menuButtonSubTop = new Layer
  width: menuButton.width * 0.8
  height: 4
  y: Align.top(14)
  backgroundColor: 'black'
menuButton.addChild(menuButtonSubTop)
menuButtonSubTop.centerX()

menuButtonSubCenter = new Layer
  width: menuButton.width * 0.8
  height: 4
  y: Align.top(29)
  backgroundColor: 'black'
menuButton.addChild(menuButtonSubCenter)
menuButtonSubCenter.centerX()

menuButtonSubBottom = new Layer
  width: menuButton.width * 0.8
  height: 4
  y: Align.top(44)
  backgroundColor: 'black'
menuButton.addChild(menuButtonSubBottom)
menuButtonSubBottom.centerX()



# list
list = new Layer
  y: header.height
  width: screenWidth
  height: screenHeight
  backgroundColor: '#0f0f0f'
  parent: appFrame

datas = [
  {
    bgcolor: '#f7ce5a',
    label: '01',
  },
  {
    bgcolor: '#ef4a5a',
    label: '02',
  },
  {
    bgcolor: '#31c6ef',
    label: '03',
  },
  {
    bgcolor: '#7dcec6',
    label: '04',
  },
  {
    bgcolor: '#ce7dc6',
    label: '05',
  },
  {
    bgcolor: '#c6ce7d',
    label: '06',
  },
  {
    bgcolor: '#c631ef',
    label: '07',
  },
];

itemHeight = 300

for i, data of datas

  item = new Layer
    y: itemHeight * i
    width: screenWidth
    height: itemHeight
    backgroundColor: data.bgcolor
    parent: list

  itemNumLabel = new Layer
    x: 40
    y: 70
    html: data.label
    height: 40
    style:
      fontSize: '40px'
    color: '#fff'
    backgroundColor: 'transparent'
    parent: item

 

arr1 = [100, 200, 300]

print arr1[0]   # result: 100
print arr1[1]   # result: 200
print arr1[2]   # result: 300
print arr1      # result: 100, 200, 300

arr1[0] = 150
print arr1   # result: 150, 200, 300

arr1.push(400)
arr1.push(800)
arr1[0] = 400   # override value in this case
print arr1.length   # result: 4
print arr1

for i in [9..0]
   print i
   
faces = []
for i in [1..5]
   face = inbox["face#{i}"]
   faces.push(face)
# Variables
listWidth = 720 #리스트 너비 정의
listHeight = 280 #리스트 높이 정의
yDistance = listHeight + 10 #리스트 간격 정의

# 레이어 생성 구문

LayerNum = 0



#for i in [0..10]
for i in [0..10]
	layers = new Layer
		width:listWidth
		height:listHeight
		x : 500	
		y : i*yDistance+200 #Top 네비게이션과의 거리 정의
		clip:false
		borderRadius: 4
		
		# 레이어 오프닝 애니메이션
		layer_ani = new Animation
			layer: layers
			properties: 
				x: Align.center
			delay: 1*LayerNum
			LayerNum += 0.3
		layer_ani.start()

	
# Variables
listWidth = 720 #리스트 너비 정의
listHeight = 280 #리스트 높이 정의
yDistance = listHeight + 10 #리스트 간격 정의

# 레이어 생성 구문

LayerNum = 0

parentLayer = new Layer

#for i in [0..10]
for i in [0..10]
	layer = new Layer
		width:listWidth
		height:listHeight
		x : 500
		y : i*yDistance+200 #Top 네비게이션과의 거리 정의
		clip:false
		borderRadius: 4

	# 레이어 오프닝 애니메이션
	layer_ani = new Animation
		layer: layer
		properties:
			x: Align.center
		delay: 1*LayerNum
		LayerNum += 0.3
	layer_ani.start()
  parentLayer.addChild(layer);
# Variables
listWidth = 720 #리스트 너비 정의
listHeight = 280 #리스트 높이 정의
yDistance = listHeight + 10 #리스트 간격 정의

# 레이어 생성 구문

LayerNum = 0


layers = [];
#for i in [0..10]
for i in [0..10]
	layer = new Layer
		width:listWidth
		height:listHeight
		x : 500
		y : i*yDistance+200 #Top 네비게이션과의 거리 정의
		clip:false
		borderRadius: 4

	# 레이어 오프닝 애니메이션
	layer_ani = new Animation
		layer: layer
		properties:
			x: Align.center
		delay: 1*LayerNum
		LayerNum += 0.3

	layer_ani.start()
  layers.push(layer);

layers[2].backgroundColor = 'red';
datas = [
 {
   bgcolor: 'red',
   imgs: ['images/menu_1.png', 'images/menu_2.png', 'images/menu_3.png', '4.png', '1.png',],	
 },
 
  {
   bgcolor: 'blue',
   imgs: ['images/menu_1.png', 'images/menu_2.png', 'images/menu_3.png', '4.png', '1.png',],	
 },
 
  {
   bgcolor: 'red',
   imgs: ['images/menu_1.png', 'images/menu_2.png', 'images/menu_3.png', '4.png', '1.png',],	
 },
 
  {
   bgcolor: 'red',
   imgs: ['images/menu_1.png', 'images/menu_2.png', 'images/menu_3.png', '4.png', '1.png',],	
 },
 
  {
   bgcolor: 'red',
   imgs: ['images/menu_1.png', 'images/menu_2.png', 'images/menu_3.png', '4.png', '1.png',],	
 }
 
 
]

back_color =["red","blue","green","yellow","white"]
Scroll_num_Arr=[]
imgs = [ ['images/menu_1.png', 'images/menu_2.png', 'images/menu_3.png', '4.png', '1.png',],
		 ['1.png', '1.png', '1.png', '1.png', '1.png',], 
		 ['1.png', '1.png', '1.png', '1.png', '1.png',], 
		 ['1.png', '1.png', '1.png', '1.png', '1.png',], 
		 ['1.png', '1.png', '1.png', '1.png', '1.png',] ]

print(datas[1].bgcolor)
print(JSON.parse(JSON.stringify(datas[1])))

 

Two days ago, 11 year National Hockey League veteran Todd Ewen reportedly took his life. Stargell manned first base for Pittsburgh from 1962 to 1982, and was always a threat to the opposing pitcher to hit one out. We can now show homes to our cheap authentic jerseys clients without leaving the office, this cuts down on unnecessary showings, wear and tear on our agents vehicles and the ability for our elderly and disabled customers to see properties in our area effortlessly,” said Angel Shuford, Realtor, with Kellum Corporation.. Thank you. If your wife’s needs go unmet, problems develop from that, and bitterness takes root, then the next Cheap Football Jerseys step is cheap jerseys from china that the marriage dies, often through divorce. Recently fake oakleys the company announced ray ban outlet that it is working with the National Football League Alumni Association (NFLAA) to develop a trial for treating NFL alumni members suffering from traumatic brain injuries (TBI), cheap nfl jerseys with NSI 189, the lead compound in the company’s neurogenic drug platform. “No question about it.”Umenyiora mentioned Savea by name.”Everyone in the NFL remembers Jonah Lomu and the way he changed rugby, and loads of people in the States noticed him. The Tote Board: NFL Bonanza or Bust or “Meh” for Casino Stocks Now and Later1. He describes the couple’s time in Oklahoma as low key: “Throwing a cooler in the back of the pickup and driving around the property clearing brush and singing to the radio,” says Shelton. As you’ve seen in our earnings announcement, CBS turned in another outstanding quarter. If you’re getting on in the club, you have to be progressing so obviously scoring for every age group is a good sign. Understanding where forces rank compared with one another allows us to predict and explain all the different ways in which they will interact.. It’s to be expected that expenses will outweigh revenue/gross profit in only the company’s second quarter of operation. To sum the game mode up altogether would be to say that your goal is to build a team from scratch, and achieve an ultimate team that is unbeatable. The orange roughy has been given the ranking by the Monterey Bay Aquarium Seafood Watch because of overfishing and the damaging trawling method that fishermen use. The selection is limited for women’s NFL jerseys, but the team’s best players are fake ray ban sunglasses normally available.. How do you feel about that statement?. Barber was selected to the Pro Bowl in 2004, 2004 and 2006. But if you really want to lose a lot of money, the fastest way might be to take the route of someone like Evander Holyfield, who is said in the film to have eleven children by nine women.

답글 남기기

이메일은 공개되지 않습니다. 필수 입력창은 * 로 표시되어 있습니다.