@galacean/effects-threejs 2.4.0 → 2.4.1-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/index.js +14 -27
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +2 -2
- package/dist/index.min.js.map +1 -1
- package/dist/index.mjs +15 -27
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Description: Galacean Effects runtime threejs plugin for the web
|
|
4
4
|
* Author: Ant Group CO., Ltd.
|
|
5
5
|
* Contributors: 燃然,飂兮,十弦,云垣,茂安,意绮
|
|
6
|
-
* Version: v2.4.0
|
|
6
|
+
* Version: v2.4.1-alpha.0
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -7643,26 +7643,16 @@ exports.MaterialRenderType = void 0;
|
|
|
7643
7643
|
return Material;
|
|
7644
7644
|
}(EffectsObject);
|
|
7645
7645
|
|
|
7646
|
-
var MaskRefManager = /*#__PURE__*/ function() {
|
|
7647
|
-
function MaskRefManager(initRef) {
|
|
7648
|
-
this.currentRef = initRef || 0;
|
|
7649
|
-
}
|
|
7650
|
-
var _proto = MaskRefManager.prototype;
|
|
7651
|
-
_proto.distributeRef = function distributeRef() {
|
|
7652
|
-
return ++this.currentRef;
|
|
7653
|
-
};
|
|
7654
|
-
return MaskRefManager;
|
|
7655
|
-
}();
|
|
7656
7646
|
var MaskProcessor = /*#__PURE__*/ function() {
|
|
7657
7647
|
function MaskProcessor(engine) {
|
|
7658
7648
|
this.engine = engine;
|
|
7649
|
+
this.stencilClearAction = {
|
|
7650
|
+
stencilAction: exports.TextureLoadAction.clear
|
|
7651
|
+
};
|
|
7659
7652
|
}
|
|
7660
7653
|
var _proto = MaskProcessor.prototype;
|
|
7661
7654
|
_proto.getRefValue = function getRefValue() {
|
|
7662
|
-
|
|
7663
|
-
this.maskRef = this.engine.maskRefManager.distributeRef();
|
|
7664
|
-
}
|
|
7665
|
-
return this.maskRef;
|
|
7655
|
+
return 1;
|
|
7666
7656
|
};
|
|
7667
7657
|
_proto.getMaskMode = function getMaskMode(data) {
|
|
7668
7658
|
var maskMode = exports.MaskMode.NONE;
|
|
@@ -7670,10 +7660,8 @@ var MaskProcessor = /*#__PURE__*/ function() {
|
|
|
7670
7660
|
var _data_mask = data.mask, _data_mask_mask = _data_mask.mask, mask = _data_mask_mask === void 0 ? false : _data_mask_mask, _data_mask_mode = _data_mask.mode, mode = _data_mask_mode === void 0 ? exports.MaskMode.NONE : _data_mask_mode, ref = _data_mask.ref;
|
|
7671
7661
|
if (mask) {
|
|
7672
7662
|
maskMode = exports.MaskMode.MASK;
|
|
7673
|
-
this.getRefValue();
|
|
7674
7663
|
} else if (mode === ObscuredMode.OBSCURED || mode === ObscuredMode.REVERSE_OBSCURED) {
|
|
7675
7664
|
maskMode = mode === ObscuredMode.OBSCURED ? exports.MaskMode.OBSCURED : exports.MaskMode.REVERSE_OBSCURED;
|
|
7676
|
-
this.maskRef = ref.maskManager.getRefValue();
|
|
7677
7665
|
this.maskable = ref;
|
|
7678
7666
|
}
|
|
7679
7667
|
}
|
|
@@ -7681,6 +7669,7 @@ var MaskProcessor = /*#__PURE__*/ function() {
|
|
|
7681
7669
|
};
|
|
7682
7670
|
_proto.drawStencilMask = function drawStencilMask(renderer) {
|
|
7683
7671
|
var _this_maskable;
|
|
7672
|
+
renderer.clear(this.stencilClearAction);
|
|
7684
7673
|
(_this_maskable = this.maskable) == null ? void 0 : _this_maskable.drawStencilMask(renderer);
|
|
7685
7674
|
};
|
|
7686
7675
|
return MaskProcessor;
|
|
@@ -19594,10 +19583,12 @@ exports.ParticleSystem = /*#__PURE__*/ function(Component) {
|
|
|
19594
19583
|
var maskMode = exports.MaskMode.NONE;
|
|
19595
19584
|
var maskRef = 0;
|
|
19596
19585
|
if (data.mask) {
|
|
19597
|
-
var
|
|
19598
|
-
|
|
19599
|
-
|
|
19600
|
-
|
|
19586
|
+
var maskProps = data.mask;
|
|
19587
|
+
if (maskProps && maskProps.ref) {
|
|
19588
|
+
maskProps.ref = this.engine.findObject(maskProps.ref);
|
|
19589
|
+
}
|
|
19590
|
+
maskMode = this.maskManager.getMaskMode(data);
|
|
19591
|
+
maskRef = this.maskManager.getRefValue();
|
|
19601
19592
|
}
|
|
19602
19593
|
return {
|
|
19603
19594
|
maskMode: maskMode,
|
|
@@ -31287,9 +31278,6 @@ var FBGeometryDataT = /*#__PURE__*/ function() {
|
|
|
31287
31278
|
/**
|
|
31288
31279
|
* 渲染过程中错误队列
|
|
31289
31280
|
*/ this.renderErrors = new Set();
|
|
31290
|
-
/**
|
|
31291
|
-
* maskRef 值分配
|
|
31292
|
-
*/ this.maskRefManager = new MaskRefManager();
|
|
31293
31281
|
this.destroyed = false;
|
|
31294
31282
|
this.textures = [];
|
|
31295
31283
|
this.materials = [];
|
|
@@ -31660,7 +31648,7 @@ registerPlugin("sprite", SpriteLoader, exports.VFXItem);
|
|
|
31660
31648
|
registerPlugin("particle", ParticleLoader, exports.VFXItem);
|
|
31661
31649
|
registerPlugin("cal", CalculateLoader, exports.VFXItem);
|
|
31662
31650
|
registerPlugin("interact", InteractLoader, exports.VFXItem);
|
|
31663
|
-
var version$1 = "2.4.0";
|
|
31651
|
+
var version$1 = "2.4.1-alpha.0";
|
|
31664
31652
|
logger.info("Core version: " + version$1 + ".");
|
|
31665
31653
|
|
|
31666
31654
|
var _obj;
|
|
@@ -33262,7 +33250,7 @@ setMaxSpriteMeshItemCount(8);
|
|
|
33262
33250
|
*/ Mesh.create = function(engine, props) {
|
|
33263
33251
|
return new ThreeMesh(engine, props);
|
|
33264
33252
|
};
|
|
33265
|
-
var version = "2.4.0";
|
|
33253
|
+
var version = "2.4.1-alpha.0";
|
|
33266
33254
|
logger.info("THREEJS plugin version: " + version + ".");
|
|
33267
33255
|
|
|
33268
33256
|
exports.AbstractPlugin = AbstractPlugin;
|
|
@@ -33320,7 +33308,6 @@ exports.KTXTexture = KTXTexture;
|
|
|
33320
33308
|
exports.LineSegments = LineSegments;
|
|
33321
33309
|
exports.LinearValue = LinearValue;
|
|
33322
33310
|
exports.MaskProcessor = MaskProcessor;
|
|
33323
|
-
exports.MaskRefManager = MaskRefManager;
|
|
33324
33311
|
exports.Material = Material;
|
|
33325
33312
|
exports.MaterialDataBlock = MaterialDataBlock;
|
|
33326
33313
|
exports.Mesh = Mesh;
|