@predy-js/render-interface 0.1.64-beta.9 → 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 +3 -6
- package/dist/types/native/PredyNativeModule.d.ts +2 -2
- package/dist/types/native/RendererInternal.d.ts +2 -1
- package/dist/types/native/TextureInternal.d.ts +25 -10
- package/dist/types/native/index.d.ts +3 -0
- 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 +3 -6
- package/types/native/PredyNativeModule.ts +2 -2
- package/types/native/RendererInternal.ts +2 -1
- package/types/native/TextureInternal.ts +28 -11
- package/types/native/declare.d.ts +5 -0
- package/types/native/index.ts +3 -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.65-beta.10
|
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
|
}());
|
@@ -3369,7 +3369,10 @@ var GLFrameBuffer = /** @class */ (function () {
|
|
3369
3369
|
gl.framebufferRenderbuffer(gl.FRAMEBUFFER, attachment_1, gl.RENDERBUFFER, renderBuffer.glHandle);
|
3370
3370
|
gl.bindFramebuffer(gl.FRAMEBUFFER, this.fbo);
|
3371
3371
|
}
|
3372
|
-
depthTexture.update({
|
3372
|
+
depthTexture.update({
|
3373
|
+
sourceType: TextureSourceType.framebuffer,
|
3374
|
+
data: { width: viewport[2], height: viewport[3] },
|
3375
|
+
});
|
3373
3376
|
var attachment = depthTexture && stencilTexture ? gl.DEPTH_STENCIL_ATTACHMENT : gl.DEPTH_ATTACHMENT;
|
3374
3377
|
gl.framebufferTexture2D(FRAMEBUFFER, attachment, gl.TEXTURE_2D, depthTexture.glHandle, 0);
|
3375
3378
|
}
|
@@ -3412,7 +3415,7 @@ var GLFrameBuffer = /** @class */ (function () {
|
|
3412
3415
|
var gl = this.renderer.gl;
|
3413
3416
|
var gpu = this.renderer.gpu;
|
3414
3417
|
var viewport = this.viewport;
|
3415
|
-
var data = { width: viewport[2], height: viewport[3]
|
3418
|
+
var data = { width: viewport[2], height: viewport[3] };
|
3416
3419
|
var buffers = [];
|
3417
3420
|
if (colors) {
|
3418
3421
|
this.colorTextures = colors.slice();
|
@@ -3420,7 +3423,7 @@ var GLFrameBuffer = /** @class */ (function () {
|
|
3420
3423
|
this.renderer.state.activeTexture(gl.TEXTURE0);
|
3421
3424
|
var multisampleFBO = this.multisampleFbo;
|
3422
3425
|
this.colorTextures.forEach(function (tex, index) {
|
3423
|
-
tex.update({ data: data });
|
3426
|
+
tex.update({ sourceType: TextureSourceType.framebuffer, data: data });
|
3424
3427
|
if (multisampleFBO) {
|
3425
3428
|
gl.bindFramebuffer(gl.FRAMEBUFFER, multisampleFBO);
|
3426
3429
|
var renderBuffer = new GLRenderBuffer(_this.renderer, {
|
@@ -3986,7 +3989,7 @@ var MarsTexture = /** @class */ (function () {
|
|
3986
3989
|
};
|
3987
3990
|
MarsTexture.prototype.uploadCurrentVideoFrame = function () {
|
3988
3991
|
if (this.options.sourceType === TextureSourceType.video && this.options.video && this.internal) {
|
3989
|
-
this.internal.update({ video: this.options.video });
|
3992
|
+
this.internal.update({ sourceType: TextureSourceType.video, video: this.options.video });
|
3990
3993
|
return true;
|
3991
3994
|
}
|
3992
3995
|
return false;
|
@@ -5823,7 +5826,7 @@ var MarsSharedGeometry = /** @class */ (function (_super) {
|
|
5823
5826
|
return MarsSharedGeometry;
|
5824
5827
|
}(MarsGeometry));
|
5825
5828
|
|
5826
|
-
consoleLog('version: ' + "0.1.
|
5829
|
+
consoleLog('version: ' + "0.1.65-beta.10");
|
5827
5830
|
|
5828
5831
|
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 };
|
5829
5832
|
//# sourceMappingURL=index.mjs.map
|