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

Function Resource1

docs/app/js/sanddance-app.js:61329–61342  ·  view source on GitHub ↗
(gl)

Source from the content-addressed store, hash-verified

61327var ERR_RESOURCE_METHOD_UNDEFINED = "Resource subclass must define virtual methods";
61328var Resource = function() {
61329 function Resource1(gl) {
61330 var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
61331 (0, _classCallCheckDefault.default)(this, Resource1);
61332 (0, _webglUtils.assertWebGLContext)(gl);
61333 var id = opts.id, _opts$userData = opts.userData, userData = _opts$userData === void 0 ? {} : _opts$userData;
61334 this.gl = gl;
61335 this.id = id || (0, _utils.uid)(this.constructor.name);
61336 this.userData = userData;
61337 this._bound = false;
61338 this._handle = opts.handle;
61339 if (this._handle === undefined) this._handle = this._createHandle();
61340 this.byteLength = 0;
61341 this._addStats();
61342 }
61343 (0, _createClassDefault.default)(Resource1, [
61344 {
61345 key: "toString",

Callers

nothing calls this directly

Calls 1

setDataMethod · 0.45

Tested by

no test coverage detected