I added a few methods to three-orbit-controls to be able to manually define phi or theta and be able to rotate to a given point.
// rotation in Y
controls.setAzimuthalAngle(theta);
// rotation in X
controls.setPolarAngle(phi);
I added a few methods to three-orbit-controls to be able to manually define phi or theta and be able to rotate to a given point.
// rotation in Y
controls.setAzimuthalAngle(theta);
// rotation in X
controls.setPolarAngle(phi);
| /** | |
| * Converts a XYZ vector3 to longitude latitude (Direct Polar) | |
| * @param Lng longitude | |
| * @param Lat latitude | |
| * @param Vector3 optional output vector3 | |
| * @returns a unit vector of the 3d position | |
| */ | |
| function lonLatToVector3 ( lng, lat, out ) { | |
| out = out || new THREE.Vector3(); |
| var p1={ | |
| x:0, | |
| y:0 | |
| }; | |
| var p2={ | |
| x:0, | |
| y:1 | |
| }; |
| var p1 = { | |
| x: 20, | |
| y: 20 | |
| }; | |
| var p2 = { | |
| x: 40, | |
| y: 40 | |
| }; |
| // Source: https://github.com/iTowns/itowns | |
| // Fork: https://github.com/sermonis/three-globe-map-itowns | |
| /* globals window */ | |
| import * as THREE from 'three'; | |
| import AnimationPlayer, { Animation } from 'Core/AnimationPlayer'; | |
| import Coordinates, { ellipsoidSizes } from 'Core/Geographic/Coordinates'; | |
| import CameraUtils from 'Utils/CameraUtils'; | |
| import StateControl from 'Controls/StateControl'; |
| var config = { | |
| type: Phaser.AUTO, | |
| width: 800, | |
| height: 600, | |
| backgroundColor: '#2d2d2d', | |
| parent: 'phaser-example', | |
| scene: { | |
| preload: preload, | |
| create: create, | |
| update: update |
Expose the Content-Disposition header using the Access-Control-Expose-Headers header and set
the Content-Disposition header as you would usually.
Access-Control-Expose-Headers: Content-Disposition
Content-Disposition: attachment; filename="example-file.csv"
| var log = require('cllc')(); | |
| var tress = require('tress'); | |
| var needle = require('needle'); | |
| var cheerio = require('cheerio'); | |
| var fs = require('fs'); | |
| var sCookie = 'http://www.puntolis.it/storelocator/defaultsearch.aspx?idcustomer=111'; | |
| var sProv = 'http://www.puntolis.it/storelocator/buildMenuProv.ashx?CodSer=111'; | |
| var sLoc = 'http://www.puntolis.it/storelocator/buildMenuLoc.ashx?CodSer=111&ProvSel=%s'; | |
| var sMarker = 'http://www.puntolis.it/storelocator/Result.aspx?provincia=%s&localita=%s&cap=XXXXX&Servizio=111'; |