@predy-js/render-interface 0.1.49-beta.1 → 0.1.50
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 +26 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -5
- package/dist/index.mjs.map +1 -1
- package/dist/src/webgl/GLShaderLibrary.d.ts +3 -3
- package/dist/statistic.js +1 -1
- package/dist/types/ShaderLibrary.d.ts +5 -7
- package/dist/types/native/ShaderLibraryInternal.d.ts +2 -3
- package/package.json +1 -1
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.50
|
6
6
|
*/
|
7
7
|
|
8
8
|
'use strict';
|
@@ -210,8 +210,17 @@ exports.ShaderCompileResultStatus = void 0;
|
|
210
210
|
})(exports.ShaderCompileResultStatus || (exports.ShaderCompileResultStatus = {}));
|
211
211
|
var ShaderLibraryEmpty = /** @class */ (function () {
|
212
212
|
function ShaderLibraryEmpty() {
|
213
|
-
this.shaderResults = {};
|
214
213
|
}
|
214
|
+
Object.defineProperty(ShaderLibraryEmpty.prototype, "cacheIds", {
|
215
|
+
get: function () {
|
216
|
+
return [];
|
217
|
+
},
|
218
|
+
enumerable: false,
|
219
|
+
configurable: true
|
220
|
+
});
|
221
|
+
ShaderLibraryEmpty.prototype.getShaderResult = function (cacheId) {
|
222
|
+
return undefined;
|
223
|
+
};
|
215
224
|
ShaderLibraryEmpty.prototype.addShader = function (shader, marcos) {
|
216
225
|
return '';
|
217
226
|
};
|
@@ -1949,6 +1958,18 @@ var GLShaderLibrary = /** @class */ (function () {
|
|
1949
1958
|
var gl = this.renderer.gl;
|
1950
1959
|
this._glAsyncCompileExt = gl.getExtension('KHR_parallel_shader_compile');
|
1951
1960
|
}
|
1961
|
+
Object.defineProperty(GLShaderLibrary.prototype, "cacheIds", {
|
1962
|
+
get: function () {
|
1963
|
+
return Object.keys(this.shaderResults);
|
1964
|
+
},
|
1965
|
+
enumerable: false,
|
1966
|
+
configurable: true
|
1967
|
+
});
|
1968
|
+
GLShaderLibrary.prototype.getShaderResult = function (cacheId) {
|
1969
|
+
if (this.shaderResults) {
|
1970
|
+
return this.shaderResults[cacheId];
|
1971
|
+
}
|
1972
|
+
};
|
1952
1973
|
GLShaderLibrary.prototype.compileAllShaders = function (asyncCallback) {
|
1953
1974
|
var _this = this;
|
1954
1975
|
if (!this._shaderAllDone) {
|
@@ -4422,8 +4443,8 @@ var GLMaterial = /** @class */ (function () {
|
|
4422
4443
|
GLMaterial.prototype.destroy = function () {
|
4423
4444
|
var _a;
|
4424
4445
|
var lib = (_a = this.renderer) === null || _a === void 0 ? void 0 : _a.shaderLibrary;
|
4425
|
-
if (lib
|
4426
|
-
var shader = lib.
|
4446
|
+
if (lib) {
|
4447
|
+
var shader = lib.getShaderResult(this.shaderCacheId);
|
4427
4448
|
if (shader && !shader.shared) {
|
4428
4449
|
lib.deleteShader(this.shaderCacheId);
|
4429
4450
|
}
|
@@ -5709,7 +5730,7 @@ var MarsSharedGeometry = /** @class */ (function (_super) {
|
|
5709
5730
|
return MarsSharedGeometry;
|
5710
5731
|
}(MarsGeometry));
|
5711
5732
|
|
5712
|
-
consoleLog('version: ' + "0.1.
|
5733
|
+
consoleLog('version: ' + "0.1.50");
|
5713
5734
|
consoleLog('Update : xxx');
|
5714
5735
|
|
5715
5736
|
exports.Geometry = MarsGeometry;
|