@antv/g-webgpu 1.7.52 → 1.7.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -374,35 +374,33 @@ var WebGPUContextService = /*#__PURE__*/function () {
374
374
  var _init = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
375
375
  var _this$canvasConfig, container, canvas, $canvas;
376
376
  return _regeneratorRuntime().wrap(function _callee$(_context) {
377
- while (1) {
378
- switch (_context.prev = _context.next) {
379
- case 0:
380
- _this$canvasConfig = this.canvasConfig, container = _this$canvasConfig.container, canvas = _this$canvasConfig.canvas;
381
- if (canvas) {
382
- this.$canvas = canvas;
383
- if (container && canvas.parentElement !== container) {
384
- container.appendChild(canvas);
385
- }
386
- this.$container = canvas.parentElement;
387
- this.canvasConfig.container = this.$container;
388
- } else if (container) {
389
- // create container
390
- this.$container = isString(container) ? document.getElementById(container) : container;
391
- if (this.$container) {
392
- // create canvas
393
- $canvas = document.createElement('canvas');
394
- this.$container.appendChild($canvas);
395
- if (!this.$container.style.position) {
396
- this.$container.style.position = 'relative';
397
- }
398
- this.$canvas = $canvas;
377
+ while (1) switch (_context.prev = _context.next) {
378
+ case 0:
379
+ _this$canvasConfig = this.canvasConfig, container = _this$canvasConfig.container, canvas = _this$canvasConfig.canvas;
380
+ if (canvas) {
381
+ this.$canvas = canvas;
382
+ if (container && canvas.parentElement !== container) {
383
+ container.appendChild(canvas);
384
+ }
385
+ this.$container = canvas.parentElement;
386
+ this.canvasConfig.container = this.$container;
387
+ } else if (container) {
388
+ // create container
389
+ this.$container = isString(container) ? document.getElementById(container) : container;
390
+ if (this.$container) {
391
+ // create canvas
392
+ $canvas = document.createElement('canvas');
393
+ this.$container.appendChild($canvas);
394
+ if (!this.$container.style.position) {
395
+ this.$container.style.position = 'relative';
399
396
  }
397
+ this.$canvas = $canvas;
400
398
  }
401
- this.resize(this.canvasConfig.width, this.canvasConfig.height);
402
- case 3:
403
- case "end":
404
- return _context.stop();
405
- }
399
+ }
400
+ this.resize(this.canvasConfig.width, this.canvasConfig.height);
401
+ case 3:
402
+ case "end":
403
+ return _context.stop();
406
404
  }
407
405
  }, _callee, this);
408
406
  }));
@@ -456,14 +454,12 @@ var WebGPUContextService = /*#__PURE__*/function () {
456
454
  _proto.toDataURL = /*#__PURE__*/function () {
457
455
  var _toDataURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(options) {
458
456
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
459
- while (1) {
460
- switch (_context2.prev = _context2.next) {
461
- case 0:
462
- return _context2.abrupt("return", '');
463
- case 1:
464
- case "end":
465
- return _context2.stop();
466
- }
457
+ while (1) switch (_context2.prev = _context2.next) {
458
+ case 0:
459
+ return _context2.abrupt("return", '');
460
+ case 1:
461
+ case "end":
462
+ return _context2.stop();
467
463
  }
468
464
  }, _callee2);
469
465
  }));
package/dist/index.js CHANGED
@@ -395,35 +395,33 @@ var WebGPUContextService = /*#__PURE__*/function () {
395
395
  var _init = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
396
396
  var _this$canvasConfig, container, canvas, $canvas;
397
397
  return _regeneratorRuntime().wrap(function _callee$(_context) {
398
- while (1) {
399
- switch (_context.prev = _context.next) {
400
- case 0:
401
- _this$canvasConfig = this.canvasConfig, container = _this$canvasConfig.container, canvas = _this$canvasConfig.canvas;
402
- if (canvas) {
403
- this.$canvas = canvas;
404
- if (container && canvas.parentElement !== container) {
405
- container.appendChild(canvas);
406
- }
407
- this.$container = canvas.parentElement;
408
- this.canvasConfig.container = this.$container;
409
- } else if (container) {
410
- // create container
411
- this.$container = util.isString(container) ? document.getElementById(container) : container;
412
- if (this.$container) {
413
- // create canvas
414
- $canvas = document.createElement('canvas');
415
- this.$container.appendChild($canvas);
416
- if (!this.$container.style.position) {
417
- this.$container.style.position = 'relative';
418
- }
419
- this.$canvas = $canvas;
398
+ while (1) switch (_context.prev = _context.next) {
399
+ case 0:
400
+ _this$canvasConfig = this.canvasConfig, container = _this$canvasConfig.container, canvas = _this$canvasConfig.canvas;
401
+ if (canvas) {
402
+ this.$canvas = canvas;
403
+ if (container && canvas.parentElement !== container) {
404
+ container.appendChild(canvas);
405
+ }
406
+ this.$container = canvas.parentElement;
407
+ this.canvasConfig.container = this.$container;
408
+ } else if (container) {
409
+ // create container
410
+ this.$container = util.isString(container) ? document.getElementById(container) : container;
411
+ if (this.$container) {
412
+ // create canvas
413
+ $canvas = document.createElement('canvas');
414
+ this.$container.appendChild($canvas);
415
+ if (!this.$container.style.position) {
416
+ this.$container.style.position = 'relative';
420
417
  }
418
+ this.$canvas = $canvas;
421
419
  }
422
- this.resize(this.canvasConfig.width, this.canvasConfig.height);
423
- case 3:
424
- case "end":
425
- return _context.stop();
426
- }
420
+ }
421
+ this.resize(this.canvasConfig.width, this.canvasConfig.height);
422
+ case 3:
423
+ case "end":
424
+ return _context.stop();
427
425
  }
428
426
  }, _callee, this);
429
427
  }));
@@ -477,14 +475,12 @@ var WebGPUContextService = /*#__PURE__*/function () {
477
475
  _proto.toDataURL = /*#__PURE__*/function () {
478
476
  var _toDataURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(options) {
479
477
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
480
- while (1) {
481
- switch (_context2.prev = _context2.next) {
482
- case 0:
483
- return _context2.abrupt("return", '');
484
- case 1:
485
- case "end":
486
- return _context2.stop();
487
- }
478
+ while (1) switch (_context2.prev = _context2.next) {
479
+ case 0:
480
+ return _context2.abrupt("return", '');
481
+ case 1:
482
+ case "end":
483
+ return _context2.stop();
488
484
  }
489
485
  }, _callee2);
490
486
  }));