@predy-js/render-interface 0.1.69 → 0.1.71
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/dist/index.js +54 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +54 -14
- package/dist/index.mjs.map +1 -1
- package/dist/src/index.d.ts +1 -17
- package/dist/src/module.d.ts +18 -0
- package/dist/src/webgl/GLProgram.d.ts +1 -1
- package/dist/statistic.js +1 -1
- package/dist/types/Canvas.d.ts +1 -0
- package/dist/types/GPUCapability.d.ts +3 -2
- package/dist/types/Geometry.d.ts +5 -12
- package/dist/types/Material.d.ts +12 -10
- package/dist/types/Renderer.d.ts +2 -0
- package/dist/types/ShaderLibrary.d.ts +20 -2
- package/dist/types/native/MetalInternal.d.ts +12 -0
- package/dist/types/native/PredyNativeInternal.d.ts +20 -0
- package/dist/types/native/RendererInternal.d.ts +5 -0
- package/package.json +1 -1
- package/types/Canvas.ts +1 -2
- package/types/GPUCapability.ts +4 -3
- package/types/Geometry.ts +6 -12
- package/types/Material.ts +14 -11
- package/types/Renderer.ts +2 -0
- package/types/ShaderLibrary.ts +21 -3
- package/types/native/MetalInternal.ts +22 -0
- package/types/native/PredyNativeInternal.ts +28 -0
- package/types/native/RendererInternal.ts +7 -0
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.71
|
6
6
|
*/
|
7
7
|
|
8
8
|
'use strict';
|
@@ -66,7 +66,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
66
66
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
67
67
|
};
|
68
68
|
|
69
|
-
var prefix = '[
|
69
|
+
var prefix = '[Predy RI]';
|
70
70
|
function consoleLog(msg) {
|
71
71
|
var data = [];
|
72
72
|
for (var _i = 1; _i < arguments.length; _i++) {
|
@@ -3079,6 +3079,7 @@ var CanvasEmpty = /** @class */ (function () {
|
|
3079
3079
|
function CanvasEmpty() {
|
3080
3080
|
this.width = 0;
|
3081
3081
|
this.height = 0;
|
3082
|
+
this.style = {};
|
3082
3083
|
}
|
3083
3084
|
CanvasEmpty.prototype.addEventListener = function (name, handler) {
|
3084
3085
|
};
|
@@ -3096,6 +3097,13 @@ var ResourcePlatform;
|
|
3096
3097
|
ResourcePlatform[ResourcePlatform["android"] = 2] = "android";
|
3097
3098
|
})(ResourcePlatform || (ResourcePlatform = {}));
|
3098
3099
|
|
3100
|
+
var PredyResourceCacheStatus;
|
3101
|
+
(function (PredyResourceCacheStatus) {
|
3102
|
+
PredyResourceCacheStatus[PredyResourceCacheStatus["noCache"] = 0] = "noCache";
|
3103
|
+
PredyResourceCacheStatus[PredyResourceCacheStatus["cached"] = 1] = "cached";
|
3104
|
+
PredyResourceCacheStatus[PredyResourceCacheStatus["preloaded"] = 2] = "preloaded";
|
3105
|
+
})(PredyResourceCacheStatus || (PredyResourceCacheStatus = {}));
|
3106
|
+
|
3099
3107
|
var GLRenderBuffer = /** @class */ (function () {
|
3100
3108
|
function GLRenderBuffer(renderer, options) {
|
3101
3109
|
var _a;
|
@@ -4584,16 +4592,7 @@ var MarsMaterialDataBlock = /** @class */ (function () {
|
|
4584
4592
|
uboBuffer.setValues(this._uniformValues, this._uniformFlags, this._uniformValueRanges);
|
4585
4593
|
};
|
4586
4594
|
MarsMaterialDataBlock.prototype.updateUniformSubData = function (name, start, count) {
|
4587
|
-
|
4588
|
-
if (!this._uniformValueRanges[name]) {
|
4589
|
-
this._uniformValueRanges[name] = [start, count];
|
4590
|
-
}
|
4591
|
-
else {
|
4592
|
-
var end = Math.max(range[0] + range[1], start + count);
|
4593
|
-
var s = Math.min(start, range[0]);
|
4594
|
-
this._uniformValueRanges[name] = [s, end - s];
|
4595
|
-
}
|
4596
|
-
this._uniformFlags[name] = true;
|
4595
|
+
throw Error('this method has been deprecated');
|
4597
4596
|
};
|
4598
4597
|
MarsMaterialDataBlock.prototype.hasUniformValue = function (name) {
|
4599
4598
|
return !!this._uniformPrivate[name];
|
@@ -5838,7 +5837,48 @@ var MarsSharedGeometry = /** @class */ (function (_super) {
|
|
5838
5837
|
return MarsSharedGeometry;
|
5839
5838
|
}(MarsGeometry));
|
5840
5839
|
|
5841
|
-
consoleLog('version: ' + "0.1.
|
5840
|
+
consoleLog('version: ' + "0.1.71");
|
5841
|
+
var ModuleMsg = 'RI Package: @predy-js/render-interface';
|
5842
|
+
|
5843
|
+
var RI = /*#__PURE__*/Object.freeze({
|
5844
|
+
__proto__: null,
|
5845
|
+
ModuleMsg: ModuleMsg,
|
5846
|
+
constants: constants,
|
5847
|
+
RenderFrame: MarsRenderFrame,
|
5848
|
+
Renderer: MarsRenderer,
|
5849
|
+
Mesh: MarsMesh,
|
5850
|
+
InstancedMesh: MarsInstancedMesh,
|
5851
|
+
Geometry: MarsGeometry,
|
5852
|
+
RenderPass: MarsRenderPass,
|
5853
|
+
Texture: MarsTexture,
|
5854
|
+
Material: MarsMaterial,
|
5855
|
+
MaterialDataBlock: MarsMaterialDataBlock,
|
5856
|
+
SharedGeometry: MarsSharedGeometry,
|
5857
|
+
getDefaultGPUCapability: getDefaultGPUCapability,
|
5858
|
+
getDefaultTextureFactory: getDefaultTextureFactory,
|
5859
|
+
setDefaultTextureFactory: setDefaultTextureFactory,
|
5860
|
+
MarsTextureFactory: MarsTextureFactory,
|
5861
|
+
get DestroyOptions () { return exports.DestroyOptions; },
|
5862
|
+
get RenderPassDestroyAttachmentType () { return exports.RenderPassDestroyAttachmentType; },
|
5863
|
+
RenderPassPriorityPrepare: RenderPassPriorityPrepare,
|
5864
|
+
RenderPassPriorityNormal: RenderPassPriorityNormal,
|
5865
|
+
RenderPassPriorityPostprocess: RenderPassPriorityPostprocess,
|
5866
|
+
get TextureLoadAction () { return exports.TextureLoadAction; },
|
5867
|
+
get TextureStoreAction () { return exports.TextureStoreAction; },
|
5868
|
+
get RenderPassAttachmentStorageType () { return exports.RenderPassAttachmentStorageType; },
|
5869
|
+
get RenderPassMeshOrder () { return exports.RenderPassMeshOrder; },
|
5870
|
+
get TextureSourceType () { return exports.TextureSourceType; },
|
5871
|
+
GPUBufferOptionsMemoryShared: GPUBufferOptionsMemoryShared,
|
5872
|
+
get ShaderCompileResultStatus () { return exports.ShaderCompileResultStatus; },
|
5873
|
+
ShaderLibraryEmpty: ShaderLibraryEmpty
|
5874
|
+
});
|
5875
|
+
|
5876
|
+
if (typeof window === 'object') {
|
5877
|
+
window.PredyRI = RI;
|
5878
|
+
}
|
5879
|
+
else if (typeof global === 'object') {
|
5880
|
+
global.PredyRI = RI;
|
5881
|
+
}
|
5842
5882
|
|
5843
5883
|
exports.GPUBufferOptionsMemoryShared = GPUBufferOptionsMemoryShared;
|
5844
5884
|
exports.Geometry = MarsGeometry;
|
@@ -5847,6 +5887,7 @@ exports.MarsTextureFactory = MarsTextureFactory;
|
|
5847
5887
|
exports.Material = MarsMaterial;
|
5848
5888
|
exports.MaterialDataBlock = MarsMaterialDataBlock;
|
5849
5889
|
exports.Mesh = MarsMesh;
|
5890
|
+
exports.ModuleMsg = ModuleMsg;
|
5850
5891
|
exports.RenderFrame = MarsRenderFrame;
|
5851
5892
|
exports.RenderPass = MarsRenderPass;
|
5852
5893
|
exports.RenderPassPriorityNormal = RenderPassPriorityNormal;
|