@galacean/engine-core 1.2.0-alpha.14 → 1.2.0-alpha.15
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 +31 -11
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +31 -11
- package/dist/module.js +31 -11
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/Camera.d.ts +9 -3
package/dist/main.js
CHANGED
|
@@ -24434,7 +24434,7 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component1) {
|
|
|
24434
24434
|
_this._customAspectRatio = undefined;
|
|
24435
24435
|
_this._renderTarget = null;
|
|
24436
24436
|
_this._depthBufferParams = new engineMath.Vector4();
|
|
24437
|
-
_this.
|
|
24437
|
+
_this._preferIndependentCanvas = false;
|
|
24438
24438
|
_this._opaqueTextureEnabled = false;
|
|
24439
24439
|
_this._viewport = new engineMath.Vector4(0, 0, 1, 1);
|
|
24440
24440
|
_this._pixelViewport = new engineMath.Rect(0, 0, 0, 0);
|
|
@@ -24730,7 +24730,7 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component1) {
|
|
|
24730
24730
|
return this._inverseProjectionMatrix;
|
|
24731
24731
|
};
|
|
24732
24732
|
_proto._forceUseInternalCanvas = function _forceUseInternalCanvas() {
|
|
24733
|
-
return
|
|
24733
|
+
return this.opaqueTextureEnabled;
|
|
24734
24734
|
};
|
|
24735
24735
|
_proto._onPixelViewportChanged = function _onPixelViewportChanged() {
|
|
24736
24736
|
this._updatePixelViewport();
|
|
@@ -24764,24 +24764,44 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component1) {
|
|
|
24764
24764
|
}
|
|
24765
24765
|
},
|
|
24766
24766
|
{
|
|
24767
|
-
key: "
|
|
24767
|
+
key: "preferIndependentCanvas",
|
|
24768
24768
|
get: /**
|
|
24769
|
-
* Whether to use an independent canvas in viewport area.
|
|
24769
|
+
* Whether prefer to use an independent canvas in viewport area when camera rendering to main canvas.
|
|
24770
24770
|
*
|
|
24771
|
-
* @remarks If
|
|
24771
|
+
* @remarks If success, the `independentCanvasEnabled` property will be true and the msaa in viewport can turn or off independently by `msaaSamples` property.
|
|
24772
24772
|
*/ function get() {
|
|
24773
|
-
|
|
24774
|
-
return forceIndependent || this._customIndependentCanvas;
|
|
24773
|
+
return this._preferIndependentCanvas;
|
|
24775
24774
|
},
|
|
24776
24775
|
set: function set(value) {
|
|
24777
|
-
|
|
24778
|
-
|
|
24779
|
-
|
|
24776
|
+
if (value) {
|
|
24777
|
+
if (this._renderTarget) {
|
|
24778
|
+
console.warn("The independent canvas can't be enabled when the renderTarget property is set.");
|
|
24779
|
+
}
|
|
24780
|
+
} else {
|
|
24781
|
+
if (this._forceUseInternalCanvas()) {
|
|
24782
|
+
console.warn("The independent canvas force to be enabled when opaqueTextureEnabled is true.");
|
|
24783
|
+
}
|
|
24780
24784
|
}
|
|
24781
|
-
this.
|
|
24785
|
+
this._preferIndependentCanvas = value;
|
|
24782
24786
|
this._checkMainCanvasAntialiasWaste();
|
|
24783
24787
|
}
|
|
24784
24788
|
},
|
|
24789
|
+
{
|
|
24790
|
+
key: "independentCanvasEnabled",
|
|
24791
|
+
get: /**
|
|
24792
|
+
* Whether independent canvas is enabled.
|
|
24793
|
+
*
|
|
24794
|
+
* @remarks If true, the msaa in viewport can turn or off independently by `msaaSamples` property.
|
|
24795
|
+
*/ function get() {
|
|
24796
|
+
if (this._renderTarget) {
|
|
24797
|
+
return false;
|
|
24798
|
+
}
|
|
24799
|
+
if (this._forceUseInternalCanvas()) {
|
|
24800
|
+
return true;
|
|
24801
|
+
}
|
|
24802
|
+
return this._preferIndependentCanvas;
|
|
24803
|
+
}
|
|
24804
|
+
},
|
|
24785
24805
|
{
|
|
24786
24806
|
key: "shaderData",
|
|
24787
24807
|
get: /**
|