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