BoneTrack.js 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. function BoneTrack() {
  2. Object.defineProperties(this, {
  3. 'scaleX': { enumerable: true, configurable: true, get: BoneTrack.prototype.__get_scaleX, set: BoneTrack.prototype.__set_scaleX},
  4. 'scaleY': { enumerable: true, configurable: true, get: BoneTrack.prototype.__get_scaleY, set: BoneTrack.prototype.__set_scaleY},
  5. 'scaleZ': { enumerable: true, configurable: true, get: BoneTrack.prototype.__get_scaleZ, set: BoneTrack.prototype.__set_scaleZ},
  6. 'QuatW': { enumerable: true, configurable: true, get: BoneTrack.prototype.__get_QuatW, set: BoneTrack.prototype.__set_QuatW},
  7. 'QuatX': { enumerable: true, configurable: true, get: BoneTrack.prototype.__get_QuatX, set: BoneTrack.prototype.__set_QuatX},
  8. 'QuatY': { enumerable: true, configurable: true, get: BoneTrack.prototype.__get_QuatY, set: BoneTrack.prototype.__set_QuatY},
  9. 'QuatZ': { enumerable: true, configurable: true, get: BoneTrack.prototype.__get_QuatZ, set: BoneTrack.prototype.__set_QuatZ},
  10. 'LocX': { enumerable: true, configurable: true, get: BoneTrack.prototype.__get_LocX, set: BoneTrack.prototype.__set_LocX},
  11. 'LocY': { enumerable: true, configurable: true, get: BoneTrack.prototype.__get_LocY, set: BoneTrack.prototype.__set_LocY},
  12. 'LocZ': { enumerable: true, configurable: true, get: BoneTrack.prototype.__get_LocZ, set: BoneTrack.prototype.__set_LocZ},
  13. 'position': { enumerable: true, configurable: true, get: BoneTrack.prototype.__get_position, set: BoneTrack.prototype.__set_position},
  14. 'scale': { enumerable: true, configurable: true, get: BoneTrack.prototype.__get_scale, set: BoneTrack.prototype.__set_scale},
  15. 'boneQuat': { enumerable: true, configurable: true, get: BoneTrack.prototype.__get_boneQuat, set: BoneTrack.prototype.__set_boneQuat},
  16. 'quatCurve': { enumerable: true, configurable: true, get: BoneTrack.prototype.__get_quatCurve, set: BoneTrack.prototype.__set_quatCurve},
  17. 'weight': { enumerable: true, configurable: true, get: BoneTrack.prototype.__get_weight, set: BoneTrack.prototype.__set_weight}
  18. })
  19. }
  20. BoneTrack.prototype.__get_scaleX = function() {
  21. var retVal = new BezierCurve()
  22. retVal.__ptr = Polycode.BoneTrack__get_scaleX(this.__ptr)
  23. return retVal
  24. }
  25. BoneTrack.prototype.__set_scaleX = function(val) {
  26. Polycode.BoneTrack__set_scaleX(this.__ptr, val.__ptr)
  27. }
  28. BoneTrack.prototype.__get_scaleY = function() {
  29. var retVal = new BezierCurve()
  30. retVal.__ptr = Polycode.BoneTrack__get_scaleY(this.__ptr)
  31. return retVal
  32. }
  33. BoneTrack.prototype.__set_scaleY = function(val) {
  34. Polycode.BoneTrack__set_scaleY(this.__ptr, val.__ptr)
  35. }
  36. BoneTrack.prototype.__get_scaleZ = function() {
  37. var retVal = new BezierCurve()
  38. retVal.__ptr = Polycode.BoneTrack__get_scaleZ(this.__ptr)
  39. return retVal
  40. }
  41. BoneTrack.prototype.__set_scaleZ = function(val) {
  42. Polycode.BoneTrack__set_scaleZ(this.__ptr, val.__ptr)
  43. }
  44. BoneTrack.prototype.__get_QuatW = function() {
  45. var retVal = new BezierCurve()
  46. retVal.__ptr = Polycode.BoneTrack__get_QuatW(this.__ptr)
  47. return retVal
  48. }
  49. BoneTrack.prototype.__set_QuatW = function(val) {
  50. Polycode.BoneTrack__set_QuatW(this.__ptr, val.__ptr)
  51. }
  52. BoneTrack.prototype.__get_QuatX = function() {
  53. var retVal = new BezierCurve()
  54. retVal.__ptr = Polycode.BoneTrack__get_QuatX(this.__ptr)
  55. return retVal
  56. }
  57. BoneTrack.prototype.__set_QuatX = function(val) {
  58. Polycode.BoneTrack__set_QuatX(this.__ptr, val.__ptr)
  59. }
  60. BoneTrack.prototype.__get_QuatY = function() {
  61. var retVal = new BezierCurve()
  62. retVal.__ptr = Polycode.BoneTrack__get_QuatY(this.__ptr)
  63. return retVal
  64. }
  65. BoneTrack.prototype.__set_QuatY = function(val) {
  66. Polycode.BoneTrack__set_QuatY(this.__ptr, val.__ptr)
  67. }
  68. BoneTrack.prototype.__get_QuatZ = function() {
  69. var retVal = new BezierCurve()
  70. retVal.__ptr = Polycode.BoneTrack__get_QuatZ(this.__ptr)
  71. return retVal
  72. }
  73. BoneTrack.prototype.__set_QuatZ = function(val) {
  74. Polycode.BoneTrack__set_QuatZ(this.__ptr, val.__ptr)
  75. }
  76. BoneTrack.prototype.__get_LocX = function() {
  77. var retVal = new BezierCurve()
  78. retVal.__ptr = Polycode.BoneTrack__get_LocX(this.__ptr)
  79. return retVal
  80. }
  81. BoneTrack.prototype.__set_LocX = function(val) {
  82. Polycode.BoneTrack__set_LocX(this.__ptr, val.__ptr)
  83. }
  84. BoneTrack.prototype.__get_LocY = function() {
  85. var retVal = new BezierCurve()
  86. retVal.__ptr = Polycode.BoneTrack__get_LocY(this.__ptr)
  87. return retVal
  88. }
  89. BoneTrack.prototype.__set_LocY = function(val) {
  90. Polycode.BoneTrack__set_LocY(this.__ptr, val.__ptr)
  91. }
  92. BoneTrack.prototype.__get_LocZ = function() {
  93. var retVal = new BezierCurve()
  94. retVal.__ptr = Polycode.BoneTrack__get_LocZ(this.__ptr)
  95. return retVal
  96. }
  97. BoneTrack.prototype.__set_LocZ = function(val) {
  98. Polycode.BoneTrack__set_LocZ(this.__ptr, val.__ptr)
  99. }
  100. BoneTrack.prototype.__get_position = function() {
  101. var retVal = new Vector3()
  102. retVal.__ptr = Polycode.BoneTrack__get_position(this.__ptr)
  103. return retVal
  104. }
  105. BoneTrack.prototype.__set_position = function(val) {
  106. Polycode.BoneTrack__set_position(this.__ptr, val.__ptr)
  107. }
  108. BoneTrack.prototype.__get_scale = function() {
  109. var retVal = new Vector3()
  110. retVal.__ptr = Polycode.BoneTrack__get_scale(this.__ptr)
  111. return retVal
  112. }
  113. BoneTrack.prototype.__set_scale = function(val) {
  114. Polycode.BoneTrack__set_scale(this.__ptr, val.__ptr)
  115. }
  116. BoneTrack.prototype.__get_boneQuat = function() {
  117. var retVal = new Quaternion()
  118. retVal.__ptr = Polycode.BoneTrack__get_boneQuat(this.__ptr)
  119. return retVal
  120. }
  121. BoneTrack.prototype.__set_boneQuat = function(val) {
  122. Polycode.BoneTrack__set_boneQuat(this.__ptr, val.__ptr)
  123. }
  124. BoneTrack.prototype.__get_quatCurve = function() {
  125. var retVal = new QuaternionCurve()
  126. retVal.__ptr = Polycode.BoneTrack__get_quatCurve(this.__ptr)
  127. return retVal
  128. }
  129. BoneTrack.prototype.__set_quatCurve = function(val) {
  130. Polycode.BoneTrack__set_quatCurve(this.__ptr, val.__ptr)
  131. }
  132. BoneTrack.prototype.__get_weight = function() {
  133. return Polycode.BoneTrack__get_weight(this.__ptr)
  134. }
  135. BoneTrack.prototype.__set_weight = function(val) {
  136. Polycode.BoneTrack__set_weight(this.__ptr, val)
  137. }
  138. Duktape.fin(BoneTrack.prototype, function (x) {
  139. if (x === BoneTrack.prototype) {
  140. return;
  141. }
  142. Polycode.BoneTrack__delete(x.__ptr)
  143. })
  144. BoneTrack.prototype.Play = function(once) {
  145. Polycode.BoneTrack_Play(this.__ptr, once)
  146. }
  147. BoneTrack.prototype.Stop = function() {
  148. Polycode.BoneTrack_Stop(this.__ptr)
  149. }
  150. BoneTrack.prototype.Update = function(elapsed) {
  151. Polycode.BoneTrack_Update(this.__ptr, elapsed)
  152. }
  153. BoneTrack.prototype.Reset = function() {
  154. Polycode.BoneTrack_Reset(this.__ptr)
  155. }
  156. BoneTrack.prototype.setSpeed = function(speed) {
  157. Polycode.BoneTrack_setSpeed(this.__ptr, speed)
  158. }