@galacean/engine-rhi-webgl 1.0.0-beta.1 → 1.0.0-beta.10
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/main.js +18 -15
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +18 -15
- package/dist/module.js +18 -15
- package/dist/module.js.map +1 -1
- package/package.json +4 -4
- package/types/WebGLEngine.d.ts +1 -1
package/dist/main.js
CHANGED
|
@@ -205,8 +205,9 @@ function _inherits(subClass, superClass) {
|
|
|
205
205
|
*/ WebGLEngine.create = function create(configuration) {
|
|
206
206
|
var canvas = configuration.canvas;
|
|
207
207
|
var webCanvas = new WebCanvas(typeof canvas === "string" ? document.getElementById(canvas) : canvas);
|
|
208
|
-
var
|
|
209
|
-
var engine = new WebGLEngine(webCanvas,
|
|
208
|
+
var webGLGraphicDevice = new WebGLGraphicDevice(configuration.graphicDeviceOptions);
|
|
209
|
+
var engine = new WebGLEngine(webCanvas, webGLGraphicDevice, configuration);
|
|
210
|
+
// @ts-ignore
|
|
210
211
|
return engine._initialize(configuration);
|
|
211
212
|
};
|
|
212
213
|
_create_class(WebGLEngine, [
|
|
@@ -215,6 +216,7 @@ function _inherits(subClass, superClass) {
|
|
|
215
216
|
get: /**
|
|
216
217
|
* Web canvas.
|
|
217
218
|
*/ function get() {
|
|
219
|
+
// @ts-ignore
|
|
218
220
|
return this._canvas;
|
|
219
221
|
}
|
|
220
222
|
}
|
|
@@ -1748,7 +1750,8 @@ exports.WebGLMode = void 0;
|
|
|
1748
1750
|
var options = _extends({
|
|
1749
1751
|
webGLMode: 0,
|
|
1750
1752
|
stencil: true,
|
|
1751
|
-
_forceFlush: false
|
|
1753
|
+
_forceFlush: false,
|
|
1754
|
+
_maxAllowSkinUniformVectorCount: 256
|
|
1752
1755
|
}, initializeOptions);
|
|
1753
1756
|
if (engineCore.SystemInfo.platform === engineCore.Platform.IPhone || engineCore.SystemInfo.platform === engineCore.Platform.IPad) {
|
|
1754
1757
|
var version = engineCore.SystemInfo.operatingSystem.match(/(\d+).?(\d+)?.?(\d+)?/);
|
|
@@ -1903,23 +1906,23 @@ exports.WebGLMode = void 0;
|
|
|
1903
1906
|
};
|
|
1904
1907
|
_proto.activeRenderTarget = function activeRenderTarget(renderTarget, viewport, mipLevel) {
|
|
1905
1908
|
var gl = this._gl;
|
|
1909
|
+
var bufferWidth, bufferHeight;
|
|
1906
1910
|
if (renderTarget) {
|
|
1907
1911
|
var /** @ts-ignore */ _renderTarget__platformRenderTarget;
|
|
1908
1912
|
(_renderTarget__platformRenderTarget = renderTarget._platformRenderTarget) == null ? void 0 : _renderTarget__platformRenderTarget._activeRenderTarget();
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
this.viewport(0, 0, width, height);
|
|
1912
|
-
this.scissor(0, 0, width, height);
|
|
1913
|
+
bufferWidth = renderTarget.width >> mipLevel;
|
|
1914
|
+
bufferHeight = renderTarget.height >> mipLevel;
|
|
1913
1915
|
} else {
|
|
1914
1916
|
gl.bindFramebuffer(gl.FRAMEBUFFER, null);
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1917
|
+
bufferWidth = gl.drawingBufferWidth;
|
|
1918
|
+
bufferHeight = gl.drawingBufferHeight;
|
|
1919
|
+
}
|
|
1920
|
+
var width = bufferWidth * viewport.z;
|
|
1921
|
+
var height = bufferHeight * viewport.w;
|
|
1922
|
+
var x = viewport.x * bufferWidth;
|
|
1923
|
+
var y = bufferHeight - viewport.y * bufferHeight - height;
|
|
1924
|
+
this.viewport(x, y, width, height);
|
|
1925
|
+
this.scissor(x, y, width, height);
|
|
1923
1926
|
};
|
|
1924
1927
|
_proto.activeTexture = function activeTexture(textureID) {
|
|
1925
1928
|
if (this._activeTextureID !== textureID) {
|