1 /*global JXG:true, define: true*/
  2 
  3 import JXG from "./jxg.js";
  4 import Options from "./options.js";
  5 
  6 JXG.extend(Options, {
  7     // infobox: {
  8     //     // strokeColor: 'black',
  9     //     // useKatex: false,
 10     //     // useMathjax: false
 11     // },
 12 
 13     axes3d: {
 14         /**#@+
 15          * @visprop
 16          */
 17 
 18         /**
 19          * Position of the main axes in a View3D element. Possible values are
 20          * 'center', 'border' or 'none'. This attribute is immutable, i.e.
 21          * can not be changed during the lifetime of the construction.
 22          *
 23          * @type String
 24          * @name View3D#axesPosition
 25          * @default 'center'
 26          */
 27         axesPosition: "center", // Possible values: 'center', 'border', 'none'
 28 
 29         // Main axes
 30         /**
 31          * Attributes of the centered 3D x-axis.
 32          *
 33          * @type Line3D
 34          * @name View3D#xAxis
 35          * @see View3D#axesPosition
 36          */
 37         xAxis: { visible: true, point2: { name: "x" }, strokeColor: JXG.palette.red },
 38 
 39         /**
 40          * Attributes of the centered 3D y-axis.
 41          *
 42          * @type Line3D
 43          * @name View3D#yAxis
 44          * @see View3D#axesPosition
 45          */
 46         yAxis: { visible: true, point2: { name: "y" }, strokeColor: JXG.palette.green },
 47 
 48         /**
 49          * Attributes of the centered 3D z-axis.
 50          *
 51          * @type Line3D
 52          * @name View3D#zAxis
 53          * @see View3D#axesPosition
 54          */
 55         zAxis: { visible: true, point2: { name: "z" }, strokeColor: JXG.palette.blue },
 56 
 57         /**
 58          * Attributes of the 3D x-axis at the border.
 59          *
 60          * @type Line3D
 61          * @name View3D#xAxisBorder
 62          * @see View3D#axesPosition
 63          * @default <pre>{
 64          *   name: 'x',
 65          *   withLabel: false,
 66          *   label: {
 67          *       position: '50% left',
 68          *       offset: [30, 0],
 69          *       fontsize: 15
 70          *   },
 71          *   strokeWidth: 1,
 72          *   lastArrow: false,
 73          *   ticks3d: {
 74          *       label: {
 75          *           anchorX: 'middle',
 76          *           anchorY: 'middle'
 77          *       }
 78          *   }
 79          *}
 80          *</pre>
 81          */
 82         xAxisBorder: {
 83             name: 'x',
 84             visible: 'ìnherit',
 85             withLabel: false,
 86             label: {
 87                 position: '50% left',
 88                 offset: [30, 0],
 89                 fontsize: 15
 90             },
 91             strokeWidth: 1,
 92             lastArrow: false,
 93             ticks3d: {
 94                 visible: 'ìnherit',
 95                 label: {
 96                     anchorX: 'middle',
 97                     anchorY: 'middle'
 98                 }
 99 
100             }
101         },
102 
103         /**
104          * Attributes of the 3D y-axis at the border.
105          *
106          * @type Line3D
107          * @name View3D#yAxisBorder
108          * @see View3D#axesPosition
109          * @default <pre>{
110          *   name: 'x',
111          *   withLabel: false,
112          *   label: {
113          *       position: '50% right',
114          *       offset: [0, -30],
115          *       fontsize: 15
116          *   },
117          *   strokeWidth: 1,
118          *   lastArrow: false,
119          *   ticks3d: {
120          *       label: {
121          *           anchorX: 'middle',
122          *       }
123          *   }
124          *}
125          *</pre>
126          */
127         yAxisBorder: {
128             name: 'y',
129             visible: 'ìnherit',
130             withLabel: false,
131             label: {
132                 position: '50% right',
133                 offset: [0, -30],
134                 fontsize: 15
135             },
136             strokeWidth: 1,
137             lastArrow: false,
138             ticks3d: {
139                 visible: 'ìnherit',
140                 label: {
141                     anchorX: 'middle'
142                 }
143             }
144         },
145 
146         /**
147          * Attributes of the 3D z-axis at the border.
148          *
149          * @type Line3D
150          * @name View3D#zAxisBorder
151          * @see View3D#axesPosition
152          * @default <pre>{
153          *   name: 'z',
154          *   withLabel: false,
155          *   label: {
156          *       position: '50% right',
157          *       offset: [30, 0],
158          *       fontsize: 15
159          *   },
160          *   strokeWidth: 1,
161          *   lastArrow: false,
162          *   ticks3d: {
163          *       label: {
164          *           anchorX: 'middle',
165          *           anchorY: 'middle'
166          *       }
167          *   }
168          *}
169          *</pre>
170          */
171         zAxisBorder: {
172             name: 'z',
173             visible: 'ìnherit',
174             withLabel: false,
175             label: {
176                 position: '50% right',
177                 offset: [30, 0],
178                 fontsize: 15
179             },
180             strokeWidth: 1,
181             lastArrow: false,
182             ticks3d: {
183                 visible: 'ìnherit',
184                 label: {
185                     anchorX: 'middle',
186                     anchorY: 'middle'
187                 }
188             }
189         },
190 
191         // Planes
192         /**
193          * Attributes of the 3D plane orthogonal to the x-axis at the "rear" of the cube.
194          * @type Plane3D
195          * @name View3D#xPlaneRear
196          */
197         xPlaneRear: {
198             visible: true,
199             layer: 0,
200             strokeWidth: 1,
201             strokeColor: '#dddddd',
202             fillColor: '#dddddd',
203             mesh3d: { layer: 1 }
204         },
205 
206         /**
207          * Attributes of the 3D plane orthogonal to the y-axis at the "rear" of the cube.
208          * @type Plane3D
209          * @name View3D#yPlaneRear
210          */
211         yPlaneRear: {
212             visible: true,
213             strokeWidth: 1,
214             strokeColor: '#dddddd',
215             fillColor: '#dddddd',
216             layer: 0,
217             mesh3d: { layer: 1 }
218         },
219 
220         /**
221          * Attributes of the 3D plane orthogonal to the z-axis at the "rear" of the cube.
222          * @type Plane3D
223          * @name View3D#zPlaneRear
224          */
225         zPlaneRear: {
226             visible: true,
227             strokeWidth: 1,
228             strokeColor: '#dddddd',
229             fillColor: '#dddddd',
230             layer: 0,
231             mesh3d: { layer: 1 }
232         },
233 
234         /**
235          * Attributes of the 3D plane orthogonal to the x-axis at the "front" of the cube.
236          * @type Plane3D
237          * @name View3D#xPlaneFront
238          */
239         xPlaneFront: {
240             visible: false,
241             strokeWidth: 1,
242             strokeColor: '#dddddd',
243             fillColor: '#dddddd',
244             layer: 0,
245             mesh3d: { layer: 1 }
246         },
247         /**
248          * Attributes of the 3D plane orthogonal to the y-axis at the "front" of the cube.
249          * @type Plane3D
250          * @name View3D#yPlaneFront
251          */
252         yPlaneFront: {
253             visible: false,
254             strokeWidth: 1,
255             strokeColor: '#dddddd',
256             fillColor: '#dddddd',
257             layer: 0,
258             mesh3d: { layer: 1 }
259         },
260         /**
261          * Attributes of the 3D plane orthogonal to the z-axis at the "front" of the cube.
262          * @type Plane3D
263          * @name View3D#zPlaneFront
264          */
265         zPlaneFront: {
266             visible: false,
267             strokeWidth: 1,
268             strokeColor: '#dddddd',
269             fillColor: '#dddddd',
270             layer: 0,
271             mesh3d: { layer: 1 }
272         },
273 
274         // Axes on the planes
275         /**
276          * Attributes of the 3D y-axis on the 3D plane orthogonal to the x-axis at the "rear" of the cube.
277          * @type Plane3D
278          * @name View3D#xPlaneRearYAxis
279          */
280         xPlaneRearYAxis: {
281             visible: "inherit",
282             strokeColor: "#888888",
283             strokeWidth: 1
284         },
285         /**
286          * Attributes of the 3D z-axis on the 3D plane orthogonal to the x-axis at the "rear" of the cube.
287          * @type Plane3D
288          * @name View3D#xPlaneRearZAxis
289          */
290         xPlaneRearZAxis: {
291             visible: "inherit",
292             strokeColor: "#888888",
293             strokeWidth: 1
294         },
295         /**
296          * Attributes of the 3D y-axis on the 3D plane orthogonal to the x-axis at the "front" of the cube.
297          * @type Plane3D
298          * @name View3D#xPlaneFrontYAxis
299          */
300         xPlaneFrontYAxis: {
301             visible: "inherit",
302             strokeColor: "#888888",
303             strokeWidth: 1
304         },
305         /**
306          * Attributes of the 3D z-axis on the 3D plane orthogonal to the x-axis at the "front" of the cube.
307          * @type Plane3D
308          * @name View3D#xPlaneFrontZAxis
309          */
310         xPlaneFrontZAxis: {
311             visible: "inherit",
312             strokeColor: "#888888",
313             strokeWidth: 1
314         },
315 
316         /**
317          * Attributes of the 3D x-axis on the 3D plane orthogonal to the y-axis at the "rear" of the cube.
318          * @type Plane3D
319          * @name View3D#yPlaneRearXAxis
320          */
321         yPlaneRearXAxis: {
322             visible: "inherit",
323             strokeColor: "#888888",
324             strokeWidth: 1
325         },
326         /**
327          * Attributes of the 3D z-axis on the 3D plane orthogonal to the y-axis at the "rear" of the cube.
328          * @type Plane3D
329          * @name View3D#yPlaneRearZAxis
330          */
331         yPlaneRearZAxis: {
332             visible: "inherit",
333             strokeColor: "#888888",
334             strokeWidth: 1
335         },
336         /**
337          * Attributes of the 3D x-axis on the 3D plane orthogonal to the y-axis at the "front" of the cube.
338          * @type Plane3D
339          * @name View3D#yPlaneFrontXAxis
340          */
341         yPlaneFrontXAxis: {
342             visible: "inherit",
343             strokeColor: "#888888",
344             strokeWidth: 1
345         },
346         /**
347          * Attributes of the 3D z-axis on the 3D plane orthogonal to the y-axis at the "front" of the cube.
348          * @type Plane3D
349          * @name View3D#yPlaneFrontZAxis
350          */
351         yPlaneFrontZAxis: {
352             visible: "inherit",
353             strokeColor: "#888888",
354             strokeWidth: 1
355         },
356 
357         /**
358          * Attributes of the 3D x-axis on the 3D plane orthogonal to the z-axis at the "rear" of the cube.
359          * @type Plane3D
360          * @name View3D#zPlaneRearXAxis
361          */
362         zPlaneRearXAxis: {
363             visible: "inherit",
364             strokeColor: "#888888",
365             strokeWidth: 1
366         },
367         /**
368          * Attributes of the 3D y-axis on the 3D plane orthogonal to the z-axis at the "rear" of the cube.
369          * @type Plane3D
370          * @name View3D#zPlaneRearYAxis
371          */
372         zPlaneRearYAxis: {
373             visible: "inherit",
374             strokeColor: "#888888",
375             strokeWidth: 1
376         },
377         /**
378          * Attributes of the 3D x-axis on the 3D plane orthogonal to the z-axis at the "front" of the cube.
379          * @type Plane3D
380          * @name View3D#zPlaneFrontXAxis
381          */
382         zPlaneFrontXAxis: {
383             visible: "inherit",
384             strokeColor: "#888888",
385             strokeWidth: 1
386         },
387         /**
388          * Attributes of the 3D y-axis on the 3D plane orthogonal to the z-axis at the "front" of the cube.
389          * @type Plane3D
390          * @name View3D#zPlaneFrontYAxis
391          */
392         zPlaneFrontYAxis: {
393             visible: "inherit",
394             strokeColor: "#888888",
395             strokeWidth: 1
396         }
397 
398         /**#@-*/
399     },
400 
401     axis3d: {
402         highlight: false,
403         fixed: true,
404         strokeColor: "black",
405         strokeWidth: 1,
406         tabindex: null,
407 
408         point1: { visible: false, name: "", withLabel: false },
409         point2: { visible: false, name: "", withLabel: false, label: { visible: true } }
410     },
411 
412     circle3d: {
413 
414         point: { visible: false, name: "" }
415     },
416 
417     curve3d: {
418         /**#@+
419          * @visprop
420          */
421 
422         highlight: false,
423         tabindex: -1,
424         strokeWidth: 1,
425         numberPointsHigh: 200
426 
427         /**#@-*/
428     },
429 
430     intersectionline3d: {
431         point1: { visible: false, name: "" }, // Used in point/point
432         point2: { visible: false, name: "" }
433     },
434 
435     line3d: {
436         strokeWidth: 1,
437         strokeColor: "black",
438         fixed: true,
439         tabindex: null,
440         gradient: "linear",
441         gradientSecondColor: "#ffffff",
442 
443         point: { visible: false, name: "" }, // Used in cases of point/direction/range
444         point1: { visible: false, name: "" }, // Used in point/point
445         point2: { visible: false, name: "" }
446     },
447 
448     mesh3d: {
449         /**#@+
450          * @visprop
451          */
452 
453         strokeWidth: 1,
454         strokeColor: "#9a9a9a",
455         strokeOpacity: 0.6,
456         highlight: false,
457         tabindex: null,
458 
459         visible: "inherit"
460 
461         /**#@-*/
462     },
463 
464     plane3d: {
465         strokeWidth: 0,
466         strokeColor: "black",
467         strokeOpacity: 1,
468         highlight: false,
469         tabindex: null,
470 
471         gradient: "linear",
472         gradientSecondColor: "#ffffff",
473         gradientAngle: Math.PI,
474         fillColor: "#a7a7a7",
475         fillOpacity: 0.6,
476 
477         point: { visible: false, name: "", fixed: true }
478     },
479 
480     point3d: {
481         infoboxDigits: "auto",
482         strokeWidth: 0,
483         gradient: "radial",
484         gradientSecondColor: "#555555",
485         fillColor: "yellow",
486         highlightStrokeColor: "#555555",
487         gradientFX: 0.7,
488         gradientFY: 0.3
489     },
490 
491     polygon3d: {
492         /**#@+
493          * @visprop
494          */
495 
496         highlight: false,
497         tabindex: -1,
498         strokeWidth: 1,
499         fillColor: 'none'
500 
501         /**#@-*/
502     },
503 
504     sphere3d: {
505         /**#@+
506          * @visprop
507          */
508 
509         highlight: false,
510 
511         strokeWidth: 1,
512         strokeColor: '#00ff80',
513         fillColor: 'white',
514         gradient: 'radial',
515         gradientSecondColor: '#00ff80',
516         gradientFX: 0.7,
517         gradientFY: 0.3,
518         fillOpacity: 0.4
519 
520         /**#@-*/
521     },
522 
523     surface3d: {
524         /**#@+
525          * @visprop
526          */
527 
528         highlight: false,
529         tabindex: -1,
530         strokeWidth: 1,
531 
532         /**
533          * Number of intervals the mesh is divided into in direction of parameter u.
534          * @type Number
535          * @name ParametricSurface3D#stepsU
536          */
537         stepsU: 30,
538 
539         /**
540          * Number of intervals the mesh is divided into in direction of parameter v.
541          * @type Number
542          * @name ParametricSurface3D#stepsV
543          */
544         stepsV: 30
545 
546         /**#@-*/
547     },
548 
549     text3d: {
550         /**#@+
551          * @visprop
552          */
553 
554         withLabel: false
555 
556         /**#@-*/
557     },
558 
559     ticks3d: {
560         /**#@+
561          * @visprop
562          */
563 
564         visible: true,
565 
566         ticksDistance: 1,
567         majorHeight: 10,
568         minorTicks: 0,
569         tickEndings: [0, 1],
570         drawLabels: true,
571 
572         label: {
573             visible: true,
574             withLabel: false
575         }
576 
577         /**#@-*/
578     },
579 
580     vectorfield3d: {
581         /**#@+
582          * @visprop
583          */
584 
585         /**
586          * Scaling factor of the vectors. This in contrast to slope fields, where this attribute sets the vector to the given length.
587          * @name scale
588          * @memberOf Vectorfield3D.prototype
589          * @type {Number|Function}
590          * @see Slopefield.scale
591          * @default 1
592          */
593         scale: 1,
594 
595         /**
596          * Customize arrow heads of vectors. Be careful! If enabled this will slow down the performance.
597          * Fields are:
598          * <ul>
599          *  <li> enabled: Boolean
600          *  <li> size: length of the arrow head legs (in pixel)
601          *  <li> angle: angle of the arrow head legs In radians.
602          * </ul>
603          * @name arrowhead
604          * @memberOf Vectorfield3D.prototype
605          * @type {Object}
606          * @default <tt>{enabled: true, size: 5, angle: Math.PI * 0.125}</tt>
607          */
608         arrowhead: {
609             enabled: true,
610             size: 5,
611             angle: Math.PI * 0.125
612         }
613 
614         /**#@-*/
615     },
616 
617     view3d: {
618         /**#@+
619          * @visprop
620          */
621 
622         needsRegularUpdate: true,
623 
624         /**
625          * When this option is enabled, points closer to the screen are drawn
626          * over points further from the screen within each layer.
627          *
628          * @name View3D#depthOrderPoints
629          * @default false
630          */
631         depthOrderPoints: false,
632 
633         /**
634          * Choose the projection type to be used: `parallel` or `central`.
635          * <ul>
636          * <li> `parallel` is parallel projection, also called orthographic projection
637          * <li> `central` is central projection, also called perspective projection
638          * </ul>
639          *
640          *
641          * @name View3D#projection
642          * @type String
643          * @default 'parallel'
644          */
645         projection: 'parallel',
646 
647         /**
648          * Allow vertical dragging of objects, i.e. in direction of the z-axis.
649          * Subobjects are
650          * <ul>
651          *  <li>enabled: true
652          *  <li>key: 'shift'
653          * </ul>
654          * <p>
655          * Possible values for attribute <i>key</i>: 'shift' or 'ctrl'.
656          *
657          * @name View3D#verticalDrag
658          * @type Object
659          * @default <tt>{enabled: true, key: 'shift'}</tt>
660          */
661         verticalDrag: {
662             enabled: true,
663             key: 'shift'
664         },
665 
666         /**
667          * Specify the user handling of the azimuth.
668          * <ul>
669          *  <li><tt>pointer</tt> sub-attributes:
670          *      <ul>
671          *          <li><tt>enabled</tt>: Boolean that specifies whether pointer navigation is allowed by azimuth.
672          *          <li><tt>speed</tt>: Number indicating how many passes the range of the az_slider makes when the cursor crosses the entire board once in the horizontal direction.
673          *          <li><tt>outside</tt>: Boolean that specifies whether the pointer navigation is continued when the cursor leaves the board.
674          *          <li><tt>button</tt>: Which button of the pointer should be used? (<tt>'-1'</tt> (=no button), <tt>'0'</tt> or <tt>'2'</tt>)
675          *          <li><tt>key</tt>: Should an additional key be pressed? (<tt>'none'</tt>, <tt>'shift'</tt> or <tt>'ctrl'</tt>)
676          *      </ul>
677          *  <li><tt>keyboard</tt> sub-attributes:
678          *      <ul>
679          *          <li><tt>enabled</tt>: Boolean that specifies whether the keyboard (arrow keys) can be used to navigate the board.
680          *          <li><tt>step</tt>: Size of the step per keystroke.
681          *          <li><tt>key</tt>: Should an additional key be pressed? (<tt>'none'</tt>, <tt>'shift'</tt> or <tt>'ctrl'</tt>)
682          *      </ul>
683          *  <li><tt>continuous</tt>: Boolean that specifies whether the az_slider starts again from the beginning when its end is reached.
684          *  <li><tt>slider</tt> attributes of the az_slider ({@link Slider}) with additional
685          *      <ul>
686          *          <li><tt>min</tt>: Minimum value.
687          *          <li><tt>max</tt>: Maximum value.
688          *          <li><tt>start</tt>: Start value.
689          *      </ul>
690          * </ul>
691          *
692          * @name View3D#az
693          * @type Object
694          * @default <pre>{
695          *      pointer: {enabled: true, speed: 1, outside: true, button: -1, key: 'none'},
696          *      keyboard: {enabled: true, step: 10, key: 'ctrl'},
697          *      continuous: true,
698          *      slider: {
699          *          visible: true,
700          *          style: 6,
701          *          point1: {frozen: true},
702          *          point2: {frozen: true},
703          *          min: 0,
704          *          max: 2 * Math.PI,
705          *          start: 1.0
706          *      },
707          * }</pre>
708          * @example
709          *     var bound = [-4, 6];
710          *     var view = board.create('view3d',
711          *         [[-4, -3], [8, 8],
712          *         [bound, bound, bound]],
713          *         {
714          *             projection: 'parallel',
715          *             az: {
716          *                 slider: {visible: true}
717          *             }
718          *         });
719          *
720          * </pre><div id="JXG4c381f21-f043-4419-941d-75f384c026d0" class="jxgbox" style="width: 300px; height: 300px;"></div>
721          * <script type="text/javascript">
722          *     (function() {
723          *         var board = JXG.JSXGraph.initBoard('JXG4c381f21-f043-4419-941d-75f384c026d0',
724          *             {boundingbox: [-8, 8, 8,-8], axis: false, showcopyright: false, shownavigation: false});
725          *         var bound = [-4, 6];
726          *         var view = board.create('view3d',
727          *             [[-4, -3], [8, 8],
728          *             [bound, bound, bound]],
729          *             {
730          *                 projection: 'parallel',
731          *                 az: {
732          *                     slider: {visible: true}
733          *                 }
734          *             });
735          *
736          *     })();
737          *
738          * </script><pre>
739          *
740          */
741         az: {
742             pointer: {
743                 enabled: true,
744                 speed: 1,
745                 outside: true,
746                 button: -1,
747                 key: 'none'
748             },
749             keyboard: {
750                 enabled: true,
751                 step: 10,
752                 key: 'ctrl'
753             },
754             continuous: true,
755             slider: {
756                 visible: 'inherit',
757                 style: 6,
758                 point1: { frozen: true },
759                 point2: { frozen: true },
760                 min: 0,
761                 max: 2 * Math.PI,
762                 start: 1.0
763             }
764         },
765 
766         /**
767          * Specify the user handling of the elevation.
768          * <ul>
769          *  <li><tt>pointer</tt> sub-attributes:
770          *      <ul>
771          *          <li><tt>enabled</tt>: Boolean that specifies whether pointer navigation is allowed by elevation.
772          *          <li><tt>speed</tt>: Number indicating how many passes the range of the el_slider makes when the cursor crosses the entire board once in the horizontal direction.
773          *          <li><tt>outside</tt>: Boolean that specifies whether the pointer navigation is continued when the cursor leaves the board.
774          *          <li><tt>button</tt>: Which button of the pointer should be used? (<tt>'-1'</tt> (=no button), <tt>'0'</tt> or <tt>'2'</tt>)
775          *          <li><tt>key</tt>: Should an additional key be pressed? (<tt>'none'</tt>, <tt>'shift'</tt> or <tt>'ctrl'</tt>)
776          *      </ul>
777          *  <li><tt>keyboard</tt> sub-attributes:
778          *      <ul>
779          *          <li><tt>enabled</tt>: Boolean that specifies whether the keyboard (arrow keys) can be used to navigate the board.
780          *          <li><tt>step</tt>: Size of the step per keystroke.
781          *          <li><tt>key</tt>: Should an additional key be pressed? (<tt>'none'</tt>, <tt>'shift'</tt> or <tt>'ctrl'</tt>)
782          *      </ul>
783          *  <li><tt>continuous</tt>: Boolean that specifies whether the el_slider starts again from the beginning when its end is reached.
784          *  <li><tt>slider</tt> attributes of the el_slider ({@link Slider}) with additional
785          *      <ul>
786          *          <li><tt>min</tt>: Minimum value.
787          *          <li><tt>max</tt>: Maximum value.
788          *          <li><tt>start</tt>: Start value.
789          *      </ul>
790          * </ul>
791          *
792          * @name View3D#el
793          * @type Object
794          * @default <pre>{
795          *      pointer: {enabled: true, speed: 1, outside: true, button: -1, key: 'none'},
796          *      keyboard: {enabled: true, step: 10, key: 'ctrl'},
797          *      continuous: true,
798          *      slider: {
799          *          visible: true,
800          *          style: 6,
801          *          point1: {frozen: true},
802          *          point2: {frozen: true},
803          *          min: 0,
804          *          max: 2 * Math.PI,
805          *          start: 0.3
806          *      },
807          * }<pre>
808          * @example
809          *     var bound = [-4, 6];
810          *     var view = board.create('view3d',
811          *         [[-4, -3], [8, 8],
812          *         [bound, bound, bound]],
813          *         {
814          *             projection: 'parallel',
815          *             el: {
816          *                 slider: {visible: true}
817          *             }
818          *         });
819          *
820          * </pre><div id="JXG8926f733-c42e-466b-853c-74feb795e879" class="jxgbox" style="width: 300px; height: 300px;"></div>
821          * <script type="text/javascript">
822          *     (function() {
823          *         var board = JXG.JSXGraph.initBoard('JXG8926f733-c42e-466b-853c-74feb795e879',
824          *             {boundingbox: [-8, 8, 8,-8], axis: false, showcopyright: false, shownavigation: false});
825          *         var bound = [-4, 6];
826          *         var view = board.create('view3d',
827          *             [[-4, -3], [8, 8],
828          *             [bound, bound, bound]],
829          *             {
830          *                 projection: 'parallel',
831          *                 el: {
832          *                     slider: {visible: true}
833          *                 }
834          *             });
835          *
836          *     })();
837          *
838          * </script><pre>
839          *
840          */
841         el: {
842             pointer: {
843                 enabled: true,
844                 speed: 1,
845                 outside: true,
846                 button: -1,
847                 key: 'none'
848             },
849             keyboard: {
850                 enabled: true,
851                 step: 10,
852                 key: 'ctrl'
853             },
854             continuous: true,
855             slider: {
856                 visible: 'inherit',
857                 style: 6,
858                 point1: { frozen: true },
859                 point2: { frozen: true },
860                 min: 0,
861                 max: 2 * Math.PI,
862                 start: 0.3
863             }
864         },
865 
866         /**
867          * Specify the user handling of the bank angle.
868          * <ul>
869          *  <li><tt>pointer</tt> sub-attributes:
870          *      <ul>
871          *          <li><tt>enabled</tt>: Boolean that specifies whether pointer navigation is allowed by elevation.
872          *          <li><tt>speed</tt>: Number indicating how many passes the range of the el_slider makes when the cursor crosses the entire board once in the horizontal direction.
873          *          <li><tt>outside</tt>: Boolean that specifies whether the pointer navigation is continued when the cursor leaves the board.
874          *          <li><tt>button</tt>: Which button of the pointer should be used? (<tt>'-1'</tt> (=no button), <tt>'0'</tt> or <tt>'2'</tt>)
875          *          <li><tt>key</tt>: Should an additional key be pressed? (<tt>'none'</tt>, <tt>'shift'</tt> or <tt>'ctrl'</tt>)
876          *      </ul>
877          *  <li><tt>keyboard</tt> sub-attributes:
878          *      <ul>
879          *          <li><tt>enabled</tt>: Boolean that specifies whether the keyboard (arrow keys) can be used to navigate the board.
880          *          <li><tt>step</tt>: Size of the step per keystroke.
881          *          <li><tt>key</tt>: Should an additional key be pressed? (<tt>'none'</tt>, <tt>'shift'</tt> or <tt>'ctrl'</tt>)
882          *      </ul>
883          *  <li><tt>continuous</tt>: Boolean that specifies whether the el_slider starts again from the beginning when its end is reached.
884          *  <li><tt>slider</tt> attributes of the el_slider ({@link Slider}) with additional
885          *      <ul>
886          *          <li><tt>min</tt>: Minimum value.
887          *          <li><tt>max</tt>: Maximum value.
888          *          <li><tt>start</tt>: Start value.
889          *      </ul>
890          * </ul>
891          *
892          * @name View3D#bank
893          * @type Object
894          * @default <pre>{
895          *      pointer: {enabled: true, speed: 1, outside: true, button: -1, key: 'none'},
896          *      keyboard: {enabled: true, step: 10, key: 'ctrl'},
897          *      continuous: true,
898          *      slider: {
899          *          visible: true,
900          *          style: 6,
901          *          point1: {frozen: true},
902          *          point2: {frozen: true},
903          *          min: 0,
904          *          max: 2 * Math.PI,
905          *          start: 0.3
906          *      },
907          * }<pre>
908          * @example
909          *     var bound = [-4, 6];
910          *     var view = board.create('view3d',
911          *         [[-4, -3], [8, 8],
912          *         [bound, bound, bound]],
913          *         {
914          *             projection: 'parallel',
915          *             bank: {
916          *                 slider: {visible: true}
917          *             }
918          *         });
919          *
920          * </pre><div id="JXGb67811ea-c1e3-4d1e-b13c-3537b3436f6c" class="jxgbox" style="width: 300px; height: 300px;"></div>
921          * <script type="text/javascript">
922          *     (function() {
923          *         var board = JXG.JSXGraph.initBoard('JXGb67811ea-c1e3-4d1e-b13c-3537b3436f6c',
924          *             {boundingbox: [-8, 8, 8,-8], axis: true, showcopyright: false, shownavigation: false});
925          *         var bound = [-4, 6];
926          *         var view = board.create('view3d',
927          *             [[-4, -3], [8, 8],
928          *             [bound, bound, bound]],
929          *             {
930          *                 projection: 'parallel',
931          *                 bank: {
932          *                     slider: {visible: true}
933          *                 }
934          *             });
935          *
936          *     })();
937          *
938          * </script><pre>
939          *
940          */
941         bank: {
942             pointer: {
943                 enabled: true,
944                 speed: 0.08,
945                 outside: true,
946                 button: -1,
947                 key: 'none'
948             },
949             keyboard: {
950                 enabled: true,
951                 step: 10,
952                 key: 'ctrl'
953             },
954             continuous: true,
955             slider: {
956                 visible: 'inherit',
957                 style: 6,
958                 point1: { frozen: true },
959                 point2: { frozen: true },
960                 min: -Math.PI,
961                 max:  Math.PI,
962                 start: 0.0
963             }
964         },
965 
966         /**
967          * Enable user handling by a virtual trackball.
968          * Sub-attributes:
969          *      <ul>
970          *          <li><tt>enabled</tt>: Boolean that specifies whether pointer navigation is allowed by elevation.
971          *          <li><tt>outside</tt>: Boolean that specifies whether the pointer navigation is continued when the cursor leaves the board.
972          *          <li><tt>button</tt>: Which button of the pointer should be used? (<tt>'-1'</tt> (=no button), <tt>'0'</tt> or <tt>'2'</tt>)
973          *          <li><tt>key</tt>: Should an additional key be pressed? (<tt>'none'</tt>, <tt>'shift'</tt> or <tt>'ctrl'</tt>)
974          *      </ul>
975          *
976          * @name View3D#trackball
977          * @type Object
978          * @default <pre>{
979          *   enabled: false,
980          *   outside: true,
981          *   button: -1,
982          *   key: 'none'
983          * }
984          * </pre>
985          */
986         trackball: {
987             enabled: false,
988             outside: true,
989             button: -1,
990             key: 'none'
991         },
992 
993         /**
994          * Distance of the camera to the center of the view.
995          * If set to 'auto', r will be calculated automatically.
996          *
997          * @type {Number|String}
998          * @default 'auto'
999          */
1000         r: 'auto',
1001 
1002         /**
1003          * Field of View defines the angle of view (in radians) of the camera, determining how much of the scene is captured within the frame.
1004          *
1005          * @type Number
1006          * @default 2/5*Math.PI
1007          */
1008         fov: 1 / 5 * 2 * Math.PI,
1009 
1010         /**
1011          * Fixed values for the view, which can be changed using keyboard keys `picture-up` and `picture-down`.
1012          * Array of the form: [[el0, az0, r0], [el1, az1, r1, ...[eln, azn, rn]]
1013          *
1014          * @name View3D#values
1015          * @type Array
1016          * @default <tt>{[[0, 1.57], [0.78, 0.62], [0, 0], [5.49, 0.62], [4.71, 0], [3.93, 0.62], [3.14, 0], [2.36, 0.62], [1.57, 1.57]]}<tt>
1017          */
1018         values: [
1019             [0, 1.57],
1020             [0.78, 0.62],
1021             [0, 0],
1022             [5.49, 0.62],
1023             [4.71, 0],
1024             [3.93, 0.62],
1025             [3.14, 0],
1026             [2.36, 0.62],
1027             [1.57, 1.57]
1028         ],
1029 
1030         infobox: {
1031             // strokeColor: '#888888',
1032             strokeColor: '#000000',
1033             fontSize: 24,
1034             useKatex: false,
1035             useMathjax: false
1036         },
1037 
1038         /**
1039          * @class
1040          * @ignore
1041          */
1042         _currentView: -1
1043 
1044         /**#@-*/
1045     }
1046 });
1047 
1048 export default JXG.Options;
1049