@predy-js/render-interface 0.1.65-beta.9 → 0.1.66-beta.1
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 +1 -3
- 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 +1 -4
- package/types/native/declare.d.ts +5 -0
package/dist/index.mjs
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.66-beta.1
|
6
6
|
*/
|
7
7
|
|
8
8
|
/******************************************************************************
|
@@ -2192,7 +2192,7 @@ var GLShaderLibrary = /** @class */ (function () {
|
|
2192
2192
|
this._glFragShaderMap = new Map();
|
2193
2193
|
}
|
2194
2194
|
// @ts-expect-error safe to assign
|
2195
|
-
this
|
2195
|
+
this['renderer'] = null;
|
2196
2196
|
};
|
2197
2197
|
return GLShaderLibrary;
|
2198
2198
|
}());
|
@@ -3377,7 +3377,10 @@ var GLFrameBuffer = /** @class */ (function () {
|
|
3377
3377
|
gl.framebufferRenderbuffer(gl.FRAMEBUFFER, attachment_1, gl.RENDERBUFFER, renderBuffer.glHandle);
|
3378
3378
|
gl.bindFramebuffer(gl.FRAMEBUFFER, this.fbo);
|
3379
3379
|
}
|
3380
|
-
depthTexture.update({
|
3380
|
+
depthTexture.update({
|
3381
|
+
sourceType: TextureSourceType.framebuffer,
|
3382
|
+
data: { width: viewport[2], height: viewport[3] },
|
3383
|
+
});
|
3381
3384
|
var attachment = depthTexture && stencilTexture ? gl.DEPTH_STENCIL_ATTACHMENT : gl.DEPTH_ATTACHMENT;
|
3382
3385
|
gl.framebufferTexture2D(FRAMEBUFFER, attachment, gl.TEXTURE_2D, depthTexture.glHandle, 0);
|
3383
3386
|
}
|
@@ -3420,7 +3423,7 @@ var GLFrameBuffer = /** @class */ (function () {
|
|
3420
3423
|
var gl = this.renderer.gl;
|
3421
3424
|
var gpu = this.renderer.gpu;
|
3422
3425
|
var viewport = this.viewport;
|
3423
|
-
var data = { width: viewport[2], height: viewport[3]
|
3426
|
+
var data = { width: viewport[2], height: viewport[3] };
|
3424
3427
|
var buffers = [];
|
3425
3428
|
if (colors) {
|
3426
3429
|
this.colorTextures = colors.slice();
|
@@ -3428,7 +3431,7 @@ var GLFrameBuffer = /** @class */ (function () {
|
|
3428
3431
|
this.renderer.state.activeTexture(gl.TEXTURE0);
|
3429
3432
|
var multisampleFBO = this.multisampleFbo;
|
3430
3433
|
this.colorTextures.forEach(function (tex, index) {
|
3431
|
-
tex.update({ data: data });
|
3434
|
+
tex.update({ sourceType: TextureSourceType.framebuffer, data: data });
|
3432
3435
|
if (multisampleFBO) {
|
3433
3436
|
gl.bindFramebuffer(gl.FRAMEBUFFER, multisampleFBO);
|
3434
3437
|
var renderBuffer = new GLRenderBuffer(_this.renderer, {
|
@@ -3994,7 +3997,7 @@ var MarsTexture = /** @class */ (function () {
|
|
3994
3997
|
};
|
3995
3998
|
MarsTexture.prototype.uploadCurrentVideoFrame = function () {
|
3996
3999
|
if (this.options.sourceType === TextureSourceType.video && this.options.video && this.internal) {
|
3997
|
-
this.internal.update({ video: this.options.video });
|
4000
|
+
this.internal.update({ sourceType: TextureSourceType.video, video: this.options.video });
|
3998
4001
|
return true;
|
3999
4002
|
}
|
4000
4003
|
return false;
|
@@ -5831,7 +5834,7 @@ var MarsSharedGeometry = /** @class */ (function (_super) {
|
|
5831
5834
|
return MarsSharedGeometry;
|
5832
5835
|
}(MarsGeometry));
|
5833
5836
|
|
5834
|
-
consoleLog('version: ' + "0.1.
|
5837
|
+
consoleLog('version: ' + "0.1.66-beta.1");
|
5835
5838
|
|
5836
5839
|
export { DestroyOptions, GPUBufferOptionsMemoryShared, MarsGeometry as Geometry, MarsInstancedMesh as InstancedMesh, MarsTextureFactory, MarsMaterial as Material, MarsMaterialDataBlock as MaterialDataBlock, MarsMesh as Mesh, MarsRenderFrame as RenderFrame, MarsRenderPass as RenderPass, RenderPassAttachmentStorageType, RenderPassDestroyAttachmentType, RenderPassMeshOrder, RenderPassPriorityNormal, RenderPassPriorityPostprocess, RenderPassPriorityPrepare, MarsRenderer as Renderer, ShaderCompileResultStatus, ShaderLibraryEmpty, MarsSharedGeometry as SharedGeometry, MarsTexture as Texture, TextureLoadAction, TextureSourceType, TextureStoreAction, constants, getDefaultGPUCapability, getDefaultTextureFactory, setDefaultTextureFactory };
|
5837
5840
|
//# sourceMappingURL=index.mjs.map
|