SpriteState.js 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. function SpriteState() {
  2. }
  3. SpriteState.prototype.setName = function(name) {
  4. Polycode.SpriteState_setName(this.__ptr, name)
  5. }
  6. SpriteState.prototype.getName = function() {
  7. Polycode.SpriteState_getName(this.__ptr)
  8. }
  9. SpriteState.prototype.getNumFrameIDs = function() {
  10. Polycode.SpriteState_getNumFrameIDs(this.__ptr)
  11. }
  12. SpriteState.prototype.getFrameIDAtIndex = function(index) {
  13. Polycode.SpriteState_getFrameIDAtIndex(this.__ptr, index)
  14. }
  15. SpriteState.prototype.getMeshForFrameIndex = function(index) {
  16. Polycode.SpriteState_getMeshForFrameIndex(this.__ptr, index)
  17. }
  18. SpriteState.prototype.insertFrame = function(index,frameID) {
  19. Polycode.SpriteState_insertFrame(this.__ptr, index,frameID)
  20. }
  21. SpriteState.prototype.removeFrameByIndex = function(frameIndex) {
  22. Polycode.SpriteState_removeFrameByIndex(this.__ptr, frameIndex)
  23. }
  24. SpriteState.prototype.clearFrames = function() {
  25. Polycode.SpriteState_clearFrames(this.__ptr)
  26. }
  27. SpriteState.prototype.setPixelsPerUnit = function(ppu) {
  28. Polycode.SpriteState_setPixelsPerUnit(this.__ptr, ppu)
  29. }
  30. SpriteState.prototype.getPixelsPerUnit = function() {
  31. Polycode.SpriteState_getPixelsPerUnit(this.__ptr)
  32. }
  33. SpriteState.prototype.rebuildStateMeshes = function() {
  34. Polycode.SpriteState_rebuildStateMeshes(this.__ptr)
  35. }
  36. SpriteState.prototype.setStateFPS = function(fps) {
  37. Polycode.SpriteState_setStateFPS(this.__ptr, fps)
  38. }
  39. SpriteState.prototype.getStateFPS = function() {
  40. Polycode.SpriteState_getStateFPS(this.__ptr)
  41. }
  42. SpriteState.prototype.getLargestFrameBoundingBox = function() {
  43. Polycode.SpriteState_getLargestFrameBoundingBox(this.__ptr)
  44. }
  45. SpriteState.prototype.setBoundingBox = function(boundingBox) {
  46. Polycode.SpriteState_setBoundingBox(this.__ptr, boundingBox)
  47. }
  48. SpriteState.prototype.getBoundingBox = function() {
  49. Polycode.SpriteState_getBoundingBox(this.__ptr)
  50. }
  51. SpriteState.prototype.getSpriteOffset = function() {
  52. Polycode.SpriteState_getSpriteOffset(this.__ptr)
  53. }
  54. SpriteState.prototype.setSpriteOffset = function(offset) {
  55. Polycode.SpriteState_setSpriteOffset(this.__ptr, offset)
  56. }