@galacean/effects-threejs 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 +22 -12
- 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 +22 -12
- 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.1
|
|
6
|
+
* Version: v2.4.1
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -891,7 +891,7 @@ function unregisterPlugin(name) {
|
|
|
891
891
|
removeItem(defaultPlugins, name);
|
|
892
892
|
}
|
|
893
893
|
var PluginSystem = /*#__PURE__*/ function() {
|
|
894
|
-
function PluginSystem() {
|
|
894
|
+
function PluginSystem(pluginNames) {
|
|
895
895
|
var loaders = {};
|
|
896
896
|
var loaded = [];
|
|
897
897
|
var addLoader = function(name) {
|
|
@@ -902,12 +902,15 @@ var PluginSystem = /*#__PURE__*/ function() {
|
|
|
902
902
|
}
|
|
903
903
|
};
|
|
904
904
|
defaultPlugins.forEach(addLoader);
|
|
905
|
-
|
|
906
|
-
var
|
|
907
|
-
if (!
|
|
908
|
-
throw new Error("The plugin '" +
|
|
905
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(pluginNames), _step; !(_step = _iterator()).done;){
|
|
906
|
+
var customPluginName = _step.value;
|
|
907
|
+
if (!pluginLoaderMap[customPluginName]) {
|
|
908
|
+
throw new Error("The plugin '" + customPluginName + "' not found." + getPluginUsageInfo(customPluginName));
|
|
909
909
|
}
|
|
910
|
-
|
|
910
|
+
}
|
|
911
|
+
this.plugins = Object.keys(loaders).map(function(name) {
|
|
912
|
+
var pluginConstructor = pluginLoaderMap[name];
|
|
913
|
+
var loader = new pluginConstructor();
|
|
911
914
|
loader.name = name;
|
|
912
915
|
return loader;
|
|
913
916
|
}).sort(function(a, b) {
|
|
@@ -7646,6 +7649,7 @@ exports.MaterialRenderType = void 0;
|
|
|
7646
7649
|
var MaskProcessor = /*#__PURE__*/ function() {
|
|
7647
7650
|
function MaskProcessor(engine) {
|
|
7648
7651
|
this.engine = engine;
|
|
7652
|
+
this.maskable = null;
|
|
7649
7653
|
this.stencilClearAction = {
|
|
7650
7654
|
stencilAction: exports.TextureLoadAction.clear
|
|
7651
7655
|
};
|
|
@@ -7662,7 +7666,9 @@ var MaskProcessor = /*#__PURE__*/ function() {
|
|
|
7662
7666
|
maskMode = exports.MaskMode.MASK;
|
|
7663
7667
|
} else if (mode === ObscuredMode.OBSCURED || mode === ObscuredMode.REVERSE_OBSCURED) {
|
|
7664
7668
|
maskMode = mode === ObscuredMode.OBSCURED ? exports.MaskMode.OBSCURED : exports.MaskMode.REVERSE_OBSCURED;
|
|
7665
|
-
|
|
7669
|
+
if (ref) {
|
|
7670
|
+
this.maskable = ref;
|
|
7671
|
+
}
|
|
7666
7672
|
}
|
|
7667
7673
|
}
|
|
7668
7674
|
return maskMode;
|
|
@@ -12585,6 +12591,9 @@ function getBezier2DValue(out, t, p0, p1, cpx0, cpy0, cpx1, cpy1) {
|
|
|
12585
12591
|
/**
|
|
12586
12592
|
* @internal
|
|
12587
12593
|
*/ _proto.drawStencilMask = function drawStencilMask(renderer) {
|
|
12594
|
+
if (!this.isActiveAndEnabled) {
|
|
12595
|
+
return;
|
|
12596
|
+
}
|
|
12588
12597
|
var previousColorMask = this.material.colorMask;
|
|
12589
12598
|
this.material.colorMask = false;
|
|
12590
12599
|
this.draw(renderer);
|
|
@@ -29093,12 +29102,13 @@ var seed$1 = 1;
|
|
|
29093
29102
|
_proto.processJSON = function processJSON(json) {
|
|
29094
29103
|
var _this = this;
|
|
29095
29104
|
return _async_to_generator(function() {
|
|
29096
|
-
var jsonScene, pluginSystem;
|
|
29105
|
+
var jsonScene, _jsonScene_plugins, plugins, pluginSystem;
|
|
29097
29106
|
return __generator(this, function(_state) {
|
|
29098
29107
|
switch(_state.label){
|
|
29099
29108
|
case 0:
|
|
29100
29109
|
jsonScene = getStandardJSON(json);
|
|
29101
|
-
|
|
29110
|
+
_jsonScene_plugins = jsonScene.plugins, plugins = _jsonScene_plugins === void 0 ? [] : _jsonScene_plugins;
|
|
29111
|
+
pluginSystem = new PluginSystem(plugins);
|
|
29102
29112
|
return [
|
|
29103
29113
|
4,
|
|
29104
29114
|
pluginSystem.processRawJSON(jsonScene, _this.options)
|
|
@@ -31649,7 +31659,7 @@ registerPlugin("sprite", SpriteLoader, exports.VFXItem);
|
|
|
31649
31659
|
registerPlugin("particle", ParticleLoader, exports.VFXItem);
|
|
31650
31660
|
registerPlugin("cal", CalculateLoader, exports.VFXItem);
|
|
31651
31661
|
registerPlugin("interact", InteractLoader, exports.VFXItem);
|
|
31652
|
-
var version$1 = "2.4.1
|
|
31662
|
+
var version$1 = "2.4.1";
|
|
31653
31663
|
logger.info("Core version: " + version$1 + ".");
|
|
31654
31664
|
|
|
31655
31665
|
var _obj;
|
|
@@ -33251,7 +33261,7 @@ setMaxSpriteMeshItemCount(8);
|
|
|
33251
33261
|
*/ Mesh.create = function(engine, props) {
|
|
33252
33262
|
return new ThreeMesh(engine, props);
|
|
33253
33263
|
};
|
|
33254
|
-
var version = "2.4.1
|
|
33264
|
+
var version = "2.4.1";
|
|
33255
33265
|
logger.info("THREEJS plugin version: " + version + ".");
|
|
33256
33266
|
|
|
33257
33267
|
exports.AbstractPlugin = AbstractPlugin;
|