@predy-js/render-interface 0.1.65-beta.2 → 0.1.65-beta.5

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/README.md ADDED
@@ -0,0 +1,4 @@
1
+
2
+ ** test case
3
+ http://local.xiaohongshu.com:8080/test/index.html
4
+ http://localhost:8080/test/index.html
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * Name: @predy-js/render-interface
3
3
  * Description: undefined
4
4
  * Author: undefined
5
- * Version: v0.1.65-beta.2
5
+ * Version: v0.1.65-beta.5
6
6
  */
7
7
 
8
8
  'use strict';
@@ -2196,7 +2196,7 @@ var GLShaderLibrary = /** @class */ (function () {
2196
2196
  this._glFragShaderMap = new Map();
2197
2197
  }
2198
2198
  // @ts-expect-error safe to assign
2199
- this.renderer = null;
2199
+ this['renderer'] = null;
2200
2200
  };
2201
2201
  return GLShaderLibrary;
2202
2202
  }());
@@ -3373,7 +3373,10 @@ var GLFrameBuffer = /** @class */ (function () {
3373
3373
  gl.framebufferRenderbuffer(gl.FRAMEBUFFER, attachment_1, gl.RENDERBUFFER, renderBuffer.glHandle);
3374
3374
  gl.bindFramebuffer(gl.FRAMEBUFFER, this.fbo);
3375
3375
  }
3376
- depthTexture.update({ data: { width: viewport[2], height: viewport[3], data: new Uint16Array(0) } });
3376
+ depthTexture.update({
3377
+ sourceType: exports.TextureSourceType.framebuffer,
3378
+ data: { width: viewport[2], height: viewport[3] },
3379
+ });
3377
3380
  var attachment = depthTexture && stencilTexture ? gl.DEPTH_STENCIL_ATTACHMENT : gl.DEPTH_ATTACHMENT;
3378
3381
  gl.framebufferTexture2D(FRAMEBUFFER, attachment, gl.TEXTURE_2D, depthTexture.glHandle, 0);
3379
3382
  }
@@ -3416,7 +3419,7 @@ var GLFrameBuffer = /** @class */ (function () {
3416
3419
  var gl = this.renderer.gl;
3417
3420
  var gpu = this.renderer.gpu;
3418
3421
  var viewport = this.viewport;
3419
- var data = { width: viewport[2], height: viewport[3], data: new Uint8Array(0) };
3422
+ var data = { width: viewport[2], height: viewport[3] };
3420
3423
  var buffers = [];
3421
3424
  if (colors) {
3422
3425
  this.colorTextures = colors.slice();
@@ -3424,7 +3427,7 @@ var GLFrameBuffer = /** @class */ (function () {
3424
3427
  this.renderer.state.activeTexture(gl.TEXTURE0);
3425
3428
  var multisampleFBO = this.multisampleFbo;
3426
3429
  this.colorTextures.forEach(function (tex, index) {
3427
- tex.update({ data: data });
3430
+ tex.update({ sourceType: exports.TextureSourceType.framebuffer, data: data });
3428
3431
  if (multisampleFBO) {
3429
3432
  gl.bindFramebuffer(gl.FRAMEBUFFER, multisampleFBO);
3430
3433
  var renderBuffer = new GLRenderBuffer(_this.renderer, {
@@ -3916,12 +3919,15 @@ var MarsTexture = /** @class */ (function () {
3916
3919
  }, options);
3917
3920
  if (!opt.sourceType) {
3918
3921
  if (opt.image) {
3922
+ // @ts-expect-error
3919
3923
  opt.sourceType = exports.TextureSourceType.image;
3920
3924
  }
3921
3925
  else if (opt.data) {
3926
+ // @ts-expect-error
3922
3927
  opt.sourceType = exports.TextureSourceType.data;
3923
3928
  }
3924
3929
  else if (opt.video) {
3930
+ // @ts-expect-error
3925
3931
  opt.sourceType = exports.TextureSourceType.video;
3926
3932
  }
3927
3933
  else {
@@ -3990,7 +3996,7 @@ var MarsTexture = /** @class */ (function () {
3990
3996
  };
3991
3997
  MarsTexture.prototype.uploadCurrentVideoFrame = function () {
3992
3998
  if (this.options.sourceType === exports.TextureSourceType.video && this.options.video && this.internal) {
3993
- this.internal.update({ video: this.options.video });
3999
+ this.internal.update({ sourceType: exports.TextureSourceType.video, video: this.options.video });
3994
4000
  return true;
3995
4001
  }
3996
4002
  return false;
@@ -5827,7 +5833,7 @@ var MarsSharedGeometry = /** @class */ (function (_super) {
5827
5833
  return MarsSharedGeometry;
5828
5834
  }(MarsGeometry));
5829
5835
 
5830
- consoleLog('version: ' + "0.1.65-beta.2");
5836
+ consoleLog('version: ' + "0.1.65-beta.5");
5831
5837
 
5832
5838
  exports.GPUBufferOptionsMemoryShared = GPUBufferOptionsMemoryShared;
5833
5839
  exports.Geometry = MarsGeometry;