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
// if an invalidate mechanism is in place | |
// easings based on expressions might have | |
// a bit of zeno's paradox, in which the | |
// value infinitesimally converges to the | |
// target value | |
var value = 0; | |
var nValue = 1; | |
function animate() { |
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 geometry = new THREE.IcosahedronGeometry( 2, 5 ); | |
for ( var i = 0, l = geometry.faceVertexUvs[ 0 ].length; i < l; i ++ ) { | |
for ( var j = 0, jl = geometry.faceVertexUvs[ 0 ][ i ].length; j < jl; j ++ ) { | |
var uv = geometry.faceVertexUvs[ 0 ][ i ][ j ]; | |
var a = uv.y * Math.PI - Math.PI / 2; | |
a = Math.sin(a); |
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
<html> | |
<head> | |
<title>Page Title</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> | |
<script src="CCapture.all.min.js"> | |
</script> | |
</head> | |
<body> | |
<div id="elementToShare" class="elementToShare"> |
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 canvas = document.createElement( 'canvas' ); | |
!! ( window.WebGLRenderingContext && ( canvas.getContext( 'webgl' ) || canvas.getContext( 'experimental-webgl' ) ) ); |
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
document.getElementById( 'loading' ).style.display = 'none'; | |
var speed = .001; // changes the rate of rotation | |
var distance = 4; // changes the distance the point travels | |
function _update() { | |
bAmDrawing = true; | |
lastMouseX = 0; lastMouseY = 0; | |
var a = speed * performance.now(); | |
var x = distance * Math.cos( a ); | |
var y = distance * Math.sin( a ); | |
stage.mousemove( { data: { global : { x: x, y: y } } } ) |
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 Block( x, y, w, h, d ) { | |
this.x = x; | |
this.y = y; | |
this.w = w; | |
this.h = h; | |
this.d = d; | |
this.children = []; |
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
document.body.addEventListener('click', async e => { | |
if(e.srcElement && e.srcElement.classList.contains('irc_mi')) { | |
const downloadBtn = document.createElement( 'a' ); | |
downloadBtn.setAttribute( 'target', '_blank' ); | |
downloadBtn.setAttribute( 'href', e.srcElement.src ); | |
downloadBtn.click(); | |
e.preventDefault(); |
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
canvas.toBlob( e => { | |
const url = URL.createObjectURL(e); | |
const link = document.createElement('a'); | |
link.setAttribute('href',url); | |
link.setAttribute('download','image.webp'); | |
link.click(); | |
console.log(url);}, | |
'image/webp', |
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
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> | |
<style> | |
.Easter { | |
egg: #17; | |
} | |
html, body { | |
background:#cccccc url(/wallpapers/cn.jpg) repeat left top; | |
background-size: 100%; | |
font: normal 12px tahoma, arial, verdana, sans-serif; | |
margin: 0; |
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 r() { | |
let mediaRecorder; | |
let recordedBlobs; | |
let startTime = 0; | |
function handleDataAvailable(event) { | |
console.log('on data available') | |
if (event.data && event.data.size > 0) { | |
recordedBlobs.push(event.data); |