1 /*global JXG:true, define: true*/ 2 3 import JXG from "./jxg"; 4 import Options from "./options"; 5 6 JXG.extend(Options, { 7 // infobox: { 8 // strokeColor: 'black' 9 // }, 10 11 axes3d: { 12 /**#@+ 13 * @visprop 14 */ 15 16 /** 17 * Position of the main axes in a View3D element. Possible values are 18 * 'center' and 'border'. 19 * 20 * @type String 21 * @name View3D#axesPosition 22 * @default 'center' 23 */ 24 axesPosition: "center", // Possible values: 'center', otherwise: border 25 26 // Main axes 27 28 /** 29 * Attributes of the 3D x-axis. 30 * 31 * @type Line3D 32 * @name View3D#xAxis 33 */ 34 xAxis: { visible: true, point2: { name: "x" } }, 35 36 /** 37 * Attributes of the 3D y-axis. 38 * 39 * @type Line3D 40 * @name View3D#yAxis 41 */ 42 yAxis: { visible: true, point2: { name: "y" } }, 43 44 /** 45 * Attributes of the 3D z-axis. 46 * 47 * @type Line3D 48 * @name View3D#zAxis 49 */ 50 zAxis: { visible: true, point2: { name: "z" } }, 51 52 // Planes 53 /** 54 * Attributes of the 3D plane orthogonal to the x-axis at the "rear" of the cube. 55 * @type Plane3D 56 * @name View3D#xPlaneRear 57 */ 58 xPlaneRear: { visible: true, layer: 0, mesh3d: { layer: 1 } }, 59 /** 60 * Attributes of the 3D plane orthogonal to the y-axis at the "rear" of the cube. 61 * @type Plane3D 62 * @name View3D#yPlaneRear 63 */ 64 yPlaneRear: { visible: true, layer: 0, mesh3d: { layer: 1 } }, 65 /** 66 * Attributes of the 3D plane orthogonal to the z-axis at the "rear" of the cube. 67 * @type Plane3D 68 * @name View3D#zPlaneRear 69 */ 70 zPlaneRear: { visible: true, layer: 0, mesh3d: { layer: 1 } }, 71 72 /** 73 * Attributes of the 3D plane orthogonal to the x-axis at the "front" of the cube. 74 * @type Plane3D 75 * @name View3D#xPlaneFront 76 */ 77 xPlaneFront: { visible: false, layer: 0, mesh3d: { layer: 1 } }, 78 /** 79 * Attributes of the 3D plane orthogonal to the y-axis at the "front" of the cube. 80 * @type Plane3D 81 * @name View3D#yPlaneFront 82 */ 83 yPlaneFront: { visible: false, layer: 0, mesh3d: { layer: 1 } }, 84 /** 85 * Attributes of the 3D plane orthogonal to the z-axis at the "front" of the cube. 86 * @type Plane3D 87 * @name View3D#zPlaneFront 88 */ 89 zPlaneFront: { visible: false, layer: 0, mesh3d: { layer: 1 } }, 90 91 // Axes on the planes 92 /** 93 * Attributes of the 3D y-axis on the 3D plane orthogonal to the x-axis at the "rear" of the cube. 94 * @type Plane3D 95 * @name View3D#xPlaneRearYAxis 96 */ 97 xPlaneRearYAxis: { 98 visible: "inherit", 99 strokeColor: "#888888", 100 strokeWidth: 1 101 }, 102 /** 103 * Attributes of the 3D z-axis on the 3D plane orthogonal to the x-axis at the "rear" of the cube. 104 * @type Plane3D 105 * @name View3D#xPlaneRearZAxis 106 */ 107 xPlaneRearZAxis: { 108 visible: "inherit", 109 strokeColor: "#888888", 110 strokeWidth: 1 111 }, 112 /** 113 * Attributes of the 3D y-axis on the 3D plane orthogonal to the x-axis at the "front" of the cube. 114 * @type Plane3D 115 * @name View3D#xPlaneFrontYAxis 116 */ 117 xPlaneFrontYAxis: { 118 visible: "inherit", 119 strokeColor: "#888888", 120 strokeWidth: 1 121 }, 122 /** 123 * Attributes of the 3D z-axis on the 3D plane orthogonal to the x-axis at the "front" of the cube. 124 * @type Plane3D 125 * @name View3D#xPlaneFrontZAxis 126 */ 127 xPlaneFrontZAxis: { 128 visible: "inherit", 129 strokeColor: "#888888", 130 strokeWidth: 1 131 }, 132 133 /** 134 * Attributes of the 3D x-axis on the 3D plane orthogonal to the y-axis at the "rear" of the cube. 135 * @type Plane3D 136 * @name View3D#yPlaneRearXAxis 137 */ 138 yPlaneRearXAxis: { 139 visible: "inherit", 140 strokeColor: "#888888", 141 strokeWidth: 1 142 }, 143 /** 144 * Attributes of the 3D z-axis on the 3D plane orthogonal to the y-axis at the "rear" of the cube. 145 * @type Plane3D 146 * @name View3D#yPlaneRearZAxis 147 */ 148 yPlaneRearZAxis: { 149 visible: "inherit", 150 strokeColor: "#888888", 151 strokeWidth: 1 152 }, 153 /** 154 * Attributes of the 3D x-axis on the 3D plane orthogonal to the y-axis at the "front" of the cube. 155 * @type Plane3D 156 * @name View3D#yPlaneFrontXAxis 157 */ 158 yPlaneFrontXAxis: { 159 visible: "inherit", 160 strokeColor: "#888888", 161 strokeWidth: 1 162 }, 163 /** 164 * Attributes of the 3D z-axis on the 3D plane orthogonal to the y-axis at the "front" of the cube. 165 * @type Plane3D 166 * @name View3D#yPlaneFrontZAxis 167 */ 168 yPlaneFrontZAxis: { 169 visible: "inherit", 170 strokeColor: "#888888", 171 strokeWidth: 1 172 }, 173 174 /** 175 * Attributes of the 3D x-axis on the 3D plane orthogonal to the z-axis at the "rear" of the cube. 176 * @type Plane3D 177 * @name View3D#zPlaneRearXAxis 178 */ 179 zPlaneRearXAxis: { 180 visible: "inherit", 181 strokeColor: "#888888", 182 strokeWidth: 1 183 }, 184 /** 185 * Attributes of the 3D y-axis on the 3D plane orthogonal to the z-axis at the "rear" of the cube. 186 * @type Plane3D 187 * @name View3D#zPlaneRearYAxis 188 */ 189 zPlaneRearYAxis: { 190 visible: "inherit", 191 strokeColor: "#888888", 192 strokeWidth: 1 193 }, 194 /** 195 * Attributes of the 3D x-axis on the 3D plane orthogonal to the z-axis at the "front" of the cube. 196 * @type Plane3D 197 * @name View3D#zPlaneFrontXAxis 198 */ 199 zPlaneFrontXAxis: { 200 visible: "inherit", 201 strokeColor: "#888888", 202 strokeWidth: 1 203 }, 204 /** 205 * Attributes of the 3D y-axis on the 3D plane orthogonal to the z-axis at the "front" of the cube. 206 * @type Plane3D 207 * @name View3D#zPlaneFrontYAxis 208 */ 209 zPlaneFrontYAxis: { 210 visible: "inherit", 211 strokeColor: "#888888", 212 strokeWidth: 1 213 } 214 215 /**#@-*/ 216 }, 217 218 axis3d: { 219 highlight: false, 220 strokecolor: "black", 221 strokeWidth: 1, 222 tabindex: null, 223 224 point1: { visible: false, name: "" }, 225 point2: { visible: false, name: "", label: { visible: true } } 226 }, 227 228 curve3d: { 229 /**#@+ 230 * @visprop 231 */ 232 233 highlight: false, 234 tabindex: -1, 235 strokeWidth: 1, 236 numberPointsHigh: 200 237 238 /**#@-*/ 239 }, 240 241 mesh3d: { 242 /**#@+ 243 * @visprop 244 */ 245 246 strokeWidth: 1, 247 strokeColor: "#9a9a9a", 248 strokeOpacity: 0.6, 249 highlight: false, 250 fillColor: "#9a9a9a", 251 fillOpacity: 0.1, 252 tabindex: null, 253 254 visible: "inherit" 255 /**#@-*/ 256 }, 257 258 line3d: { 259 strokeWidth: 1, 260 strokeColor: "black", 261 fixed: true, 262 tabindex: null, 263 gradient: "linear", 264 gradientSecondColor: "#ffffff", 265 266 point: { visible: false, name: "" }, // Used in cases of point/direction/range 267 point1: { visible: false, name: "" }, // Used in point/point 268 point2: { visible: false, name: "" } 269 }, 270 271 plane3d: { 272 strokeWidth: 0, 273 strokeColor: "black", 274 strokeOpacity: 1, 275 highlight: false, 276 tabindex: null, 277 278 gradient: "linear", 279 gradientSecondColor: "#ffffff", 280 gradientAngle: Math.PI, 281 fillColor: "#a7a7a7", 282 fillOpacity: 0.6, 283 284 point: { visible: false, name: "", fixed: true } 285 }, 286 287 point3d: { 288 infoboxDigits: "auto", 289 strokeWidth: 0, 290 gradient: "radial", 291 gradientSecondColor: "#555555", 292 fillColor: "yellow", 293 highlightStrokeColor: "#555555" 294 }, 295 296 surface3d: { 297 /**#@+ 298 * @visprop 299 */ 300 301 highlight: false, 302 tabindex: -1, 303 strokeWidth: 1, 304 305 /** 306 * Number of intervals the mesh is divided into in direction of parameter u. 307 * @type Number 308 * @name ParametricSurface3D#stepsU 309 */ 310 stepsU: 30, 311 312 /** 313 * Number of intervals the mesh is divided into in direction of parameter v. 314 * @type Number 315 * @name ParametricSurface3D#stepsV 316 */ 317 stepsV: 30 318 319 /**#@-*/ 320 }, 321 322 view3d: { 323 /**#@+ 324 * @visprop 325 */ 326 needsRegularUpdate: true, 327 328 /** 329 * Allow vertical dragging of objects, i.e. in direction of the z-axis. 330 * Subobjects are 331 * <ul> 332 * <li>enabled: true 333 * <li>key: 'shift' 334 * </ul> 335 * <p> 336 * Possible values for attribute <i>key</i>: 'shift' or 'ctrl'. 337 * 338 * @name View3D#verticalDrag 339 * @type Object 340 * @default {enabled: true, key: 'shift'} 341 */ 342 verticalDrag: { 343 enabled: true, 344 key: 'shift' // ctrl 345 } 346 /**#@-*/ 347 } 348 }); 349 350 export default JXG.Options; 351