diff options
author | Jose Antonio Marquez | 2012-03-02 19:06:37 -0800 |
---|---|---|
committer | Jose Antonio Marquez | 2012-03-02 19:06:37 -0800 |
commit | 5c49635cc44815364f9a0296ffaa7acc34254937 (patch) | |
tree | d7cb1cd499ab49df4366d776878a8137d662abe4 /js/tools/OvalTool.js | |
parent | 5c9795958b08c233eb2c4afab8054d55c3a33d98 (diff) | |
parent | 13f52cf0c74f53a919fa864f86669e8155f82961 (diff) | |
download | ninja-5c49635cc44815364f9a0296ffaa7acc34254937.tar.gz |
Merge branch 'refs/heads/Ninja-Internal' into FileIO
Diffstat (limited to 'js/tools/OvalTool.js')
-rwxr-xr-x | js/tools/OvalTool.js | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/js/tools/OvalTool.js b/js/tools/OvalTool.js index 14655312..911059a7 100755 --- a/js/tools/OvalTool.js +++ b/js/tools/OvalTool.js | |||
@@ -43,19 +43,21 @@ exports.OvalTool = Montage.create(ShapeTool, { | |||
43 | var strokeMaterial = null; | 43 | var strokeMaterial = null; |
44 | var fillMaterial = null; | 44 | var fillMaterial = null; |
45 | 45 | ||
46 | var strokeM = this.options.strokeMaterial; | 46 | if(this.options.use3D) |
47 | if(strokeM) | ||
48 | { | 47 | { |
49 | strokeMaterial = Object.create(MaterialsLibrary.getMaterial(strokeM)); | 48 | var strokeM = this.options.strokeMaterial; |
50 | } | 49 | if(strokeM) |
50 | { | ||
51 | strokeMaterial = Object.create(MaterialsLibrary.getMaterial(strokeM)); | ||
52 | } | ||
51 | 53 | ||
52 | var fillM = this.options.fillMaterial; | 54 | var fillM = this.options.fillMaterial; |
53 | if(fillM) | 55 | if(fillM) |
54 | { | 56 | { |
55 | fillMaterial = Object.create(MaterialsLibrary.getMaterial(fillM)); | 57 | fillMaterial = Object.create(MaterialsLibrary.getMaterial(fillM)); |
58 | } | ||
56 | } | 59 | } |
57 | 60 | ||
58 | |||
59 | var world = this.getGLWorld(canvas, this.options.use3D); | 61 | var world = this.getGLWorld(canvas, this.options.use3D); |
60 | 62 | ||
61 | var xOffset = ((left - canvas.offsetLeft + w/2) - canvas.width/2); | 63 | var xOffset = ((left - canvas.offsetLeft + w/2) - canvas.width/2); |