Add play and stop animation actions in runtime interaction system and update scene build to include animation properties
This commit is contained in:
@@ -214,6 +214,12 @@ export class RuntimeInteractionSystem {
|
|||||||
case "toggleVisibility":
|
case "toggleVisibility":
|
||||||
dispatcher.toggleBrushVisibility(link.action.targetBrushId, link.action.visible, link);
|
dispatcher.toggleBrushVisibility(link.action.targetBrushId, link.action.visible, link);
|
||||||
break;
|
break;
|
||||||
|
case "playAnimation":
|
||||||
|
dispatcher.playAnimation(link.action.targetModelInstanceId, link.action.clipName, link);
|
||||||
|
break;
|
||||||
|
case "stopAnimation":
|
||||||
|
dispatcher.stopAnimation(link.action.targetModelInstanceId, link);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -224,7 +224,9 @@ function buildRuntimeModelInstance(modelInstance: SceneDocument["modelInstances"
|
|||||||
name: modelInstance.name,
|
name: modelInstance.name,
|
||||||
position: cloneVec3(modelInstance.position),
|
position: cloneVec3(modelInstance.position),
|
||||||
rotationDegrees: cloneVec3(modelInstance.rotationDegrees),
|
rotationDegrees: cloneVec3(modelInstance.rotationDegrees),
|
||||||
scale: cloneVec3(modelInstance.scale)
|
scale: cloneVec3(modelInstance.scale),
|
||||||
|
animationClipName: modelInstance.animationClipName,
|
||||||
|
animationAutoplay: modelInstance.animationAutoplay
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user