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 toNumber = function ( text ) { | |
var i, charCode, charArray = []; | |
if ( typeof( text ) === 'number' && !isNaN( text ) ) { | |
return text; | |
} | |
text = text.replace( /,/, '' ); | |
for ( i = text.length - 1; 0 <= i; i-- ) { | |
charCode = charArray[i] = text.charCodeAt( i ); | |
switch( true ) { | |
case ( charCode <= 0xff5e && 0xff01 <= charCode ): |
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> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
</head> | |
<body> | |
<svg viewBox="0 0 200 200" width="200" height="200"> |
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
// collision detection for Sphere vs Triangle in three.js | |
// http://realtimecollisiondetection.net/blog/?p=103 | |
var detectSphereVsTriangleCollision = function ( face, position, radius ) { | |
var A = new THREE.Vector3(), | |
B = new THREE.Vector3(), | |
C = new THREE.Vector3(), | |
rr, | |
V = new THREE.Vector3(), |
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
new THREE.WebGLRenderer({ precision: "mediump", devicePixelRatio:1, antialias:false }); |
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
<a href="http://twitter.com/home?status=<?php echo urlencode(the_title_attribute('echo=0')); ?>%20<?php the_permalink(); ?>%20by%20@helloooo"> | |
</a> | |
<a href="https://www.facebook.com/sharer/sharer.php?u=<?php the_permalink(); ?>"> | |
</a> | |
<a href="https://plus.google.com/share?url=<?php the_permalink(); ?>"> | |
Google+ |
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 strict'; | |
var triangle = {} | |
triangle.makeBoundingBox = function ( triangle ) { | |
var bb = new THREE.Box3(); | |
bb.min = bb.min.min( triangle.a ); | |
bb.min = bb.min.min( triangle.b ); |
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 A = function () { | |
this.a = 1; | |
} | |
A.prototype.aaa = function () { | |
var count = 0; | |
return function () { | |
count ++; | |
console.log( this.a + count ); | |
} |
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
// based on http://marupeke296.com/COL_3D_No15_Octree.html | |
// | |
// +------+------+ | |
// |\ 6 \ 7 \ | |
// | +------+------+ | |
// + |\ \ \ | |
// |\| +------+------+ | |
// |4+ | | | | |
// + |\| 2 | 3 | | |
// \| +------+------+ |
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
.PREFIX-block .PREFIX-block--element{ | |
@at-root .PREFIX-block--modifier#{&} .PREFIX-block--elementElement{ | |
color: red; | |
} | |
} | |
will be | |
.PREFIX-block--modifier.PREFIX-block .PREFIX-block--element .PREFIX-block--elementElement { | |
color: red; } |
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 triangle = {} | |
triangle.makeBoundingBox = function ( triangle ) { | |
var bb = new THREE.Box3(); | |
bb.min = bb.min.min( triangle.a ); | |
bb.min = bb.min.min( triangle.b ); | |
bb.min = bb.min.min( triangle.c ); |