diff --git a/build/update.js b/build/update.js
index 231bb4bc..c1ff3e5a 100644
--- a/build/update.js
+++ b/build/update.js
@@ -4,7 +4,12 @@ var fs = require('fs');
var ROOT = "../src/";
var OUTPUT_PORTAL = "qtek.js";
-var template = fs.readFileSync("qtek_template.js", "utf-8")
+var TS_ROOT = "../typescript/";
+var TS_PORTAL = "qtek.d.ts";
+
+var template = fs.readFileSync("qtek_template.js", "utf-8");
+
+var tsReferenceList = [];
glob("**/*.js", {
cwd : ROOT
@@ -27,13 +32,26 @@ glob("**/*.js", {
return memo[propName];
}, namespace);
- object[baseName] = "__require('qtek/"+filePathWithOutExt+"')__";
- })
+ object[baseName] = "__require('qtek/" + filePathWithOutExt + "')__";
+
+ // Get typescript reference list
+ var tsPath = TS_ROOT + filePathWithOutExt + ".d.ts";
+
+ if (fs.existsSync(tsPath)) {
+ tsReferenceList.push(filePathWithOutExt);
+ }
+ });
var jsString = JSON.stringify( namespace, null, '\t' );
jsString = jsString.replace(/\"\__require\((\S*?)\)__\"/g, 'require($1)')
var output = template.replace(/\{\{\$exportsObject\}\}/, jsString);
- fs.writeFileSync( ROOT+OUTPUT_PORTAL, output, "utf-8");
+ fs.writeFileSync(ROOT + OUTPUT_PORTAL, output, "utf-8");
+
+ // Write to ts reference file
+ var referenceCode = tsReferenceList.map(function(path) {
+ return '///';
+ }).join('\n');
+ fs.writeFileSync(TS_ROOT + TS_PORTAL, referenceCode, "utf-8");
});
\ No newline at end of file
diff --git a/src/DynamicGeometry.js b/src/DynamicGeometry.js
index d666a8ea..3495a324 100644
--- a/src/DynamicGeometry.js
+++ b/src/DynamicGeometry.js
@@ -37,7 +37,7 @@ define(function(require) {
joint : new Geometry.Attribute('joint', 'float', 4, 'JOINT', true),
// For wireframe display
// http://codeflow.org/entries/2012/aug/02/easy-wireframe-display-with-barycentric-coordinates/
- barycentric : new Geometry.Attribute('barycentric', 'float', 3, null, true),
+ barycentric : new Geometry.Attribute('barycentric', 'float', 3, null, true)
},
hint : glenum.DYNAMIC_DRAW,
diff --git a/src/FrameBuffer.js b/src/FrameBuffer.js
index bc1d6339..6c1d4e14 100644
--- a/src/FrameBuffer.js
+++ b/src/FrameBuffer.js
@@ -105,7 +105,6 @@ define(function(require) {
if (! texture.width) {
throw new Error("The texture attached to color buffer is not a valid.");
- return;
}
_gl.bindFramebuffer(_gl.FRAMEBUFFER, this.getFrameBuffer(_gl));
@@ -118,7 +117,7 @@ define(function(require) {
// http://blog.tojicode.com/2012/07/using-webgldepthtexture.html
attachment = attachment || _gl.COLOR_ATTACHMENT0;
target = target || _gl.TEXTURE_2D;
- mipmapLevel = mipmapLevel || 0
+ mipmapLevel = mipmapLevel || 0;
if (attachment === _gl.DEPTH_ATTACHMENT) {
@@ -163,4 +162,4 @@ define(function(require) {
FrameBuffer.DEPTH_STENCIL_ATTACHMENT = glenum.DEPTH_STENCIL_ATTACHMENT;
return FrameBuffer;
-})
\ No newline at end of file
+});
\ No newline at end of file
diff --git a/src/Geometry.js b/src/Geometry.js
index e97ef6bb..8438e6ac 100644
--- a/src/Geometry.js
+++ b/src/Geometry.js
@@ -90,7 +90,7 @@ define(function(require) {
useFace : true,
//Max Value of Uint16, i.e. 0xffff
- chunkSize : 65535,
+ chunkSize : 65535
}, function() {
// Use cache
this.cache = new Cache();
diff --git a/tests/cubes.html b/tests/cubes.html
index bba646d6..8055ab7d 100644
--- a/tests/cubes.html
+++ b/tests/cubes.html
@@ -9,11 +9,11 @@
+
+