From e87069b43027b6b1707bb065a1f331b600b5db58 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Tue, 6 Mar 2012 12:37:17 -0800 Subject: Authortime import of 2d & 3d canvases --- js/document/html-document.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'js/document') diff --git a/js/document/html-document.js b/js/document/html-document.js index 2d7192b7..8722e223 100755 --- a/js/document/html-document.js +++ b/js/document/html-document.js @@ -220,9 +220,14 @@ exports.HTMLDocument = Montage.create(TextDocument, { if (canvas.elementModel.shapeModel.GLWorld) canvas.elementModel.shapeModel.GLWorld.clearTree(); - var world = new GLWorld( canvas ); - canvas.elementModel.shapeModel.GLWorld = world; + var index = importStr.indexOf( "webGL: " ); + var useWebGL = (index >= 0) + var world = new GLWorld( canvas, useWebGL ); world.import( importStr ); + canvas.elementModel.shapeModel.GLWorld = world; + + /////////////////////////// + //something.buildShapeModel( world ); // to come from Nivesh } } } -- cgit v1.2.3