SceneRenderTexture.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. function SceneRenderTexture() {
  2. Object.defineProperties(this, {
  3. 'enabled': { enumerable: true, configurable: true, get: SceneRenderTexture.prototype.__get_enabled, set: SceneRenderTexture.prototype.__set_enabled}
  4. })
  5. }
  6. SceneRenderTexture.prototype.__get_enabled = function() {
  7. return Polycode.SceneRenderTexture__get_enabled(this.__ptr)
  8. }
  9. SceneRenderTexture.prototype.__set_enabled = function(val) {
  10. Polycode.SceneRenderTexture__set_enabled(this.__ptr, val)
  11. }
  12. SceneRenderTexture.prototype.getTargetTexture = function() {
  13. var retVal = new Texture()
  14. retVal.__ptr = Polycode.SceneRenderTexture_getTargetTexture(this.__ptr)
  15. return retVal
  16. }
  17. SceneRenderTexture.prototype.getFilterColorBufferTexture = function() {
  18. var retVal = new Texture()
  19. retVal.__ptr = Polycode.SceneRenderTexture_getFilterColorBufferTexture(this.__ptr)
  20. return retVal
  21. }
  22. SceneRenderTexture.prototype.getFilterZBufferTexture = function() {
  23. var retVal = new Texture()
  24. retVal.__ptr = Polycode.SceneRenderTexture_getFilterZBufferTexture(this.__ptr)
  25. return retVal
  26. }
  27. SceneRenderTexture.prototype.Render = function() {
  28. Polycode.SceneRenderTexture_Render(this.__ptr)
  29. }
  30. SceneRenderTexture.prototype.saveToImage = function() {
  31. var retVal = new Image()
  32. retVal.__ptr = Polycode.SceneRenderTexture_saveToImage(this.__ptr)
  33. return retVal
  34. }
  35. SceneRenderTexture.prototype.resizeRenderTexture = function(newWidth,newHeight) {
  36. Polycode.SceneRenderTexture_resizeRenderTexture(this.__ptr, newWidth,newHeight)
  37. }
  38. SceneRenderTexture.prototype.getTargetScene = function() {
  39. var retVal = new Scene()
  40. retVal.__ptr = Polycode.SceneRenderTexture_getTargetScene(this.__ptr)
  41. return retVal
  42. }
  43. SceneRenderTexture.prototype.getTargetCamera = function() {
  44. var retVal = new Camera()
  45. retVal.__ptr = Polycode.SceneRenderTexture_getTargetCamera(this.__ptr)
  46. return retVal
  47. }