This file contains 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 AWS = require('aws-sdk') | |
const db = new AWS.DynamoDB({apiVersion: '2012-08-10', region: 'ap-southeast-1'}) | |
exports.handler = function (event, context, callback) { | |
const TABLE = (event.stageVariables && event.stageVariables.env === 'production') | |
? 'find-wally-ranking-tree' | |
: 'find-wally-ranking-tree-dev' | |
const q = event.queryStringParameters | |
const score = +q.score |
This file contains 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
<template> | |
<div class="st-scrolly" :class="{active}"> | |
<div class="background-container"> | |
<div class="background" :style="stickyStyle"> | |
<slot name="background" v-bind="exposedScope"></slot> | |
</div> | |
</div> | |
<div ref="slides" class="slide-container"> | |
<slot v-bind="exposedScope"></slot> |
This file contains 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
/* | |
Example usage: | |
<rect v-for="bar in bars" :key="bar.key" v-animated="bar.attrs"></rect> | |
*/ | |
import {TweenMax} from 'gsap/TweenMax' | |
const currentAnimations = {} | |
export default { |
This file contains 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
/* | |
This version works better than the previous one because it supports animating computed properties. | |
i.e. attribute can be a function | |
This is useful for attributes like `transform` or non-linear tween | |
*/ | |
import TweenLite from 'gsap/TweenLite' | |
const currentAnimations = {} |
This file contains 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 IDENTITY = { | |
a: 1, | |
b: 0, | |
c: 0, | |
d: 1, | |
e: 0, | |
f: 0 | |
} | |
const epsilon = 0.00001 |
This file contains 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.map = function (iterable, mapper, options) { | |
options = options || {} | |
let concurrency = options.concurrency || Infinity | |
let index = 0 | |
const results = [] | |
const iterator = iterable[Symbol.iterator]() | |
const promises = [] | |
while (concurrency-- > 0) { |
This file contains 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 TweenLite from 'gsap/TweenLite' | |
import {_ANIMATE_, currentAnimations, defaultConfig} from '../shared' | |
export default { | |
bind (el, binding) { | |
if (typeof el.getTotalLength !== 'function') { | |
return console.warn('Using directive `v-draw` on unsupported element') | |
} | |
el.classList.add('vg-animated') |
This file contains 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 TweenLite from 'gsap/TweenLite' | |
import {_ANIMATE_, currentAnimations, defaultConfig} from './shared' | |
export default function (Target, animatedProps = []) { | |
if (animatedProps.length === 0) return Target | |
const props = { | |
animation: Object | |
} | |
animatedProps.forEach(prop => { props[prop] = null }) |
This file contains 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 Promise = window.Promise || (function () { | |
function PromiseLike (init) { | |
let state = 'pending' | |
let resolved, error | |
const pendingResolve = [] | |
const pendingReject = [] | |
function resolve (value) { | |
state = 'resolved' | |
resolved = value | |
pendingResolve.forEach(function (fn) { fn(value) }) |
This file contains 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
<template> | |
<video class="object-fit-video" v-bind="$attrs" v-on="$listeners" :style="videoStyle"> | |
<slot></slot> | |
</video> | |
</template> | |
<script> | |
const supportsObjectFit = window.CSS && window.CSS.supports && | |
window.CSS.supports('object-fit', 'cover') && | |
!/Edge/.test(window.navigator.userAgent) |
OlderNewer