This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Woowahan from 'woowahan'; | |
| import template from './main.handlebars'; | |
| export const Main = Woowahan.View.create('Main', { | |
| template, | |
| initialize() { | |
| this.setModel({ | |
| myList: [ | |
| { all: '부각용', wait: '7', ad: '10', deal: '8' }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| START_POSITION = 60 | |
| ADJUIST = 5 | |
| boxMaker = (y) -> new Layer | |
| name: 'box' | |
| opacity: 0 | |
| x: Align.center | |
| y: y | |
| backgroundColor: Utils.randomColor() | |
| width: Screen.width - 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Data, animate, Override, Animatable } from "framer" | |
| let isOriginalSize = true | |
| const data = Data({ | |
| scale: Animatable(1) | |
| }) | |
| export const ToggleButton: Override = () => { | |
| return { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Data, animate, Override, Animatable } from "framer" | |
| const STABLE_COLOR = '#FFF' | |
| const GROWING_COLOR = '#F00' | |
| let isGrowing = false | |
| const data = Data({ | |
| backgroundColor: Animatable(STABLE_COLOR), | |
| likeScale: Animatable(1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Data, animate, Override, Animatable } from "framer" | |
| const data = Data({ | |
| plusOpacity: 1, | |
| minusOpacity: 0.3, | |
| page: 0 | |
| }) | |
| export const PlusButtonStatus: Override = () => { | |
| return { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as React from "react" | |
| import { Frame, useCycle } from "framer" | |
| // Open Preview (CMD + P) | |
| // API Reference: https://www.framer.com/api | |
| export function BlinkingCircle() { | |
| const [animate, cycle] = useCycle( | |
| { backgroundColor: "#ff2020" }, | |
| { backgroundColor: "#ffbc20" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const OrderList: React.FC<IProps> = props => { | |
| const [request, completeRequest] = React.useState(false); | |
| const [requestId, upddateRequestId] = React.useState(0); | |
| if (request && checkCompleteTask(props.asyncTasks, requestId)) { | |
| completeRequest(false); | |
| } | |
| React.useEffect(() => { | |
| const { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function random(max) { | |
| return Math.floor(Math.random()*max); | |
| } | |
| const startButton = document.querySelector('#start'); | |
| const boxes = [ | |
| document.querySelector('#b1'), | |
| document.querySelector('#b2'), | |
| document.querySelector('#b3') | |
| ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as React from "react" | |
| import { Frame, useCycle, useMotionValue, useTransform } from "framer" | |
| // Open Preview (CMD + P) | |
| // API Reference: https://www.framer.com/api | |
| export function MotionAndTransform() { | |
| const yPosition = useMotionValue(200) | |
| const xPosition = useMotionValue(0) | |
| const doubleXPosition = useTransform(xPosition, v => v * 2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Promise.resolve() | |
| .then(() => { | |
| return 'OK' | |
| }) | |
| .then(a => `${a} ${Date.now()}`) | |
| .then(b => new Promise((resolve) => { | |
| setTimeout(() => resolve(`${b} + delay`), 1000); | |
| })) | |
| .then(out => console.log(out)) | |
| .catch(e => console.error(e)); |