Commit d4904ed2 authored by Juan Blanco Segleau's avatar Juan Blanco Segleau

Implements threejs in the viewer, no touch controls implemented yet

parent 5ff9d0e8
This diff is collapsed.
......@@ -170,7 +170,7 @@ Blockscad.init = function() {
// toggle whether or not we draw the axes, then redraw
Blockscad.drawAxes = (Blockscad.drawAxes + 1) % 2;
$( '#axesButton' ).toggleClass("btn-pushed");
gProcessor.viewer.onDraw();
gProcessor.viewer.toggleAxes();
});
// can I bind a click to a tab?
......
......@@ -56,7 +56,7 @@ class Gen_compressed(threading.Thread):
# Read in all the source files.
filenames = ['storage.js','utils.js','blockscad.js', 'FileSaver.js',
'text.js','lightgl.js','toolbox.js','deflate.js', 'stl.js']
'text.js','three.min.js','OrbitControls.js','toolbox.js','deflate.js', 'stl.js']
for filename in filenames:
f = open(filename)
print filename
......@@ -79,7 +79,7 @@ class Gen_compressed(threading.Thread):
]
# Read in all the source files.
filenames = ['viewer.js', 'csg.js', 'formats.js']
filenames = ['threeViewer.js', 'csg.js', 'formats.js']
for filename in filenames:
f = open(filename)
print filename
......@@ -165,4 +165,4 @@ def file_lookup(name):
n = int(name[6:])
return filenames[n]
if __name__ == '__main__':
Gen_compressed('').start()
\ No newline at end of file
Gen_compressed('').start()
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -8,9 +8,15 @@
var Blockscad = Blockscad || {};
var CSG = CSG || {};
var CAG = CAG || {};
/**
* A viewer is a WebGL canvas that lets the user view a mesh. The user can tumble it around by dragging the mouse.
* @constructor
* @param {string} containerelement - selector of the doom element wich will contain the viewer
* @param {int} width - width of the viewer
* @param {int} height - width of the viewer
* @param {int} initialdepth - ??
*/
// A viewer is a WebGL canvas that lets the user view a mesh. The user can
// tumble it around by dragging the mouse.
Blockscad.Viewer = function(containerelement, width, height, initialdepth) {
var gl = GL.create();
this.gl = gl;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -605,3 +605,4 @@
</body>
</html>
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment