diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/controllers/elements/shapes-controller.js | 1 | ||||
-rw-r--r-- | js/data/pi/pi-data.js | 30 | ||||
-rw-r--r-- | js/models/shape-model.js | 1 | ||||
-rw-r--r-- | js/tools/LineTool.js | 1 | ||||
-rw-r--r-- | js/tools/OvalTool.js | 1 | ||||
-rw-r--r-- | js/tools/RectTool.js | 1 |
6 files changed, 35 insertions, 0 deletions
diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js index 5efbccd0..48072309 100644 --- a/js/controllers/elements/shapes-controller.js +++ b/js/controllers/elements/shapes-controller.js | |||
@@ -76,6 +76,7 @@ exports.ShapesController = Montage.create(CanvasController, { | |||
76 | case "fillMaterial": | 76 | case "fillMaterial": |
77 | case "border": | 77 | case "border": |
78 | case "background": | 78 | case "background": |
79 | case "useWebGl": | ||
79 | return this.getShapeProperty(el, p); | 80 | return this.getShapeProperty(el, p); |
80 | default: | 81 | default: |
81 | return CanvasController.getProperty(el, p); | 82 | return CanvasController.getProperty(el, p); |
diff --git a/js/data/pi/pi-data.js b/js/data/pi/pi-data.js index dd75e255..8ccf17cc 100644 --- a/js/data/pi/pi-data.js +++ b/js/data/pi/pi-data.js | |||
@@ -369,6 +369,16 @@ exports.PiData = Montage.create( Montage, { | |||
369 | Section: [ | 369 | Section: [ |
370 | [ | 370 | [ |
371 | { | 371 | { |
372 | type: "checkbox", | ||
373 | id: "useWebGl", | ||
374 | prop: "useWebGl", | ||
375 | defaultValue: false, | ||
376 | value: "Use WebGL", | ||
377 | checked: false | ||
378 | } | ||
379 | ], | ||
380 | [ | ||
381 | { | ||
372 | type: "dropdown", | 382 | type: "dropdown", |
373 | id: "strokeMaterial", | 383 | id: "strokeMaterial", |
374 | prop: "strokeMaterial", | 384 | prop: "strokeMaterial", |
@@ -434,6 +444,16 @@ exports.PiData = Montage.create( Montage, { | |||
434 | Section: [ | 444 | Section: [ |
435 | [ | 445 | [ |
436 | { | 446 | { |
447 | type: "checkbox", | ||
448 | id: "useWebGl", | ||
449 | prop: "useWebGl", | ||
450 | defaultValue: false, | ||
451 | value: "Use WebGL", | ||
452 | checked: false | ||
453 | } | ||
454 | ], | ||
455 | [ | ||
456 | { | ||
437 | type: "dropdown", | 457 | type: "dropdown", |
438 | id: "stroke", | 458 | id: "stroke", |
439 | label: "Stroke", | 459 | label: "Stroke", |
@@ -507,6 +527,16 @@ exports.PiData = Montage.create( Montage, { | |||
507 | Section: [ | 527 | Section: [ |
508 | [ | 528 | [ |
509 | { | 529 | { |
530 | type: "checkbox", | ||
531 | id: "useWebGl", | ||
532 | prop: "useWebGl", | ||
533 | defaultValue: false, | ||
534 | value: "Use WebGL", | ||
535 | checked: false | ||
536 | } | ||
537 | ], | ||
538 | [ | ||
539 | { | ||
510 | type: "dropdown", | 540 | type: "dropdown", |
511 | id: "strokeMaterial", | 541 | id: "strokeMaterial", |
512 | prop: "strokeMaterial", | 542 | prop: "strokeMaterial", |
diff --git a/js/models/shape-model.js b/js/models/shape-model.js index b643a7b5..1175538f 100644 --- a/js/models/shape-model.js +++ b/js/models/shape-model.js | |||
@@ -10,6 +10,7 @@ var Montage = require("montage/core/core").Montage, | |||
10 | exports.ShapeModel = Montage.create(Component, { | 10 | exports.ShapeModel = Montage.create(Component, { |
11 | 11 | ||
12 | shapeCount: { value: 0 }, | 12 | shapeCount: { value: 0 }, |
13 | useWebGl: { value: false }, | ||
13 | 14 | ||
14 | GLWorld: { value: null }, | 15 | GLWorld: { value: null }, |
15 | GLGeomObj: { value: null }, | 16 | GLGeomObj: { value: null }, |
diff --git a/js/tools/LineTool.js b/js/tools/LineTool.js index 17157f23..6a948fd8 100644 --- a/js/tools/LineTool.js +++ b/js/tools/LineTool.js | |||
@@ -238,6 +238,7 @@ exports.LineTool = Montage.create(ShapeTool, { | |||
238 | canvas.elementModel.shapeModel.strokeStyle = strokeStyle; | 238 | canvas.elementModel.shapeModel.strokeStyle = strokeStyle; |
239 | 239 | ||
240 | canvas.elementModel.shapeModel.GLGeomObj = line; | 240 | canvas.elementModel.shapeModel.GLGeomObj = line; |
241 | canvas.elementModel.shapeModel.useWebGl = this.options.use3D; | ||
241 | } | 242 | } |
242 | else | 243 | else |
243 | { | 244 | { |
diff --git a/js/tools/OvalTool.js b/js/tools/OvalTool.js index 2fa5411b..446c6754 100644 --- a/js/tools/OvalTool.js +++ b/js/tools/OvalTool.js | |||
@@ -95,6 +95,7 @@ exports.OvalTool = Montage.create(ShapeTool, { | |||
95 | canvas.elementModel.shapeModel.strokeStyle = strokeStyle; | 95 | canvas.elementModel.shapeModel.strokeStyle = strokeStyle; |
96 | 96 | ||
97 | canvas.elementModel.shapeModel.GLGeomObj = oval; | 97 | canvas.elementModel.shapeModel.GLGeomObj = oval; |
98 | canvas.elementModel.shapeModel.useWebGl = this.options.use3D; | ||
98 | } | 99 | } |
99 | else | 100 | else |
100 | { | 101 | { |
diff --git a/js/tools/RectTool.js b/js/tools/RectTool.js index 94d80b53..6109ee4d 100644 --- a/js/tools/RectTool.js +++ b/js/tools/RectTool.js | |||
@@ -117,6 +117,7 @@ exports.RectTool = Montage.create(ShapeTool, { | |||
117 | canvas.elementModel.shapeModel.strokeStyle = strokeStyle; | 117 | canvas.elementModel.shapeModel.strokeStyle = strokeStyle; |
118 | 118 | ||
119 | canvas.elementModel.shapeModel.GLGeomObj = rect; | 119 | canvas.elementModel.shapeModel.GLGeomObj = rect; |
120 | canvas.elementModel.shapeModel.useWebGl = this.options.use3D; | ||
120 | } | 121 | } |
121 | else | 122 | else |
122 | { | 123 | { |