Skeleton.js 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. function Skeleton() {
  2. }
  3. Skeleton.prototype.loadSkeleton = function(fileName) {
  4. Polycode.Skeleton_loadSkeleton(this.__ptr, fileName)
  5. }
  6. Skeleton.prototype.playAnimationByName = function(animName,weight,once,restartIfPlaying) {
  7. Polycode.Skeleton_playAnimationByName(this.__ptr, animName,weight,once,restartIfPlaying)
  8. }
  9. Skeleton.prototype.playAnimation = function(animation,weight,once,restartIfPlaying) {
  10. Polycode.Skeleton_playAnimation(this.__ptr, animation,weight,once,restartIfPlaying)
  11. }
  12. Skeleton.prototype.setBaseAnimationByName = function(animName) {
  13. Polycode.Skeleton_setBaseAnimationByName(this.__ptr, animName)
  14. }
  15. Skeleton.prototype.setBaseAnimation = function(animation) {
  16. Polycode.Skeleton_setBaseAnimation(this.__ptr, animation)
  17. }
  18. Skeleton.prototype.stopAllAnimations = function() {
  19. Polycode.Skeleton_stopAllAnimations(this.__ptr)
  20. }
  21. Skeleton.prototype.getBaseAnimation = function() {
  22. Polycode.Skeleton_getBaseAnimation(this.__ptr)
  23. }
  24. Skeleton.prototype.addAnimation = function(name,fileName) {
  25. Polycode.Skeleton_addAnimation(this.__ptr, name,fileName)
  26. }
  27. Skeleton.prototype.getAnimation = function(name) {
  28. Polycode.Skeleton_getAnimation(this.__ptr, name)
  29. }
  30. Skeleton.prototype.stopAnimationByName = function(name) {
  31. Polycode.Skeleton_stopAnimationByName(this.__ptr, name)
  32. }
  33. Skeleton.prototype.stopAnimation = function(animation) {
  34. Polycode.Skeleton_stopAnimation(this.__ptr, animation)
  35. }
  36. Skeleton.prototype.Update = function() {
  37. Polycode.Skeleton_Update(this.__ptr)
  38. }
  39. Skeleton.prototype.getBoneByName = function(name) {
  40. Polycode.Skeleton_getBoneByName(this.__ptr, name)
  41. }
  42. Skeleton.prototype.bonesVisible = function(val) {
  43. Polycode.Skeleton_bonesVisible(this.__ptr, val)
  44. }
  45. Skeleton.prototype.getNumBones = function() {
  46. Polycode.Skeleton_getNumBones(this.__ptr)
  47. }
  48. Skeleton.prototype.getBone = function(index) {
  49. Polycode.Skeleton_getBone(this.__ptr, index)
  50. }
  51. Skeleton.prototype.addBone = function(bone) {
  52. Polycode.Skeleton_addBone(this.__ptr, bone)
  53. }
  54. Skeleton.prototype.removeBone = function(bone) {
  55. Polycode.Skeleton_removeBone(this.__ptr, bone)
  56. }
  57. Skeleton.prototype.getBoneIndexByBone = function(bone) {
  58. Polycode.Skeleton_getBoneIndexByBone(this.__ptr, bone)
  59. }