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

Function Geometry

docs/tests/v2/es6/js/sanddance.js:25224–25244  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25222/*#__PURE__*/
25223function () {
25224 function Geometry() {
25225 var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
25226 (0, _classCallCheck2.default)(this, Geometry);
25227 var id = opts.id,
25228 _opts$drawMode = opts.drawMode,
25229 drawMode = _opts$drawMode === void 0 ? DRAW_MODE.TRIANGLES : _opts$drawMode,
25230 _opts$vertexCount = opts.vertexCount,
25231 vertexCount = _opts$vertexCount === void 0 ? undefined : _opts$vertexCount,
25232 attributes = opts.attributes;
25233 this.id = id || (0, _utils.uid)(this.constructor.name);
25234 this.drawMode = getDrawMode(drawMode);
25235 this.vertexCount = vertexCount;
25236 this.attributes = {};
25237 this.needsRedraw = true;
25238 this.userData = {};
25239 Object.seal(this);
25240
25241 if (attributes) {
25242 this.setAttributes(attributes);
25243 }
25244 }
25245
25246 (0, _createClass2.default)(Geometry, [{
25247 key: "setNeedsRedraw",

Callers

nothing calls this directly

Calls 1

getDrawModeFunction · 0.85

Tested by

no test coverage detected