@galacean/effects 1.4.4 → 1.5.0-alpha.0
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/alipay.js +31182 -0
- package/dist/alipay.js.map +1 -0
- package/dist/alipay.mjs +30924 -0
- package/dist/alipay.mjs.map +1 -0
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +4 -4
- package/dist/index.min.js.map +1 -1
- package/dist/index.mjs +6 -5
- package/dist/index.mjs.map +1 -1
- package/dist/weapp.js +13 -12
- package/dist/weapp.js.map +1 -1
- package/dist/weapp.mjs +6 -5
- package/dist/weapp.mjs.map +1 -1
- package/package.json +11 -3
package/dist/weapp.js
CHANGED
|
@@ -219,8 +219,8 @@ if (!initErrors.length) {
|
|
|
219
219
|
}
|
|
220
220
|
function initGLContext() {
|
|
221
221
|
// 重要:iOS 9/10 低版本需要拷贝 gl context 的 prototype,要不然会有属性值的缺失
|
|
222
|
-
if (typeof WebGL2RenderingContext === 'function') {
|
|
223
|
-
copy(WebGL2RenderingContext);
|
|
222
|
+
if (typeof weapp.WebGL2RenderingContext === 'function') {
|
|
223
|
+
copy(weapp.WebGL2RenderingContext);
|
|
224
224
|
}
|
|
225
225
|
else if (typeof weapp.WebGLRenderingContext !== 'undefined') {
|
|
226
226
|
copy(weapp.WebGLRenderingContext);
|
|
@@ -237,7 +237,7 @@ function initGLContext() {
|
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
function isWebGL2(gl) {
|
|
240
|
-
return typeof WebGL2RenderingContext !== 'undefined' && gl.constructor.name === 'WebGL2RenderingContext';
|
|
240
|
+
return typeof weapp.WebGL2RenderingContext !== 'undefined' && gl.constructor.name === 'WebGL2RenderingContext';
|
|
241
241
|
}
|
|
242
242
|
function copy(target) {
|
|
243
243
|
for (var name_1 in target) {
|
|
@@ -485,9 +485,9 @@ function parsePercent$1(c) {
|
|
|
485
485
|
}
|
|
486
486
|
|
|
487
487
|
function getPixelRatio() {
|
|
488
|
-
if (typeof screen === 'object' && typeof weapp.document === 'object') {
|
|
488
|
+
if (typeof weapp.screen === 'object' && typeof weapp.document === 'object') {
|
|
489
489
|
var viewportWidth = Math.max(weapp.document.documentElement.clientWidth, weapp.window.innerWidth || 0);
|
|
490
|
-
var screenWidth = screen.width;
|
|
490
|
+
var screenWidth = weapp.screen.width;
|
|
491
491
|
var viewportScale = screenWidth / viewportWidth;
|
|
492
492
|
return Math.min(2 * viewportScale, 2);
|
|
493
493
|
}
|
|
@@ -692,7 +692,7 @@ function isValidFontFamily(fontFamily) {
|
|
|
692
692
|
* Name: @galacean/effects-specification
|
|
693
693
|
* Description: Galacean Effects JSON Specification
|
|
694
694
|
* Author: Ant Group CO., Ltd.
|
|
695
|
-
* Version: v1.
|
|
695
|
+
* Version: v1.3.0-alpha.0
|
|
696
696
|
*/
|
|
697
697
|
|
|
698
698
|
/*********************************************/
|
|
@@ -13109,14 +13109,14 @@ var RenderBuffer = /** @class */ (function () {
|
|
|
13109
13109
|
return RenderBuffer;
|
|
13110
13110
|
}());
|
|
13111
13111
|
|
|
13112
|
-
var isWebGL2Available = typeof WebGL2RenderingContext === 'function';
|
|
13112
|
+
var isWebGL2Available = typeof weapp.WebGL2RenderingContext === 'function';
|
|
13113
13113
|
var GPUCapability = /** @class */ (function () {
|
|
13114
13114
|
function GPUCapability(gl) {
|
|
13115
13115
|
this.setupCapability(gl);
|
|
13116
13116
|
}
|
|
13117
13117
|
GPUCapability.prototype.setupCapability = function (gl) {
|
|
13118
13118
|
var _a;
|
|
13119
|
-
var level = isWebGL2Available && gl instanceof WebGL2RenderingContext ? 2 : 1;
|
|
13119
|
+
var level = isWebGL2Available && gl instanceof weapp.WebGL2RenderingContext ? 2 : 1;
|
|
13120
13120
|
var level2 = level === 2;
|
|
13121
13121
|
var textureAnisotropicExt = gl.getExtension('EXT_texture_filter_anisotropic') || gl.getExtension('WEBKIT_EXT_texture_filter_anisotropic');
|
|
13122
13122
|
var depthTextureExtension = gl.getExtension('WEBGL_depth_texture');
|
|
@@ -13140,7 +13140,7 @@ var GPUCapability = /** @class */ (function () {
|
|
|
13140
13140
|
this.internalFormatDepth16 = level2 ? gl.DEPTH_COMPONENT16 : gl.DEPTH_COMPONENT;
|
|
13141
13141
|
this.internalFormatDepth24_stencil8 = level2 ? gl.DEPTH24_STENCIL8 : gl.DEPTH_STENCIL;
|
|
13142
13142
|
var floatTexture = (level2 || gl.getExtension('OES_texture_float')) ? gl.FLOAT : 0;
|
|
13143
|
-
var halfFloatTexture = level2 ? WebGL2RenderingContext.HALF_FLOAT : (((_a = gl.getExtension('OES_texture_half_float')) === null || _a === void 0 ? void 0 : _a.HALF_FLOAT_OES) || 0);
|
|
13143
|
+
var halfFloatTexture = level2 ? weapp.WebGL2RenderingContext.HALF_FLOAT : (((_a = gl.getExtension('OES_texture_half_float')) === null || _a === void 0 ? void 0 : _a.HALF_FLOAT_OES) || 0);
|
|
13144
13144
|
var detail = {
|
|
13145
13145
|
floatTexture: floatTexture,
|
|
13146
13146
|
halfFloatTexture: halfFloatTexture,
|
|
@@ -21873,7 +21873,7 @@ var filters = {
|
|
|
21873
21873
|
* Name: @galacean/effects-specification
|
|
21874
21874
|
* Description: Galacean Effects JSON Specification
|
|
21875
21875
|
* Author: Ant Group CO., Ltd.
|
|
21876
|
-
* Version: v1.
|
|
21876
|
+
* Version: v1.3.0-alpha.0
|
|
21877
21877
|
*/
|
|
21878
21878
|
|
|
21879
21879
|
/*********************************************/
|
|
@@ -28751,7 +28751,8 @@ var GLProgram = /** @class */ (function () {
|
|
|
28751
28751
|
}
|
|
28752
28752
|
geometry.vaos[programId] = vao;
|
|
28753
28753
|
}
|
|
28754
|
-
|
|
28754
|
+
// 兼容小程序下不支持vao
|
|
28755
|
+
if (vao && vao.vao) {
|
|
28755
28756
|
vao.bind();
|
|
28756
28757
|
if (vao.ready) {
|
|
28757
28758
|
return vao;
|
|
@@ -30920,7 +30921,7 @@ Renderer.create = function (canvas, framework, renderOptions) {
|
|
|
30920
30921
|
Engine.create = function (gl) {
|
|
30921
30922
|
return new GLEngine(gl);
|
|
30922
30923
|
};
|
|
30923
|
-
var version = "1.
|
|
30924
|
+
var version = "1.5.0-alpha.0";
|
|
30924
30925
|
logger.info('player version: ' + version);
|
|
30925
30926
|
|
|
30926
30927
|
exports.AbstractPlugin = AbstractPlugin;
|