Source: extern/animation.js

  1. import register from "../util/register.js";
  2. import m_anim_fact from "../intern/animation.js";
  3. import m_obj_util_fact from "../intern/obj_util.js";
  4. import m_print_fact from "../intern/print.js";
  5. /**
  6. * API methods for animation.
  7. * @see https://www.blend4web.com/doc/en/animation.html
  8. * @module animation
  9. * @local AnimFinishCallback
  10. * @local AnimBehavior
  11. * @local AnimType
  12. * @local AnimSlot
  13. */
  14. function Animation(ns, exports) {
  15. var m_anim = m_anim_fact(ns);
  16. var m_obj_util = m_obj_util_fact(ns);
  17. var m_print = m_print_fact(ns);
  18. /**
  19. * Animation finish callback.
  20. * @callback AnimFinishCallback
  21. * @param {Object3D} obj Animated object.
  22. * @param {AnimSlot} slot_num Animation slot.
  23. */
  24. /**
  25. * Animation blending finish callback.
  26. * @callback AnimBlendingCallback
  27. */
  28. /**
  29. * Animation behavior enum.
  30. * @see {@link module:animation.AB_CYCLIC},
  31. * {@link module:animation.AB_FINISH_RESET},
  32. * {@link module:animation.AB_FINISH_STOP}
  33. * @typedef {number} AnimBehavior
  34. */
  35. /**
  36. * Animation type enum. One of OBJ_ANIM_TYPE_*.
  37. * @typedef {number} AnimType
  38. */
  39. /**
  40. * Animation slot enum. One of SLOT_*.
  41. * @typedef {number} AnimSlot
  42. */
  43. /**
  44. * Object's animation slot 0.
  45. * @const {AnimSlot} module:animation.SLOT_0
  46. */
  47. exports.SLOT_0 = m_anim.SLOT_0;
  48. /**
  49. * Object's animation slot 1.
  50. * @const {AnimSlot} module:animation.SLOT_1
  51. */
  52. exports.SLOT_1 = m_anim.SLOT_1;
  53. /**
  54. * Object's animation slot 2.
  55. * @const {AnimSlot} module:animation.SLOT_2
  56. */
  57. exports.SLOT_2 = m_anim.SLOT_2;
  58. /**
  59. * Object's animation slot 3.
  60. * @const {AnimSlot} module:animation.SLOT_3
  61. */
  62. exports.SLOT_3 = m_anim.SLOT_3;
  63. /**
  64. * Object's animation slot 4.
  65. * @const {AnimSlot} module:animation.SLOT_4
  66. */
  67. exports.SLOT_4 = m_anim.SLOT_4;
  68. /**
  69. * Object's animation slot 5.
  70. * @const {AnimSlot} module:animation.SLOT_5
  71. */
  72. exports.SLOT_5 = m_anim.SLOT_5;
  73. /**
  74. * Object's animation slot 6.
  75. * @const {AnimSlot} module:animation.SLOT_6
  76. */
  77. exports.SLOT_6 = m_anim.SLOT_6;
  78. /**
  79. * Object's animation slot 7.
  80. * @const {AnimSlot} module:animation.SLOT_7
  81. */
  82. exports.SLOT_7 = m_anim.SLOT_7;
  83. /**
  84. * All object's animation slots.
  85. * @const {AnimSlot} module:animation.SLOT_ALL
  86. */
  87. exports.SLOT_ALL = m_anim.SLOT_ALL;
  88. /**
  89. * Animation type: none.
  90. * @const {AnimType} module:animation.OBJ_ANIM_TYPE_NONE
  91. */
  92. exports.OBJ_ANIM_TYPE_NONE = m_anim.OBJ_ANIM_TYPE_NONE;
  93. /**
  94. * Animation type: armature.
  95. * @const {AnimType} module:animation.OBJ_ANIM_TYPE_ARMATURE
  96. */
  97. exports.OBJ_ANIM_TYPE_ARMATURE = m_anim.OBJ_ANIM_TYPE_ARMATURE;
  98. /**
  99. * Animation type: object.
  100. * @const {AnimType} module:animation.OBJ_ANIM_TYPE_OBJECT
  101. */
  102. exports.OBJ_ANIM_TYPE_OBJECT = m_anim.OBJ_ANIM_TYPE_OBJECT;
  103. /**
  104. * Animation type: vertex.
  105. * @const {AnimType} module:animation.OBJ_ANIM_TYPE_VERTEX
  106. */
  107. exports.OBJ_ANIM_TYPE_VERTEX = m_anim.OBJ_ANIM_TYPE_VERTEX;
  108. /**
  109. * Animation type: sound.
  110. * @const {AnimType} module:animation.OBJ_ANIM_TYPE_SOUND
  111. */
  112. exports.OBJ_ANIM_TYPE_SOUND = m_anim.OBJ_ANIM_TYPE_SOUND;
  113. /**
  114. * Animation type: particles.
  115. * @const {AnimType} module:animation.OBJ_ANIM_TYPE_PARTICLES
  116. */
  117. exports.OBJ_ANIM_TYPE_PARTICLES = m_anim.OBJ_ANIM_TYPE_PARTICLES;
  118. /**
  119. * Animation type: material.
  120. * @const {AnimType} module:animation.OBJ_ANIM_TYPE_MATERIAL
  121. */
  122. exports.OBJ_ANIM_TYPE_MATERIAL = m_anim.OBJ_ANIM_TYPE_MATERIAL;
  123. /**
  124. * Animation type: static.
  125. * @const {AnimType} module:animation.OBJ_ANIM_TYPE_STATIC
  126. */
  127. exports.OBJ_ANIM_TYPE_STATIC = m_anim.OBJ_ANIM_TYPE_STATIC;
  128. /**
  129. * Animation behavior: cyclic.
  130. * @const {AnimBehavior} module:animation.AB_CYCLIC
  131. */
  132. exports.AB_CYCLIC = m_anim.AB_CYCLIC;
  133. /**
  134. * Animation behavior: go back to the zero frame after finishing.
  135. * @const {AnimBehavior} module:animation.AB_FINISH_RESET
  136. */
  137. exports.AB_FINISH_RESET = m_anim.AB_FINISH_RESET;
  138. /**
  139. * Animation behavior: stop the animation after finishing.
  140. * @const {AnimBehavior} module:animation.AB_FINISH_STOP
  141. */
  142. exports.AB_FINISH_STOP = m_anim.AB_FINISH_STOP;
  143. /**
  144. * Check if the object is animated.
  145. * @method module:animation.is_animated
  146. * @param {Object3D} obj Object 3D
  147. * @returns {boolean} Checking result.
  148. */
  149. exports.is_animated = function(obj) {
  150. return m_anim.is_animated(obj);
  151. }
  152. /**
  153. * Return the names of all available animations.
  154. * @method module:animation.get_anim_names
  155. * @param {Object3D} obj Object 3D
  156. * @returns {string[]} Array of animation names.
  157. */
  158. exports.get_anim_names = function(obj) {
  159. if (!m_anim.obj_is_animatable(obj))
  160. return [];
  161. return m_anim.get_anim_names(obj);
  162. }
  163. /**
  164. * Return the name of the applied animation.
  165. * @method module:animation.get_current_anim_name
  166. * @param {Object3D} obj Object 3D
  167. * @param {AnimSlot} [slot_num = SLOT_0] Animation slot number
  168. * @returns {?string} Current animation name or null.
  169. */
  170. exports.get_current_anim_name = function(obj, slot_num) {
  171. if (!m_anim.is_animated(obj))
  172. return null;
  173. slot_num = slot_num || m_anim.SLOT_0;
  174. return m_anim.get_anim_by_slot_num(obj, slot_num);
  175. }
  176. /**
  177. * Apply the animation to the object.
  178. * @method module:animation.apply
  179. * @param {Object3D} obj Object 3D
  180. * @param {string} name Animation name
  181. * @param {AnimSlot} [slot_num = SLOT_0] Animation slot number.
  182. */
  183. exports.apply = function(obj, name, slot_num) {
  184. if (slot_num > m_anim.SLOT_7) {
  185. m_print.error("Can't apply animation to slot " + slot_num +
  186. " for object \"" + obj.name +
  187. "\". Object can have maximum of 8 animation slots");
  188. return;
  189. }
  190. slot_num = slot_num || m_anim.SLOT_0;
  191. if (m_anim.is_animated(obj)) {
  192. var applied_slot = m_anim.get_slot_num_by_anim(obj, name);
  193. if (applied_slot != -1 && applied_slot != slot_num) {
  194. m_print.error("Animation \"" + name +
  195. "\" is already applied to object \"" + obj.name +
  196. "\" (slot \"" + applied_slot + "\").");
  197. return;
  198. }
  199. }
  200. if (!m_anim.validate_action_by_name(obj, name)) {
  201. m_print.error("No fcurves in action \"" + name + "\"");
  202. return;
  203. }
  204. m_anim.apply(obj, null, name, slot_num);
  205. }
  206. /**
  207. * Apply the animation to the object.
  208. * @method module:animation.apply_ext
  209. * @param {Object3D} obj Object 3D
  210. * @param {?String[]} name_list Array of material and nested groups names and
  211. * animation name.
  212. * @param {AnimSlot} [slot_num = SLOT_0] Animation slot number.
  213. */
  214. exports.apply_ext = function(obj, name_list, slot_num) {
  215. if (slot_num > m_anim.SLOT_7) {
  216. m_print.error("Can't apply animation to slot " + slot_num +
  217. " for object \"" + obj.name +
  218. "\". Object can have maximum of 8 animation slots");
  219. return;
  220. }
  221. slot_num = slot_num || m_anim.SLOT_0;
  222. var name = name_list[0];
  223. if (!m_anim.validate_action_by_name(obj, name)) {
  224. m_print.error("No fcurves in action \"" + name + "\"");
  225. return;
  226. }
  227. var new_name_list = name_list.slice(1);
  228. m_anim.apply(obj, new_name_list, name, slot_num);
  229. }
  230. /**
  231. * Remove the animation from the object.
  232. * @method module:animation.remove
  233. * @param {Object3D} obj Object 3D
  234. */
  235. exports.remove = function(obj) {
  236. m_anim.remove(obj);
  237. }
  238. /**
  239. * Remove the animation from the given animation slot of the object.
  240. * @method module:animation.remove_slot_animation
  241. * @param {Object3D} obj Object 3D
  242. * @param {AnimSlot} [slot_num = SLOT_0] Animation slot number.
  243. */
  244. exports.remove_slot_animation = function(obj, slot_num) {
  245. if (!m_anim.is_animated(obj))
  246. return;
  247. slot_num = slot_num || m_anim.SLOT_0;
  248. m_anim.remove_slot_animation(obj, slot_num);
  249. }
  250. /**
  251. * Apply the default animation (i.e. assigned in Blender) to the object.
  252. * @method module:animation.apply_def
  253. * @param {Object3D} obj Object 3D
  254. */
  255. exports.apply_def = function(obj) {
  256. m_anim.apply_def(obj);
  257. }
  258. /**
  259. * Play the object's animation.
  260. * The animation must be applied to the object before,
  261. * or the object must have the default animation (i.e. assigned in Blender).
  262. * @method module:animation.play
  263. * @param {Object3D} obj Object 3D
  264. * @param {AnimFinishCallback} [finish_callback] Callback to execute on finished animation
  265. * @param {AnimSlot} [slot_num = SLOT_0] Animation slot number.
  266. */
  267. exports.play = function(obj, finish_callback, slot_num) {
  268. if (!m_anim.is_animated(obj)) {
  269. m_print.error("Object \"" + obj.name + "\" has no applied animation");
  270. return;
  271. }
  272. slot_num = slot_num || m_anim.SLOT_0;
  273. m_anim.play(obj, finish_callback, slot_num);
  274. m_anim.update_object_animation(obj, 0, slot_num, true);
  275. }
  276. /**
  277. * Stop the object's animation.
  278. * @method module:animation.stop
  279. * @param {Object3D} obj Object 3D
  280. * @param {AnimSlot} [slot_num = SLOT_0] Animation slot number
  281. */
  282. exports.stop = function(obj, slot_num) {
  283. if (m_anim.is_animated(obj)) {
  284. slot_num = slot_num || m_anim.SLOT_0;
  285. m_anim.stop(obj, slot_num);
  286. }
  287. }
  288. /**
  289. * Check if the object's animation is being played back.
  290. * @method module:animation.is_play
  291. * @param {Object3D} obj Object 3D
  292. * @param {AnimSlot} [slot_num = SLOT_0] Animation slot number
  293. * @returns {boolean} Checking result.
  294. */
  295. exports.is_play = function(obj, slot_num) {
  296. if (!m_anim.is_animated(obj))
  297. return false;
  298. slot_num = slot_num || m_anim.SLOT_0;
  299. return m_anim.is_play(obj, slot_num);
  300. }
  301. /**
  302. * Set the current frame of the object's animation.
  303. * @method module:animation.set_frame
  304. * @param {Object3D} obj Object 3D
  305. * @param {number} frame Current frame (float)
  306. * @param {AnimSlot} [slot_num = SLOT_0] Animation slot number
  307. */
  308. exports.set_frame = function(obj, frame, slot_num) {
  309. if (!m_anim.is_animated(obj))
  310. return;
  311. slot_num = slot_num || m_anim.SLOT_0;
  312. m_anim.set_frame(obj, frame, slot_num);
  313. }
  314. /**
  315. * Set the first frame of the object's animation.
  316. * @method module:animation.set_first_frame
  317. * @param {Object3D} obj Object 3D
  318. * @param {AnimSlot} [slot_num = SLOT_0] Animation slot number
  319. */
  320. exports.set_first_frame = function(obj, slot_num) {
  321. if (!m_anim.is_animated(obj))
  322. return;
  323. m_anim.set_first_frame(obj, slot_num);
  324. }
  325. /**
  326. * Set the last frame of the object's animation.
  327. * @method module:animation.set_last_frame
  328. * @param {Object3D} obj Object 3D
  329. * @param {AnimSlot} [slot_num = SLOT_0] Animation slot number
  330. */
  331. exports.set_last_frame = function(obj, slot_num) {
  332. if (!m_anim.is_animated(obj))
  333. return;
  334. slot_num = slot_num || m_anim.SLOT_0;
  335. var start = m_anim.get_anim_start_frame(obj, slot_num);
  336. var len = m_anim.get_anim_length(obj, slot_num);
  337. m_anim.set_frame(obj, start + len -
  338. m_anim.LAST_FRAME_EPSILON, slot_num);
  339. }
  340. /**
  341. * Get the current frame of the object's animation.
  342. * @method module:animation.get_frame
  343. * @param {Object3D} obj Object 3D
  344. * @param {AnimSlot} [slot_num = SLOT_0] Animation slot number
  345. * @returns {number} Current frame
  346. */
  347. exports.get_frame = function(obj, slot_num) {
  348. if (!m_anim.is_animated(obj))
  349. return 0.0;
  350. slot_num = slot_num || m_anim.SLOT_0;
  351. return m_anim.get_current_frame_float(obj, slot_num);
  352. }
  353. /**
  354. * Set the speed of the object's animation.
  355. * @method module:animation.set_speed
  356. * @param {Object3D} obj Object 3D
  357. * @param {number} speed Speed (may be negative) (float)
  358. * @param {AnimSlot} [slot_num = SLOT_0] Animation slot number
  359. */
  360. exports.set_speed = function(obj, speed, slot_num) {
  361. if (!m_anim.is_animated(obj))
  362. return;
  363. slot_num = slot_num || m_anim.SLOT_0;
  364. speed = speed || 1;
  365. m_anim.set_speed(obj, speed, slot_num);
  366. }
  367. /**
  368. * Get the speed of the object's animation.
  369. * @method module:animation.get_speed
  370. * @param {Object3D} obj Object 3D
  371. * @param {AnimSlot} [slot_num = SLOT_0] Animation slot number
  372. * @returns {number} Animation speed.
  373. */
  374. exports.get_speed = function(obj, slot_num) {
  375. if (!m_anim.is_animated(obj))
  376. return 0;
  377. slot_num = slot_num || m_anim.SLOT_0;
  378. if (!obj.anim_slots[slot_num])
  379. return 0;
  380. return m_anim.get_speed(obj, slot_num);
  381. }
  382. /**
  383. * Get the starting frame of the object's animation.
  384. * @method module:animation.get_anim_start_frame
  385. * @param {Object3D} obj Object 3D
  386. * @param {AnimSlot} [slot_num = SLOT_0] Animation slot number
  387. * @returns {number} Animation start frame or -1 for incorrect object
  388. */
  389. exports.get_anim_start_frame = function(obj, slot_num) {
  390. if (m_anim.is_animated(obj)) {
  391. slot_num = slot_num || m_anim.SLOT_0;
  392. if (!obj.anim_slots[slot_num])
  393. return -1;
  394. else
  395. return m_anim.get_anim_start_frame(obj, slot_num);
  396. }
  397. return -1;
  398. }
  399. /**
  400. * Get the length of the object's animation measured in frames.
  401. * @method module:animation.get_anim_length
  402. * @param {Object3D} obj Object 3D
  403. * @param {AnimSlot} [slot_num = SLOT_0] Animation slot number
  404. * @returns {number} Animation length or -1 for incorrect object
  405. */
  406. exports.get_anim_length = function(obj, slot_num) {
  407. if (m_anim.is_animated(obj)) {
  408. slot_num = slot_num || m_anim.SLOT_0;
  409. if (!obj.anim_slots[slot_num])
  410. return -1;
  411. else
  412. return m_anim.get_anim_length(obj, slot_num);
  413. }
  414. return -1;
  415. }
  416. /**
  417. * Set behavior for the object's animation.
  418. * @method module:animation.set_behavior
  419. * @param {Object3D} obj Object 3D
  420. * @param {AnimBehavior} behavior Behavior enum
  421. * @param {AnimSlot} [slot_num = SLOT_0] Animation slot number
  422. */
  423. exports.set_behavior = function(obj, behavior, slot_num) {
  424. if (!m_anim.is_animated(obj))
  425. return;
  426. slot_num = slot_num || m_anim.SLOT_0;
  427. m_anim.set_behavior(obj, behavior, slot_num);
  428. }
  429. /**
  430. * Get behavior of the object's animation.
  431. * @method module:animation.get_behavior
  432. * @param {Object3D} obj Object 3D
  433. * @param {AnimSlot} [slot_num = SLOT_0] Animation slot number
  434. * @returns {AnimBehavior} Behavior enum
  435. */
  436. exports.get_behavior = function(obj, slot_num) {
  437. if (!m_anim.is_animated(obj))
  438. return null;
  439. slot_num = slot_num || m_anim.SLOT_0;
  440. return m_anim.get_behavior(obj, slot_num);
  441. }
  442. /**
  443. * Apply smoothing to the object's animation.
  444. * In order to disable the smoothing, specify the zero periods.
  445. * @method module:animation.apply_smoothing
  446. * @param {Object3D} obj Object 3D
  447. * @param {number} [trans_period=0] Translation smoothing period
  448. * @param {number} [quat_period=0] Rotation smoothing period
  449. * @param {AnimSlot} [slot_num = SLOT_0] Animation slot number
  450. */
  451. exports.apply_smoothing = function(obj, trans_period, quat_period, slot_num) {
  452. slot_num = slot_num || m_anim.SLOT_0;
  453. if (m_anim.is_animated(obj))
  454. m_anim.apply_smoothing(obj, trans_period, quat_period, slot_num);
  455. }
  456. /**
  457. * Convert animation frames to seconds.
  458. * @method module:animation.frame_to_sec
  459. * @param {number} frame Frame number
  460. * @returns {number} Number of seconds
  461. */
  462. exports.frame_to_sec = function(frame) {
  463. return m_anim.frame_to_sec(frame);
  464. }
  465. /**
  466. * Get the slot number of the object to which the animation is assigned.
  467. * @method module:animation.get_slot_num_by_anim
  468. * @param {Object3D} obj Object 3D
  469. * @param {string} anim_name Animation name
  470. * @returns {?number} Animation slot number
  471. */
  472. exports.get_slot_num_by_anim = function(obj, anim_name) {
  473. if (!m_anim.is_animated(obj) || !anim_name)
  474. return -1;
  475. return m_anim.get_slot_num_by_anim(obj, anim_name);
  476. }
  477. /**
  478. * Get the object's animation type.
  479. * @method module:animation.get_anim_type
  480. * @param {Object3D} obj Object 3D
  481. * @param {AnimSlot} [slot_num = SLOT_0] Slot number
  482. * @returns {?AnimType} Animation type
  483. */
  484. exports.get_anim_type = function(obj, slot_num) {
  485. if (!m_anim.is_animated(obj))
  486. return null;
  487. return m_anim.get_anim_type(obj, slot_num);
  488. }
  489. /**
  490. * Apply the animation to the first available animation slot.
  491. * @method module:animation.apply_to_first_empty_slot
  492. * @param {Object3D} obj Object 3D
  493. * @param {string} name Animation name.
  494. * @returns {number} Slot number or -1 if no empty slots found.
  495. */
  496. exports.apply_to_first_empty_slot = function(obj, name) {
  497. return m_anim.apply_to_first_empty_slot(obj, name);
  498. }
  499. /**
  500. * Get the mix factor for the skeletal animations assigned to the last two animation slots.
  501. * @method module:animation.get_skel_mix_factor
  502. * @param {Object3D} armobj Armature object.
  503. * @returns {number} Mix factor.
  504. */
  505. exports.get_skel_mix_factor = function(armobj) {
  506. return armobj.render.anim_mix_factor;
  507. }
  508. /**
  509. * Set the mix factor for the skeletal animations assigned to the last two animation slots.
  510. * Specify the non-zero time for smooth animation transitions.
  511. * @method module:animation.set_skel_mix_factor
  512. * @param {Object3D} armobj Armature object.
  513. * @param {number} factor Target animation mix factor.
  514. * @param {number} [time=0] Time interval for changing the mix factor from
  515. * the current to the target value.
  516. * @param {AnimBlendingCallback} [callback=null] Callback to execute on finished blending.
  517. */
  518. exports.set_skel_mix_factor = function(armobj, factor, time, callback) {
  519. if (!m_obj_util.is_armature(armobj)) {
  520. m_print.error("Can't blend animation. Object \"" + armobj.name + "\" is not armature");
  521. return;
  522. }
  523. factor = Math.min(Math.max(factor, 0), 1);
  524. if (armobj.render.anim_mix_factor == factor)
  525. return;
  526. time = time || 0;
  527. callback = callback || null;
  528. m_anim.set_skel_mix_factor(armobj, factor, time, callback);
  529. }
  530. /**
  531. * Set the blended skeletal animation slots.
  532. * @method module:animation.set_skeletal_slots
  533. * @param {Object3D} armobj Armature object.
  534. * @param {number} [slot_1=-1] First blended animation slot.
  535. * @param {number} [slot_2=-1] Second blended animation slot.
  536. * @param {number} [factor=0] Start animation mix factor.
  537. */
  538. exports.set_skeletal_slots = function(armobj, slot_1, slot_2, factor) {
  539. slot_1 = slot_1 == undefined ? -1 : slot_1;
  540. slot_2 = slot_1 == undefined ? -1 : slot_2;
  541. factor = factor || 0;
  542. var render = armobj.render;
  543. var skeletal_slots = render.blend_skel_slots;
  544. if (slot_1 >= 0)
  545. skeletal_slots[0] = slot_1;
  546. if (slot_2 >= 0)
  547. skeletal_slots[1] = slot_2;
  548. armobj.render.anim_mix_factor = factor;
  549. }
  550. /**
  551. * Get the first blended animation slot.
  552. * @method module:animation.get_first_skeletal_slot
  553. * @param {Object3D} armobj Armature object.
  554. * @returns {slot_1} First blended animation slot.
  555. */
  556. exports.get_first_skeletal_slot = function(armobj) {
  557. return armobj.render.blend_skel_slots[0];
  558. }
  559. /**
  560. * Get the second blended animation slot.
  561. * @method module:animation.get_second_skeletal_slot
  562. * @param {Object3D} armobj Armature object.
  563. * @returns {slot_2} Second blended animation slot.
  564. */
  565. exports.get_second_skeletal_slot = function(armobj) {
  566. return armobj.render.blend_skel_slots[1];
  567. }
  568. /**
  569. * Set the mix factor for the skeletal animations assigned to the last two animation slots.
  570. * @method module:animation.mix_from_cur_pos
  571. * @param {Object3D} armobj Armature object.
  572. * @param {AnimSlot} slot Animation slot number.
  573. * @param {number} [time=0] Time interval for changing the mix factor from
  574. * the current to the target value.
  575. * @param {AnimBlendingCallback} [callback=null] Callback to execute on finished blending.
  576. */
  577. exports.mix_from_cur_pos = function(armobj, slot, time, callback) {
  578. callback = callback || null;
  579. time = time || 0;
  580. m_anim.mix_from_cur_pos(armobj, slot, time, callback);
  581. }
  582. }
  583. var animation_factory = register("animation", Animation);
  584. export default animation_factory;