BoneTrack.js 6.5 KB

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