Because I never remember (work with easing too)
var y = data.y - scrollY * data.speed;
// Container height
var targetY = size.height; // window height
Git team workflow - merging and rebasing | |
0. git checkout [branch] | |
1. git push origin [branch] | |
2. git checkout master | |
3. git pull --rebase | |
4. git checkout [branch] | |
5. git rebase master | |
(6.) git mergetool / git rebase --continue |
/* | |
** Copyright (c) 2012, Romain Dura [email protected] | |
** | |
** Permission to use, copy, modify, and/or distribute this software for any | |
** purpose with or without fee is hereby granted, provided that the above | |
** copyright notice and this permission notice appear in all copies. | |
** | |
** THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
** WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
** MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY |
landscape() { | |
@media screen and (min-aspect-ratio: 13/9) { block; } | |
} | |
portrait() { | |
@media screen and (max-aspect-ratio: 13/9) { block; } | |
} | |
// http://blog.abouthalf.com/development/orientation-media-query-challenges-in-android-browsers/ |
python objConvert.py -i -o -s flat
// Minimal version of MeshBasicMaterial | |
// But removed everything except shadow | |
// then only render the shadow | |
var shadowMaterial = { | |
transparent: true, | |
uniforms: THREE.UniformsUtils.merge([ | |
THREE.UniformsLib['common'], | |
THREE.UniformsLib['shadowmap'] | |
]), |
// http://stackoverflow.com/questions/19764018/controlling-fps-with-requestanimationframe | |
fpsInterval = 1000 / fps; // 24 for instance | |
then = Date.now(); | |
update(); | |
function update() { | |
requestAnimationFrame(update); | |
now = Date.now(); |
pointer-events: none
on cover and play button
(might need some nested pointer-events to get the click through the UI to the video)
on iOS, use cuevideoById
instead of loadVideoById
???
Profit !
var ratio = window.devicePixelRatio || 1; | |
var canvas = this.canvas; | |
canvas.width = ratio * size.width; | |
canvas.height = ratio * size.height; | |
canvas.style.width = size.width + 'px'; | |
canvas.style.height = size.height + 'px'; |