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
# For Ubuntu MATE, save this config file at ~/.config/marco-compton.conf | |
################################# | |
# | |
# Backend | |
# | |
################################# | |
# Backend to use: "xrender" or "glx". | |
# GLX backend is typically much faster but depends on a sane driver. |
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
/** | |
* Note: I have forked this gist from @getify to rewrite it with variable naming with closer association with hook and state | |
* and added some comments of my own so that it is easier to follow | |
* A demo is live at: https://codepen.io/trongthanh/pen/WaqqoJ?editors=0012 | |
*/ | |
'use strict'; | |
[foo, bar] = enableHooks(foo, bar); | |
function foo(origX, origY) { |
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
/* Animations plus animations/transitions */ | |
/* ref: http://mattwilcox.net/sandbox/css3-animations-1/index.htm */ | |
/* also ref: http://css-tricks.com/restart-css-animation/ */ | |
.animate-on-load {animation: bgcolor 3s;} | |
.animate-on-hover:hover {animation: bgcolor 3s;} | |
.animate-on-hover2:hover {animation: bgcolor2 3s;} /* change anim name */ | |
.animate-on-hover3:hover {animation: bgcolor 2.9s;} /* change duration */ | |
.animate-on-hover4:hover {animation: bgcolor 3s 2;} /* change iteration-count */ | |
.transition-on-hover {transition: background-color 2s;} | |
.transition-on-hover:hover {background-color: #777;} |
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
var | |
projector = new THREE.Projector(), | |
p3D = new THREE.Vector3(25, 15, 9), | |
p2D; | |
p2D = projector.projectVector(p3D, camera); | |
p3D = projector.unprojectVector(p2D, camera); | |
//need extra steps to convert p2D to window's coordinates | |
p2D.x = (p2D.x + 1)/2 * window.innerWidth; |