@galacean/effects-core 2.4.1-alpha.1 → 2.4.1
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 +21 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -11
- package/dist/index.mjs.map +1 -1
- package/dist/material/mask-ref-manager.d.ts +1 -1
- package/dist/material/types.d.ts +0 -2
- package/dist/plugin-system.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Description: Galacean Effects runtime core for the web
|
|
4
4
|
* Author: Ant Group CO., Ltd.
|
|
5
5
|
* Contributors: 燃然,飂兮,十弦,云垣,茂安,意绮
|
|
6
|
-
* Version: v2.4.1
|
|
6
|
+
* Version: v2.4.1
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -869,7 +869,7 @@ function unregisterPlugin(name) {
|
|
|
869
869
|
removeItem(defaultPlugins, name);
|
|
870
870
|
}
|
|
871
871
|
var PluginSystem = /*#__PURE__*/ function() {
|
|
872
|
-
function PluginSystem() {
|
|
872
|
+
function PluginSystem(pluginNames) {
|
|
873
873
|
var loaders = {};
|
|
874
874
|
var loaded = [];
|
|
875
875
|
var addLoader = function(name) {
|
|
@@ -880,12 +880,15 @@ var PluginSystem = /*#__PURE__*/ function() {
|
|
|
880
880
|
}
|
|
881
881
|
};
|
|
882
882
|
defaultPlugins.forEach(addLoader);
|
|
883
|
-
|
|
884
|
-
var
|
|
885
|
-
if (!
|
|
886
|
-
throw new Error("The plugin '" +
|
|
883
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(pluginNames), _step; !(_step = _iterator()).done;){
|
|
884
|
+
var customPluginName = _step.value;
|
|
885
|
+
if (!pluginLoaderMap[customPluginName]) {
|
|
886
|
+
throw new Error("The plugin '" + customPluginName + "' not found." + getPluginUsageInfo(customPluginName));
|
|
887
887
|
}
|
|
888
|
-
|
|
888
|
+
}
|
|
889
|
+
this.plugins = Object.keys(loaders).map(function(name) {
|
|
890
|
+
var pluginConstructor = pluginLoaderMap[name];
|
|
891
|
+
var loader = new pluginConstructor();
|
|
889
892
|
loader.name = name;
|
|
890
893
|
return loader;
|
|
891
894
|
}).sort(function(a, b) {
|
|
@@ -7624,6 +7627,7 @@ exports.MaterialRenderType = void 0;
|
|
|
7624
7627
|
var MaskProcessor = /*#__PURE__*/ function() {
|
|
7625
7628
|
function MaskProcessor(engine) {
|
|
7626
7629
|
this.engine = engine;
|
|
7630
|
+
this.maskable = null;
|
|
7627
7631
|
this.stencilClearAction = {
|
|
7628
7632
|
stencilAction: exports.TextureLoadAction.clear
|
|
7629
7633
|
};
|
|
@@ -7640,7 +7644,9 @@ var MaskProcessor = /*#__PURE__*/ function() {
|
|
|
7640
7644
|
maskMode = exports.MaskMode.MASK;
|
|
7641
7645
|
} else if (mode === ObscuredMode.OBSCURED || mode === ObscuredMode.REVERSE_OBSCURED) {
|
|
7642
7646
|
maskMode = mode === ObscuredMode.OBSCURED ? exports.MaskMode.OBSCURED : exports.MaskMode.REVERSE_OBSCURED;
|
|
7643
|
-
|
|
7647
|
+
if (ref) {
|
|
7648
|
+
this.maskable = ref;
|
|
7649
|
+
}
|
|
7644
7650
|
}
|
|
7645
7651
|
}
|
|
7646
7652
|
return maskMode;
|
|
@@ -12563,6 +12569,9 @@ function getBezier2DValue(out, t, p0, p1, cpx0, cpy0, cpx1, cpy1) {
|
|
|
12563
12569
|
/**
|
|
12564
12570
|
* @internal
|
|
12565
12571
|
*/ _proto.drawStencilMask = function drawStencilMask(renderer) {
|
|
12572
|
+
if (!this.isActiveAndEnabled) {
|
|
12573
|
+
return;
|
|
12574
|
+
}
|
|
12566
12575
|
var previousColorMask = this.material.colorMask;
|
|
12567
12576
|
this.material.colorMask = false;
|
|
12568
12577
|
this.draw(renderer);
|
|
@@ -29071,12 +29080,13 @@ var seed = 1;
|
|
|
29071
29080
|
_proto.processJSON = function processJSON(json) {
|
|
29072
29081
|
var _this = this;
|
|
29073
29082
|
return _async_to_generator(function() {
|
|
29074
|
-
var jsonScene, pluginSystem;
|
|
29083
|
+
var jsonScene, _jsonScene_plugins, plugins, pluginSystem;
|
|
29075
29084
|
return __generator(this, function(_state) {
|
|
29076
29085
|
switch(_state.label){
|
|
29077
29086
|
case 0:
|
|
29078
29087
|
jsonScene = getStandardJSON(json);
|
|
29079
|
-
|
|
29088
|
+
_jsonScene_plugins = jsonScene.plugins, plugins = _jsonScene_plugins === void 0 ? [] : _jsonScene_plugins;
|
|
29089
|
+
pluginSystem = new PluginSystem(plugins);
|
|
29080
29090
|
return [
|
|
29081
29091
|
4,
|
|
29082
29092
|
pluginSystem.processRawJSON(jsonScene, _this.options)
|
|
@@ -31627,7 +31637,7 @@ registerPlugin("sprite", SpriteLoader, exports.VFXItem);
|
|
|
31627
31637
|
registerPlugin("particle", ParticleLoader, exports.VFXItem);
|
|
31628
31638
|
registerPlugin("cal", CalculateLoader, exports.VFXItem);
|
|
31629
31639
|
registerPlugin("interact", InteractLoader, exports.VFXItem);
|
|
31630
|
-
var version = "2.4.1
|
|
31640
|
+
var version = "2.4.1";
|
|
31631
31641
|
logger.info("Core version: " + version + ".");
|
|
31632
31642
|
|
|
31633
31643
|
exports.AbstractPlugin = AbstractPlugin;
|