Home Reference Source Repository

js/SceneKit/SCNAnimation.js

  1. 'use strict'
  2.  
  3. import NSObject from '../ObjectiveC/NSObject'
  4. //import CAAnimation from '../QuartzCore/CAAnimation'
  5. //import SCNTimingFunction from './SCNTimingFunction'
  6.  
  7. /**
  8. *
  9. * @access public
  10. * @extends {NSObject}
  11. * @implements {SCNAnimationProtocol}
  12. * @see https://developer.apple.com/documentation/scenekit/scnanimation
  13. */
  14. export default class SCNAnimation extends NSObject {
  15.  
  16. // Initializers
  17.  
  18. /**
  19. *
  20. * @access public
  21. * @param {CAAnimation} caAnimation -
  22. * @returns {void}
  23. * @see https://developer.apple.com/documentation/scenekit/scnanimation/2866056-init
  24. */
  25. constructor(caAnimation) {
  26. super()
  27.  
  28. // Instance Properties
  29.  
  30. /**
  31. *
  32. * @type {?SCNAnimationDidStartBlock}
  33. * @see https://developer.apple.com/documentation/scenekit/scnanimation/2866063-animationdidstart
  34. */
  35. this.animationDidStart = null
  36.  
  37. /**
  38. *
  39. * @type {?SCNAnimationDidStopBlock}
  40. * @see https://developer.apple.com/documentation/scenekit/scnanimation/2866040-animationdidstop
  41. */
  42. this.animationDidStop = null
  43.  
  44. /**
  45. *
  46. * @type {?SCNAnimationEvent[]}
  47. * @see https://developer.apple.com/documentation/scenekit/scnanimation/2866038-animationevents
  48. */
  49. this.animationEvents = null
  50.  
  51. /**
  52. *
  53. * @type {boolean}
  54. * @see https://developer.apple.com/documentation/scenekit/scnanimation/2878140-autoreverses
  55. */
  56. this.autoreverses = false
  57.  
  58. /**
  59. *
  60. * @type {number}
  61. * @see https://developer.apple.com/documentation/scenekit/scnanimation/2881689-blendinduration
  62. */
  63. this.blendInDuration = 0
  64.  
  65. /**
  66. *
  67. * @type {number}
  68. * @see https://developer.apple.com/documentation/scenekit/scnanimation/2881690-blendoutduration
  69. */
  70. this.blendOutDuration = 0
  71.  
  72. /**
  73. *
  74. * @type {number}
  75. * @see https://developer.apple.com/documentation/scenekit/scnanimation/2866057-duration
  76. */
  77. this.duration = 0
  78.  
  79. /**
  80. *
  81. * @type {boolean}
  82. * @see https://developer.apple.com/documentation/scenekit/scnanimation/2878138-fillsbackward
  83. */
  84. this.fillsBackward = false
  85.  
  86. /**
  87. *
  88. * @type {boolean}
  89. * @see https://developer.apple.com/documentation/scenekit/scnanimation/2878132-fillsforward
  90. */
  91. this.fillsForward = false
  92.  
  93. /**
  94. *
  95. * @type {boolean}
  96. * @see https://developer.apple.com/documentation/scenekit/scnanimation/2866062-isadditive
  97. */
  98. this.isAdditive = false
  99.  
  100. /**
  101. *
  102. * @type {boolean}
  103. * @see https://developer.apple.com/documentation/scenekit/scnanimation/2878139-isappliedoncompletion
  104. */
  105. this.isAppliedOnCompletion = false
  106.  
  107. /**
  108. *
  109. * @type {boolean}
  110. * @see https://developer.apple.com/documentation/scenekit/scnanimation/2866047-iscumulative
  111. */
  112. this.isCumulative = false
  113.  
  114. /**
  115. *
  116. * @type {boolean}
  117. * @see https://developer.apple.com/documentation/scenekit/scnanimation/2878126-isremovedoncompletion
  118. */
  119. this.isRemovedOnCompletion = false
  120.  
  121. /**
  122. *
  123. * @type {?string}
  124. * @see https://developer.apple.com/documentation/scenekit/scnanimation/2878148-keypath
  125. */
  126. this.keyPath = null
  127.  
  128. /**
  129. *
  130. * @type {number}
  131. * @see https://developer.apple.com/documentation/scenekit/scnanimation/2878146-repeatcount
  132. */
  133. this.repeatCount = 0
  134.  
  135. /**
  136. *
  137. * @type {number}
  138. * @see https://developer.apple.com/documentation/scenekit/scnanimation/2878135-startdelay
  139. */
  140. this.startDelay = 0
  141.  
  142. /**
  143. *
  144. * @type {number}
  145. * @see https://developer.apple.com/documentation/scenekit/scnanimation/2878147-timeoffset
  146. */
  147. this.timeOffset = 0
  148.  
  149. /**
  150. *
  151. * @type {SCNTimingFunction}
  152. * @see https://developer.apple.com/documentation/scenekit/scnanimation/2878143-timingfunction
  153. */
  154. this.timingFunction = null
  155.  
  156. /**
  157. *
  158. * @type {boolean}
  159. * @see https://developer.apple.com/documentation/scenekit/scnanimation/2878127-usesscenetimebase
  160. */
  161. this.usesSceneTimeBase = false
  162.  
  163. /**
  164. * @access private
  165. * @type {CAAnimation}
  166. */
  167. this._animation = caAnimation
  168. }
  169.  
  170. /**
  171. *
  172. * @access public
  173. * @param {string} animationUrl -
  174. * @returns {SCNAnimation} -
  175. * @see https://developer.apple.com/documentation/scenekit/scnanimation/2866053-init
  176. */
  177. static animationWithContentsOf(animationUrl) {
  178. // TODO: implement
  179. }
  180.  
  181. /**
  182. *
  183. * @access public
  184. * @param {string} animationName -
  185. * @returns {SCNAnimation} -
  186. * @see https://developer.apple.com/documentation/scenekit/scnanimation/2866042-init
  187. */
  188. static animationNamed(animationName) {
  189. // TODO: implement
  190. }
  191. }