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
https://vine.co/pxlwrx | |
https://vine.co/u/936947234963095552 | |
https://vine.co/Tragic.Tofu | |
https://vine.co/Le.Seb.Ettinger | |
https://vine.co/stonebizone | |
https://vine.co/u/909047515024867328 |
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
//I think that the main problem with the code is that | |
//Particle inherits from Object3D, but you couldn't reuse that same code to | |
//make another object inherit from Particle, since the original Particle constructor | |
//is overridden by Object3Ds. So my approach would be: | |
THREE.Particle = function (material) { | |
THREE.Object3D.call(this); | |
this.size = 1; | |
this.material = material; | |
}; |
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
function canvasTest() { | |
var canvas = document.createElement('canvas'); | |
alert(typeof canvas.getContext('2d').fillText); | |
var ctx = canvas.getContext('2d'); | |
canvas.widh = 500; | |
canvas.height = 500; | |
document.body.appendChild(canvas); | |
ctx.font = 'bold 12px Arial'; | |
ctx.fillStyle= '#000'; | |
ctx.fillText("Hello World", 200, 200); |
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
self.head = { | |
'prev': None, | |
'next': None, | |
'value': Node | |
} |
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
add : function(key, o){ | |
if(arguments.length == 1){ | |
o = key; | |
key = this.getKey(o); | |
debugger; | |
} | |
if(typeof key != 'undefined' && key !== null){ | |
var old = this.map[key]; | |
if(typeof old != 'undefined'){ | |
return this.replace(key, o); |
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
function test1() { | |
alert(blah); | |
function blah() { | |
} | |
} | |
function test2() { | |
alert(blah); | |
var blah = function() {}; |
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
function webGLStart() { | |
var $id = function(d) { return document.getElementById(d); }; | |
//unpack modules | |
PhiloGL.unpack(); | |
//create all models | |
var models = {}; | |
//Create moon | |
models.moon = new O3D.Sphere({ |
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
function webGLStart() { | |
//Load models | |
var triangle = new PhiloGL.O3D.Model({ | |
vertices: [ 0, 1, 0, | |
-1, -1, 0, | |
1, -1, 0], | |
colors: [1, 0, 0, 1, | |
0, 1, 0, 1, | |
0, 0, 1, 1] |
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
function webGLStart() { | |
var xRot = 0, xSpeed = 0, | |
yRot = 0, ySpeed = 0, | |
z = -5.0, | |
filter = 0, | |
filters = ['nearest', 'linear', 'mipmap']; | |
//Create object | |
var cube = new PhiloGL.O3D.Model({ | |
vertices: [-1, -1, 1, |
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
//Lighting form elements variables | |
var $id = function(d) { return document.getElementById(d); }; | |
function webGLStart() { | |
var xRot = 0, xSpeed = 0, | |
yRot = 0, ySpeed = 0, | |
z = -5.0; | |
//Get lighting form elements | |
var lighting = $id('lighting'), |
OlderNewer