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

Function Query

docs/tests/v2/es6/js/sanddance.js:13484–13501  ·  view source on GitHub ↗
(gl)

Source from the content-addressed store, hash-verified

13482 }]);
13483
13484 function Query(gl) {
13485 var _this;
13486
13487 var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
13488 (0, _classCallCheck2.default)(this, Query);
13489 _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(Query).call(this, gl, opts));
13490 var _opts$onComplete = opts.onComplete,
13491 onComplete = _opts$onComplete === void 0 ? noop : _opts$onComplete,
13492 _opts$onError = opts.onError,
13493 onError = _opts$onError === void 0 ? noop : _opts$onError;
13494 _this.target = null;
13495 _this.onComplete = onComplete;
13496 _this.onError = onError; // query manager needs a promise field
13497
13498 _this.promise = null;
13499 Object.seal((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
13500 return _this;
13501 } // Shortcut for timer query (dependent on extension in both WebGL1 and 2)
13502 // Measures GPU time delta between this call and a matching `end` call in the
13503 // GPU instruction stream.
13504

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected