|
2 | 2 |
|
3 | 3 | // generate mixer |
4 | 4 | var mixerList = [ |
5 | | - {name: 'Tricopter', model: 'tricopter', image: 'tri'}, |
6 | | - {name: 'Quad +', model: 'quad_x', image: 'quad_p'}, |
7 | | - {name: 'Quad X', model: 'quad_x', image: 'quad_x'}, |
8 | | - {name: 'Bicopter', model: 'custom', image: 'bicopter'}, |
9 | | - {name: 'Gimbal', model: 'custom', image: 'custom'}, |
10 | | - {name: 'Y6', model: 'y6', image: 'y6'}, |
11 | | - {name: 'Hex +', model: 'hex_plus', image: 'hex_p'}, |
12 | | - {name: 'Flying Wing', model: 'custom', image: 'flying_wing'}, |
13 | | - {name: 'Y4', model: 'y4', image: 'y4'}, |
14 | | - {name: 'Hex X', model: 'hex_x', image: 'hex_x'}, |
15 | | - {name: 'Octo X8', model: 'custom', image: 'octo_x8'}, |
16 | | - {name: 'Octo Flat +', model: 'custom', image: 'octo_flat_p'}, |
17 | | - {name: 'Octo Flat X', model: 'custom', image: 'octo_flat_x'}, |
18 | | - {name: 'Airplane', model: 'custom', image: 'airplane'}, |
19 | | - {name: 'Heli 120', model: 'custom', image: 'custom'}, |
20 | | - {name: 'Heli 90', model: 'custom', image: 'custom'}, |
21 | | - {name: 'V-tail Quad', model: 'quad_vtail', image: 'vtail_quad'}, |
22 | | - {name: 'Hex H', model: 'custom', image: 'custom'}, |
23 | | - {name: 'PPM to SERVO', model: 'custom', image: 'custom'}, |
24 | | - {name: 'Dualcopter', model: 'custom', image: 'custom'}, |
25 | | - {name: 'Singlecopter', model: 'custom', image: 'custom'}, |
26 | | - {name: 'A-tail Quad', model: 'quad_atail', image: 'atail_quad'}, |
27 | | - {name: 'Custom', model: 'custom', image: 'custom'}, |
28 | | - {name: 'Custom Airplane', model: 'custom', image: 'custom'}, |
29 | | - {name: 'Custom Tricopter', model: 'custom', image: 'custom'}, |
30 | | - {name: 'Quad X 1234', model: 'quad_x', image: 'quad_x_1234'} |
| 5 | + {name: 'Tricopter', pos: 3, model: 'tricopter', image: 'tri'}, |
| 6 | + {name: 'Quad +', pos: 2, model: 'quad_x', image: 'quad_p'}, |
| 7 | + {name: 'Quad X', pos: 0, model: 'quad_x', image: 'quad_x'}, |
| 8 | + {name: 'Bicopter', pos: 16, model: 'custom', image: 'bicopter'}, |
| 9 | + {name: 'Gimbal', pos: 4, model: 'custom', image: 'custom'}, |
| 10 | + {name: 'Y6', pos: 20, model: 'y6', image: 'y6'}, |
| 11 | + {name: 'Hex +', pos: 5, model: 'hex_plus', image: 'hex_p'}, |
| 12 | + {name: 'Flying Wing', pos: 10, model: 'custom', image: 'flying_wing'}, |
| 13 | + {name: 'Y4', pos: 19, model: 'y4', image: 'y4'}, |
| 14 | + {name: 'Hex X', pos: 6, model: 'hex_x', image: 'hex_x'}, |
| 15 | + {name: 'Octo X8', pos: 21, model: 'custom', image: 'octo_x8'}, |
| 16 | + {name: 'Octo Flat +', pos: 8, model: 'custom', image: 'octo_flat_p'}, |
| 17 | + {name: 'Octo Flat X', pos: 9, model: 'custom', image: 'octo_flat_x'}, |
| 18 | + {name: 'Airplane', pos: 11, model: 'custom', image: 'airplane'}, |
| 19 | + {name: 'Heli 120', pos: 12, model: 'custom', image: 'custom'}, |
| 20 | + {name: 'Heli 90', pos: 13, model: 'custom', image: 'custom'}, |
| 21 | + {name: 'V-tail Quad', pos: 17, model: 'quad_vtail', image: 'vtail_quad'}, |
| 22 | + {name: 'Hex H', pos: 7, model: 'custom', image: 'custom'}, |
| 23 | + {name: 'PPM to SERVO', pos: 22, model: 'custom', image: 'custom'}, |
| 24 | + {name: 'Dualcopter', pos: 15, model: 'custom', image: 'custom'}, |
| 25 | + {name: 'Singlecopter', pos: 14, model: 'custom', image: 'custom'}, |
| 26 | + {name: 'A-tail Quad', pos: 18, model: 'quad_atail', image: 'atail_quad'}, |
| 27 | + {name: 'Custom', pos: 23, model: 'custom', image: 'custom'}, |
| 28 | + {name: 'Custom Airplane', pos: 24, model: 'custom', image: 'custom'}, |
| 29 | + {name: 'Custom Tricopter', pos: 25, model: 'custom', image: 'custom'}, |
| 30 | + {name: 'Quad X 1234', pos: 1, model: 'quad_x', image: 'quad_x_1234'} |
31 | 31 | ]; |
32 | 32 |
|
33 | | - |
34 | 33 | // 3D model |
35 | 34 | var Model = function (wrapper, canvas) { |
36 | 35 | var useWebGLRenderer = this.canUseWebGLRenderer(); |
@@ -106,7 +105,7 @@ Model.prototype.canUseWebGLRenderer = function () { |
106 | 105 | // and webgl will be supported if gpu supports it by default (canary 40.0.2175.0), keep an eye on this one |
107 | 106 | var detector_canvas = document.createElement('canvas'); |
108 | 107 |
|
109 | | - return window.WebGLRenderingContext && (detector_canvas.getContext('webgl') || detector_canvas.getContext('experimental-webgl')) |
| 108 | + return window.WebGLRenderingContext && (detector_canvas.getContext('webgl') || detector_canvas.getContext('experimental-webgl')); |
110 | 109 | }; |
111 | 110 |
|
112 | 111 | Model.prototype.rotateTo = function (x, y, z) { |
|
0 commit comments