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
class Path { | |
Path() {} | |
Path.parse(String data) { | |
return null; // mock | |
} | |
} | |
Document SVG = null; | |
Document ensureSvg(Function cb(Document svg)) { |
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
/** | |
* @constructor | |
*/ | |
function Injector() { | |
/** | |
* @type {!Object.<string, function(Injector=): !Object>} | |
*/ | |
this.factories = {}; | |
/** | |
* @type {!Object.<string, !Object>} |
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
/** | |
* Extended version of THREE.ShadowMapPluginVSM using VSM shadow mapping. | |
* @author Dusan Maliarik | |
*/ | |
THREE.ShadowMapPluginVSM = function ( ) { | |
var _gl, | |
_renderer, | |
_depthMaterial, _depthMaterialMorph, _depthMaterialSkin, _depthMaterialMorphSkin, |
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::property = (prop, desc) -> | |
Object.defineProperty @prototype, prop, desc | |
class vec3i | |
X = 0 | |
Y = 1 | |
Z = 2 | |
constructor: (x, y, z) -> | |
@data = new Uint32Array() | |
@data[X] = x |
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::property = (prop, desc) -> | |
Object.defineProperty @prototype, prop, desc | |
typed_concat = (type, a, b) -> | |
alen = a.length | |
result = new type(alen + b.length) | |
result.set(a) | |
result.set(b, alen) | |
result | |
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
<script> | |
//<![CDATA[ | |
document.write("<script type='text/javascript' src='http://" + window.location.hostname + ":9810/compile?id=areas-serve&mode=RAW'><\/script>"); | |
//]]> | |
</script> |
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::property = (prop, desc) -> | |
Object.defineProperty @prototype, prop, desc | |
arrayExcept = (arr, idx) -> | |
res = arr[0..] | |
res.splice idx, 1 | |
res | |
combine = (str) -> | |
fn = (active, rest, 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
return class Sun extends require('events') | |
constructor: (gui, @bounds, @orientation=104, @elevation=60) -> | |
gui.remember @ | |
super() | |
folder = gui.addFolder('Sun') | |
folder.add(@, 'orientation', 0, 360).onChange(@update) | |
folder.add(@, 'elevation', 0, 90).onChange(@update) | |
@size = @bounds.size.length | |
@center = @bounds.min.add(@bounds.size.div 2, new Vec3) |
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
return class AABB | |
@property 'size', | |
get: -> @max.sub(@min, new Vec3) | |
@property 'vertices', | |
get: -> [ | |
new Vec3(new Float32Array([@min.x, @min.y, @min.z])) | |
new Vec3(new Float32Array([@max.x, @min.y, @min.z])) | |
new Vec3(new Float32Array([@max.x, @min.y, @max.z])) | |
new Vec3(new Float32Array([@min.x, @min.y, @max.z])) |
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
touch .git/hooks/pre-commit | |
chmod +x .git/hooks/pre-commit | |
cat > .git/hooks/pre-commit | |
#!/bin/sh | |
make test |