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
const src = `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADYAAAAHCAAAAABmCOEJAAAACXBIWXMAAAsTAAALEwEAmpwYAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N+QWVRZnpGiYKhpaWlgmNKflKqQnBlcUlqbrGCZ15yflFBflFiSWoKAwMD1A4GBgYGXpf8EgX3xMw8BSMDVQYqg4jIKAUICxE+CDEESC4tKoMHJQODAIMCgwGDA0MAQyJDPcMChqMMbxjFGV0YSxlXMN5jEmMKYprAdIFZmDmSeSHzGxZLlg6WW6x6rK2s99gs2aaxfWMPZ9/NocTRxfGFM5HzApcj1xZuTe4FPFI8U3mFeCfxCfNN45fhXyygI7BD0FXwilCq0A/hXhEVkb2i4aJfxCaJG4lfkaiQlJM8JpUvLS19QqZMVl32llyfvIv8H4WtioVKekpvldeqFKiaqP5UO6jepRGqqaT5QeuA9iSdVF0rPUG9V/pHDBYY1hrFGNuayJsym740u2C+02KJ5QSrOutcmzjbQDtXe2sHY0cdJzVnJRcFV3k3BXdlD3VPXS8Tbxsfd99gvwT//ID6wIlBS4N3hVwMfRnOFCEXaRUVEV0RMzN2T9yDBLZE3aSw5IaUNak30zkyLDIzs+ZmX8xlz7PPryjYVPiuWLskq3RV2ZsK/cqSql01jLVedVPrHzbqNdU0n22VaytsP9op3VXUfbpXta+x/+5Em0mzJ/+dGj/t8AyNmf2zvs9JmHt6vvmCpYtEFrcu+bYsc/m9lSGrTq9xWbtvveW |
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); |
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
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
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
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.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
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
<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 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); |