Home Reference Source Repository

js/base/CameraMotion.js

  1. 'use strict'
  2.  
  3. /**
  4. * CameraMotion class
  5. * @access public
  6. */
  7. export default class CameraMotion {
  8. /**
  9. * constructor
  10. * @access public
  11. * @constructor
  12. */
  13. constructor() {
  14. /** @type {string} */
  15. this.hashName = ''
  16.  
  17. /** @type {boolean} */
  18. this.loaded = false
  19.  
  20. /** @type {function} */
  21. this.onload = null
  22.  
  23. // motion
  24.  
  25. /** @type {Array<Motion>} */
  26. this.motionArray = []
  27.  
  28. /** @type {int} */
  29. this.frameLength = 0
  30.  
  31. /** @type {float} */
  32. this.defaultFPS = 0
  33.  
  34. /** @type {boolean} */
  35. this.loop = false
  36. }
  37.  
  38. /**
  39. * copy this motion object
  40. * @access public
  41. * @returns {CameraMotion} - new motion object
  42. */
  43. clone() {
  44. return this
  45. }
  46.  
  47. /**
  48. * set motion data
  49. * @access public
  50. * @param {Motion} motion -
  51. * @returns {void}
  52. */
  53. copy(motion) {
  54. this.motionArray = motion.motionArray
  55. this.frameLength = motion.frameLength
  56. this.defaultFPS = motion.defaultFPS
  57. this.loop = motion.loop
  58. }
  59. }