@antv/g-lite 2.0.1 → 2.0.2

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.js CHANGED
@@ -1720,6 +1720,12 @@ var Camera = /** @class */ (function () {
1720
1720
  this._update();
1721
1721
  return this;
1722
1722
  };
1723
+ /**
1724
+ * Set projection matrix manually.
1725
+ */
1726
+ Camera.prototype.setProjectionMatrix = function (matrix) {
1727
+ this.projectionMatrix = matrix;
1728
+ };
1723
1729
  Camera.prototype.setFov = function (fov) {
1724
1730
  this.setPerspective(this.near, this.far, fov, this.aspect);
1725
1731
  return this;
@@ -10099,7 +10105,7 @@ var RenderingService = /** @class */ (function () {
10099
10105
  return (!enableDirtyRectangleRendering ||
10100
10106
  this.context.renderingContext.renderReasons.has(exports.RenderReason.CAMERA_CHANGED));
10101
10107
  };
10102
- RenderingService.prototype.render = function (canvasConfig, rerenderCallback) {
10108
+ RenderingService.prototype.render = function (canvasConfig, frame, rerenderCallback) {
10103
10109
  var _this = this;
10104
10110
  this.stats.total = 0;
10105
10111
  this.stats.rendered = 0;
@@ -10118,7 +10124,7 @@ var RenderingService = /** @class */ (function () {
10118
10124
  if (shouldTriggerRenderHooks) {
10119
10125
  this.renderDisplayObject(renderingContext.root, canvasConfig, renderingContext);
10120
10126
  }
10121
- this.hooks.beginFrame.call();
10127
+ this.hooks.beginFrame.call(frame);
10122
10128
  if (shouldTriggerRenderHooks) {
10123
10129
  renderingContext.renderListCurrentFrame.forEach(function (object) {
10124
10130
  _this.hooks.beforeRender.call(object);
@@ -10126,7 +10132,7 @@ var RenderingService = /** @class */ (function () {
10126
10132
  _this.hooks.afterRender.call(object);
10127
10133
  });
10128
10134
  }
10129
- this.hooks.endFrame.call();
10135
+ this.hooks.endFrame.call(frame);
10130
10136
  renderingContext.renderListCurrentFrame = [];
10131
10137
  renderingContext.renderReasons.clear();
10132
10138
  rerenderCallback();
@@ -15196,11 +15202,11 @@ var Canvas = /** @class */ (function (_super) {
15196
15202
  Canvas.prototype.destroyChildren = function () {
15197
15203
  this.document.documentElement.destroyChildren();
15198
15204
  };
15199
- Canvas.prototype.render = function () {
15205
+ Canvas.prototype.render = function (frame) {
15200
15206
  var _this = this;
15201
15207
  this.dispatchEvent(beforeRenderEvent);
15202
15208
  var renderingService = this.getRenderingService();
15203
- renderingService.render(this.getConfig(), function () {
15209
+ renderingService.render(this.getConfig(), frame, function () {
15204
15210
  // trigger actual rerender event
15205
15211
  // @see https://github.com/antvis/G/issues/1268
15206
15212
  _this.dispatchEvent(rerenderEvent);
@@ -15209,8 +15215,8 @@ var Canvas = /** @class */ (function (_super) {
15209
15215
  };
15210
15216
  Canvas.prototype.run = function () {
15211
15217
  var _this = this;
15212
- var tick = function () {
15213
- _this.render();
15218
+ var tick = function (time, frame) {
15219
+ _this.render(frame);
15214
15220
  _this.frameId = _this.requestAnimationFrame(tick);
15215
15221
  };
15216
15222
  tick();