diff options
author | Valerio Virgillito | 2012-05-11 10:59:25 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-05-11 10:59:25 -0700 |
commit | e2ef92008a39a67d4f7db0627c7352bdc06ed476 (patch) | |
tree | ae6122570b41879b5fa434c970592fe1deb23a2e /js/lib/drawing | |
parent | 632a53278826a33506b302b573ee0681840f2d6c (diff) | |
parent | 0467a1cf331c067b21bf5d6acfe47ec9edc2e41c (diff) | |
download | ninja-e2ef92008a39a67d4f7db0627c7352bdc06ed476.tar.gz |
Merge pull request #215 from mqg734/WebGLFixes
Updated Line, Oval and Rectangle geom classes to use object literal notation. Also, updated canvas-runtime.js to use object literal notation.
Diffstat (limited to 'js/lib/drawing')
-rwxr-xr-x | js/lib/drawing/world.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/js/lib/drawing/world.js b/js/lib/drawing/world.js index 7ce23921..0dde9af4 100755 --- a/js/lib/drawing/world.js +++ b/js/lib/drawing/world.js | |||
@@ -874,17 +874,17 @@ World.prototype.importObjectJSON = function( jObj, parentGeomObj ) | |||
874 | switch (type) | 874 | switch (type) |
875 | { | 875 | { |
876 | case 1: | 876 | case 1: |
877 | obj = new Rectangle(); | 877 | obj = Object.create(Rectangle, {}); |
878 | obj.importJSON( jObj ); | 878 | obj.importJSON( jObj ); |
879 | break; | 879 | break; |
880 | 880 | ||
881 | case 2: // circle | 881 | case 2: // circle |
882 | obj = new Circle(); | 882 | obj = Object.create(Circle, {}); |
883 | obj.importJSON( jObj ); | 883 | obj.importJSON( jObj ); |
884 | break; | 884 | break; |
885 | 885 | ||
886 | case 3: // line | 886 | case 3: // line |
887 | obj = new Line(); | 887 | obj = Object.create(Line, {}); |
888 | obj.importJSON( jObj ); | 888 | obj.importJSON( jObj ); |
889 | break; | 889 | break; |
890 | 890 | ||