@predy-js/render-interface 0.1.64 → 0.1.65-beta.10
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 +4 -0
- package/dist/index.js +10 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -7
- package/dist/index.mjs.map +1 -1
- package/dist/statistic.js +1 -1
- package/dist/types/Texture.d.ts +8 -8
- package/dist/types/native/AndGLContext.d.ts +9 -0
- package/dist/types/native/ImageBitmapInternal.d.ts +0 -2
- package/dist/types/native/PredyNativeInternal.d.ts +2 -4
- package/dist/types/native/RendererInternal.d.ts +2 -1
- package/dist/types/native/TextureInternal.d.ts +25 -10
- package/package.json +1 -1
- package/types/Texture.ts +8 -8
- package/types/native/AndGLContext.ts +11 -0
- package/types/native/ImageBitmapInternal.ts +0 -2
- package/types/native/PredyNativeInternal.ts +2 -5
- package/types/native/RendererInternal.ts +2 -1
- package/types/native/TextureInternal.ts +28 -11
- package/types/native/declare.d.ts +5 -0
package/README.md
ADDED
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.
|
5
|
+
* Version: v0.1.65-beta.10
|
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
|
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({
|
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]
|
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, {
|
@@ -3990,7 +3993,7 @@ var MarsTexture = /** @class */ (function () {
|
|
3990
3993
|
};
|
3991
3994
|
MarsTexture.prototype.uploadCurrentVideoFrame = function () {
|
3992
3995
|
if (this.options.sourceType === exports.TextureSourceType.video && this.options.video && this.internal) {
|
3993
|
-
this.internal.update({ video: this.options.video });
|
3996
|
+
this.internal.update({ sourceType: exports.TextureSourceType.video, video: this.options.video });
|
3994
3997
|
return true;
|
3995
3998
|
}
|
3996
3999
|
return false;
|
@@ -5827,7 +5830,7 @@ var MarsSharedGeometry = /** @class */ (function (_super) {
|
|
5827
5830
|
return MarsSharedGeometry;
|
5828
5831
|
}(MarsGeometry));
|
5829
5832
|
|
5830
|
-
consoleLog('version: ' + "0.1.
|
5833
|
+
consoleLog('version: ' + "0.1.65-beta.10");
|
5831
5834
|
|
5832
5835
|
exports.GPUBufferOptionsMemoryShared = GPUBufferOptionsMemoryShared;
|
5833
5836
|
exports.Geometry = MarsGeometry;
|