@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 +4 -0
- package/dist/index.js +13 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -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/PredyNativeInternal.d.ts +0 -3
- package/package.json +1 -1
- package/types/Texture.ts +8 -8
- package/types/native/PredyNativeInternal.ts +0 -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.65-beta.
|
5
|
+
* Version: v0.1.65-beta.5
|
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, {
|
@@ -3912,12 +3915,15 @@ var MarsTexture = /** @class */ (function () {
|
|
3912
3915
|
}, options);
|
3913
3916
|
if (!opt.sourceType) {
|
3914
3917
|
if (opt.image) {
|
3918
|
+
// @ts-expect-error
|
3915
3919
|
opt.sourceType = TextureSourceType.image;
|
3916
3920
|
}
|
3917
3921
|
else if (opt.data) {
|
3922
|
+
// @ts-expect-error
|
3918
3923
|
opt.sourceType = TextureSourceType.data;
|
3919
3924
|
}
|
3920
3925
|
else if (opt.video) {
|
3926
|
+
// @ts-expect-error
|
3921
3927
|
opt.sourceType = TextureSourceType.video;
|
3922
3928
|
}
|
3923
3929
|
else {
|
@@ -3986,7 +3992,7 @@ var MarsTexture = /** @class */ (function () {
|
|
3986
3992
|
};
|
3987
3993
|
MarsTexture.prototype.uploadCurrentVideoFrame = function () {
|
3988
3994
|
if (this.options.sourceType === TextureSourceType.video && this.options.video && this.internal) {
|
3989
|
-
this.internal.update({ video: this.options.video });
|
3995
|
+
this.internal.update({ sourceType: TextureSourceType.video, video: this.options.video });
|
3990
3996
|
return true;
|
3991
3997
|
}
|
3992
3998
|
return false;
|
@@ -5823,7 +5829,7 @@ var MarsSharedGeometry = /** @class */ (function (_super) {
|
|
5823
5829
|
return MarsSharedGeometry;
|
5824
5830
|
}(MarsGeometry));
|
5825
5831
|
|
5826
|
-
consoleLog('version: ' + "0.1.65-beta.
|
5832
|
+
consoleLog('version: ' + "0.1.65-beta.5");
|
5827
5833
|
|
5828
5834
|
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
5835
|
//# sourceMappingURL=index.mjs.map
|