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
/* | |
add this code | |
run console.log( canvas ); | |
see the canvas | |
if the canvas is running a webgl context, it'll need the preserveDrawingBuffer flag set to true | |
*/ | |
( function() { |
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() { | |
var b = document.body; | |
document.addEventListener( | |
'touchstart', function(evt) { | |
var o = parseFloat( getComputedStyle( b, null ).getPropertyValue( 'opacity' ) ); | |
b.style.opacity = o - .005; | |
} | |
); | |
} )(); |
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() { | |
function sugarifyNew( id ) { | |
var name = id + ''; | |
var fnName = name.charAt( 0 ).toUpperCase() + name.substr( 1 ); | |
window[ fnName ] = function() { | |
return document.createElement( id ); | |
} |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<title>Decal Splatter</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"> | |
<style> | |
*{ box-sizing: border-box; margin: 0; padding: 0 } | |
body { | |
color: #888; |
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
var ctx1 = document.getElementById( 'color-1' ).getContext( '2d' ), | |
ctx2 = document.getElementById( 'color-2' ).getContext( '2d' ); | |
function simulateClick( target ) { | |
var evt = document.createEvent("Events"); | |
evt.initEvent("click", true, true); | |
target.dispatchEvent(evt); | |
} | |
setInterval( function() { |
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 f() { var a = [].slice.apply( document.querySelectorAll( 'a' ) ); a.forEach( function( e ) { e.click(); } ) } | |
var s = setInterval( f, 100 ) |
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 exportZipToSketchfab( zip ) { | |
setLoadingText( 'Uploading...' ); | |
showLoading( true ); | |
var fd = new FormData(); | |
fd.append('token', settings.sketchfabToken ); | |
fd.append('fileModel', zip ); |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<title>Wagner - Minefield!</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"> | |
<style> | |
body { | |
color: #ffffff; | |
font-family: 'roboto condensed', tahoma; |
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
/* | |
uniform types: https://github.com/mrdoob/three.js/wiki/Uniforms-types | |
THREE.Matrix4: http://threejs.org/docs/#Reference/Math/Matrix4 | |
https://github.com/mrdoob/three.js/issues/1188 | |
*/ | |
/* | |
on Init(); | |
Add this uniform to your uniforms |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |