@galacean/effects-plugin-spine 2.8.0-alpha.3 → 2.8.0-alpha.4

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 CHANGED
@@ -3,7 +3,7 @@
3
3
  * Description: Galacean Effects player spine plugin
4
4
  * Author: Ant Group CO., Ltd.
5
5
  * Contributors: 十弦
6
- * Version: v2.8.0-alpha.3
6
+ * Version: v2.8.0-alpha.4
7
7
  */
8
8
 
9
9
  'use strict';
@@ -54,6 +54,74 @@ function _inherits(subClass, superClass) {
54
54
  if (superClass) _set_prototype_of(subClass, superClass);
55
55
  }
56
56
 
57
+ function _is_native_reflect_construct() {
58
+ // Since Reflect.construct can't be properly polyfilled, some
59
+ // implementations (e.g. core-js@2) don't set the correct internal slots.
60
+ // Those polyfills don't allow us to subclass built-ins, so we need to
61
+ // use our fallback implementation.
62
+ try {
63
+ // If the internal slots aren't set, this throws an error similar to
64
+ // TypeError: this is not a Boolean object.
65
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
66
+ } catch (_) {}
67
+ return (_is_native_reflect_construct = function _is_native_reflect_construct() {
68
+ return !!result;
69
+ })();
70
+ }
71
+
72
+ function _construct(Parent, args, Class) {
73
+ if (_is_native_reflect_construct()) _construct = Reflect.construct;
74
+ else {
75
+ _construct = function construct(Parent, args, Class) {
76
+ var a = [
77
+ null
78
+ ];
79
+ a.push.apply(a, args);
80
+ var Constructor = Function.bind.apply(Parent, a);
81
+ var instance = new Constructor();
82
+ if (Class) _set_prototype_of(instance, Class.prototype);
83
+ return instance;
84
+ };
85
+ }
86
+ return _construct.apply(null, arguments);
87
+ }
88
+
89
+ function _get_prototype_of(o) {
90
+ _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
91
+ return o.__proto__ || Object.getPrototypeOf(o);
92
+ };
93
+ return _get_prototype_of(o);
94
+ }
95
+
96
+ function _is_native_function(fn) {
97
+ return Function.toString.call(fn).indexOf("[native code]") !== -1;
98
+ }
99
+
100
+ function _wrap_native_super(Class) {
101
+ var _cache = typeof Map === "function" ? new Map() : undefined;
102
+ _wrap_native_super = function _wrap_native_super(Class) {
103
+ if (Class === null || !_is_native_function(Class)) return Class;
104
+ if (typeof Class !== "function") throw new TypeError("Super expression must either be null or a function");
105
+ if (typeof _cache !== "undefined") {
106
+ if (_cache.has(Class)) return _cache.get(Class);
107
+ _cache.set(Class, Wrapper);
108
+ }
109
+ function Wrapper() {
110
+ return _construct(Class, arguments, _get_prototype_of(this).constructor);
111
+ }
112
+ Wrapper.prototype = Object.create(Class.prototype, {
113
+ constructor: {
114
+ value: Wrapper,
115
+ enumerable: false,
116
+ writable: true,
117
+ configurable: true
118
+ }
119
+ });
120
+ return _set_prototype_of(Wrapper, Class);
121
+ };
122
+ return _wrap_native_super(Class);
123
+ }
124
+
57
125
  function _array_like_to_array(arr, len) {
58
126
  if (len == null || len > arr.length) len = arr.length;
59
127
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
@@ -11548,17 +11616,17 @@ exports.SpineComponent = __decorate([
11548
11616
  EFFECTS.effectsClass(EFFECTS.spec.DataType.SpineComponent)
11549
11617
  ], exports.SpineComponent);
11550
11618
 
11551
- var SpineLoader = /*#__PURE__*/ function(AbstractPlugin) {
11552
- _inherits(SpineLoader, AbstractPlugin);
11619
+ var SpineLoader = /*#__PURE__*/ function(Plugin) {
11620
+ _inherits(SpineLoader, Plugin);
11553
11621
  function SpineLoader() {
11554
- return AbstractPlugin.apply(this, arguments);
11622
+ return Plugin.apply(this, arguments);
11555
11623
  }
11556
11624
  return SpineLoader;
11557
- }(EFFECTS.AbstractPlugin);
11625
+ }(_wrap_native_super(EFFECTS.Plugin));
11558
11626
  EFFECTS.registerPlugin("spine", SpineLoader);
11559
11627
  /**
11560
11628
  * 插件版本号
11561
- */ var version = "2.8.0-alpha.3";
11629
+ */ var version = "2.8.0-alpha.4";
11562
11630
  EFFECTS.logger.info("Plugin spine version: " + version + ".");
11563
11631
  if (version !== EFFECTS__namespace.version) {
11564
11632
  console.error("注意:请统一 Spine 插件与 Player 版本,不统一的版本混用会有不可预知的后果!", "\nAttention: Please ensure the Spine plugin is synchronized with the Player version. Mixing and matching incompatible versions may result in unpredictable consequences!");