@gamelearn/arcade-components 0.25.16 → 0.25.18

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.
@@ -47,12 +47,14 @@ var AnimationComponent = function AnimationComponent(_ref) {
47
47
  var scene = (0, _fiber.useThree)(function (state) {
48
48
  return state.scene;
49
49
  });
50
+ var loader = (0, _react.useMemo)(function () {
51
+ return new _GLTFLoader.GLTFLoader();
52
+ }, []);
50
53
  (0, _react.useEffect)(function () {
51
54
  setMounted(false);
52
55
  }, [resource.elementUid, animation.url]);
53
56
  (0, _react.useEffect)(function () {
54
57
  if (!mounted) {
55
- var loader = new _GLTFLoader.GLTFLoader();
56
58
  var object = scene.getObjectByProperty('elementUid', resource.elementUid);
57
59
 
58
60
  if (object) {
@@ -81,7 +83,7 @@ var AnimationComponent = function AnimationComponent(_ref) {
81
83
  });
82
84
  }
83
85
  }
84
- }, [scene, resource.elementUid, animation.url, loopTimes, emitEvent, mounted]);
86
+ }, [scene, resource.elementUid, animation.url, loopTimes, emitEvent, mounted, loader]);
85
87
  return null;
86
88
  };
87
89
 
@@ -113,6 +113,7 @@ var Element = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
113
113
 
114
114
  if (Object.keys(material).length > 0) {
115
115
  (0, _fiber.applyProps)(node.material, material);
116
+ node.material.alphaTest = material.alphaTest || 0.5;
116
117
  }
117
118
 
118
119
  if (node.material.map) node.material.map.encoding = _three.sRGBEncoding;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gamelearn/arcade-components",
3
3
  "license": "Gamelearn",
4
- "version": "0.25.16",
4
+ "version": "0.25.18",
5
5
  "main": "dist/index.js",
6
6
  "files": [
7
7
  "dist",