nodejs with express server, leapmotion for movement control, and threejs for 3d render

This commit is contained in:
idoctnef
2016-05-30 18:14:08 +02:00
parent e2aeac1bae
commit 52b63ee33a
893 changed files with 127726 additions and 0 deletions

1
node_modules/base64-arraybuffer/.npmignore generated vendored Normal file
View File

@@ -0,0 +1 @@
/node_modules/

6
node_modules/base64-arraybuffer/.travis.yml generated vendored Normal file
View File

@@ -0,0 +1,6 @@
---
language: node_js
node_js:
- '0.10'
before_script:
- npm install

22
node_modules/base64-arraybuffer/LICENSE-MIT generated vendored Normal file
View File

@@ -0,0 +1,22 @@
Copyright (c) 2012 Niklas von Hertzen
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

23
node_modules/base64-arraybuffer/README.md generated vendored Normal file
View File

@@ -0,0 +1,23 @@
# base64-arraybuffer
[![Build Status](https://travis-ci.org/niklasvh/base64-arraybuffer.png)](https://travis-ci.org/niklasvh/base64-arraybuffer)
Encode/decode base64 data into ArrayBuffers
## Getting Started
Install the module with: `npm install base64-arraybuffer`
## API
The library encodes and decodes base64 to and from ArrayBuffers
- __encode(buffer)__ - Encodes `ArrayBuffer` into base64 string
- __decode(str)__ - Decodes base64 string to `ArrayBuffer`
## Release History
- 0.1.2 - Fix old format of typed arrays
- 0.1.0 - Initial version, basic decode/encode base64 to and from ArrayBuffer
## License
Copyright (c) 2012 Niklas von Hertzen
Licensed under the MIT license.

23
node_modules/base64-arraybuffer/README.md~ generated vendored Normal file
View File

@@ -0,0 +1,23 @@
# base64-arraybuffer
[![Build Status](https://travis-ci.org/niklasvh/base64-arraybuffer.png)](https://travis-ci.org/niklasvh/base64-arraybuffer)
Encode/decode base64 data into ArrayBuffers
## Getting Started
Install the module with: `npm install base64-arraybuffer`
## API
The library encodes and decodes base64 to and from ArrayBuffers
- __encode(buffer)__ - Encodes `ArrayBuffer` into base64 string
- __decode(str)__ - Decodes base64 string to `ArrayBuffer`
## Release History
- 0.1.2 - Fix old format of typed arrays
- 0.1.0 - Initial version, basic decode/encode base64 to and from ArrayBuffer
## License
Copyright (c) 2012 Niklas von Hertzen
Licensed under the MIT license.

39
node_modules/base64-arraybuffer/grunt.js generated vendored Normal file
View File

@@ -0,0 +1,39 @@
module.exports = function(grunt) {
"use strict";
// Project configuration.
grunt.initConfig({
pkg: '<json:package.json>',
test: {
files: ['test/**/*.js']
},
lint: {
files: ['grunt.js', 'lib/**/*.js', 'test/**/*.js']
},
watch: {
files: '<config:lint.files>',
tasks: 'default'
},
jshint: {
options: {
curly: true,
eqeqeq: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: true,
boss: true,
eqnull: true,
node: true
},
globals: {
exports: true
}
}
});
// Default task.
grunt.registerTask('default', 'test');
};

View File

@@ -0,0 +1,59 @@
/*
* base64-arraybuffer
* https://github.com/niklasvh/base64-arraybuffer
*
* Copyright (c) 2012 Niklas von Hertzen
* Licensed under the MIT license.
*/
(function(chars){
"use strict";
exports.encode = function(arraybuffer) {
var bytes = new Uint8Array(arraybuffer),
i, len = bytes.length, base64 = "";
for (i = 0; i < len; i+=3) {
base64 += chars[bytes[i] >> 2];
base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];
base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];
base64 += chars[bytes[i + 2] & 63];
}
if ((len % 3) === 2) {
base64 = base64.substring(0, base64.length - 1) + "=";
} else if (len % 3 === 1) {
base64 = base64.substring(0, base64.length - 2) + "==";
}
return base64;
};
exports.decode = function(base64) {
var bufferLength = base64.length * 0.75,
len = base64.length, i, p = 0,
encoded1, encoded2, encoded3, encoded4;
if (base64[base64.length - 1] === "=") {
bufferLength--;
if (base64[base64.length - 2] === "=") {
bufferLength--;
}
}
var arraybuffer = new ArrayBuffer(bufferLength),
bytes = new Uint8Array(arraybuffer);
for (i = 0; i < len; i+=4) {
encoded1 = chars.indexOf(base64[i]);
encoded2 = chars.indexOf(base64[i+1]);
encoded3 = chars.indexOf(base64[i+2]);
encoded4 = chars.indexOf(base64[i+3]);
bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);
bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);
bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);
}
return arraybuffer;
};
})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/");

82
node_modules/base64-arraybuffer/package.json generated vendored Normal file
View File

@@ -0,0 +1,82 @@
{
"_args": [
[
"base64-arraybuffer@0.1.2",
"C:\\Users\\esanvin\\Desktop\\multi\\NodeServer\\node_modules\\engine.io-parser"
]
],
"_from": "base64-arraybuffer@0.1.2",
"_id": "base64-arraybuffer@0.1.2",
"_inCache": true,
"_installable": true,
"_location": "/base64-arraybuffer",
"_npmUser": {
"email": "niklasvh@gmail.com",
"name": "niklasvh"
},
"_npmVersion": "1.3.21",
"_phantomChildren": {},
"_requested": {
"name": "base64-arraybuffer",
"raw": "base64-arraybuffer@0.1.2",
"rawSpec": "0.1.2",
"scope": null,
"spec": "0.1.2",
"type": "version"
},
"_requiredBy": [
"/engine.io-parser"
],
"_resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.2.tgz",
"_shasum": "474df4a9f2da24e05df3158c3b1db3c3cd46a154",
"_shrinkwrap": null,
"_spec": "base64-arraybuffer@0.1.2",
"_where": "C:\\Users\\esanvin\\Desktop\\multi\\NodeServer\\node_modules\\engine.io-parser",
"author": {
"email": "niklasvh@gmail.com",
"name": "Niklas von Hertzen",
"url": "http://hertzen.com"
},
"bugs": {
"url": "https://github.com/niklasvh/base64-arraybuffer/issues"
},
"dependencies": {},
"description": "Encode/decode base64 data into ArrayBuffers",
"devDependencies": {
"grunt": "~0.3.17"
},
"directories": {},
"dist": {
"shasum": "474df4a9f2da24e05df3158c3b1db3c3cd46a154",
"tarball": "http://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.2.tgz"
},
"engines": {
"node": ">= 0.6.0"
},
"homepage": "https://github.com/niklasvh/base64-arraybuffer",
"keywords": [],
"licenses": [
{
"type": "MIT",
"url": "https://github.com/niklasvh/base64-arraybuffer/blob/master/LICENSE-MIT"
}
],
"main": "lib/base64-arraybuffer",
"maintainers": [
{
"email": "niklasvh@gmail.com",
"name": "niklasvh"
}
],
"name": "base64-arraybuffer",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/niklasvh/base64-arraybuffer.git"
},
"scripts": {
"test": "grunt test"
},
"version": "0.1.2"
}

35
node_modules/base64-arraybuffer/package.json~ generated vendored Normal file
View File

@@ -0,0 +1,35 @@
{
"name": "base64-arraybuffer",
"description": "Encode/decode base64 data into ArrayBuffers",
"version": "0.1.1",
"homepage": "https://github.com/niklasvh/base64-arraybuffer",
"author": {
"name": "Niklas von Hertzen",
"email": "niklasvh@gmail.com",
"url": "http://hertzen.com"
},
"repository": {
"type": "git",
"url": "https://github.com/niklasvh/base64-arraybuffer"
},
"bugs": {
"url": "https://github.com/niklasvh/base64-arraybuffer/issues"
},
"licenses": [
{
"type": "MIT",
"url": "https://github.com/niklasvh/base64-arraybuffer/blob/master/LICENSE-MIT"
}
],
"main": "lib/base64-arraybuffer",
"engines": {
"node": ">= 0.6.0"
},
"scripts": {
"test": "grunt test"
},
"devDependencies": {
"grunt": "~0.3.17"
},
"keywords": []
}

View File

@@ -0,0 +1,72 @@
(function(){
"use strict";
var base64_arraybuffer = require('../lib/base64-arraybuffer.js');
/*
======== A Handy Little Nodeunit Reference ========
https://github.com/caolan/nodeunit
Test methods:
test.expect(numAssertions)
test.done()
Test assertions:
test.ok(value, [message])
test.equal(actual, expected, [message])
test.notEqual(actual, expected, [message])
test.deepEqual(actual, expected, [message])
test.notDeepEqual(actual, expected, [message])
test.strictEqual(actual, expected, [message])
test.notStrictEqual(actual, expected, [message])
test.throws(block, [error], [message])
test.doesNotThrow(block, [error], [message])
test.ifError(value)
*/
function stringArrayBuffer(str) {
var buffer = new ArrayBuffer(str.length);
var bytes = new Uint8Array(buffer);
str.split('').forEach(function(str, i) {
bytes[i] = str.charCodeAt(0);
});
return buffer;
}
function testArrayBuffers(buffer1, buffer2) {
var len1 = buffer1.byteLength,
len2 = buffer2.byteLength;
if (len1 !== len2) {
console.log(buffer1, buffer2);
return false;
}
for (var i = 0; i < len1; i++) {
if (buffer1[i] !== buffer1[i]) {
console.log(i, buffer1, buffer2);
return false;
}
}
return true;
}
exports['base64tests'] = {
'encode': function(test) {
test.expect(4);
test.equal(base64_arraybuffer.encode(stringArrayBuffer("Hello world")), "SGVsbG8gd29ybGQ=", 'encode "Hello world"');
test.equal(base64_arraybuffer.encode(stringArrayBuffer("Man")), 'TWFu', 'encode "Man"');
test.equal(base64_arraybuffer.encode(stringArrayBuffer("Ma")), "TWE=", 'encode "Ma"');
test.equal(base64_arraybuffer.encode(stringArrayBuffer("Hello worlds!")), "SGVsbG8gd29ybGRzIQ==", 'encode "Hello worlds!"');
test.done();
},
'decode': function(test) {
test.expect(3);
test.ok(testArrayBuffers(base64_arraybuffer.decode("TWFu"), stringArrayBuffer("Man")), 'decode "Man"');
test.ok(testArrayBuffers(base64_arraybuffer.decode("SGVsbG8gd29ybGQ="), stringArrayBuffer("Hello world")), 'decode "Hello world"');
test.ok(testArrayBuffers(base64_arraybuffer.decode("SGVsbG8gd29ybGRzIQ=="), stringArrayBuffer("Hello worlds!")), 'decode "Hello worlds!"');
test.done();
}
};
})();