From 636014cf5d824909993d7dc3510fbe6ce2fc72f1 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Thu, 22 Mar 2012 14:24:46 -0700 Subject: WebGL needs to have 3d styles to render. Signed-off-by: Nivesh Rajbhandari --- js/tools/BrushTool.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/tools/BrushTool.js') diff --git a/js/tools/BrushTool.js b/js/tools/BrushTool.js index 4ce9976a..ac29f2f2 100644 --- a/js/tools/BrushTool.js +++ b/js/tools/BrushTool.js @@ -252,7 +252,7 @@ exports.BrushTool = Montage.create(ShapeTool, { if (!canvas) { var newCanvas = NJUtils.makeNJElement("canvas", "Brushstroke", "shape", {"data-RDGE-id": NJUtils.generateRandom()}, true); - var elementModel = TagTool.makeElement(w, h, planeMat, midPt, newCanvas); + var elementModel = TagTool.makeElement(w, h, planeMat, midPt, newCanvas, this._useWebGL); ElementMediator.addElement(newCanvas, elementModel.data, true); // create all the GL stuff -- cgit v1.2.3 From 4dc89306c43e86cdac254c81fb9bb3a92eb4a8b9 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Thu, 5 Apr 2012 12:12:36 -0700 Subject: Removing fill, stroke, fillMaterial and strokeMaterial from the shapeModel cache because they can easily get out of sync with the actual colors and materials. Instead, we will always query the object for these values. Signed-off-by: Nivesh Rajbhandari --- js/tools/BrushTool.js | 6 ------ 1 file changed, 6 deletions(-) (limited to 'js/tools/BrushTool.js') diff --git a/js/tools/BrushTool.js b/js/tools/BrushTool.js index d71cc743..1365896a 100644 --- a/js/tools/BrushTool.js +++ b/js/tools/BrushTool.js @@ -334,12 +334,6 @@ exports.BrushTool = Montage.create(ShapeTool, { newCanvas.elementModel.selection = "BrushStroke"; newCanvas.elementModel.pi = "BrushStrokePi"; newCanvas.elementModel.shapeModel.strokeSize = this.options.strokeSize.value + " " + this.options.strokeSize.units; - var strokeColor = this._selectedBrushStroke.getStrokeColor(); - newCanvas.elementModel.shapeModel.stroke = strokeColor; - if(strokeColor) { - newCanvas.elementModel.shapeModel.border = this.application.ninja.colorController.colorToolbar.stroke; - } - newCanvas.elementModel.shapeModel.strokeMaterial = this._selectedBrushStroke.getStrokeMaterial(); newCanvas.elementModel.shapeModel.GLGeomObj = brushStroke; newCanvas.elementModel.shapeModel.useWebGl = this.options.use3D; -- cgit v1.2.3 From d42af4f0f5e893ab0e1f74f50055e0be3bd9e78e Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Thu, 5 Apr 2012 16:43:25 -0700 Subject: -webkit-transform-style needs to be set to preserve-3d for shapes regardless of whether they are 2d shapes or WebGL shapes. Signed-off-by: Nivesh Rajbhandari --- js/tools/BrushTool.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/tools/BrushTool.js') diff --git a/js/tools/BrushTool.js b/js/tools/BrushTool.js index 1365896a..4347658a 100644 --- a/js/tools/BrushTool.js +++ b/js/tools/BrushTool.js @@ -305,7 +305,7 @@ exports.BrushTool = Montage.create(ShapeTool, { if (!canvas) { var newCanvas = NJUtils.makeNJElement("canvas", "Brushstroke", "shape", {"data-RDGE-id": NJUtils.generateRandom()}, true); - var elementModel = TagTool.makeElement(w, h, planeMat, midPt, newCanvas, this._useWebGL); + var elementModel = TagTool.makeElement(w, h, planeMat, midPt, newCanvas, true); ElementMediator.addElements(newCanvas, elementModel.data, false); // create all the GL stuff -- cgit v1.2.3