SkeletonAnimation.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. function SkeletonAnimation(name,duration) {
  2. if(arguments[0] != "__skip_ptr__") {
  3. this.__ptr = Polycode.SkeletonAnimation(name,duration)
  4. }
  5. }
  6. Duktape.fin(SkeletonAnimation.prototype, function (x) {
  7. if (x === SkeletonAnimation.prototype) {
  8. return;
  9. }
  10. Polycode.SkeletonAnimation__delete(x.__ptr)
  11. })
  12. SkeletonAnimation.prototype.addBoneTrack = function(boneTrack) {
  13. Polycode.SkeletonAnimation_addBoneTrack(this.__ptr, boneTrack.__ptr)
  14. }
  15. SkeletonAnimation.prototype.getName = function() {
  16. return Polycode.SkeletonAnimation_getName(this.__ptr)
  17. }
  18. SkeletonAnimation.prototype.Play = function(once) {
  19. Polycode.SkeletonAnimation_Play(this.__ptr, once)
  20. }
  21. SkeletonAnimation.prototype.Stop = function() {
  22. Polycode.SkeletonAnimation_Stop(this.__ptr)
  23. }
  24. SkeletonAnimation.prototype.Reset = function() {
  25. Polycode.SkeletonAnimation_Reset(this.__ptr)
  26. }
  27. SkeletonAnimation.prototype.Update = function() {
  28. Polycode.SkeletonAnimation_Update(this.__ptr)
  29. }
  30. SkeletonAnimation.prototype.setSpeed = function(speed) {
  31. Polycode.SkeletonAnimation_setSpeed(this.__ptr, speed)
  32. }
  33. SkeletonAnimation.prototype.setWeight = function(newWeight) {
  34. Polycode.SkeletonAnimation_setWeight(this.__ptr, newWeight)
  35. }
  36. SkeletonAnimation.prototype.getWeight = function() {
  37. return Polycode.SkeletonAnimation_getWeight(this.__ptr)
  38. }
  39. SkeletonAnimation.prototype.isPlaying = function() {
  40. return Polycode.SkeletonAnimation_isPlaying(this.__ptr)
  41. }