MCPcopy Create free account
hub / github.com/microsoft/SandDance / constructor

Method constructor

docs/app/js/sanddance-app.js:75356–75368  ·  view source on GitHub ↗
({ phi =0 , theta =0 , radius =1 , bearing , pitch , altitude , radiusScale =EARTH_RADIUS_METERS  } = {})

Source from the content-addressed store, hash-verified

75354const EARTH_RADIUS_METERS = 6371000;
75355class SphericalCoordinates {
75356 constructor({ phi =0 , theta =0 , radius =1 , bearing , pitch , altitude , radiusScale =EARTH_RADIUS_METERS } = {}){
75357 (0, _definePropertyDefault.default)(this, "phi", void 0);
75358 (0, _definePropertyDefault.default)(this, "theta", void 0);
75359 (0, _definePropertyDefault.default)(this, "radius", void 0);
75360 (0, _definePropertyDefault.default)(this, "radiusScale", void 0);
75361 this.phi = phi;
75362 this.theta = theta;
75363 this.radius = radius || altitude || 1;
75364 this.radiusScale = radiusScale || 1;
75365 if (bearing !== undefined) this.bearing = bearing;
75366 if (pitch !== undefined) this.pitch = pitch;
75367 this.check();
75368 }
75369 toString() {
75370 return this.formatString((0, _common.config));
75371 }

Callers

nothing calls this directly

Calls 1

checkMethod · 0.95

Tested by

no test coverage detected