@gamelearn/arcade-components 0.25.12 → 0.25.14
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.
|
@@ -68,7 +68,7 @@ var SceneElements = function SceneElements(_ref) {
|
|
|
68
68
|
|
|
69
69
|
if (object.url && object.userData.resourceId) {
|
|
70
70
|
return /*#__PURE__*/_react.default.createElement(_element.default, _extends({
|
|
71
|
-
key: object.uid || "".concat(object.
|
|
71
|
+
key: object.uid || "".concat(object.userData.resourceId, "_").concat(i),
|
|
72
72
|
url: object.url,
|
|
73
73
|
position: object.position,
|
|
74
74
|
rotation: object.rotation,
|
|
@@ -90,12 +90,21 @@ var AnimateElement = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref)
|
|
|
90
90
|
var action = mixer.clipAction(clip, animationRef.current);
|
|
91
91
|
action.play();
|
|
92
92
|
|
|
93
|
+
if (animationRef.current.brother) {
|
|
94
|
+
animationRef.current.brother.updatePosition();
|
|
95
|
+
}
|
|
96
|
+
|
|
93
97
|
if (pauseAtStart) {
|
|
94
98
|
action.paused = true;
|
|
95
99
|
}
|
|
96
100
|
}
|
|
97
101
|
}
|
|
98
102
|
}, [mixer, animations, pauseAtStart, animationRef]);
|
|
103
|
+
(0, _react.useEffect)(function () {
|
|
104
|
+
if (model.brother) {
|
|
105
|
+
model.brother.updatePosition();
|
|
106
|
+
}
|
|
107
|
+
}, [model, position, rotation, currentProps.scale]);
|
|
99
108
|
return /*#__PURE__*/_react.default.createElement("group", {
|
|
100
109
|
visible: props.visible
|
|
101
110
|
}, enableBounding ? /*#__PURE__*/_react.default.createElement(_BoundingBox.default, _extends({
|
|
@@ -67,13 +67,13 @@ var ElementsList = function ElementsList(_ref) {
|
|
|
67
67
|
case 'object':
|
|
68
68
|
{
|
|
69
69
|
return /*#__PURE__*/_react.default.createElement(_element.default, _extends({
|
|
70
|
-
key: "".concat(element.uid),
|
|
70
|
+
key: "".concat(element.elementUid ? element.elementUid : element.uid),
|
|
71
71
|
url: element.url,
|
|
72
72
|
position: element.position,
|
|
73
73
|
rotation: element.rotation,
|
|
74
74
|
scale: element.scale,
|
|
75
75
|
layers: 1,
|
|
76
|
-
name: element.uid,
|
|
76
|
+
name: element.elementUid ? element.elementUid : element.uid,
|
|
77
77
|
visible: isVisible(element),
|
|
78
78
|
onClick: function onClick(e) {
|
|
79
79
|
return handleClick(e, element);
|