@galacean/effects-threejs 2.10.0 → 2.10.2

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 runtime threejs plugin for the web
4
4
  * Author: Ant Group CO., Ltd.
5
5
  * Contributors: 燃然,飂兮,十弦,云垣,茂安,意绮
6
- * Version: v2.10.0
6
+ * Version: v2.10.2
7
7
  */
8
8
 
9
9
  'use strict';
@@ -25334,16 +25334,19 @@ var EventSystem = /*#__PURE__*/ function(EventEmitter) {
25334
25334
  *
25335
25335
  * Rebind or unbind only while there are no active key, mouse, touch, or drag sessions.
25336
25336
  */ _proto.bindListeners = function bindListeners(target) {
25337
+ var _target_style;
25337
25338
  this.unbindListeners();
25338
25339
  this.target = target;
25339
25340
  if (!target || typeof window === "undefined") {
25340
25341
  return;
25341
25342
  }
25342
- if (!target.hasAttribute("tabindex")) {
25343
+ // Mini-program canvas adapters support input events but may not implement
25344
+ // the full HTMLElement attribute and CSSStyleDeclaration APIs.
25345
+ if (typeof target.hasAttribute === "function" && typeof target.removeAttribute === "function" && !target.hasAttribute("tabindex")) {
25343
25346
  target.tabIndex = 0;
25344
25347
  this.addedTabIndex = true;
25345
25348
  }
25346
- if (!target.style.outline) {
25349
+ if (typeof ((_target_style = target.style) == null ? void 0 : _target_style.removeProperty) === "function" && !target.style.outline) {
25347
25350
  target.style.outline = "none";
25348
25351
  this.addedOutlineStyle = true;
25349
25352
  }
@@ -25744,7 +25747,9 @@ var EventSystem = /*#__PURE__*/ function(EventEmitter) {
25744
25747
  };
25745
25748
  _proto.focusTarget = function focusTarget() {
25746
25749
  var _this_target;
25747
- (_this_target = this.target) == null ? void 0 : _this_target.focus();
25750
+ if (typeof ((_this_target = this.target) == null ? void 0 : _this_target.focus) === "function") {
25751
+ this.target.focus();
25752
+ }
25748
25753
  };
25749
25754
  _proto.resetInputState = function resetInputState() {
25750
25755
  this.mouseState = null;
@@ -37881,7 +37886,7 @@ function getStandardSpriteContent(sprite, transform) {
37881
37886
  return ret;
37882
37887
  }
37883
37888
 
37884
- var version$2 = "2.10.0";
37889
+ var version$2 = "2.10.2";
37885
37890
  var v0 = /^(\d+)\.(\d+)\.(\d+)(-(\w+)\.\d+)?$/;
37886
37891
  var standardVersion = /^(\d+)\.(\d+)$/;
37887
37892
  var reverseParticle = false;
@@ -42279,6 +42284,8 @@ var DEFAULT_FPS = 60;
42279
42284
  _this.canvas = canvas;
42280
42285
  var _options_env;
42281
42286
  _this.env = (_options_env = options == null ? void 0 : options.env) != null ? _options_env : "";
42287
+ var _options_ownsCanvas;
42288
+ _this.ownsCanvas = (_options_ownsCanvas = options == null ? void 0 : options.ownsCanvas) != null ? _options_ownsCanvas : true;
42282
42289
  var _options_doNotHandleContextLost;
42283
42290
  _this.doNotHandleContextLost = (_options_doNotHandleContextLost = options == null ? void 0 : options.doNotHandleContextLost) != null ? _options_doNotHandleContextLost : true;
42284
42291
  var _options_name;
@@ -43110,7 +43117,7 @@ registerPlugin("text", TextLoader);
43110
43117
  registerPlugin("sprite", SpriteLoader);
43111
43118
  registerPlugin("particle", ParticleLoader);
43112
43119
  registerPlugin("interact", InteractLoader);
43113
- var version$1 = "2.10.0";
43120
+ var version$1 = "2.10.2";
43114
43121
  logger.info("Core version: " + version$1 + ".");
43115
43122
 
43116
43123
  var _obj;
@@ -44603,7 +44610,7 @@ applyMixins(exports.ThreeTextComponent, [
44603
44610
  */ Mesh.create = function(engine, props) {
44604
44611
  return new ThreeMesh(engine, props);
44605
44612
  };
44606
- var version = "2.10.0";
44613
+ var version = "2.10.2";
44607
44614
  logger.info("THREEJS plugin version: " + version + ".");
44608
44615
 
44609
44616
  exports.ATLAS_SIZE = ATLAS_SIZE;