@galacean/engine 1.5.0-alpha.2 → 1.5.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/browser.js +28 -6
- package/dist/browser.js.map +1 -1
- package/dist/browser.min.js +1 -1
- package/dist/browser.min.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/module.js +1 -1
- package/dist/module.js.map +1 -1
- package/package.json +5 -5
package/dist/browser.js
CHANGED
|
@@ -41163,6 +41163,7 @@
|
|
|
41163
41163
|
Polyfill.registerPolyfill = function registerPolyfill() {
|
|
41164
41164
|
Polyfill._registerMatchAll();
|
|
41165
41165
|
Polyfill._registerAudioContext();
|
|
41166
|
+
Polyfill._registerTextMetrics();
|
|
41166
41167
|
};
|
|
41167
41168
|
Polyfill._registerMatchAll = function _registerMatchAll() {
|
|
41168
41169
|
if (!String.prototype.matchAll) {
|
|
@@ -41240,6 +41241,25 @@
|
|
|
41240
41241
|
};
|
|
41241
41242
|
}
|
|
41242
41243
|
};
|
|
41244
|
+
Polyfill._registerTextMetrics = function _registerTextMetrics() {
|
|
41245
|
+
// Based on the specific version of the engine implementation, when actualBoundingBoxLeft is not supported, width is used to represent the rendering width, and `textAlign` uses the default value `start` and direction is left to right.
|
|
41246
|
+
// Some devices do not support actualBoundingBoxLeft and actualBoundingBoxRight in TextMetrics.
|
|
41247
|
+
// Examples: Google Pixel 2 XL (Android 11), Honor 6X (Android 8).
|
|
41248
|
+
if (!("actualBoundingBoxLeft" in TextMetrics.prototype)) {
|
|
41249
|
+
Object.defineProperties(TextMetrics.prototype, {
|
|
41250
|
+
actualBoundingBoxLeft: {
|
|
41251
|
+
get: function get() {
|
|
41252
|
+
return 0;
|
|
41253
|
+
}
|
|
41254
|
+
},
|
|
41255
|
+
actualBoundingBoxRight: {
|
|
41256
|
+
get: function get() {
|
|
41257
|
+
return this.width;
|
|
41258
|
+
}
|
|
41259
|
+
}
|
|
41260
|
+
});
|
|
41261
|
+
}
|
|
41262
|
+
};
|
|
41243
41263
|
return Polyfill;
|
|
41244
41264
|
}();
|
|
41245
41265
|
Polyfill.registerPolyfill();
|
|
@@ -43072,7 +43092,6 @@
|
|
|
43072
43092
|
};
|
|
43073
43093
|
_proto._checkFrameBuffer = function _checkFrameBuffer() {
|
|
43074
43094
|
var gl = this._gl;
|
|
43075
|
-
var isWebGL2 = this._isWebGL2;
|
|
43076
43095
|
var e = gl.checkFramebufferStatus(gl.FRAMEBUFFER);
|
|
43077
43096
|
switch(e){
|
|
43078
43097
|
case gl.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:
|
|
@@ -43082,10 +43101,13 @@
|
|
|
43082
43101
|
case gl.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:
|
|
43083
43102
|
throw new Error(" Height and width of the attachment are not the same.");
|
|
43084
43103
|
case gl.FRAMEBUFFER_UNSUPPORTED:
|
|
43085
|
-
|
|
43086
|
-
|
|
43087
|
-
|
|
43088
|
-
|
|
43104
|
+
// #5.14.3 Event Types in https://registry.khronos.org/webgl/specs/1.0.0/
|
|
43105
|
+
if (!gl.isContextLost()) {
|
|
43106
|
+
throw new Error("The format of the attachment is not supported or if depth and stencil attachments are not the same renderbuffer");
|
|
43107
|
+
}
|
|
43108
|
+
break;
|
|
43109
|
+
case gl.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:
|
|
43110
|
+
throw new Error("The values of gl.RENDERBUFFER_SAMPLES are different among attached renderbuffers, or are non-zero if the attached images are a mix of renderbuffers and textures.");
|
|
43089
43111
|
}
|
|
43090
43112
|
};
|
|
43091
43113
|
return GLRenderTarget;
|
|
@@ -51115,7 +51137,7 @@
|
|
|
51115
51137
|
], EXT_texture_webp);
|
|
51116
51138
|
|
|
51117
51139
|
//@ts-ignore
|
|
51118
|
-
var version = "1.5.0
|
|
51140
|
+
var version = "1.5.0";
|
|
51119
51141
|
console.log("Galacean Engine Version: " + version);
|
|
51120
51142
|
for(var key in CoreObjects){
|
|
51121
51143
|
Loader.registerClass(key, CoreObjects[key]);
|