Scene.js 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. function Scene() {
  2. }
  3. Scene.prototype.addEntity = function(entity) {
  4. Polycode.Scene_addEntity(this.__ptr, entity)
  5. }
  6. Scene.prototype.addChild = function(entity) {
  7. Polycode.Scene_addChild(this.__ptr, entity)
  8. }
  9. Scene.prototype.removeEntity = function(entity) {
  10. Polycode.Scene_removeEntity(this.__ptr, entity)
  11. }
  12. Scene.prototype.getDefaultCamera = function() {
  13. Polycode.Scene_getDefaultCamera(this.__ptr)
  14. }
  15. Scene.prototype.getActiveCamera = function() {
  16. Polycode.Scene_getActiveCamera(this.__ptr)
  17. }
  18. Scene.prototype.setActiveCamera = function(camera) {
  19. Polycode.Scene_setActiveCamera(this.__ptr, camera)
  20. }
  21. Scene.prototype.enableFog = function(enable) {
  22. Polycode.Scene_enableFog(this.__ptr, enable)
  23. }
  24. Scene.prototype.setFogProperties = function(fogMode,color,density,startDepth,endDepth) {
  25. Polycode.Scene_setFogProperties(this.__ptr, fogMode,color,density,startDepth,endDepth)
  26. }
  27. Scene.prototype.setSceneType = function(newType) {
  28. Polycode.Scene_setSceneType(this.__ptr, newType)
  29. }
  30. Scene.prototype.fixedUpdate = function() {
  31. Polycode.Scene_fixedUpdate(this.__ptr)
  32. }
  33. Scene.prototype.Update = function() {
  34. Polycode.Scene_Update(this.__ptr)
  35. }
  36. Scene.prototype.setVirtual = function(val) {
  37. Polycode.Scene_setVirtual(this.__ptr, val)
  38. }
  39. Scene.prototype.isVirtual = function() {
  40. Polycode.Scene_isVirtual(this.__ptr)
  41. }
  42. Scene.prototype.isEnabled = function() {
  43. Polycode.Scene_isEnabled(this.__ptr)
  44. }
  45. Scene.prototype.setEnabled = function(enabled) {
  46. Polycode.Scene_setEnabled(this.__ptr, enabled)
  47. }
  48. Scene.prototype.Render = function(targetCamera,targetFramebuffer,overrideMaterial,sendLights) {
  49. Polycode.Scene_Render(this.__ptr, targetCamera,targetFramebuffer,overrideMaterial,sendLights)
  50. }
  51. Scene.prototype.setOverrideMaterial = function(material) {
  52. Polycode.Scene_setOverrideMaterial(this.__ptr, material)
  53. }
  54. Scene.prototype.projectRayFromCameraAndViewportCoordinate = function(camera,coordinate) {
  55. Polycode.Scene_projectRayFromCameraAndViewportCoordinate(this.__ptr, camera,coordinate)
  56. }
  57. Scene.prototype.addLight = function(light) {
  58. Polycode.Scene_addLight(this.__ptr, light)
  59. }
  60. Scene.prototype.removeLight = function(light) {
  61. Polycode.Scene_removeLight(this.__ptr, light)
  62. }
  63. Scene.prototype.getNumLights = function() {
  64. Polycode.Scene_getNumLights(this.__ptr)
  65. }
  66. Scene.prototype.getLight = function(index) {
  67. Polycode.Scene_getLight(this.__ptr, index)
  68. }
  69. Scene.prototype.doVisibilityChecking = function(val) {
  70. Polycode.Scene_doVisibilityChecking(this.__ptr, val)
  71. }
  72. Scene.prototype.doesVisibilityChecking = function() {
  73. Polycode.Scene_doesVisibilityChecking(this.__ptr)
  74. }