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

Method constructor

docs/app/js/sanddance-app.js:75468–75475  ·  view source on GitHub ↗
({ x =0 , y =0 , z =0 , roll =0 , pitch =0 , yaw =0 , position , orientation  } = {})

Source from the content-addressed store, hash-verified

75466var _eulerDefault = parcelHelpers.interopDefault(_euler);
75467class Pose {
75468 constructor({ x =0 , y =0 , z =0 , roll =0 , pitch =0 , yaw =0 , position , orientation } = {}){
75469 (0, _definePropertyDefault.default)(this, "position", void 0);
75470 (0, _definePropertyDefault.default)(this, "orientation", void 0);
75471 if (Array.isArray(position) && position.length === 3) this.position = new (0, _vector3Default.default)(position);
75472 else this.position = new (0, _vector3Default.default)(x, y, z);
75473 if (Array.isArray(orientation) && orientation.length === 4) this.orientation = new (0, _eulerDefault.default)(orientation, orientation[3]);
75474 else this.orientation = new (0, _eulerDefault.default)(roll, pitch, yaw, (0, _eulerDefault.default).RollPitchYaw);
75475 }
75476 get x() {
75477 return this.position.x;
75478 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected