Parcourir la source

JavaScript binding getters and setters for properties, fixed JS script to entity bindings, still no GC considerations

Ivan Safrin il y a 9 ans
Parent
commit
24a8d24298
100 fichiers modifiés avec 4240 ajouts et 460 suppressions
  1. 0 2
      bindings/javascript/Polycode.js
  2. 24 0
      bindings/javascript/Polycode/AABB.js
  3. 42 0
      bindings/javascript/Polycode/AttributeBinding.js
  4. 22 0
      bindings/javascript/Polycode/AudioMixer.js
  5. 2 2
      bindings/javascript/Polycode/AudioStreamingSource.js
  6. 34 6
      bindings/javascript/Polycode/BezierCurve.js
  7. 35 0
      bindings/javascript/Polycode/BezierPoint.js
  8. 11 0
      bindings/javascript/Polycode/BinaryObjectReader.js
  9. 3 3
      bindings/javascript/Polycode/BinaryObjectWriter.js
  10. 129 12
      bindings/javascript/Polycode/Bone.js
  11. 165 0
      bindings/javascript/Polycode/BoneTrack.js
  12. 67 20
      bindings/javascript/Polycode/Camera.js
  13. 46 6
      bindings/javascript/Polycode/Color.js
  14. 31 0
      bindings/javascript/Polycode/ColorRange.js
  15. 6 4
      bindings/javascript/Polycode/Config.js
  16. 47 0
      bindings/javascript/Polycode/ConfigEntry.js
  17. 102 32
      bindings/javascript/Polycode/Core.js
  18. 20 0
      bindings/javascript/Polycode/CoreFileExtension.js
  19. 86 9
      bindings/javascript/Polycode/CoreInput.js
  20. 13 0
      bindings/javascript/Polycode/CoreMotionEvent.js
  21. 11 0
      bindings/javascript/Polycode/CoreMutex.js
  22. 33 11
      bindings/javascript/Polycode/CoreServices.js
  23. 6 4
      bindings/javascript/Polycode/Data.js
  24. 20 0
      bindings/javascript/Polycode/DebugBackTraceEntry.js
  25. 10 8
      bindings/javascript/Polycode/DummyCore.js
  26. 311 50
      bindings/javascript/Polycode/Entity.js
  27. 20 0
      bindings/javascript/Polycode/EntityProp.js
  28. 25 3
      bindings/javascript/Polycode/Event.js
  29. 1 1
      bindings/javascript/Polycode/EventDispatcher.js
  30. 17 4
      bindings/javascript/Polycode/Font.js
  31. 3 1
      bindings/javascript/Polycode/FontResourceLoader.js
  32. 108 0
      bindings/javascript/Polycode/GPUDrawBuffer.js
  33. 46 0
      bindings/javascript/Polycode/GPUDrawCall.js
  34. 105 0
      bindings/javascript/Polycode/GPUDrawOptions.js
  35. 44 0
      bindings/javascript/Polycode/GlyphData.js
  36. 21 13
      bindings/javascript/Polycode/Image.js
  37. 1 1
      bindings/javascript/Polycode/IndexDataArray.js
  38. 134 5
      bindings/javascript/Polycode/InputEvent.js
  39. 13 0
      bindings/javascript/Polycode/JSScriptInstance.js
  40. 20 0
      bindings/javascript/Polycode/JoystickInfo.js
  41. 22 14
      bindings/javascript/Polycode/Label.js
  42. 149 0
      bindings/javascript/Polycode/LightInfo.js
  43. 112 0
      bindings/javascript/Polycode/LightInfoBinding.js
  44. 24 0
      bindings/javascript/Polycode/LightShadowInfoBinding.js
  45. 82 8
      bindings/javascript/Polycode/LocalShaderParam.js
  46. 11 0
      bindings/javascript/Polycode/LuaScriptInstance.js
  47. 55 7
      bindings/javascript/Polycode/Material.js
  48. 79 15
      bindings/javascript/Polycode/MaterialManager.js
  49. 3 1
      bindings/javascript/Polycode/MaterialResourceLoader.js
  50. 25 9
      bindings/javascript/Polycode/Matrix4.js
  51. 39 14
      bindings/javascript/Polycode/Mesh.js
  52. 3 1
      bindings/javascript/Polycode/MeshResourceLoader.js
  53. 20 0
      bindings/javascript/Polycode/MouseEventResult.js
  54. 56 0
      bindings/javascript/Polycode/OSFileEntry.js
  55. 72 5
      bindings/javascript/Polycode/ObjectEntry.js
  56. 4 4
      bindings/javascript/Polycode/Perlin.js
  57. 22 0
      bindings/javascript/Polycode/PolycodeViewBase.js
  58. 31 0
      bindings/javascript/Polycode/ProgramAttribute.js
  59. 42 0
      bindings/javascript/Polycode/ProgramParam.js
  60. 3 1
      bindings/javascript/Polycode/ProgramResourceLoader.js
  61. 44 0
      bindings/javascript/Polycode/QuatTriple.js
  62. 60 10
      bindings/javascript/Polycode/Quaternion.js
  63. 3 1
      bindings/javascript/Polycode/QuaternionCurve.js
  64. 47 6
      bindings/javascript/Polycode/Ray.js
  65. 45 5
      bindings/javascript/Polycode/Rectangle.js
  66. 48 2
      bindings/javascript/Polycode/RenderBuffer.js
  67. 41 1
      bindings/javascript/Polycode/RenderDataArray.js
  68. 13 0
      bindings/javascript/Polycode/RenderFrame.js
  69. 40 0
      bindings/javascript/Polycode/RenderTargetBinding.js
  70. 6 2
      bindings/javascript/Polycode/RenderThread.js
  71. 29 0
      bindings/javascript/Polycode/RenderThreadDebugInfo.js
  72. 24 10
      bindings/javascript/Polycode/Renderer.js
  73. 33 0
      bindings/javascript/Polycode/RendererThreadJob.js
  74. 36 3
      bindings/javascript/Polycode/Resource.js
  75. 13 5
      bindings/javascript/Polycode/ResourceManager.js
  76. 52 6
      bindings/javascript/Polycode/ResourcePool.js
  77. 29 0
      bindings/javascript/Polycode/Rotation.js
  78. 127 8
      bindings/javascript/Polycode/Scene.js
  79. 29 3
      bindings/javascript/Polycode/SceneCurve.js
  80. 46 12
      bindings/javascript/Polycode/SceneEntityInstance.js
  81. 42 0
      bindings/javascript/Polycode/SceneEntityInstanceLayer.js
  82. 3 1
      bindings/javascript/Polycode/SceneEntityInstanceResourceEntry.js
  83. 5 3
      bindings/javascript/Polycode/SceneImage.js
  84. 20 5
      bindings/javascript/Polycode/SceneLabel.js
  85. 27 17
      bindings/javascript/Polycode/SceneLight.js
  86. 105 10
      bindings/javascript/Polycode/SceneMesh.js
  87. 93 0
      bindings/javascript/Polycode/SceneParticle.js
  88. 119 17
      bindings/javascript/Polycode/SceneParticleEmitter.js
  89. 9 7
      bindings/javascript/Polycode/ScenePrimitive.js
  90. 29 6
      bindings/javascript/Polycode/SceneRenderTexture.js
  91. 8 4
      bindings/javascript/Polycode/SceneSound.js
  92. 18 8
      bindings/javascript/Polycode/SceneSprite.js
  93. 13 0
      bindings/javascript/Polycode/ScriptInstance.js
  94. 3 1
      bindings/javascript/Polycode/ScriptResourceLoader.js
  95. 69 5
      bindings/javascript/Polycode/Shader.js
  96. 79 20
      bindings/javascript/Polycode/ShaderBinding.js
  97. 53 0
      bindings/javascript/Polycode/ShaderPass.js
  98. 11 0
      bindings/javascript/Polycode/ShaderProgram.js
  99. 67 0
      bindings/javascript/Polycode/ShaderRenderTarget.js
  100. 14 6
      bindings/javascript/Polycode/Skeleton.js

+ 0 - 2
bindings/javascript/Polycode.js

@@ -54,8 +54,6 @@ require('Polycode/QuaternionCurve')
 require('Polycode/Ray')
 require('Polycode/Rectangle')
 require('Polycode/RenderDataArray')
-require('Polycode/VertexDataArray')
-require('Polycode/IndexDataArray')
 require('Polycode/LightShadowInfoBinding')
 require('Polycode/LightInfoBinding')
 require('Polycode/RenderFrame')

+ 24 - 0
bindings/javascript/Polycode/AABB.js

@@ -1,2 +1,26 @@
 function AABB() {
+	Object.defineProperties(this, {
+		'min': { enumerable: true, configurable: true, get: AABB.prototype.__get_min, set: AABB.prototype.__set_min},
+		'max': { enumerable: true, configurable: true, get: AABB.prototype.__get_max, set: AABB.prototype.__set_max}
+	})
 }
+AABB.prototype.__get_min = function() {
+	var retVal = new Vector3()
+	retVal.__ptr = 	Polycode.AABB__get_min(this.__ptr)
+	return retVal
+}
+
+AABB.prototype.__set_min = function(val) {
+	Polycode.AABB__set_min(this.__ptr, val.__ptr)
+}
+
+AABB.prototype.__get_max = function() {
+	var retVal = new Vector3()
+	retVal.__ptr = 	Polycode.AABB__get_max(this.__ptr)
+	return retVal
+}
+
+AABB.prototype.__set_max = function(val) {
+	Polycode.AABB__set_max(this.__ptr, val.__ptr)
+}
+

+ 42 - 0
bindings/javascript/Polycode/AttributeBinding.js

@@ -1,2 +1,44 @@
 function AttributeBinding() {
+	Object.defineProperties(this, {
+		'name': { enumerable: true, configurable: true, get: AttributeBinding.prototype.__get_name, set: AttributeBinding.prototype.__set_name},
+		'vertexData': { enumerable: true, configurable: true, get: AttributeBinding.prototype.__get_vertexData, set: AttributeBinding.prototype.__set_vertexData},
+		'attribute': { enumerable: true, configurable: true, get: AttributeBinding.prototype.__get_attribute, set: AttributeBinding.prototype.__set_attribute},
+		'enabled': { enumerable: true, configurable: true, get: AttributeBinding.prototype.__get_enabled, set: AttributeBinding.prototype.__set_enabled}
+	})
 }
+AttributeBinding.prototype.__get_name = function() {
+	return Polycode.AttributeBinding__get_name(this.__ptr)
+}
+
+AttributeBinding.prototype.__set_name = function(val) {
+	Polycode.AttributeBinding__set_name(this.__ptr, val)
+}
+
+AttributeBinding.prototype.__get_vertexData = function() {
+	var retVal = new VertexDataArray()
+	retVal.__ptr = 	Polycode.AttributeBinding__get_vertexData(this.__ptr)
+	return retVal
+}
+
+AttributeBinding.prototype.__set_vertexData = function(val) {
+	Polycode.AttributeBinding__set_vertexData(this.__ptr, val.__ptr)
+}
+
+AttributeBinding.prototype.__get_attribute = function() {
+	var retVal = new ProgramAttribute()
+	retVal.__ptr = 	Polycode.AttributeBinding__get_attribute(this.__ptr)
+	return retVal
+}
+
+AttributeBinding.prototype.__set_attribute = function(val) {
+	Polycode.AttributeBinding__set_attribute(this.__ptr, val.__ptr)
+}
+
+AttributeBinding.prototype.__get_enabled = function() {
+	return Polycode.AttributeBinding__get_enabled(this.__ptr)
+}
+
+AttributeBinding.prototype.__set_enabled = function(val) {
+	Polycode.AttributeBinding__set_enabled(this.__ptr, val)
+}
+

+ 22 - 0
bindings/javascript/Polycode/AudioMixer.js

@@ -1,5 +1,27 @@
 function AudioMixer() {
+	Object.defineProperties(this, {
+		'globalVolume': { enumerable: true, configurable: true, get: AudioMixer.prototype.__get_globalVolume, set: AudioMixer.prototype.__set_globalVolume},
+		'mixerMutex': { enumerable: true, configurable: true, get: AudioMixer.prototype.__get_mixerMutex, set: AudioMixer.prototype.__set_mixerMutex}
+	})
 }
+AudioMixer.prototype.__get_globalVolume = function() {
+	return Polycode.AudioMixer__get_globalVolume(this.__ptr)
+}
+
+AudioMixer.prototype.__set_globalVolume = function(val) {
+	Polycode.AudioMixer__set_globalVolume(this.__ptr, val)
+}
+
+AudioMixer.prototype.__get_mixerMutex = function() {
+	var retVal = new CoreMutex()
+	retVal.__ptr = 	Polycode.AudioMixer__get_mixerMutex(this.__ptr)
+	return retVal
+}
+
+AudioMixer.prototype.__set_mixerMutex = function(val) {
+	Polycode.AudioMixer__set_mixerMutex(this.__ptr, val.__ptr)
+}
+
 
 AudioMixer.prototype.mixIntoBuffer = function(buffer,numSamples) {
 	Polycode.AudioMixer_mixIntoBuffer(this.__ptr, buffer,numSamples)

+ 2 - 2
bindings/javascript/Polycode/AudioStreamingSource.js

@@ -2,9 +2,9 @@ function AudioStreamingSource() {
 }
 
 AudioStreamingSource.prototype.getNumChannels = function() {
-	Polycode.AudioStreamingSource_getNumChannels(this.__ptr)
+	return Polycode.AudioStreamingSource_getNumChannels(this.__ptr)
 }
 
 AudioStreamingSource.prototype.getFrequency = function() {
-	Polycode.AudioStreamingSource_getFrequency(this.__ptr)
+	return Polycode.AudioStreamingSource_getFrequency(this.__ptr)
 }

+ 34 - 6
bindings/javascript/Polycode/BezierCurve.js

@@ -1,12 +1,36 @@
 function BezierCurve() {
+	Object.defineProperties(this, {
+		'insertPoint': { enumerable: true, configurable: true, get: BezierCurve.prototype.__get_insertPoint, set: BezierCurve.prototype.__set_insertPoint},
+		'evaluationAccuracy': { enumerable: true, configurable: true, get: BezierCurve.prototype.__get_evaluationAccuracy, set: BezierCurve.prototype.__set_evaluationAccuracy}
+	})
 }
+BezierCurve.prototype.__get_insertPoint = function() {
+	var retVal = new BezierPoint()
+	retVal.__ptr = 	Polycode.BezierCurve__get_insertPoint(this.__ptr)
+	return retVal
+}
+
+BezierCurve.prototype.__set_insertPoint = function(val) {
+	Polycode.BezierCurve__set_insertPoint(this.__ptr, val.__ptr)
+}
+
+BezierCurve.prototype.__get_evaluationAccuracy = function() {
+	return Polycode.BezierCurve__get_evaluationAccuracy(this.__ptr)
+}
+
+BezierCurve.prototype.__set_evaluationAccuracy = function(val) {
+	Polycode.BezierCurve__set_evaluationAccuracy(this.__ptr, val)
+}
+
 
 BezierCurve.prototype.getControlPoint = function(index) {
-	Polycode.BezierCurve_getControlPoint(this.__ptr, index)
+	var retVal = new BezierPoint()
+	retVal.__ptr = Polycode.BezierCurve_getControlPoint(this.__ptr, index)
+	return retVal
 }
 
 BezierCurve.prototype.getNumControlPoints = function() {
-	Polycode.BezierCurve_getNumControlPoints(this.__ptr)
+	return Polycode.BezierCurve_getNumControlPoints(this.__ptr)
 }
 
 BezierCurve.prototype.addControlPoint = function(p1x,p1y,p1z,p2x,p2y,p2z,p3x,p3y,p3z) {
@@ -30,11 +54,15 @@ BezierCurve.prototype.addControlPoint2d = function(x,y) {
 }
 
 BezierCurve.prototype.getPointAt = function(a) {
-	Polycode.BezierCurve_getPointAt(this.__ptr, a)
+	var retVal = new Vector3()
+	retVal.__ptr = Polycode.BezierCurve_getPointAt(this.__ptr, a)
+	return retVal
 }
 
 BezierCurve.prototype.getPointBetween = function(a,bp1,bp2) {
-	Polycode.BezierCurve_getPointBetween(this.__ptr, a,bp1,bp2)
+	var retVal = new Vector3()
+	retVal.__ptr = Polycode.BezierCurve_getPointBetween(this.__ptr, a,bp1,bp2)
+	return retVal
 }
 
 BezierCurve.prototype.clearControlPoints = function() {
@@ -42,11 +70,11 @@ BezierCurve.prototype.clearControlPoints = function() {
 }
 
 BezierCurve.prototype.getYValueAtX = function(x) {
-	Polycode.BezierCurve_getYValueAtX(this.__ptr, x)
+	return Polycode.BezierCurve_getYValueAtX(this.__ptr, x)
 }
 
 BezierCurve.prototype.getTValueAtX = function(x) {
-	Polycode.BezierCurve_getTValueAtX(this.__ptr, x)
+	return Polycode.BezierCurve_getTValueAtX(this.__ptr, x)
 }
 
 BezierCurve.prototype.removePoint = function(point) {

+ 35 - 0
bindings/javascript/Polycode/BezierPoint.js

@@ -1,2 +1,37 @@
 function BezierPoint() {
+	Object.defineProperties(this, {
+		'p1': { enumerable: true, configurable: true, get: BezierPoint.prototype.__get_p1, set: BezierPoint.prototype.__set_p1},
+		'p2': { enumerable: true, configurable: true, get: BezierPoint.prototype.__get_p2, set: BezierPoint.prototype.__set_p2},
+		'p3': { enumerable: true, configurable: true, get: BezierPoint.prototype.__get_p3, set: BezierPoint.prototype.__set_p3}
+	})
 }
+BezierPoint.prototype.__get_p1 = function() {
+	var retVal = new Vector3()
+	retVal.__ptr = 	Polycode.BezierPoint__get_p1(this.__ptr)
+	return retVal
+}
+
+BezierPoint.prototype.__set_p1 = function(val) {
+	Polycode.BezierPoint__set_p1(this.__ptr, val.__ptr)
+}
+
+BezierPoint.prototype.__get_p2 = function() {
+	var retVal = new Vector3()
+	retVal.__ptr = 	Polycode.BezierPoint__get_p2(this.__ptr)
+	return retVal
+}
+
+BezierPoint.prototype.__set_p2 = function(val) {
+	Polycode.BezierPoint__set_p2(this.__ptr, val.__ptr)
+}
+
+BezierPoint.prototype.__get_p3 = function() {
+	var retVal = new Vector3()
+	retVal.__ptr = 	Polycode.BezierPoint__get_p3(this.__ptr)
+	return retVal
+}
+
+BezierPoint.prototype.__set_p3 = function(val) {
+	Polycode.BezierPoint__set_p3(this.__ptr, val.__ptr)
+}
+

+ 11 - 0
bindings/javascript/Polycode/BinaryObjectReader.js

@@ -1,2 +1,13 @@
 function BinaryObjectReader() {
+	Object.defineProperties(this, {
+		'success': { enumerable: true, configurable: true, get: BinaryObjectReader.prototype.__get_success, set: BinaryObjectReader.prototype.__set_success}
+	})
 }
+BinaryObjectReader.prototype.__get_success = function() {
+	return Polycode.BinaryObjectReader__get_success(this.__ptr)
+}
+
+BinaryObjectReader.prototype.__set_success = function(val) {
+	Polycode.BinaryObjectReader__set_success(this.__ptr, val)
+}
+

+ 3 - 3
bindings/javascript/Polycode/BinaryObjectWriter.js

@@ -10,13 +10,13 @@ BinaryObjectWriter.prototype.writeEntryToFile = function(entry) {
 }
 
 BinaryObjectWriter.prototype.addKey = function(key) {
-	Polycode.BinaryObjectWriter_addKey(this.__ptr, key)
+	return Polycode.BinaryObjectWriter_addKey(this.__ptr, key)
 }
 
 BinaryObjectWriter.prototype.getKeyIndex = function(key) {
-	Polycode.BinaryObjectWriter_getKeyIndex(this.__ptr, key)
+	return Polycode.BinaryObjectWriter_getKeyIndex(this.__ptr, key)
 }
 
 BinaryObjectWriter.prototype.writeToFile = function(fileName) {
-	Polycode.BinaryObjectWriter_writeToFile(this.__ptr, fileName)
+	return Polycode.BinaryObjectWriter_writeToFile(this.__ptr, fileName)
 }

+ 129 - 12
bindings/javascript/Polycode/Bone.js

@@ -1,8 +1,105 @@
 function Bone() {
+	Object.defineProperties(this, {
+		'parentBoneId': { enumerable: true, configurable: true, get: Bone.prototype.__get_parentBoneId, set: Bone.prototype.__set_parentBoneId},
+		'boneMatrix': { enumerable: true, configurable: true, get: Bone.prototype.__get_boneMatrix, set: Bone.prototype.__set_boneMatrix},
+		'restMatrix': { enumerable: true, configurable: true, get: Bone.prototype.__get_restMatrix, set: Bone.prototype.__set_restMatrix},
+		'baseMatrix': { enumerable: true, configurable: true, get: Bone.prototype.__get_baseMatrix, set: Bone.prototype.__set_baseMatrix},
+		'finalMatrix': { enumerable: true, configurable: true, get: Bone.prototype.__get_finalMatrix, set: Bone.prototype.__set_finalMatrix},
+		'baseRotation': { enumerable: true, configurable: true, get: Bone.prototype.__get_baseRotation, set: Bone.prototype.__set_baseRotation},
+		'baseScale': { enumerable: true, configurable: true, get: Bone.prototype.__get_baseScale, set: Bone.prototype.__set_baseScale},
+		'basePosition': { enumerable: true, configurable: true, get: Bone.prototype.__get_basePosition, set: Bone.prototype.__set_basePosition},
+		'disableAnimation': { enumerable: true, configurable: true, get: Bone.prototype.__get_disableAnimation, set: Bone.prototype.__set_disableAnimation}
+	})
 }
+Bone.prototype.__get_parentBoneId = function() {
+	return Polycode.Bone__get_parentBoneId(this.__ptr)
+}
+
+Bone.prototype.__set_parentBoneId = function(val) {
+	Polycode.Bone__set_parentBoneId(this.__ptr, val)
+}
+
+Bone.prototype.__get_boneMatrix = function() {
+	var retVal = new Matrix4()
+	retVal.__ptr = 	Polycode.Bone__get_boneMatrix(this.__ptr)
+	return retVal
+}
+
+Bone.prototype.__set_boneMatrix = function(val) {
+	Polycode.Bone__set_boneMatrix(this.__ptr, val.__ptr)
+}
+
+Bone.prototype.__get_restMatrix = function() {
+	var retVal = new Matrix4()
+	retVal.__ptr = 	Polycode.Bone__get_restMatrix(this.__ptr)
+	return retVal
+}
+
+Bone.prototype.__set_restMatrix = function(val) {
+	Polycode.Bone__set_restMatrix(this.__ptr, val.__ptr)
+}
+
+Bone.prototype.__get_baseMatrix = function() {
+	var retVal = new Matrix4()
+	retVal.__ptr = 	Polycode.Bone__get_baseMatrix(this.__ptr)
+	return retVal
+}
+
+Bone.prototype.__set_baseMatrix = function(val) {
+	Polycode.Bone__set_baseMatrix(this.__ptr, val.__ptr)
+}
+
+Bone.prototype.__get_finalMatrix = function() {
+	var retVal = new Matrix4()
+	retVal.__ptr = 	Polycode.Bone__get_finalMatrix(this.__ptr)
+	return retVal
+}
+
+Bone.prototype.__set_finalMatrix = function(val) {
+	Polycode.Bone__set_finalMatrix(this.__ptr, val.__ptr)
+}
+
+Bone.prototype.__get_baseRotation = function() {
+	var retVal = new Quaternion()
+	retVal.__ptr = 	Polycode.Bone__get_baseRotation(this.__ptr)
+	return retVal
+}
+
+Bone.prototype.__set_baseRotation = function(val) {
+	Polycode.Bone__set_baseRotation(this.__ptr, val.__ptr)
+}
+
+Bone.prototype.__get_baseScale = function() {
+	var retVal = new Vector3()
+	retVal.__ptr = 	Polycode.Bone__get_baseScale(this.__ptr)
+	return retVal
+}
+
+Bone.prototype.__set_baseScale = function(val) {
+	Polycode.Bone__set_baseScale(this.__ptr, val.__ptr)
+}
+
+Bone.prototype.__get_basePosition = function() {
+	var retVal = new Vector3()
+	retVal.__ptr = 	Polycode.Bone__get_basePosition(this.__ptr)
+	return retVal
+}
+
+Bone.prototype.__set_basePosition = function(val) {
+	Polycode.Bone__set_basePosition(this.__ptr, val.__ptr)
+}
+
+Bone.prototype.__get_disableAnimation = function() {
+	return Polycode.Bone__get_disableAnimation(this.__ptr)
+}
+
+Bone.prototype.__set_disableAnimation = function(val) {
+	Polycode.Bone__set_disableAnimation(this.__ptr, val)
+}
+
 
 Bone.prototype.getName = function() {
-	Polycode.Bone_getName(this.__ptr)
+	return Polycode.Bone_getName(this.__ptr)
 }
 
 Bone.prototype.setParentBone = function(bone) {
@@ -14,19 +111,25 @@ Bone.prototype.addChildBone = function(bone) {
 }
 
 Bone.prototype.getParentBone = function() {
-	Polycode.Bone_getParentBone(this.__ptr)
+	var retVal = new Bone()
+	retVal.__ptr = Polycode.Bone_getParentBone(this.__ptr)
+	return retVal
 }
 
 Bone.prototype.getNumChildBones = function() {
-	Polycode.Bone_getNumChildBones(this.__ptr)
+	return Polycode.Bone_getNumChildBones(this.__ptr)
 }
 
 Bone.prototype.getChildBone = function(index) {
-	Polycode.Bone_getChildBone(this.__ptr, index)
+	var retVal = new Bone()
+	retVal.__ptr = Polycode.Bone_getChildBone(this.__ptr, index)
+	return retVal
 }
 
 Bone.prototype.getBoneMatrix = function() {
-	Polycode.Bone_getBoneMatrix(this.__ptr)
+	var retVal = new Matrix4()
+	retVal.__ptr = Polycode.Bone_getBoneMatrix(this.__ptr)
+	return retVal
 }
 
 Bone.prototype.setBoneMatrix = function(matrix) {
@@ -34,19 +137,27 @@ Bone.prototype.setBoneMatrix = function(matrix) {
 }
 
 Bone.prototype.getRestMatrix = function() {
-	Polycode.Bone_getRestMatrix(this.__ptr)
+	var retVal = new Matrix4()
+	retVal.__ptr = Polycode.Bone_getRestMatrix(this.__ptr)
+	return retVal
 }
 
 Bone.prototype.getFullRestMatrix = function() {
-	Polycode.Bone_getFullRestMatrix(this.__ptr)
+	var retVal = new Matrix4()
+	retVal.__ptr = Polycode.Bone_getFullRestMatrix(this.__ptr)
+	return retVal
 }
 
 Bone.prototype.getParentRestMatrix = function() {
-	Polycode.Bone_getParentRestMatrix(this.__ptr)
+	var retVal = new Matrix4()
+	retVal.__ptr = Polycode.Bone_getParentRestMatrix(this.__ptr)
+	return retVal
 }
 
 Bone.prototype.getFinalMatrix = function() {
-	Polycode.Bone_getFinalMatrix(this.__ptr)
+	var retVal = new Matrix4()
+	retVal.__ptr = Polycode.Bone_getFinalMatrix(this.__ptr)
+	return retVal
 }
 
 Bone.prototype.setRestMatrix = function(matrix) {
@@ -58,11 +169,15 @@ Bone.prototype.setBaseMatrix = function(matrix) {
 }
 
 Bone.prototype.getBaseMatrix = function() {
-	Polycode.Bone_getBaseMatrix(this.__ptr)
+	var retVal = new Matrix4()
+	retVal.__ptr = Polycode.Bone_getBaseMatrix(this.__ptr)
+	return retVal
 }
 
 Bone.prototype.getFullBaseMatrix = function() {
-	Polycode.Bone_getFullBaseMatrix(this.__ptr)
+	var retVal = new Matrix4()
+	retVal.__ptr = Polycode.Bone_getFullBaseMatrix(this.__ptr)
+	return retVal
 }
 
 Bone.prototype.rebuildFinalMatrix = function() {
@@ -70,7 +185,9 @@ Bone.prototype.rebuildFinalMatrix = function() {
 }
 
 Bone.prototype.buildFinalMatrix = function() {
-	Polycode.Bone_buildFinalMatrix(this.__ptr)
+	var retVal = new Matrix4()
+	retVal.__ptr = Polycode.Bone_buildFinalMatrix(this.__ptr)
+	return retVal
 }
 
 Bone.prototype.intializeBone = function(basePosition,baseScale,baseRotation,restPosition,restScale,restRotation) {

+ 165 - 0
bindings/javascript/Polycode/BoneTrack.js

@@ -1,5 +1,170 @@
 function BoneTrack() {
+	Object.defineProperties(this, {
+		'scaleX': { enumerable: true, configurable: true, get: BoneTrack.prototype.__get_scaleX, set: BoneTrack.prototype.__set_scaleX},
+		'scaleY': { enumerable: true, configurable: true, get: BoneTrack.prototype.__get_scaleY, set: BoneTrack.prototype.__set_scaleY},
+		'scaleZ': { enumerable: true, configurable: true, get: BoneTrack.prototype.__get_scaleZ, set: BoneTrack.prototype.__set_scaleZ},
+		'QuatW': { enumerable: true, configurable: true, get: BoneTrack.prototype.__get_QuatW, set: BoneTrack.prototype.__set_QuatW},
+		'QuatX': { enumerable: true, configurable: true, get: BoneTrack.prototype.__get_QuatX, set: BoneTrack.prototype.__set_QuatX},
+		'QuatY': { enumerable: true, configurable: true, get: BoneTrack.prototype.__get_QuatY, set: BoneTrack.prototype.__set_QuatY},
+		'QuatZ': { enumerable: true, configurable: true, get: BoneTrack.prototype.__get_QuatZ, set: BoneTrack.prototype.__set_QuatZ},
+		'LocX': { enumerable: true, configurable: true, get: BoneTrack.prototype.__get_LocX, set: BoneTrack.prototype.__set_LocX},
+		'LocY': { enumerable: true, configurable: true, get: BoneTrack.prototype.__get_LocY, set: BoneTrack.prototype.__set_LocY},
+		'LocZ': { enumerable: true, configurable: true, get: BoneTrack.prototype.__get_LocZ, set: BoneTrack.prototype.__set_LocZ},
+		'position': { enumerable: true, configurable: true, get: BoneTrack.prototype.__get_position, set: BoneTrack.prototype.__set_position},
+		'scale': { enumerable: true, configurable: true, get: BoneTrack.prototype.__get_scale, set: BoneTrack.prototype.__set_scale},
+		'boneQuat': { enumerable: true, configurable: true, get: BoneTrack.prototype.__get_boneQuat, set: BoneTrack.prototype.__set_boneQuat},
+		'quatCurve': { enumerable: true, configurable: true, get: BoneTrack.prototype.__get_quatCurve, set: BoneTrack.prototype.__set_quatCurve},
+		'weight': { enumerable: true, configurable: true, get: BoneTrack.prototype.__get_weight, set: BoneTrack.prototype.__set_weight}
+	})
 }
+BoneTrack.prototype.__get_scaleX = function() {
+	var retVal = new BezierCurve()
+	retVal.__ptr = 	Polycode.BoneTrack__get_scaleX(this.__ptr)
+	return retVal
+}
+
+BoneTrack.prototype.__set_scaleX = function(val) {
+	Polycode.BoneTrack__set_scaleX(this.__ptr, val.__ptr)
+}
+
+BoneTrack.prototype.__get_scaleY = function() {
+	var retVal = new BezierCurve()
+	retVal.__ptr = 	Polycode.BoneTrack__get_scaleY(this.__ptr)
+	return retVal
+}
+
+BoneTrack.prototype.__set_scaleY = function(val) {
+	Polycode.BoneTrack__set_scaleY(this.__ptr, val.__ptr)
+}
+
+BoneTrack.prototype.__get_scaleZ = function() {
+	var retVal = new BezierCurve()
+	retVal.__ptr = 	Polycode.BoneTrack__get_scaleZ(this.__ptr)
+	return retVal
+}
+
+BoneTrack.prototype.__set_scaleZ = function(val) {
+	Polycode.BoneTrack__set_scaleZ(this.__ptr, val.__ptr)
+}
+
+BoneTrack.prototype.__get_QuatW = function() {
+	var retVal = new BezierCurve()
+	retVal.__ptr = 	Polycode.BoneTrack__get_QuatW(this.__ptr)
+	return retVal
+}
+
+BoneTrack.prototype.__set_QuatW = function(val) {
+	Polycode.BoneTrack__set_QuatW(this.__ptr, val.__ptr)
+}
+
+BoneTrack.prototype.__get_QuatX = function() {
+	var retVal = new BezierCurve()
+	retVal.__ptr = 	Polycode.BoneTrack__get_QuatX(this.__ptr)
+	return retVal
+}
+
+BoneTrack.prototype.__set_QuatX = function(val) {
+	Polycode.BoneTrack__set_QuatX(this.__ptr, val.__ptr)
+}
+
+BoneTrack.prototype.__get_QuatY = function() {
+	var retVal = new BezierCurve()
+	retVal.__ptr = 	Polycode.BoneTrack__get_QuatY(this.__ptr)
+	return retVal
+}
+
+BoneTrack.prototype.__set_QuatY = function(val) {
+	Polycode.BoneTrack__set_QuatY(this.__ptr, val.__ptr)
+}
+
+BoneTrack.prototype.__get_QuatZ = function() {
+	var retVal = new BezierCurve()
+	retVal.__ptr = 	Polycode.BoneTrack__get_QuatZ(this.__ptr)
+	return retVal
+}
+
+BoneTrack.prototype.__set_QuatZ = function(val) {
+	Polycode.BoneTrack__set_QuatZ(this.__ptr, val.__ptr)
+}
+
+BoneTrack.prototype.__get_LocX = function() {
+	var retVal = new BezierCurve()
+	retVal.__ptr = 	Polycode.BoneTrack__get_LocX(this.__ptr)
+	return retVal
+}
+
+BoneTrack.prototype.__set_LocX = function(val) {
+	Polycode.BoneTrack__set_LocX(this.__ptr, val.__ptr)
+}
+
+BoneTrack.prototype.__get_LocY = function() {
+	var retVal = new BezierCurve()
+	retVal.__ptr = 	Polycode.BoneTrack__get_LocY(this.__ptr)
+	return retVal
+}
+
+BoneTrack.prototype.__set_LocY = function(val) {
+	Polycode.BoneTrack__set_LocY(this.__ptr, val.__ptr)
+}
+
+BoneTrack.prototype.__get_LocZ = function() {
+	var retVal = new BezierCurve()
+	retVal.__ptr = 	Polycode.BoneTrack__get_LocZ(this.__ptr)
+	return retVal
+}
+
+BoneTrack.prototype.__set_LocZ = function(val) {
+	Polycode.BoneTrack__set_LocZ(this.__ptr, val.__ptr)
+}
+
+BoneTrack.prototype.__get_position = function() {
+	var retVal = new Vector3()
+	retVal.__ptr = 	Polycode.BoneTrack__get_position(this.__ptr)
+	return retVal
+}
+
+BoneTrack.prototype.__set_position = function(val) {
+	Polycode.BoneTrack__set_position(this.__ptr, val.__ptr)
+}
+
+BoneTrack.prototype.__get_scale = function() {
+	var retVal = new Vector3()
+	retVal.__ptr = 	Polycode.BoneTrack__get_scale(this.__ptr)
+	return retVal
+}
+
+BoneTrack.prototype.__set_scale = function(val) {
+	Polycode.BoneTrack__set_scale(this.__ptr, val.__ptr)
+}
+
+BoneTrack.prototype.__get_boneQuat = function() {
+	var retVal = new Quaternion()
+	retVal.__ptr = 	Polycode.BoneTrack__get_boneQuat(this.__ptr)
+	return retVal
+}
+
+BoneTrack.prototype.__set_boneQuat = function(val) {
+	Polycode.BoneTrack__set_boneQuat(this.__ptr, val.__ptr)
+}
+
+BoneTrack.prototype.__get_quatCurve = function() {
+	var retVal = new QuaternionCurve()
+	retVal.__ptr = 	Polycode.BoneTrack__get_quatCurve(this.__ptr)
+	return retVal
+}
+
+BoneTrack.prototype.__set_quatCurve = function(val) {
+	Polycode.BoneTrack__set_quatCurve(this.__ptr, val.__ptr)
+}
+
+BoneTrack.prototype.__get_weight = function() {
+	return Polycode.BoneTrack__get_weight(this.__ptr)
+}
+
+BoneTrack.prototype.__set_weight = function(val) {
+	Polycode.BoneTrack__set_weight(this.__ptr, val)
+}
+
 
 BoneTrack.prototype.Play = function(once) {
 	Polycode.BoneTrack_Play(this.__ptr, once)

+ 67 - 20
bindings/javascript/Polycode/Camera.js

@@ -1,16 +1,47 @@
 function Camera() {
+	Object.defineProperties(this, {
+		'frustumCulling': { enumerable: true, configurable: true, get: Camera.prototype.__get_frustumCulling, set: Camera.prototype.__set_frustumCulling},
+		'topLeftOrtho': { enumerable: true, configurable: true, get: Camera.prototype.__get_topLeftOrtho, set: Camera.prototype.__set_topLeftOrtho},
+		'cameraShift': { enumerable: true, configurable: true, get: Camera.prototype.__get_cameraShift, set: Camera.prototype.__set_cameraShift}
+	})
 }
+Camera.prototype.__get_frustumCulling = function() {
+	return Polycode.Camera__get_frustumCulling(this.__ptr)
+}
+
+Camera.prototype.__set_frustumCulling = function(val) {
+	Polycode.Camera__set_frustumCulling(this.__ptr, val)
+}
+
+Camera.prototype.__get_topLeftOrtho = function() {
+	return Polycode.Camera__get_topLeftOrtho(this.__ptr)
+}
+
+Camera.prototype.__set_topLeftOrtho = function(val) {
+	Polycode.Camera__set_topLeftOrtho(this.__ptr, val)
+}
+
+Camera.prototype.__get_cameraShift = function() {
+	var retVal = new Vector2()
+	retVal.__ptr = 	Polycode.Camera__get_cameraShift(this.__ptr)
+	return retVal
+}
+
+Camera.prototype.__set_cameraShift = function(val) {
+	Polycode.Camera__set_cameraShift(this.__ptr, val.__ptr)
+}
+
 
 Camera.prototype.buildFrustumPlanes = function() {
 	Polycode.Camera_buildFrustumPlanes(this.__ptr)
 }
 
 Camera.prototype.isSphereInFrustum = function(pos,fRadius) {
-	Polycode.Camera_isSphereInFrustum(this.__ptr, pos,fRadius)
+	return Polycode.Camera_isSphereInFrustum(this.__ptr, pos,fRadius)
 }
 
 Camera.prototype.isAABBInFrustum = function(aabb) {
-	Polycode.Camera_isAABBInFrustum(this.__ptr, aabb)
+	return Polycode.Camera_isAABBInFrustum(this.__ptr, aabb)
 }
 
 Camera.prototype.setOrthoMode = function(mode) {
@@ -26,15 +57,15 @@ Camera.prototype.setFrustumMode = function(left,right,bottom,top,front,back) {
 }
 
 Camera.prototype.getOrthoMode = function() {
-	Polycode.Camera_getOrthoMode(this.__ptr)
+	return Polycode.Camera_getOrthoMode(this.__ptr)
 }
 
 Camera.prototype.getOrthoSizeX = function() {
-	Polycode.Camera_getOrthoSizeX(this.__ptr)
+	return Polycode.Camera_getOrthoSizeX(this.__ptr)
 }
 
 Camera.prototype.getOrthoSizeY = function() {
-	Polycode.Camera_getOrthoSizeY(this.__ptr)
+	return Polycode.Camera_getOrthoSizeY(this.__ptr)
 }
 
 Camera.prototype.setFOV = function(fov) {
@@ -42,7 +73,7 @@ Camera.prototype.setFOV = function(fov) {
 }
 
 Camera.prototype.getFOV = function() {
-	Polycode.Camera_getFOV(this.__ptr)
+	return Polycode.Camera_getFOV(this.__ptr)
 }
 
 Camera.prototype.setClippingPlanes = function(nearClipPlane,farClipPlane) {
@@ -50,11 +81,11 @@ Camera.prototype.setClippingPlanes = function(nearClipPlane,farClipPlane) {
 }
 
 Camera.prototype.getNearClippingPlane = function() {
-	Polycode.Camera_getNearClippingPlane(this.__ptr)
+	return Polycode.Camera_getNearClippingPlane(this.__ptr)
 }
 
 Camera.prototype.getFarClippingPlane = function() {
-	Polycode.Camera_getFarClippingPlane(this.__ptr)
+	return Polycode.Camera_getFarClippingPlane(this.__ptr)
 }
 
 Camera.prototype.setParentScene = function(parentScene) {
@@ -62,15 +93,19 @@ Camera.prototype.setParentScene = function(parentScene) {
 }
 
 Camera.prototype.getParentScene = function() {
-	Polycode.Camera_getParentScene(this.__ptr)
+	var retVal = new Scene()
+	retVal.__ptr = Polycode.Camera_getParentScene(this.__ptr)
+	return retVal
 }
 
 Camera.prototype.createProjectionMatrix = function() {
-	Polycode.Camera_createProjectionMatrix(this.__ptr)
+	var retVal = new Matrix4()
+	retVal.__ptr = Polycode.Camera_createProjectionMatrix(this.__ptr)
+	return retVal
 }
 
 Camera.prototype.hasFilterShader = function() {
-	Polycode.Camera_hasFilterShader(this.__ptr)
+	return Polycode.Camera_hasFilterShader(this.__ptr)
 }
 
 Camera.prototype.drawFilter = function(targetBuffer) {
@@ -90,11 +125,15 @@ Camera.prototype.removePostFilter = function() {
 }
 
 Camera.prototype.getScreenShaderMaterial = function() {
-	Polycode.Camera_getScreenShaderMaterial(this.__ptr)
+	var retVal = new Material()
+	retVal.__ptr = Polycode.Camera_getScreenShaderMaterial(this.__ptr)
+	return retVal
 }
 
 Camera.prototype.Clone = function(deepClone,ignoreEditorOnly) {
-	Polycode.Camera_Clone(this.__ptr, deepClone,ignoreEditorOnly)
+	var retVal = new Entity()
+	retVal.__ptr = Polycode.Camera_Clone(this.__ptr, deepClone,ignoreEditorOnly)
+	return retVal
 }
 
 Camera.prototype.applyClone = function(clone,deepClone,ignoreEditorOnly) {
@@ -102,7 +141,9 @@ Camera.prototype.applyClone = function(clone,deepClone,ignoreEditorOnly) {
 }
 
 Camera.prototype.getProjectionMatrix = function() {
-	Polycode.Camera_getProjectionMatrix(this.__ptr)
+	var retVal = new Matrix4()
+	retVal.__ptr = Polycode.Camera_getProjectionMatrix(this.__ptr)
+	return retVal
 }
 
 Camera.prototype.setCustomProjectionMatrix = function(matrix) {
@@ -110,7 +151,9 @@ Camera.prototype.setCustomProjectionMatrix = function(matrix) {
 }
 
 Camera.prototype.getViewport = function() {
-	Polycode.Camera_getViewport(this.__ptr)
+	var retVal = new Rectangle()
+	retVal.__ptr = Polycode.Camera_getViewport(this.__ptr)
+	return retVal
 }
 
 Camera.prototype.setViewport = function(viewport) {
@@ -122,7 +165,7 @@ Camera.prototype.setOrthoSizeMode = function(orthoSizeMode) {
 }
 
 Camera.prototype.getOrthoSizeMode = function() {
-	Polycode.Camera_getOrthoSizeMode(this.__ptr)
+	return Polycode.Camera_getOrthoSizeMode(this.__ptr)
 }
 
 Camera.prototype.setProjectionMode = function(mode) {
@@ -130,11 +173,13 @@ Camera.prototype.setProjectionMode = function(mode) {
 }
 
 Camera.prototype.getProjectionMode = function() {
-	Polycode.Camera_getProjectionMode(this.__ptr)
+	return Polycode.Camera_getProjectionMode(this.__ptr)
 }
 
 Camera.prototype.projectRayFrom2DCoordinate = function(coordinate,viewport) {
-	Polycode.Camera_projectRayFrom2DCoordinate(this.__ptr, coordinate,viewport)
+	var retVal = new Vector3()
+	retVal.__ptr = Polycode.Camera_projectRayFrom2DCoordinate(this.__ptr, coordinate,viewport)
+	return retVal
 }
 
 Camera.prototype.renderFullScreenQuad = function(drawBuffer,shaderPass) {
@@ -142,9 +187,11 @@ Camera.prototype.renderFullScreenQuad = function(drawBuffer,shaderPass) {
 }
 
 Camera.prototype.getShaderPass = function(index) {
-	Polycode.Camera_getShaderPass(this.__ptr, index)
+	var retVal = new ShaderPass()
+	retVal.__ptr = Polycode.Camera_getShaderPass(this.__ptr, index)
+	return retVal
 }
 
 Camera.prototype.getNumShaderPasses = function() {
-	Polycode.Camera_getNumShaderPasses(this.__ptr)
+	return Polycode.Camera_getNumShaderPasses(this.__ptr)
 }

+ 46 - 6
bindings/javascript/Polycode/Color.js

@@ -1,5 +1,43 @@
 function Color() {
+	Object.defineProperties(this, {
+		'r': { enumerable: true, configurable: true, get: Color.prototype.__get_r, set: Color.prototype.__set_r},
+		'g': { enumerable: true, configurable: true, get: Color.prototype.__get_g, set: Color.prototype.__set_g},
+		'b': { enumerable: true, configurable: true, get: Color.prototype.__get_b, set: Color.prototype.__set_b},
+		'a': { enumerable: true, configurable: true, get: Color.prototype.__get_a, set: Color.prototype.__set_a}
+	})
 }
+Color.prototype.__get_r = function() {
+	return Polycode.Color__get_r(this.__ptr)
+}
+
+Color.prototype.__set_r = function(val) {
+	Polycode.Color__set_r(this.__ptr, val)
+}
+
+Color.prototype.__get_g = function() {
+	return Polycode.Color__get_g(this.__ptr)
+}
+
+Color.prototype.__set_g = function(val) {
+	Polycode.Color__set_g(this.__ptr, val)
+}
+
+Color.prototype.__get_b = function() {
+	return Polycode.Color__get_b(this.__ptr)
+}
+
+Color.prototype.__set_b = function(val) {
+	Polycode.Color__set_b(this.__ptr, val)
+}
+
+Color.prototype.__get_a = function() {
+	return Polycode.Color__get_a(this.__ptr)
+}
+
+Color.prototype.__set_a = function(val) {
+	Polycode.Color__set_a(this.__ptr, val)
+}
+
 
 Color.prototype.setColorHex = function(hex) {
 	Polycode.Color_setColorHex(this.__ptr, hex)
@@ -34,7 +72,9 @@ Color.prototype.setColor = function(r,g,b,a) {
 }
 
 Color.prototype.blendColor = function(c2,mode,amount,c3) {
-	Polycode.Color_blendColor(this.__ptr, c2,mode,amount,c3)
+	var retVal = new Color()
+	retVal.__ptr = Polycode.Color_blendColor(this.__ptr, c2,mode,amount,c3)
+	return retVal
 }
 
 Color.prototype.Random = function() {
@@ -42,21 +82,21 @@ Color.prototype.Random = function() {
 }
 
 Color.prototype.getBrightness = function() {
-	Polycode.Color_getBrightness(this.__ptr)
+	return Polycode.Color_getBrightness(this.__ptr)
 }
 
 Color.prototype.getHue = function() {
-	Polycode.Color_getHue(this.__ptr)
+	return Polycode.Color_getHue(this.__ptr)
 }
 
 Color.prototype.getSaturation = function() {
-	Polycode.Color_getSaturation(this.__ptr)
+	return Polycode.Color_getSaturation(this.__ptr)
 }
 
 Color.prototype.getValue = function() {
-	Polycode.Color_getValue(this.__ptr)
+	return Polycode.Color_getValue(this.__ptr)
 }
 
 Color.prototype.getUint = function() {
-	Polycode.Color_getUint(this.__ptr)
+	return Polycode.Color_getUint(this.__ptr)
 }

+ 31 - 0
bindings/javascript/Polycode/ColorRange.js

@@ -1,2 +1,33 @@
 function ColorRange() {
+	Object.defineProperties(this, {
+		'color': { enumerable: true, configurable: true, get: ColorRange.prototype.__get_color, set: ColorRange.prototype.__set_color},
+		'rangeStart': { enumerable: true, configurable: true, get: ColorRange.prototype.__get_rangeStart, set: ColorRange.prototype.__set_rangeStart},
+		'rangeEnd': { enumerable: true, configurable: true, get: ColorRange.prototype.__get_rangeEnd, set: ColorRange.prototype.__set_rangeEnd}
+	})
 }
+ColorRange.prototype.__get_color = function() {
+	var retVal = new Color()
+	retVal.__ptr = 	Polycode.ColorRange__get_color(this.__ptr)
+	return retVal
+}
+
+ColorRange.prototype.__set_color = function(val) {
+	Polycode.ColorRange__set_color(this.__ptr, val.__ptr)
+}
+
+ColorRange.prototype.__get_rangeStart = function() {
+	return Polycode.ColorRange__get_rangeStart(this.__ptr)
+}
+
+ColorRange.prototype.__set_rangeStart = function(val) {
+	Polycode.ColorRange__set_rangeStart(this.__ptr, val)
+}
+
+ColorRange.prototype.__get_rangeEnd = function() {
+	return Polycode.ColorRange__get_rangeEnd(this.__ptr)
+}
+
+ColorRange.prototype.__set_rangeEnd = function(val) {
+	Polycode.ColorRange__set_rangeEnd(this.__ptr, val)
+}
+

+ 6 - 4
bindings/javascript/Polycode/Config.js

@@ -10,7 +10,9 @@ Config.prototype.saveConfig = function(configNamespace,fileName) {
 }
 
 Config.prototype.getEntry = function(configNamespace,key) {
-	Polycode.Config_getEntry(this.__ptr, configNamespace,key)
+	var retVal = new ConfigEntry()
+	retVal.__ptr = Polycode.Config_getEntry(this.__ptr, configNamespace,key)
+	return retVal
 }
 
 Config.prototype.setStringValue = function(configNamespace,key,value) {
@@ -22,11 +24,11 @@ Config.prototype.setNumericValue = function(configNamespace,key,value) {
 }
 
 Config.prototype.getNumericValue = function(configNamespace,key) {
-	Polycode.Config_getNumericValue(this.__ptr, configNamespace,key)
+	return Polycode.Config_getNumericValue(this.__ptr, configNamespace,key)
 }
 
 Config.prototype.getStringValue = function(configNamespace,key) {
-	Polycode.Config_getStringValue(this.__ptr, configNamespace,key)
+	return Polycode.Config_getStringValue(this.__ptr, configNamespace,key)
 }
 
 Config.prototype.setBoolValue = function(configNamespace,key,value) {
@@ -34,5 +36,5 @@ Config.prototype.setBoolValue = function(configNamespace,key,value) {
 }
 
 Config.prototype.getBoolValue = function(configNamespace,key) {
-	Polycode.Config_getBoolValue(this.__ptr, configNamespace,key)
+	return Polycode.Config_getBoolValue(this.__ptr, configNamespace,key)
 }

+ 47 - 0
bindings/javascript/Polycode/ConfigEntry.js

@@ -1,2 +1,49 @@
 function ConfigEntry() {
+	Object.defineProperties(this, {
+		'key': { enumerable: true, configurable: true, get: ConfigEntry.prototype.__get_key, set: ConfigEntry.prototype.__set_key},
+		'configNamespace': { enumerable: true, configurable: true, get: ConfigEntry.prototype.__get_configNamespace, set: ConfigEntry.prototype.__set_configNamespace},
+		'numVal': { enumerable: true, configurable: true, get: ConfigEntry.prototype.__get_numVal, set: ConfigEntry.prototype.__set_numVal},
+		'stringVal': { enumerable: true, configurable: true, get: ConfigEntry.prototype.__get_stringVal, set: ConfigEntry.prototype.__set_stringVal},
+		'isString': { enumerable: true, configurable: true, get: ConfigEntry.prototype.__get_isString, set: ConfigEntry.prototype.__set_isString}
+	})
 }
+ConfigEntry.prototype.__get_key = function() {
+	return Polycode.ConfigEntry__get_key(this.__ptr)
+}
+
+ConfigEntry.prototype.__set_key = function(val) {
+	Polycode.ConfigEntry__set_key(this.__ptr, val)
+}
+
+ConfigEntry.prototype.__get_configNamespace = function() {
+	return Polycode.ConfigEntry__get_configNamespace(this.__ptr)
+}
+
+ConfigEntry.prototype.__set_configNamespace = function(val) {
+	Polycode.ConfigEntry__set_configNamespace(this.__ptr, val)
+}
+
+ConfigEntry.prototype.__get_numVal = function() {
+	return Polycode.ConfigEntry__get_numVal(this.__ptr)
+}
+
+ConfigEntry.prototype.__set_numVal = function(val) {
+	Polycode.ConfigEntry__set_numVal(this.__ptr, val)
+}
+
+ConfigEntry.prototype.__get_stringVal = function() {
+	return Polycode.ConfigEntry__get_stringVal(this.__ptr)
+}
+
+ConfigEntry.prototype.__set_stringVal = function(val) {
+	Polycode.ConfigEntry__set_stringVal(this.__ptr, val)
+}
+
+ConfigEntry.prototype.__get_isString = function() {
+	return Polycode.ConfigEntry__get_isString(this.__ptr)
+}
+
+ConfigEntry.prototype.__set_isString = function(val) {
+	Polycode.ConfigEntry__set_isString(this.__ptr, val)
+}
+

+ 102 - 32
bindings/javascript/Polycode/Core.js

@@ -1,8 +1,68 @@
 function Core() {
+	Object.defineProperties(this, {
+		'eventMutex': { enumerable: true, configurable: true, get: Core.prototype.__get_eventMutex, set: Core.prototype.__set_eventMutex},
+		'paused': { enumerable: true, configurable: true, get: Core.prototype.__get_paused, set: Core.prototype.__set_paused},
+		'pauseOnLoseFocus': { enumerable: true, configurable: true, get: Core.prototype.__get_pauseOnLoseFocus, set: Core.prototype.__set_pauseOnLoseFocus},
+		'defaultScreenWidth': { enumerable: true, configurable: true, get: Core.prototype.__get_defaultScreenWidth, set: Core.prototype.__set_defaultScreenWidth},
+		'defaultScreenHeight': { enumerable: true, configurable: true, get: Core.prototype.__get_defaultScreenHeight, set: Core.prototype.__set_defaultScreenHeight},
+		'deviceAttitude': { enumerable: true, configurable: true, get: Core.prototype.__get_deviceAttitude, set: Core.prototype.__set_deviceAttitude}
+	})
 }
+Core.prototype.__get_eventMutex = function() {
+	var retVal = new CoreMutex()
+	retVal.__ptr = 	Polycode.Core__get_eventMutex(this.__ptr)
+	return retVal
+}
+
+Core.prototype.__set_eventMutex = function(val) {
+	Polycode.Core__set_eventMutex(this.__ptr, val.__ptr)
+}
+
+Core.prototype.__get_paused = function() {
+	return Polycode.Core__get_paused(this.__ptr)
+}
+
+Core.prototype.__set_paused = function(val) {
+	Polycode.Core__set_paused(this.__ptr, val)
+}
+
+Core.prototype.__get_pauseOnLoseFocus = function() {
+	return Polycode.Core__get_pauseOnLoseFocus(this.__ptr)
+}
+
+Core.prototype.__set_pauseOnLoseFocus = function(val) {
+	Polycode.Core__set_pauseOnLoseFocus(this.__ptr, val)
+}
+
+Core.prototype.__get_defaultScreenWidth = function() {
+	return Polycode.Core__get_defaultScreenWidth(this.__ptr)
+}
+
+Core.prototype.__set_defaultScreenWidth = function(val) {
+	Polycode.Core__set_defaultScreenWidth(this.__ptr, val)
+}
+
+Core.prototype.__get_defaultScreenHeight = function() {
+	return Polycode.Core__get_defaultScreenHeight(this.__ptr)
+}
+
+Core.prototype.__set_defaultScreenHeight = function(val) {
+	Polycode.Core__set_defaultScreenHeight(this.__ptr, val)
+}
+
+Core.prototype.__get_deviceAttitude = function() {
+	var retVal = new Quaternion()
+	retVal.__ptr = 	Polycode.Core__get_deviceAttitude(this.__ptr)
+	return retVal
+}
+
+Core.prototype.__set_deviceAttitude = function(val) {
+	Polycode.Core__set_deviceAttitude(this.__ptr, val.__ptr)
+}
+
 
 Core.prototype.Update = function() {
-	Polycode.Core_Update(this.__ptr)
+	return Polycode.Core_Update(this.__ptr)
 }
 
 Core.prototype.Render = function() {
@@ -10,15 +70,15 @@ Core.prototype.Render = function() {
 }
 
 Core.prototype.fixedUpdate = function() {
-	Polycode.Core_fixedUpdate(this.__ptr)
+	return Polycode.Core_fixedUpdate(this.__ptr)
 }
 
 Core.prototype.systemUpdate = function() {
-	Polycode.Core_systemUpdate(this.__ptr)
+	return Polycode.Core_systemUpdate(this.__ptr)
 }
 
 Core.prototype.updateAndRender = function() {
-	Polycode.Core_updateAndRender(this.__ptr)
+	return Polycode.Core_updateAndRender(this.__ptr)
 }
 
 Core.prototype.enableMouse = function(newval) {
@@ -50,7 +110,9 @@ Core.prototype.unlockMutex = function(mutex) {
 }
 
 Core.prototype.createMutex = function() {
-	Polycode.Core_createMutex(this.__ptr)
+	var retVal = new CoreMutex()
+	retVal.__ptr = Polycode.Core_createMutex(this.__ptr)
+	return retVal
 }
 
 Core.prototype.copyStringToClipboard = function(str) {
@@ -58,15 +120,17 @@ Core.prototype.copyStringToClipboard = function(str) {
 }
 
 Core.prototype.getClipboardString = function() {
-	Polycode.Core_getClipboardString(this.__ptr)
+	return Polycode.Core_getClipboardString(this.__ptr)
 }
 
 Core.prototype.getServices = function() {
-	Polycode.Core_getServices(this.__ptr)
+	var retVal = new CoreServices()
+	retVal.__ptr = Polycode.Core_getServices(this.__ptr)
+	return retVal
 }
 
 Core.prototype.getFPS = function() {
-	Polycode.Core_getFPS(this.__ptr)
+	return Polycode.Core_getFPS(this.__ptr)
 }
 
 Core.prototype.Shutdown = function() {
@@ -74,39 +138,41 @@ Core.prototype.Shutdown = function() {
 }
 
 Core.prototype.isFullscreen = function() {
-	Polycode.Core_isFullscreen(this.__ptr)
+	return Polycode.Core_isFullscreen(this.__ptr)
 }
 
 Core.prototype.getAALevel = function() {
-	Polycode.Core_getAALevel(this.__ptr)
+	return Polycode.Core_getAALevel(this.__ptr)
 }
 
 Core.prototype.getInput = function() {
-	Polycode.Core_getInput(this.__ptr)
+	var retVal = new CoreInput()
+	retVal.__ptr = Polycode.Core_getInput(this.__ptr)
+	return retVal
 }
 
 Core.prototype.getXRes = function() {
-	Polycode.Core_getXRes(this.__ptr)
+	return Polycode.Core_getXRes(this.__ptr)
 }
 
 Core.prototype.getYRes = function() {
-	Polycode.Core_getYRes(this.__ptr)
+	return Polycode.Core_getYRes(this.__ptr)
 }
 
 Core.prototype.getBackingXRes = function() {
-	Polycode.Core_getBackingXRes(this.__ptr)
+	return Polycode.Core_getBackingXRes(this.__ptr)
 }
 
 Core.prototype.getBackingYRes = function() {
-	Polycode.Core_getBackingYRes(this.__ptr)
+	return Polycode.Core_getBackingYRes(this.__ptr)
 }
 
 Core.prototype.getScreenWidth = function() {
-	Polycode.Core_getScreenWidth(this.__ptr)
+	return Polycode.Core_getScreenWidth(this.__ptr)
 }
 
 Core.prototype.getScreenHeight = function() {
-	Polycode.Core_getScreenHeight(this.__ptr)
+	return Polycode.Core_getScreenHeight(this.__ptr)
 }
 
 Core.prototype.createFolder = function(folderPath) {
@@ -126,7 +192,7 @@ Core.prototype.removeDiskItem = function(itemPath) {
 }
 
 Core.prototype.openFolderPicker = function() {
-	Polycode.Core_openFolderPicker(this.__ptr)
+	return Polycode.Core_openFolderPicker(this.__ptr)
 }
 
 Core.prototype.setFramerate = function(frameRate,maxFixedCycles) {
@@ -138,7 +204,7 @@ Core.prototype.openFilePicker = function(extensions,allowMultiple) {
 }
 
 Core.prototype.saveFilePicker = function(extensions) {
-	Polycode.Core_saveFilePicker(this.__ptr, extensions)
+	return Polycode.Core_saveFilePicker(this.__ptr, extensions)
 }
 
 Core.prototype.handleVideoModeChange = function(modeInfo) {
@@ -154,7 +220,9 @@ Core.prototype.prepareRenderContext = function() {
 }
 
 Core.prototype.openFile = function(fileName,opts) {
-	Polycode.Core_openFile(this.__ptr, fileName,opts)
+	var retVal = new CoreFile()
+	retVal.__ptr = Polycode.Core_openFile(this.__ptr, fileName,opts)
+	return retVal
 }
 
 Core.prototype.closeFile = function(file) {
@@ -174,11 +242,11 @@ Core.prototype.parseFolder = function(pathString,showHidden) {
 }
 
 Core.prototype.systemParseFolder = function(pathString,showHidden,targetVector) {
-	Polycode.Core_systemParseFolder(this.__ptr, pathString,showHidden,targetVector)
+	return Polycode.Core_systemParseFolder(this.__ptr, pathString,showHidden,targetVector)
 }
 
 Core.prototype.getResourcePathForFile = function(fileName) {
-	Polycode.Core_getResourcePathForFile(this.__ptr, fileName)
+	return Polycode.Core_getResourcePathForFile(this.__ptr, fileName)
 }
 
 Core.prototype.setVideoMode = function(xRes,yRes,fullScreen,vSync,aaLevel,anisotropyLevel,retinaSupport) {
@@ -198,27 +266,27 @@ Core.prototype.openURL = function(url) {
 }
 
 Core.prototype.getElapsed = function() {
-	Polycode.Core_getElapsed(this.__ptr)
+	return Polycode.Core_getElapsed(this.__ptr)
 }
 
 Core.prototype.getTicks = function() {
-	Polycode.Core_getTicks(this.__ptr)
+	return Polycode.Core_getTicks(this.__ptr)
 }
 
 Core.prototype.getRefreshIntervalMs = function() {
-	Polycode.Core_getRefreshIntervalMs(this.__ptr)
+	return Polycode.Core_getRefreshIntervalMs(this.__ptr)
 }
 
 Core.prototype.getTimeSleptMs = function() {
-	Polycode.Core_getTimeSleptMs(this.__ptr)
+	return Polycode.Core_getTimeSleptMs(this.__ptr)
 }
 
 Core.prototype.getFixedTimestep = function() {
-	Polycode.Core_getFixedTimestep(this.__ptr)
+	return Polycode.Core_getFixedTimestep(this.__ptr)
 }
 
 Core.prototype.getTicksFloat = function() {
-	Polycode.Core_getTicksFloat(this.__ptr)
+	return Polycode.Core_getTicksFloat(this.__ptr)
 }
 
 Core.prototype.setUserPointer = function(ptr) {
@@ -230,15 +298,15 @@ Core.prototype.getUserPointer = function() {
 }
 
 Core.prototype.executeExternalCommand = function(command,args,inDirectory) {
-	Polycode.Core_executeExternalCommand(this.__ptr, command,args,inDirectory)
+	return Polycode.Core_executeExternalCommand(this.__ptr, command,args,inDirectory)
 }
 
 Core.prototype.getDefaultWorkingDirectory = function() {
-	Polycode.Core_getDefaultWorkingDirectory(this.__ptr)
+	return Polycode.Core_getDefaultWorkingDirectory(this.__ptr)
 }
 
 Core.prototype.getUserHomeDirectory = function() {
-	Polycode.Core_getUserHomeDirectory(this.__ptr)
+	return Polycode.Core_getUserHomeDirectory(this.__ptr)
 }
 
 Core.prototype.makeApplicationMain = function() {
@@ -246,7 +314,9 @@ Core.prototype.makeApplicationMain = function() {
 }
 
 Core.prototype.getEventMutex = function() {
-	Polycode.Core_getEventMutex(this.__ptr)
+	var retVal = new CoreMutex()
+	retVal.__ptr = Polycode.Core_getEventMutex(this.__ptr)
+	return retVal
 }
 
 Core.prototype.removeThread = function(thread) {

+ 20 - 0
bindings/javascript/Polycode/CoreFileExtension.js

@@ -1,2 +1,22 @@
 function CoreFileExtension() {
+	Object.defineProperties(this, {
+		'extension': { enumerable: true, configurable: true, get: CoreFileExtension.prototype.__get_extension, set: CoreFileExtension.prototype.__set_extension},
+		'description': { enumerable: true, configurable: true, get: CoreFileExtension.prototype.__get_description, set: CoreFileExtension.prototype.__set_description}
+	})
 }
+CoreFileExtension.prototype.__get_extension = function() {
+	return Polycode.CoreFileExtension__get_extension(this.__ptr)
+}
+
+CoreFileExtension.prototype.__set_extension = function(val) {
+	Polycode.CoreFileExtension__set_extension(this.__ptr, val)
+}
+
+CoreFileExtension.prototype.__get_description = function() {
+	return Polycode.CoreFileExtension__get_description(this.__ptr)
+}
+
+CoreFileExtension.prototype.__set_description = function(val) {
+	Polycode.CoreFileExtension__set_description(this.__ptr, val)
+}
+

+ 86 - 9
bindings/javascript/Polycode/CoreInput.js

@@ -1,40 +1,117 @@
 function CoreInput() {
+	Object.defineProperties(this, {
+		'simulateTouchWithMouse': { enumerable: true, configurable: true, get: CoreInput.prototype.__get_simulateTouchWithMouse, set: CoreInput.prototype.__set_simulateTouchWithMouse},
+		'simulateTouchAsPen': { enumerable: true, configurable: true, get: CoreInput.prototype.__get_simulateTouchAsPen, set: CoreInput.prototype.__set_simulateTouchAsPen},
+		'simulateMouseWithTouch': { enumerable: true, configurable: true, get: CoreInput.prototype.__get_simulateMouseWithTouch, set: CoreInput.prototype.__set_simulateMouseWithTouch},
+		'ignoreOffScreenTouch': { enumerable: true, configurable: true, get: CoreInput.prototype.__get_ignoreOffScreenTouch, set: CoreInput.prototype.__set_ignoreOffScreenTouch},
+		'keyRepeat': { enumerable: true, configurable: true, get: CoreInput.prototype.__get_keyRepeat, set: CoreInput.prototype.__set_keyRepeat},
+		'mousePosition': { enumerable: true, configurable: true, get: CoreInput.prototype.__get_mousePosition, set: CoreInput.prototype.__set_mousePosition},
+		'deltaMousePosition': { enumerable: true, configurable: true, get: CoreInput.prototype.__get_deltaMousePosition, set: CoreInput.prototype.__set_deltaMousePosition}
+	})
 }
+CoreInput.prototype.__get_simulateTouchWithMouse = function() {
+	return Polycode.CoreInput__get_simulateTouchWithMouse(this.__ptr)
+}
+
+CoreInput.prototype.__set_simulateTouchWithMouse = function(val) {
+	Polycode.CoreInput__set_simulateTouchWithMouse(this.__ptr, val)
+}
+
+CoreInput.prototype.__get_simulateTouchAsPen = function() {
+	return Polycode.CoreInput__get_simulateTouchAsPen(this.__ptr)
+}
+
+CoreInput.prototype.__set_simulateTouchAsPen = function(val) {
+	Polycode.CoreInput__set_simulateTouchAsPen(this.__ptr, val)
+}
+
+CoreInput.prototype.__get_simulateMouseWithTouch = function() {
+	return Polycode.CoreInput__get_simulateMouseWithTouch(this.__ptr)
+}
+
+CoreInput.prototype.__set_simulateMouseWithTouch = function(val) {
+	Polycode.CoreInput__set_simulateMouseWithTouch(this.__ptr, val)
+}
+
+CoreInput.prototype.__get_ignoreOffScreenTouch = function() {
+	return Polycode.CoreInput__get_ignoreOffScreenTouch(this.__ptr)
+}
+
+CoreInput.prototype.__set_ignoreOffScreenTouch = function(val) {
+	Polycode.CoreInput__set_ignoreOffScreenTouch(this.__ptr, val)
+}
+
+CoreInput.prototype.__get_keyRepeat = function() {
+	return Polycode.CoreInput__get_keyRepeat(this.__ptr)
+}
+
+CoreInput.prototype.__set_keyRepeat = function(val) {
+	Polycode.CoreInput__set_keyRepeat(this.__ptr, val)
+}
+
+CoreInput.prototype.__get_mousePosition = function() {
+	var retVal = new Vector2()
+	retVal.__ptr = 	Polycode.CoreInput__get_mousePosition(this.__ptr)
+	return retVal
+}
+
+CoreInput.prototype.__set_mousePosition = function(val) {
+	Polycode.CoreInput__set_mousePosition(this.__ptr, val.__ptr)
+}
+
+CoreInput.prototype.__get_deltaMousePosition = function() {
+	var retVal = new Vector2()
+	retVal.__ptr = 	Polycode.CoreInput__get_deltaMousePosition(this.__ptr)
+	return retVal
+}
+
+CoreInput.prototype.__set_deltaMousePosition = function(val) {
+	Polycode.CoreInput__set_deltaMousePosition(this.__ptr, val.__ptr)
+}
+
 
 CoreInput.prototype.getMousePosition = function() {
-	Polycode.CoreInput_getMousePosition(this.__ptr)
+	var retVal = new Vector2()
+	retVal.__ptr = Polycode.CoreInput_getMousePosition(this.__ptr)
+	return retVal
 }
 
 CoreInput.prototype.getKeyState = function(keyCode) {
-	Polycode.CoreInput_getKeyState(this.__ptr, keyCode)
+	return Polycode.CoreInput_getKeyState(this.__ptr, keyCode)
 }
 
 CoreInput.prototype.getJoystickButtonState = function(joystickIndex,button) {
-	Polycode.CoreInput_getJoystickButtonState(this.__ptr, joystickIndex,button)
+	return Polycode.CoreInput_getJoystickButtonState(this.__ptr, joystickIndex,button)
 }
 
 CoreInput.prototype.getJoystickAxisValue = function(joystickIndex,axis) {
-	Polycode.CoreInput_getJoystickAxisValue(this.__ptr, joystickIndex,axis)
+	return Polycode.CoreInput_getJoystickAxisValue(this.__ptr, joystickIndex,axis)
 }
 
 CoreInput.prototype.getMouseDelta = function() {
-	Polycode.CoreInput_getMouseDelta(this.__ptr)
+	var retVal = new Vector2()
+	retVal.__ptr = Polycode.CoreInput_getMouseDelta(this.__ptr)
+	return retVal
 }
 
 CoreInput.prototype.getMouseButtonState = function(mouseButton) {
-	Polycode.CoreInput_getMouseButtonState(this.__ptr, mouseButton)
+	return Polycode.CoreInput_getMouseButtonState(this.__ptr, mouseButton)
 }
 
 CoreInput.prototype.getNumJoysticks = function() {
-	Polycode.CoreInput_getNumJoysticks(this.__ptr)
+	return Polycode.CoreInput_getNumJoysticks(this.__ptr)
 }
 
 CoreInput.prototype.getJoystickInfoByIndex = function(index) {
-	Polycode.CoreInput_getJoystickInfoByIndex(this.__ptr, index)
+	var retVal = new JoystickInfo()
+	retVal.__ptr = Polycode.CoreInput_getJoystickInfoByIndex(this.__ptr, index)
+	return retVal
 }
 
 CoreInput.prototype.getJoystickInfoByID = function(deviceID) {
-	Polycode.CoreInput_getJoystickInfoByID(this.__ptr, deviceID)
+	var retVal = new JoystickInfo()
+	retVal.__ptr = Polycode.CoreInput_getJoystickInfoByID(this.__ptr, deviceID)
+	return retVal
 }
 
 CoreInput.prototype.addJoystick = function(deviceID) {

+ 13 - 0
bindings/javascript/Polycode/CoreMotionEvent.js

@@ -1,2 +1,15 @@
 function CoreMotionEvent() {
+	Object.defineProperties(this, {
+		'amount': { enumerable: true, configurable: true, get: CoreMotionEvent.prototype.__get_amount, set: CoreMotionEvent.prototype.__set_amount}
+	})
 }
+CoreMotionEvent.prototype.__get_amount = function() {
+	var retVal = new Vector3()
+	retVal.__ptr = 	Polycode.CoreMotionEvent__get_amount(this.__ptr)
+	return retVal
+}
+
+CoreMotionEvent.prototype.__set_amount = function(val) {
+	Polycode.CoreMotionEvent__set_amount(this.__ptr, val.__ptr)
+}
+

+ 11 - 0
bindings/javascript/Polycode/CoreMutex.js

@@ -1,5 +1,16 @@
 function CoreMutex() {
+	Object.defineProperties(this, {
+		'mutexID': { enumerable: true, configurable: true, get: CoreMutex.prototype.__get_mutexID, set: CoreMutex.prototype.__set_mutexID}
+	})
 }
+CoreMutex.prototype.__get_mutexID = function() {
+	return Polycode.CoreMutex__get_mutexID(this.__ptr)
+}
+
+CoreMutex.prototype.__set_mutexID = function(val) {
+	Polycode.CoreMutex__set_mutexID(this.__ptr, val)
+}
+
 
 CoreMutex.prototype.lock = function() {
 	Polycode.CoreMutex_lock(this.__ptr)

+ 33 - 11
bindings/javascript/Polycode/CoreServices.js

@@ -6,7 +6,9 @@ CoreServices.prototype.setRenderer = function(renderer) {
 }
 
 CoreServices.prototype.getRenderer = function() {
-	Polycode.CoreServices_getRenderer(this.__ptr)
+	var retVal = new Renderer()
+	retVal.__ptr = Polycode.CoreServices_getRenderer(this.__ptr)
+	return retVal
 }
 
 CoreServices.prototype.Update = function(elapsed) {
@@ -26,41 +28,61 @@ CoreServices.prototype.setCore = function(core) {
 }
 
 CoreServices.prototype.getCore = function() {
-	Polycode.CoreServices_getCore(this.__ptr)
+	var retVal = new Core()
+	retVal.__ptr = Polycode.CoreServices_getCore(this.__ptr)
+	return retVal
 }
 
 CoreServices.prototype.getInput = function() {
-	Polycode.CoreServices_getInput(this.__ptr)
+	var retVal = new CoreInput()
+	retVal.__ptr = Polycode.CoreServices_getInput(this.__ptr)
+	return retVal
 }
 
 CoreServices.prototype.getMaterialManager = function() {
-	Polycode.CoreServices_getMaterialManager(this.__ptr)
+	var retVal = new MaterialManager()
+	retVal.__ptr = Polycode.CoreServices_getMaterialManager(this.__ptr)
+	return retVal
 }
 
 CoreServices.prototype.getSceneManager = function() {
-	Polycode.CoreServices_getSceneManager(this.__ptr)
+	var retVal = new SceneManager()
+	retVal.__ptr = Polycode.CoreServices_getSceneManager(this.__ptr)
+	return retVal
 }
 
 CoreServices.prototype.getTimerManager = function() {
-	Polycode.CoreServices_getTimerManager(this.__ptr)
+	var retVal = new TimerManager()
+	retVal.__ptr = Polycode.CoreServices_getTimerManager(this.__ptr)
+	return retVal
 }
 
 CoreServices.prototype.getTweenManager = function() {
-	Polycode.CoreServices_getTweenManager(this.__ptr)
+	var retVal = new TweenManager()
+	retVal.__ptr = Polycode.CoreServices_getTweenManager(this.__ptr)
+	return retVal
 }
 
 CoreServices.prototype.getResourceManager = function() {
-	Polycode.CoreServices_getResourceManager(this.__ptr)
+	var retVal = new ResourceManager()
+	retVal.__ptr = Polycode.CoreServices_getResourceManager(this.__ptr)
+	return retVal
 }
 
 CoreServices.prototype.getSoundManager = function() {
-	Polycode.CoreServices_getSoundManager(this.__ptr)
+	var retVal = new SoundManager()
+	retVal.__ptr = Polycode.CoreServices_getSoundManager(this.__ptr)
+	return retVal
 }
 
 CoreServices.prototype.getLogger = function() {
-	Polycode.CoreServices_getLogger(this.__ptr)
+	var retVal = new Logger()
+	retVal.__ptr = Polycode.CoreServices_getLogger(this.__ptr)
+	return retVal
 }
 
 CoreServices.prototype.getConfig = function() {
-	Polycode.CoreServices_getConfig(this.__ptr)
+	var retVal = new Config()
+	retVal.__ptr = Polycode.CoreServices_getConfig(this.__ptr)
+	return retVal
 }

+ 6 - 4
bindings/javascript/Polycode/Data.js

@@ -2,11 +2,11 @@ function Data() {
 }
 
 Data.prototype.loadFromFile = function(fileName) {
-	Polycode.Data_loadFromFile(this.__ptr, fileName)
+	return Polycode.Data_loadFromFile(this.__ptr, fileName)
 }
 
 Data.prototype.getAsString = function(encoding) {
-	Polycode.Data_getAsString(this.__ptr, encoding)
+	return Polycode.Data_getAsString(this.__ptr, encoding)
 }
 
 Data.prototype.setFromString = function(str,encoding) {
@@ -14,9 +14,11 @@ Data.prototype.setFromString = function(str,encoding) {
 }
 
 Data.prototype.saveToFile = function(fileName) {
-	Polycode.Data_saveToFile(this.__ptr, fileName)
+	return Polycode.Data_saveToFile(this.__ptr, fileName)
 }
 
 Data.prototype.getData = function() {
-	Polycode.Data_getData(this.__ptr)
+	var retVal = new char()
+	retVal.__ptr = Polycode.Data_getData(this.__ptr)
+	return retVal
 }

+ 20 - 0
bindings/javascript/Polycode/DebugBackTraceEntry.js

@@ -1,2 +1,22 @@
 function DebugBackTraceEntry() {
+	Object.defineProperties(this, {
+		'fileName': { enumerable: true, configurable: true, get: DebugBackTraceEntry.prototype.__get_fileName, set: DebugBackTraceEntry.prototype.__set_fileName},
+		'lineNumber': { enumerable: true, configurable: true, get: DebugBackTraceEntry.prototype.__get_lineNumber, set: DebugBackTraceEntry.prototype.__set_lineNumber}
+	})
 }
+DebugBackTraceEntry.prototype.__get_fileName = function() {
+	return Polycode.DebugBackTraceEntry__get_fileName(this.__ptr)
+}
+
+DebugBackTraceEntry.prototype.__set_fileName = function(val) {
+	Polycode.DebugBackTraceEntry__set_fileName(this.__ptr, val)
+}
+
+DebugBackTraceEntry.prototype.__get_lineNumber = function() {
+	return Polycode.DebugBackTraceEntry__get_lineNumber(this.__ptr)
+}
+
+DebugBackTraceEntry.prototype.__set_lineNumber = function(val) {
+	Polycode.DebugBackTraceEntry__set_lineNumber(this.__ptr, val)
+}
+

+ 10 - 8
bindings/javascript/Polycode/DummyCore.js

@@ -6,7 +6,7 @@ DummyCore.prototype.Render = function() {
 }
 
 DummyCore.prototype.systemUpdate = function() {
-	Polycode.DummyCore_systemUpdate(this.__ptr)
+	return Polycode.DummyCore_systemUpdate(this.__ptr)
 }
 
 DummyCore.prototype.setCursor = function(cursorType) {
@@ -18,7 +18,9 @@ DummyCore.prototype.createThread = function(target) {
 }
 
 DummyCore.prototype.createMutex = function() {
-	Polycode.DummyCore_createMutex(this.__ptr)
+	var retVal = new CoreMutex()
+	retVal.__ptr = Polycode.DummyCore_createMutex(this.__ptr)
+	return retVal
 }
 
 DummyCore.prototype.copyStringToClipboard = function(str) {
@@ -26,7 +28,7 @@ DummyCore.prototype.copyStringToClipboard = function(str) {
 }
 
 DummyCore.prototype.getClipboardString = function() {
-	Polycode.DummyCore_getClipboardString(this.__ptr)
+	return Polycode.DummyCore_getClipboardString(this.__ptr)
 }
 
 DummyCore.prototype.createFolder = function(folderPath) {
@@ -46,7 +48,7 @@ DummyCore.prototype.removeDiskItem = function(itemPath) {
 }
 
 DummyCore.prototype.openFolderPicker = function() {
-	Polycode.DummyCore_openFolderPicker(this.__ptr)
+	return Polycode.DummyCore_openFolderPicker(this.__ptr)
 }
 
 DummyCore.prototype.openFilePicker = function(extensions,allowMultiple) {
@@ -54,7 +56,7 @@ DummyCore.prototype.openFilePicker = function(extensions,allowMultiple) {
 }
 
 DummyCore.prototype.saveFilePicker = function(extensions) {
-	Polycode.DummyCore_saveFilePicker(this.__ptr, extensions)
+	return Polycode.DummyCore_saveFilePicker(this.__ptr, extensions)
 }
 
 DummyCore.prototype.handleVideoModeChange = function(modeInfo) {
@@ -70,13 +72,13 @@ DummyCore.prototype.openURL = function(url) {
 }
 
 DummyCore.prototype.getTicks = function() {
-	Polycode.DummyCore_getTicks(this.__ptr)
+	return Polycode.DummyCore_getTicks(this.__ptr)
 }
 
 DummyCore.prototype.executeExternalCommand = function(command,args,inDirectory) {
-	Polycode.DummyCore_executeExternalCommand(this.__ptr, command,args,inDirectory)
+	return Polycode.DummyCore_executeExternalCommand(this.__ptr, command,args,inDirectory)
 }
 
 DummyCore.prototype.systemParseFolder = function(pathString,showHidden,targetVector) {
-	Polycode.DummyCore_systemParseFolder(this.__ptr, pathString,showHidden,targetVector)
+	return Polycode.DummyCore_systemParseFolder(this.__ptr, pathString,showHidden,targetVector)
 }

+ 311 - 50
bindings/javascript/Polycode/Entity.js

@@ -1,5 +1,204 @@
 function Entity() {
+	Object.defineProperties(this, {
+		'ownsChildren': { enumerable: true, configurable: true, get: Entity.prototype.__get_ownsChildren, set: Entity.prototype.__set_ownsChildren},
+		'billboardMode': { enumerable: true, configurable: true, get: Entity.prototype.__get_billboardMode, set: Entity.prototype.__set_billboardMode},
+		'color': { enumerable: true, configurable: true, get: Entity.prototype.__get_color, set: Entity.prototype.__set_color},
+		'enabled': { enumerable: true, configurable: true, get: Entity.prototype.__get_enabled, set: Entity.prototype.__set_enabled},
+		'visible': { enumerable: true, configurable: true, get: Entity.prototype.__get_visible, set: Entity.prototype.__set_visible},
+		'depthWrite': { enumerable: true, configurable: true, get: Entity.prototype.__get_depthWrite, set: Entity.prototype.__set_depthWrite},
+		'depthTest': { enumerable: true, configurable: true, get: Entity.prototype.__get_depthTest, set: Entity.prototype.__set_depthTest},
+		'colorAffectsChildren': { enumerable: true, configurable: true, get: Entity.prototype.__get_colorAffectsChildren, set: Entity.prototype.__set_colorAffectsChildren},
+		'visibilityAffectsChildren': { enumerable: true, configurable: true, get: Entity.prototype.__get_visibilityAffectsChildren, set: Entity.prototype.__set_visibilityAffectsChildren},
+		'ignoreParentMatrix': { enumerable: true, configurable: true, get: Entity.prototype.__get_ignoreParentMatrix, set: Entity.prototype.__set_ignoreParentMatrix},
+		'enableScissor': { enumerable: true, configurable: true, get: Entity.prototype.__get_enableScissor, set: Entity.prototype.__set_enableScissor},
+		'scissorBox': { enumerable: true, configurable: true, get: Entity.prototype.__get_scissorBox, set: Entity.prototype.__set_scissorBox},
+		'editorOnly': { enumerable: true, configurable: true, get: Entity.prototype.__get_editorOnly, set: Entity.prototype.__set_editorOnly},
+		'id': { enumerable: true, configurable: true, get: Entity.prototype.__get_id, set: Entity.prototype.__set_id},
+		'collisionShapeType': { enumerable: true, configurable: true, get: Entity.prototype.__get_collisionShapeType, set: Entity.prototype.__set_collisionShapeType},
+		'processInputEvents': { enumerable: true, configurable: true, get: Entity.prototype.__get_processInputEvents, set: Entity.prototype.__set_processInputEvents},
+		'blockMouseInput': { enumerable: true, configurable: true, get: Entity.prototype.__get_blockMouseInput, set: Entity.prototype.__set_blockMouseInput},
+		'snapToPixels': { enumerable: true, configurable: true, get: Entity.prototype.__get_snapToPixels, set: Entity.prototype.__set_snapToPixels},
+		'mouseOver': { enumerable: true, configurable: true, get: Entity.prototype.__get_mouseOver, set: Entity.prototype.__set_mouseOver},
+		'rendererVis': { enumerable: true, configurable: true, get: Entity.prototype.__get_rendererVis, set: Entity.prototype.__set_rendererVis},
+		'layerID': { enumerable: true, configurable: true, get: Entity.prototype.__get_layerID, set: Entity.prototype.__set_layerID}
+	})
 }
+Entity.prototype.__get_ownsChildren = function() {
+	return Polycode.Entity__get_ownsChildren(this.__ptr)
+}
+
+Entity.prototype.__set_ownsChildren = function(val) {
+	Polycode.Entity__set_ownsChildren(this.__ptr, val)
+}
+
+Entity.prototype.__get_billboardMode = function() {
+	return Polycode.Entity__get_billboardMode(this.__ptr)
+}
+
+Entity.prototype.__set_billboardMode = function(val) {
+	Polycode.Entity__set_billboardMode(this.__ptr, val)
+}
+
+Entity.prototype.__get_color = function() {
+	var retVal = new Color()
+	retVal.__ptr = 	Polycode.Entity__get_color(this.__ptr)
+	return retVal
+}
+
+Entity.prototype.__set_color = function(val) {
+	Polycode.Entity__set_color(this.__ptr, val.__ptr)
+}
+
+Entity.prototype.__get_enabled = function() {
+	return Polycode.Entity__get_enabled(this.__ptr)
+}
+
+Entity.prototype.__set_enabled = function(val) {
+	Polycode.Entity__set_enabled(this.__ptr, val)
+}
+
+Entity.prototype.__get_visible = function() {
+	return Polycode.Entity__get_visible(this.__ptr)
+}
+
+Entity.prototype.__set_visible = function(val) {
+	Polycode.Entity__set_visible(this.__ptr, val)
+}
+
+Entity.prototype.__get_depthWrite = function() {
+	return Polycode.Entity__get_depthWrite(this.__ptr)
+}
+
+Entity.prototype.__set_depthWrite = function(val) {
+	Polycode.Entity__set_depthWrite(this.__ptr, val)
+}
+
+Entity.prototype.__get_depthTest = function() {
+	return Polycode.Entity__get_depthTest(this.__ptr)
+}
+
+Entity.prototype.__set_depthTest = function(val) {
+	Polycode.Entity__set_depthTest(this.__ptr, val)
+}
+
+Entity.prototype.__get_colorAffectsChildren = function() {
+	return Polycode.Entity__get_colorAffectsChildren(this.__ptr)
+}
+
+Entity.prototype.__set_colorAffectsChildren = function(val) {
+	Polycode.Entity__set_colorAffectsChildren(this.__ptr, val)
+}
+
+Entity.prototype.__get_visibilityAffectsChildren = function() {
+	return Polycode.Entity__get_visibilityAffectsChildren(this.__ptr)
+}
+
+Entity.prototype.__set_visibilityAffectsChildren = function(val) {
+	Polycode.Entity__set_visibilityAffectsChildren(this.__ptr, val)
+}
+
+Entity.prototype.__get_ignoreParentMatrix = function() {
+	return Polycode.Entity__get_ignoreParentMatrix(this.__ptr)
+}
+
+Entity.prototype.__set_ignoreParentMatrix = function(val) {
+	Polycode.Entity__set_ignoreParentMatrix(this.__ptr, val)
+}
+
+Entity.prototype.__get_enableScissor = function() {
+	return Polycode.Entity__get_enableScissor(this.__ptr)
+}
+
+Entity.prototype.__set_enableScissor = function(val) {
+	Polycode.Entity__set_enableScissor(this.__ptr, val)
+}
+
+Entity.prototype.__get_scissorBox = function() {
+	var retVal = new Rectangle()
+	retVal.__ptr = 	Polycode.Entity__get_scissorBox(this.__ptr)
+	return retVal
+}
+
+Entity.prototype.__set_scissorBox = function(val) {
+	Polycode.Entity__set_scissorBox(this.__ptr, val.__ptr)
+}
+
+Entity.prototype.__get_editorOnly = function() {
+	return Polycode.Entity__get_editorOnly(this.__ptr)
+}
+
+Entity.prototype.__set_editorOnly = function(val) {
+	Polycode.Entity__set_editorOnly(this.__ptr, val)
+}
+
+Entity.prototype.__get_id = function() {
+	return Polycode.Entity__get_id(this.__ptr)
+}
+
+Entity.prototype.__set_id = function(val) {
+	Polycode.Entity__set_id(this.__ptr, val)
+}
+
+Entity.prototype.__get_collisionShapeType = function() {
+	var retVal = new char()
+	retVal.__ptr = 	Polycode.Entity__get_collisionShapeType(this.__ptr)
+	return retVal
+}
+
+Entity.prototype.__set_collisionShapeType = function(val) {
+	Polycode.Entity__set_collisionShapeType(this.__ptr, val.__ptr)
+}
+
+Entity.prototype.__get_processInputEvents = function() {
+	return Polycode.Entity__get_processInputEvents(this.__ptr)
+}
+
+Entity.prototype.__set_processInputEvents = function(val) {
+	Polycode.Entity__set_processInputEvents(this.__ptr, val)
+}
+
+Entity.prototype.__get_blockMouseInput = function() {
+	return Polycode.Entity__get_blockMouseInput(this.__ptr)
+}
+
+Entity.prototype.__set_blockMouseInput = function(val) {
+	Polycode.Entity__set_blockMouseInput(this.__ptr, val)
+}
+
+Entity.prototype.__get_snapToPixels = function() {
+	return Polycode.Entity__get_snapToPixels(this.__ptr)
+}
+
+Entity.prototype.__set_snapToPixels = function(val) {
+	Polycode.Entity__set_snapToPixels(this.__ptr, val)
+}
+
+Entity.prototype.__get_mouseOver = function() {
+	return Polycode.Entity__get_mouseOver(this.__ptr)
+}
+
+Entity.prototype.__set_mouseOver = function(val) {
+	Polycode.Entity__set_mouseOver(this.__ptr, val)
+}
+
+Entity.prototype.__get_rendererVis = function() {
+	return Polycode.Entity__get_rendererVis(this.__ptr)
+}
+
+Entity.prototype.__set_rendererVis = function(val) {
+	Polycode.Entity__set_rendererVis(this.__ptr, val)
+}
+
+Entity.prototype.__get_layerID = function() {
+	var retVal = new char()
+	retVal.__ptr = 	Polycode.Entity__get_layerID(this.__ptr)
+	return retVal
+}
+
+Entity.prototype.__set_layerID = function(val) {
+	Polycode.Entity__set_layerID(this.__ptr, val.__ptr)
+}
+
 
 Entity.prototype.initEntity = function() {
 	Polycode.Entity_initEntity(this.__ptr)
@@ -26,7 +225,9 @@ Entity.prototype.renderChildren = function(buffer,parentScissorBox) {
 }
 
 Entity.prototype.Clone = function(deepClone,ignoreEditorOnly) {
-	Polycode.Entity_Clone(this.__ptr, deepClone,ignoreEditorOnly)
+	var retVal = new Entity()
+	retVal.__ptr = Polycode.Entity_Clone(this.__ptr, deepClone,ignoreEditorOnly)
+	return retVal
 }
 
 Entity.prototype.applyClone = function(clone,deepClone,ignoreEditorOnly) {
@@ -46,23 +247,33 @@ Entity.prototype.updateEntityMatrix = function() {
 }
 
 Entity.prototype.getTransformMatrix = function() {
-	Polycode.Entity_getTransformMatrix(this.__ptr)
+	var retVal = new Matrix4()
+	retVal.__ptr = Polycode.Entity_getTransformMatrix(this.__ptr)
+	return retVal
 }
 
 Entity.prototype.getConcatenatedMatrix = function() {
-	Polycode.Entity_getConcatenatedMatrix(this.__ptr)
+	var retVal = new Matrix4()
+	retVal.__ptr = Polycode.Entity_getConcatenatedMatrix(this.__ptr)
+	return retVal
 }
 
 Entity.prototype.getConcatenatedMatrixRelativeTo = function(relativeEntity) {
-	Polycode.Entity_getConcatenatedMatrixRelativeTo(this.__ptr, relativeEntity)
+	var retVal = new Matrix4()
+	retVal.__ptr = Polycode.Entity_getConcatenatedMatrixRelativeTo(this.__ptr, relativeEntity)
+	return retVal
 }
 
 Entity.prototype.getAnchorAdjustedMatrix = function() {
-	Polycode.Entity_getAnchorAdjustedMatrix(this.__ptr)
+	var retVal = new Matrix4()
+	retVal.__ptr = Polycode.Entity_getAnchorAdjustedMatrix(this.__ptr)
+	return retVal
 }
 
 Entity.prototype.getConcatenatedRollMatrix = function() {
-	Polycode.Entity_getConcatenatedRollMatrix(this.__ptr)
+	var retVal = new Matrix4()
+	retVal.__ptr = Polycode.Entity_getConcatenatedRollMatrix(this.__ptr)
+	return retVal
 }
 
 Entity.prototype.setTransformByMatrixPure = function(matrix) {
@@ -70,7 +281,9 @@ Entity.prototype.setTransformByMatrixPure = function(matrix) {
 }
 
 Entity.prototype.getLookAtMatrix = function(loc,upVector) {
-	Polycode.Entity_getLookAtMatrix(this.__ptr, loc,upVector)
+	var retVal = new Matrix4()
+	retVal.__ptr = Polycode.Entity_getLookAtMatrix(this.__ptr, loc,upVector)
+	return retVal
 }
 
 Entity.prototype.addChild = function(newChild) {
@@ -102,15 +315,19 @@ Entity.prototype.setParentEntity = function(entity) {
 }
 
 Entity.prototype.getParentEntity = function() {
-	Polycode.Entity_getParentEntity(this.__ptr)
+	var retVal = new Entity()
+	retVal.__ptr = Polycode.Entity_getParentEntity(this.__ptr)
+	return retVal
 }
 
 Entity.prototype.getNumChildren = function() {
-	Polycode.Entity_getNumChildren(this.__ptr)
+	return Polycode.Entity_getNumChildren(this.__ptr)
 }
 
 Entity.prototype.getChildAtIndex = function(index) {
-	Polycode.Entity_getChildAtIndex(this.__ptr, index)
+	var retVal = new Entity()
+	retVal.__ptr = Polycode.Entity_getChildAtIndex(this.__ptr, index)
+	return retVal
 }
 
 Entity.prototype.setOwnsChildrenRecursive = function(val) {
@@ -118,15 +335,21 @@ Entity.prototype.setOwnsChildrenRecursive = function(val) {
 }
 
 Entity.prototype.getPosition = function() {
-	Polycode.Entity_getPosition(this.__ptr)
+	var retVal = new Vector3()
+	retVal.__ptr = Polycode.Entity_getPosition(this.__ptr)
+	return retVal
 }
 
 Entity.prototype.getPosition2D = function() {
-	Polycode.Entity_getPosition2D(this.__ptr)
+	var retVal = new Vector2()
+	retVal.__ptr = Polycode.Entity_getPosition2D(this.__ptr)
+	return retVal
 }
 
 Entity.prototype.getCombinedPosition = function() {
-	Polycode.Entity_getCombinedPosition(this.__ptr)
+	var retVal = new Vector3()
+	retVal.__ptr = Polycode.Entity_getCombinedPosition(this.__ptr)
+	return retVal
 }
 
 Entity.prototype.setPosition = function(x,y,z) {
@@ -170,27 +393,33 @@ Entity.prototype.setScale = function(x,y,z) {
 }
 
 Entity.prototype.getCompoundScale = function() {
-	Polycode.Entity_getCompoundScale(this.__ptr)
+	var retVal = new Vector3()
+	retVal.__ptr = Polycode.Entity_getCompoundScale(this.__ptr)
+	return retVal
 }
 
 Entity.prototype.getScale = function() {
-	Polycode.Entity_getScale(this.__ptr)
+	var retVal = new Vector3()
+	retVal.__ptr = Polycode.Entity_getScale(this.__ptr)
+	return retVal
 }
 
 Entity.prototype.getRotationEuler = function() {
-	Polycode.Entity_getRotationEuler(this.__ptr)
+	var retVal = new Vector3()
+	retVal.__ptr = Polycode.Entity_getRotationEuler(this.__ptr)
+	return retVal
 }
 
 Entity.prototype.getCombinedPitch = function() {
-	Polycode.Entity_getCombinedPitch(this.__ptr)
+	return Polycode.Entity_getCombinedPitch(this.__ptr)
 }
 
 Entity.prototype.getCombinedYaw = function() {
-	Polycode.Entity_getCombinedYaw(this.__ptr)
+	return Polycode.Entity_getCombinedYaw(this.__ptr)
 }
 
 Entity.prototype.getCombinedRoll = function() {
-	Polycode.Entity_getCombinedRoll(this.__ptr)
+	return Polycode.Entity_getCombinedRoll(this.__ptr)
 }
 
 Entity.prototype.rebuildRotation = function() {
@@ -226,27 +455,27 @@ Entity.prototype.Pitch = function(pitch) {
 }
 
 Entity.prototype.getPitch = function() {
-	Polycode.Entity_getPitch(this.__ptr)
+	return Polycode.Entity_getPitch(this.__ptr)
 }
 
 Entity.prototype.getYaw = function() {
-	Polycode.Entity_getYaw(this.__ptr)
+	return Polycode.Entity_getYaw(this.__ptr)
 }
 
 Entity.prototype.getRoll = function() {
-	Polycode.Entity_getRoll(this.__ptr)
+	return Polycode.Entity_getRoll(this.__ptr)
 }
 
 Entity.prototype.getWidth = function() {
-	Polycode.Entity_getWidth(this.__ptr)
+	return Polycode.Entity_getWidth(this.__ptr)
 }
 
 Entity.prototype.getHeight = function() {
-	Polycode.Entity_getHeight(this.__ptr)
+	return Polycode.Entity_getHeight(this.__ptr)
 }
 
 Entity.prototype.getDepth = function() {
-	Polycode.Entity_getDepth(this.__ptr)
+	return Polycode.Entity_getDepth(this.__ptr)
 }
 
 Entity.prototype.setWidth = function(width) {
@@ -270,11 +499,15 @@ Entity.prototype.setRotationByQuaternion = function(quaternion) {
 }
 
 Entity.prototype.getRotationQuat = function() {
-	Polycode.Entity_getRotationQuat(this.__ptr)
+	var retVal = new Quaternion()
+	retVal.__ptr = Polycode.Entity_getRotationQuat(this.__ptr)
+	return retVal
 }
 
 Entity.prototype.getConcatenatedQuat = function() {
-	Polycode.Entity_getConcatenatedQuat(this.__ptr)
+	var retVal = new Quaternion()
+	retVal.__ptr = Polycode.Entity_getConcatenatedQuat(this.__ptr)
+	return retVal
 }
 
 Entity.prototype.lookAt = function(loc,upVector) {
@@ -286,7 +519,9 @@ Entity.prototype.lookAtEntity = function(entity,upVector) {
 }
 
 Entity.prototype.getCombinedColor = function() {
-	Polycode.Entity_getCombinedColor(this.__ptr)
+	var retVal = new Color()
+	retVal.__ptr = Polycode.Entity_getCombinedColor(this.__ptr)
+	return retVal
 }
 
 Entity.prototype.setColor = function(r,g,b,a) {
@@ -302,27 +537,39 @@ Entity.prototype.setAnchorPoint = function(anchorPoint) {
 }
 
 Entity.prototype.getAnchorPoint = function() {
-	Polycode.Entity_getAnchorPoint(this.__ptr)
+	var retVal = new Vector3()
+	retVal.__ptr = Polycode.Entity_getAnchorPoint(this.__ptr)
+	return retVal
 }
 
 Entity.prototype.onMouseDown = function(ray,mouseButton,timestamp) {
-	Polycode.Entity_onMouseDown(this.__ptr, ray,mouseButton,timestamp)
+	var retVal = new MouseEventResult()
+	retVal.__ptr = Polycode.Entity_onMouseDown(this.__ptr, ray,mouseButton,timestamp)
+	return retVal
 }
 
 Entity.prototype.onMouseUp = function(ray,mouseButton,timestamp) {
-	Polycode.Entity_onMouseUp(this.__ptr, ray,mouseButton,timestamp)
+	var retVal = new MouseEventResult()
+	retVal.__ptr = Polycode.Entity_onMouseUp(this.__ptr, ray,mouseButton,timestamp)
+	return retVal
 }
 
 Entity.prototype.onMouseMove = function(ray,timestamp) {
-	Polycode.Entity_onMouseMove(this.__ptr, ray,timestamp)
+	var retVal = new MouseEventResult()
+	retVal.__ptr = Polycode.Entity_onMouseMove(this.__ptr, ray,timestamp)
+	return retVal
 }
 
 Entity.prototype.onMouseWheelUp = function(ray,timestamp) {
-	Polycode.Entity_onMouseWheelUp(this.__ptr, ray,timestamp)
+	var retVal = new MouseEventResult()
+	retVal.__ptr = Polycode.Entity_onMouseWheelUp(this.__ptr, ray,timestamp)
+	return retVal
 }
 
 Entity.prototype.onMouseWheelDown = function(ray,timestamp) {
-	Polycode.Entity_onMouseWheelDown(this.__ptr, ray,timestamp)
+	var retVal = new MouseEventResult()
+	retVal.__ptr = Polycode.Entity_onMouseWheelDown(this.__ptr, ray,timestamp)
+	return retVal
 }
 
 Entity.prototype.setDepthOnly = function(val) {
@@ -330,7 +577,7 @@ Entity.prototype.setDepthOnly = function(val) {
 }
 
 Entity.prototype.getDepthOnly = function() {
-	Polycode.Entity_getDepthOnly(this.__ptr)
+	return Polycode.Entity_getDepthOnly(this.__ptr)
 }
 
 Entity.prototype.setUserData = function(userData) {
@@ -346,11 +593,13 @@ Entity.prototype.setBlendingMode = function(newBlendingMode) {
 }
 
 Entity.prototype.getBlendingMode = function() {
-	Polycode.Entity_getBlendingMode(this.__ptr)
+	return Polycode.Entity_getBlendingMode(this.__ptr)
 }
 
 Entity.prototype.getEntityById = function(id,recursive) {
-	Polycode.Entity_getEntityById(this.__ptr, id,recursive)
+	var retVal = new Entity()
+	retVal.__ptr = Polycode.Entity_getEntityById(this.__ptr, id,recursive)
+	return retVal
 }
 
 Entity.prototype.getEntitiesByTag = function(tag,recursive) {
@@ -362,7 +611,7 @@ Entity.prototype.getEntitiesByLayerID = function(layerID,recursive) {
 }
 
 Entity.prototype.getEntityProp = function(propName) {
-	Polycode.Entity_getEntityProp(this.__ptr, propName)
+	return Polycode.Entity_getEntityProp(this.__ptr, propName)
 }
 
 Entity.prototype.setEntityProp = function(propName,propValue) {
@@ -374,7 +623,7 @@ Entity.prototype.setInverseY = function(val) {
 }
 
 Entity.prototype.getInverseY = function() {
-	Polycode.Entity_getInverseY(this.__ptr)
+	return Polycode.Entity_getInverseY(this.__ptr)
 }
 
 Entity.prototype.doUpdates = function() {
@@ -386,7 +635,9 @@ Entity.prototype.doFixedUpdates = function() {
 }
 
 Entity.prototype.buildPositionMatrix = function() {
-	Polycode.Entity_buildPositionMatrix(this.__ptr)
+	var retVal = new Matrix4()
+	retVal.__ptr = Polycode.Entity_buildPositionMatrix(this.__ptr)
+	return retVal
 }
 
 Entity.prototype.setRenderer = function(renderer) {
@@ -394,19 +645,19 @@ Entity.prototype.setRenderer = function(renderer) {
 }
 
 Entity.prototype.customHitDetection = function(ray) {
-	Polycode.Entity_customHitDetection(this.__ptr, ray)
+	return Polycode.Entity_customHitDetection(this.__ptr, ray)
 }
 
 Entity.prototype.getNumTags = function() {
-	Polycode.Entity_getNumTags(this.__ptr)
+	return Polycode.Entity_getNumTags(this.__ptr)
 }
 
 Entity.prototype.getTagAtIndex = function(index) {
-	Polycode.Entity_getTagAtIndex(this.__ptr, index)
+	return Polycode.Entity_getTagAtIndex(this.__ptr, index)
 }
 
 Entity.prototype.hasTag = function(tag) {
-	Polycode.Entity_hasTag(this.__ptr, tag)
+	return Polycode.Entity_hasTag(this.__ptr, tag)
 }
 
 Entity.prototype.clearTags = function() {
@@ -418,7 +669,9 @@ Entity.prototype.addTag = function(tag) {
 }
 
 Entity.prototype.getScreenPosition = function(projectionMatrix,cameraMatrix,viewport) {
-	Polycode.Entity_getScreenPosition(this.__ptr, projectionMatrix,cameraMatrix,viewport)
+	var retVal = new Vector2()
+	retVal.__ptr = Polycode.Entity_getScreenPosition(this.__ptr, projectionMatrix,cameraMatrix,viewport)
+	return retVal
 }
 
 Entity.prototype.recalculateAABBAllChildren = function() {
@@ -430,11 +683,15 @@ Entity.prototype.recalculateAABB = function() {
 }
 
 Entity.prototype.getWorldAABB = function() {
-	Polycode.Entity_getWorldAABB(this.__ptr)
+	var retVal = new AABB()
+	retVal.__ptr = Polycode.Entity_getWorldAABB(this.__ptr)
+	return retVal
 }
 
 Entity.prototype.getLocalBoundingBox = function() {
-	Polycode.Entity_getLocalBoundingBox(this.__ptr)
+	var retVal = new Vector3()
+	retVal.__ptr = Polycode.Entity_getLocalBoundingBox(this.__ptr)
+	return retVal
 }
 
 Entity.prototype.setLocalBoundingBox = function(box) {
@@ -458,7 +715,9 @@ Entity.prototype.setContainerScene = function(scene) {
 }
 
 Entity.prototype.getContainerScene = function() {
-	Polycode.Entity_getContainerScene(this.__ptr)
+	var retVal = new Scene()
+	retVal.__ptr = Polycode.Entity_getContainerScene(this.__ptr)
+	return retVal
 }
 
 Entity.prototype.attachScript = function(script) {
@@ -470,9 +729,11 @@ Entity.prototype.detachScript = function(script) {
 }
 
 Entity.prototype.getNumScripts = function() {
-	Polycode.Entity_getNumScripts(this.__ptr)
+	return Polycode.Entity_getNumScripts(this.__ptr)
 }
 
 Entity.prototype.getScriptAtIndex = function(index) {
-	Polycode.Entity_getScriptAtIndex(this.__ptr, index)
+	var retVal = new ScriptInstance()
+	retVal.__ptr = Polycode.Entity_getScriptAtIndex(this.__ptr, index)
+	return retVal
 }

+ 20 - 0
bindings/javascript/Polycode/EntityProp.js

@@ -1,2 +1,22 @@
 function EntityProp() {
+	Object.defineProperties(this, {
+		'propName': { enumerable: true, configurable: true, get: EntityProp.prototype.__get_propName, set: EntityProp.prototype.__set_propName},
+		'propValue': { enumerable: true, configurable: true, get: EntityProp.prototype.__get_propValue, set: EntityProp.prototype.__set_propValue}
+	})
 }
+EntityProp.prototype.__get_propName = function() {
+	return Polycode.EntityProp__get_propName(this.__ptr)
+}
+
+EntityProp.prototype.__set_propName = function(val) {
+	Polycode.EntityProp__set_propName(this.__ptr, val)
+}
+
+EntityProp.prototype.__get_propValue = function() {
+	return Polycode.EntityProp__get_propValue(this.__ptr)
+}
+
+EntityProp.prototype.__set_propValue = function(val) {
+	Polycode.EntityProp__set_propValue(this.__ptr, val)
+}
+

+ 25 - 3
bindings/javascript/Polycode/Event.js

@@ -1,12 +1,34 @@
 function Event() {
+	Object.defineProperties(this, {
+		'deleteOnDispatch': { enumerable: true, configurable: true, get: Event.prototype.__get_deleteOnDispatch, set: Event.prototype.__set_deleteOnDispatch},
+		'cancelEventFlag': { enumerable: true, configurable: true, get: Event.prototype.__get_cancelEventFlag, set: Event.prototype.__set_cancelEventFlag}
+	})
 }
+Event.prototype.__get_deleteOnDispatch = function() {
+	return Polycode.Event__get_deleteOnDispatch(this.__ptr)
+}
+
+Event.prototype.__set_deleteOnDispatch = function(val) {
+	Polycode.Event__set_deleteOnDispatch(this.__ptr, val)
+}
+
+Event.prototype.__get_cancelEventFlag = function() {
+	return Polycode.Event__get_cancelEventFlag(this.__ptr)
+}
+
+Event.prototype.__set_cancelEventFlag = function(val) {
+	Polycode.Event__set_cancelEventFlag(this.__ptr, val)
+}
+
 
 Event.prototype.getEventCode = function() {
-	Polycode.Event_getEventCode(this.__ptr)
+	return Polycode.Event_getEventCode(this.__ptr)
 }
 
 Event.prototype.getDispatcher = function() {
-	Polycode.Event_getDispatcher(this.__ptr)
+	var retVal = new EventDispatcher()
+	retVal.__ptr = Polycode.Event_getDispatcher(this.__ptr)
+	return retVal
 }
 
 Event.prototype.setEventCode = function(eventCode) {
@@ -18,7 +40,7 @@ Event.prototype.setDispatcher = function(dispatcher) {
 }
 
 Event.prototype.getEventType = function() {
-	Polycode.Event_getEventType(this.__ptr)
+	return Polycode.Event_getEventType(this.__ptr)
 }
 
 Event.prototype.cancelEvent = function() {

+ 1 - 1
bindings/javascript/Polycode/EventDispatcher.js

@@ -18,7 +18,7 @@ EventDispatcher.prototype.addEventListenerUnique = function(handler,eventCode) {
 }
 
 EventDispatcher.prototype.hasEventListener = function(handler,eventCode) {
-	Polycode.EventDispatcher_hasEventListener(this.__ptr, handler,eventCode)
+	return Polycode.EventDispatcher_hasEventListener(this.__ptr, handler,eventCode)
 }
 
 EventDispatcher.prototype.removeEventListener = function(handler,eventCode) {

+ 17 - 4
bindings/javascript/Polycode/Font.js

@@ -1,12 +1,25 @@
 function Font() {
+	Object.defineProperties(this, {
+		'loaded': { enumerable: true, configurable: true, get: Font.prototype.__get_loaded, set: Font.prototype.__set_loaded}
+	})
 }
+Font.prototype.__get_loaded = function() {
+	return Polycode.Font__get_loaded(this.__ptr)
+}
+
+Font.prototype.__set_loaded = function(val) {
+	Polycode.Font__set_loaded(this.__ptr, val)
+}
+
 
 Font.prototype.getFace = function() {
-	Polycode.Font_getFace(this.__ptr)
+	var retVal = new FT_Face()
+	retVal.__ptr = Polycode.Font_getFace(this.__ptr)
+	return retVal
 }
 
 Font.prototype.isValid = function() {
-	Polycode.Font_isValid(this.__ptr)
+	return Polycode.Font_isValid(this.__ptr)
 }
 
 Font.prototype.setFontName = function(fontName) {
@@ -14,9 +27,9 @@ Font.prototype.setFontName = function(fontName) {
 }
 
 Font.prototype.getFontName = function() {
-	Polycode.Font_getFontName(this.__ptr)
+	return Polycode.Font_getFontName(this.__ptr)
 }
 
 Font.prototype.getFontPath = function() {
-	Polycode.Font_getFontPath(this.__ptr)
+	return Polycode.Font_getFontPath(this.__ptr)
 }

+ 3 - 1
bindings/javascript/Polycode/FontResourceLoader.js

@@ -2,5 +2,7 @@ function FontResourceLoader() {
 }
 
 FontResourceLoader.prototype.loadResource = function(path,targetPool) {
-	Polycode.FontResourceLoader_loadResource(this.__ptr, path,targetPool)
+	var retVal = new Resource()
+	retVal.__ptr = Polycode.FontResourceLoader_loadResource(this.__ptr, path,targetPool)
+	return retVal
 }

+ 108 - 0
bindings/javascript/Polycode/GPUDrawBuffer.js

@@ -1,2 +1,110 @@
 function GPUDrawBuffer() {
+	Object.defineProperties(this, {
+		'targetFramebuffer': { enumerable: true, configurable: true, get: GPUDrawBuffer.prototype.__get_targetFramebuffer, set: GPUDrawBuffer.prototype.__set_targetFramebuffer},
+		'projectionMatrix': { enumerable: true, configurable: true, get: GPUDrawBuffer.prototype.__get_projectionMatrix, set: GPUDrawBuffer.prototype.__set_projectionMatrix},
+		'viewMatrix': { enumerable: true, configurable: true, get: GPUDrawBuffer.prototype.__get_viewMatrix, set: GPUDrawBuffer.prototype.__set_viewMatrix},
+		'cameraMatrix': { enumerable: true, configurable: true, get: GPUDrawBuffer.prototype.__get_cameraMatrix, set: GPUDrawBuffer.prototype.__set_cameraMatrix},
+		'clearColor': { enumerable: true, configurable: true, get: GPUDrawBuffer.prototype.__get_clearColor, set: GPUDrawBuffer.prototype.__set_clearColor},
+		'clearDepthBuffer': { enumerable: true, configurable: true, get: GPUDrawBuffer.prototype.__get_clearDepthBuffer, set: GPUDrawBuffer.prototype.__set_clearDepthBuffer},
+		'clearColorBuffer': { enumerable: true, configurable: true, get: GPUDrawBuffer.prototype.__get_clearColorBuffer, set: GPUDrawBuffer.prototype.__set_clearColorBuffer},
+		'backingResolutionScale': { enumerable: true, configurable: true, get: GPUDrawBuffer.prototype.__get_backingResolutionScale, set: GPUDrawBuffer.prototype.__set_backingResolutionScale},
+		'globalMaterial': { enumerable: true, configurable: true, get: GPUDrawBuffer.prototype.__get_globalMaterial, set: GPUDrawBuffer.prototype.__set_globalMaterial},
+		'viewport': { enumerable: true, configurable: true, get: GPUDrawBuffer.prototype.__get_viewport, set: GPUDrawBuffer.prototype.__set_viewport}
+	})
 }
+GPUDrawBuffer.prototype.__get_targetFramebuffer = function() {
+	var retVal = new RenderBuffer()
+	retVal.__ptr = 	Polycode.GPUDrawBuffer__get_targetFramebuffer(this.__ptr)
+	return retVal
+}
+
+GPUDrawBuffer.prototype.__set_targetFramebuffer = function(val) {
+	Polycode.GPUDrawBuffer__set_targetFramebuffer(this.__ptr, val.__ptr)
+}
+
+GPUDrawBuffer.prototype.__get_projectionMatrix = function() {
+	var retVal = new Matrix4()
+	retVal.__ptr = 	Polycode.GPUDrawBuffer__get_projectionMatrix(this.__ptr)
+	return retVal
+}
+
+GPUDrawBuffer.prototype.__set_projectionMatrix = function(val) {
+	Polycode.GPUDrawBuffer__set_projectionMatrix(this.__ptr, val.__ptr)
+}
+
+GPUDrawBuffer.prototype.__get_viewMatrix = function() {
+	var retVal = new Matrix4()
+	retVal.__ptr = 	Polycode.GPUDrawBuffer__get_viewMatrix(this.__ptr)
+	return retVal
+}
+
+GPUDrawBuffer.prototype.__set_viewMatrix = function(val) {
+	Polycode.GPUDrawBuffer__set_viewMatrix(this.__ptr, val.__ptr)
+}
+
+GPUDrawBuffer.prototype.__get_cameraMatrix = function() {
+	var retVal = new Matrix4()
+	retVal.__ptr = 	Polycode.GPUDrawBuffer__get_cameraMatrix(this.__ptr)
+	return retVal
+}
+
+GPUDrawBuffer.prototype.__set_cameraMatrix = function(val) {
+	Polycode.GPUDrawBuffer__set_cameraMatrix(this.__ptr, val.__ptr)
+}
+
+GPUDrawBuffer.prototype.__get_clearColor = function() {
+	var retVal = new Color()
+	retVal.__ptr = 	Polycode.GPUDrawBuffer__get_clearColor(this.__ptr)
+	return retVal
+}
+
+GPUDrawBuffer.prototype.__set_clearColor = function(val) {
+	Polycode.GPUDrawBuffer__set_clearColor(this.__ptr, val.__ptr)
+}
+
+GPUDrawBuffer.prototype.__get_clearDepthBuffer = function() {
+	return Polycode.GPUDrawBuffer__get_clearDepthBuffer(this.__ptr)
+}
+
+GPUDrawBuffer.prototype.__set_clearDepthBuffer = function(val) {
+	Polycode.GPUDrawBuffer__set_clearDepthBuffer(this.__ptr, val)
+}
+
+GPUDrawBuffer.prototype.__get_clearColorBuffer = function() {
+	return Polycode.GPUDrawBuffer__get_clearColorBuffer(this.__ptr)
+}
+
+GPUDrawBuffer.prototype.__set_clearColorBuffer = function(val) {
+	Polycode.GPUDrawBuffer__set_clearColorBuffer(this.__ptr, val)
+}
+
+GPUDrawBuffer.prototype.__get_backingResolutionScale = function() {
+	var retVal = new Vector2()
+	retVal.__ptr = 	Polycode.GPUDrawBuffer__get_backingResolutionScale(this.__ptr)
+	return retVal
+}
+
+GPUDrawBuffer.prototype.__set_backingResolutionScale = function(val) {
+	Polycode.GPUDrawBuffer__set_backingResolutionScale(this.__ptr, val.__ptr)
+}
+
+GPUDrawBuffer.prototype.__get_globalMaterial = function() {
+	var retVal = new Material()
+	retVal.__ptr = 	Polycode.GPUDrawBuffer__get_globalMaterial(this.__ptr)
+	return retVal
+}
+
+GPUDrawBuffer.prototype.__set_globalMaterial = function(val) {
+	Polycode.GPUDrawBuffer__set_globalMaterial(this.__ptr, val.__ptr)
+}
+
+GPUDrawBuffer.prototype.__get_viewport = function() {
+	var retVal = new Rectangle()
+	retVal.__ptr = 	Polycode.GPUDrawBuffer__get_viewport(this.__ptr)
+	return retVal
+}
+
+GPUDrawBuffer.prototype.__set_viewport = function(val) {
+	Polycode.GPUDrawBuffer__set_viewport(this.__ptr, val.__ptr)
+}
+

+ 46 - 0
bindings/javascript/Polycode/GPUDrawCall.js

@@ -1,2 +1,48 @@
 function GPUDrawCall() {
+	Object.defineProperties(this, {
+		'mesh': { enumerable: true, configurable: true, get: GPUDrawCall.prototype.__get_mesh, set: GPUDrawCall.prototype.__set_mesh},
+		'options': { enumerable: true, configurable: true, get: GPUDrawCall.prototype.__get_options, set: GPUDrawCall.prototype.__set_options},
+		'modelMatrix': { enumerable: true, configurable: true, get: GPUDrawCall.prototype.__get_modelMatrix, set: GPUDrawCall.prototype.__set_modelMatrix},
+		'material': { enumerable: true, configurable: true, get: GPUDrawCall.prototype.__get_material, set: GPUDrawCall.prototype.__set_material}
+	})
 }
+GPUDrawCall.prototype.__get_mesh = function() {
+	var retVal = new Mesh()
+	retVal.__ptr = 	Polycode.GPUDrawCall__get_mesh(this.__ptr)
+	return retVal
+}
+
+GPUDrawCall.prototype.__set_mesh = function(val) {
+	Polycode.GPUDrawCall__set_mesh(this.__ptr, val.__ptr)
+}
+
+GPUDrawCall.prototype.__get_options = function() {
+	var retVal = new GPUDrawOptions()
+	retVal.__ptr = 	Polycode.GPUDrawCall__get_options(this.__ptr)
+	return retVal
+}
+
+GPUDrawCall.prototype.__set_options = function(val) {
+	Polycode.GPUDrawCall__set_options(this.__ptr, val.__ptr)
+}
+
+GPUDrawCall.prototype.__get_modelMatrix = function() {
+	var retVal = new Matrix4()
+	retVal.__ptr = 	Polycode.GPUDrawCall__get_modelMatrix(this.__ptr)
+	return retVal
+}
+
+GPUDrawCall.prototype.__set_modelMatrix = function(val) {
+	Polycode.GPUDrawCall__set_modelMatrix(this.__ptr, val.__ptr)
+}
+
+GPUDrawCall.prototype.__get_material = function() {
+	var retVal = new Material()
+	retVal.__ptr = 	Polycode.GPUDrawCall__get_material(this.__ptr)
+	return retVal
+}
+
+GPUDrawCall.prototype.__set_material = function(val) {
+	Polycode.GPUDrawCall__set_material(this.__ptr, val.__ptr)
+}
+

+ 105 - 0
bindings/javascript/Polycode/GPUDrawOptions.js

@@ -1,2 +1,107 @@
 function GPUDrawOptions() {
+	Object.defineProperties(this, {
+		'depthTest': { enumerable: true, configurable: true, get: GPUDrawOptions.prototype.__get_depthTest, set: GPUDrawOptions.prototype.__set_depthTest},
+		'depthWrite': { enumerable: true, configurable: true, get: GPUDrawOptions.prototype.__get_depthWrite, set: GPUDrawOptions.prototype.__set_depthWrite},
+		'linePointSize': { enumerable: true, configurable: true, get: GPUDrawOptions.prototype.__get_linePointSize, set: GPUDrawOptions.prototype.__set_linePointSize},
+		'alphaTest': { enumerable: true, configurable: true, get: GPUDrawOptions.prototype.__get_alphaTest, set: GPUDrawOptions.prototype.__set_alphaTest},
+		'backfaceCull': { enumerable: true, configurable: true, get: GPUDrawOptions.prototype.__get_backfaceCull, set: GPUDrawOptions.prototype.__set_backfaceCull},
+		'depthOnly': { enumerable: true, configurable: true, get: GPUDrawOptions.prototype.__get_depthOnly, set: GPUDrawOptions.prototype.__set_depthOnly},
+		'forceMaterial': { enumerable: true, configurable: true, get: GPUDrawOptions.prototype.__get_forceMaterial, set: GPUDrawOptions.prototype.__set_forceMaterial},
+		'blendingMode': { enumerable: true, configurable: true, get: GPUDrawOptions.prototype.__get_blendingMode, set: GPUDrawOptions.prototype.__set_blendingMode},
+		'scissorBox': { enumerable: true, configurable: true, get: GPUDrawOptions.prototype.__get_scissorBox, set: GPUDrawOptions.prototype.__set_scissorBox},
+		'enableScissor': { enumerable: true, configurable: true, get: GPUDrawOptions.prototype.__get_enableScissor, set: GPUDrawOptions.prototype.__set_enableScissor},
+		'drawColor': { enumerable: true, configurable: true, get: GPUDrawOptions.prototype.__get_drawColor, set: GPUDrawOptions.prototype.__set_drawColor}
+	})
 }
+GPUDrawOptions.prototype.__get_depthTest = function() {
+	return Polycode.GPUDrawOptions__get_depthTest(this.__ptr)
+}
+
+GPUDrawOptions.prototype.__set_depthTest = function(val) {
+	Polycode.GPUDrawOptions__set_depthTest(this.__ptr, val)
+}
+
+GPUDrawOptions.prototype.__get_depthWrite = function() {
+	return Polycode.GPUDrawOptions__get_depthWrite(this.__ptr)
+}
+
+GPUDrawOptions.prototype.__set_depthWrite = function(val) {
+	Polycode.GPUDrawOptions__set_depthWrite(this.__ptr, val)
+}
+
+GPUDrawOptions.prototype.__get_linePointSize = function() {
+	return Polycode.GPUDrawOptions__get_linePointSize(this.__ptr)
+}
+
+GPUDrawOptions.prototype.__set_linePointSize = function(val) {
+	Polycode.GPUDrawOptions__set_linePointSize(this.__ptr, val)
+}
+
+GPUDrawOptions.prototype.__get_alphaTest = function() {
+	return Polycode.GPUDrawOptions__get_alphaTest(this.__ptr)
+}
+
+GPUDrawOptions.prototype.__set_alphaTest = function(val) {
+	Polycode.GPUDrawOptions__set_alphaTest(this.__ptr, val)
+}
+
+GPUDrawOptions.prototype.__get_backfaceCull = function() {
+	return Polycode.GPUDrawOptions__get_backfaceCull(this.__ptr)
+}
+
+GPUDrawOptions.prototype.__set_backfaceCull = function(val) {
+	Polycode.GPUDrawOptions__set_backfaceCull(this.__ptr, val)
+}
+
+GPUDrawOptions.prototype.__get_depthOnly = function() {
+	return Polycode.GPUDrawOptions__get_depthOnly(this.__ptr)
+}
+
+GPUDrawOptions.prototype.__set_depthOnly = function(val) {
+	Polycode.GPUDrawOptions__set_depthOnly(this.__ptr, val)
+}
+
+GPUDrawOptions.prototype.__get_forceMaterial = function() {
+	return Polycode.GPUDrawOptions__get_forceMaterial(this.__ptr)
+}
+
+GPUDrawOptions.prototype.__set_forceMaterial = function(val) {
+	Polycode.GPUDrawOptions__set_forceMaterial(this.__ptr, val)
+}
+
+GPUDrawOptions.prototype.__get_blendingMode = function() {
+	return Polycode.GPUDrawOptions__get_blendingMode(this.__ptr)
+}
+
+GPUDrawOptions.prototype.__set_blendingMode = function(val) {
+	Polycode.GPUDrawOptions__set_blendingMode(this.__ptr, val)
+}
+
+GPUDrawOptions.prototype.__get_scissorBox = function() {
+	var retVal = new Rectangle()
+	retVal.__ptr = 	Polycode.GPUDrawOptions__get_scissorBox(this.__ptr)
+	return retVal
+}
+
+GPUDrawOptions.prototype.__set_scissorBox = function(val) {
+	Polycode.GPUDrawOptions__set_scissorBox(this.__ptr, val.__ptr)
+}
+
+GPUDrawOptions.prototype.__get_enableScissor = function() {
+	return Polycode.GPUDrawOptions__get_enableScissor(this.__ptr)
+}
+
+GPUDrawOptions.prototype.__set_enableScissor = function(val) {
+	Polycode.GPUDrawOptions__set_enableScissor(this.__ptr, val)
+}
+
+GPUDrawOptions.prototype.__get_drawColor = function() {
+	var retVal = new Color()
+	retVal.__ptr = 	Polycode.GPUDrawOptions__get_drawColor(this.__ptr)
+	return retVal
+}
+
+GPUDrawOptions.prototype.__set_drawColor = function(val) {
+	Polycode.GPUDrawOptions__set_drawColor(this.__ptr, val.__ptr)
+}
+

+ 44 - 0
bindings/javascript/Polycode/GlyphData.js

@@ -1,5 +1,49 @@
 function GlyphData() {
+	Object.defineProperties(this, {
+		'glyphs': { enumerable: true, configurable: true, get: GlyphData.prototype.__get_glyphs, set: GlyphData.prototype.__set_glyphs},
+		'positions': { enumerable: true, configurable: true, get: GlyphData.prototype.__get_positions, set: GlyphData.prototype.__set_positions},
+		'num_glyphs': { enumerable: true, configurable: true, get: GlyphData.prototype.__get_num_glyphs, set: GlyphData.prototype.__set_num_glyphs},
+		'trailingAdvance': { enumerable: true, configurable: true, get: GlyphData.prototype.__get_trailingAdvance, set: GlyphData.prototype.__set_trailingAdvance}
+	})
 }
+GlyphData.prototype.__get_glyphs = function() {
+	var retVal = new FT_Glyph()
+	retVal.__ptr = 	Polycode.GlyphData__get_glyphs(this.__ptr)
+	return retVal
+}
+
+GlyphData.prototype.__set_glyphs = function(val) {
+	Polycode.GlyphData__set_glyphs(this.__ptr, val.__ptr)
+}
+
+GlyphData.prototype.__get_positions = function() {
+	var retVal = new FT_Vector()
+	retVal.__ptr = 	Polycode.GlyphData__get_positions(this.__ptr)
+	return retVal
+}
+
+GlyphData.prototype.__set_positions = function(val) {
+	Polycode.GlyphData__set_positions(this.__ptr, val.__ptr)
+}
+
+GlyphData.prototype.__get_num_glyphs = function() {
+	var retVal = new FT_UInt()
+	retVal.__ptr = 	Polycode.GlyphData__get_num_glyphs(this.__ptr)
+	return retVal
+}
+
+GlyphData.prototype.__set_num_glyphs = function(val) {
+	Polycode.GlyphData__set_num_glyphs(this.__ptr, val.__ptr)
+}
+
+GlyphData.prototype.__get_trailingAdvance = function() {
+	return Polycode.GlyphData__get_trailingAdvance(this.__ptr)
+}
+
+GlyphData.prototype.__set_trailingAdvance = function(val) {
+	Polycode.GlyphData__set_trailingAdvance(this.__ptr, val)
+}
+
 
 GlyphData.prototype.clearData = function() {
 	Polycode.GlyphData_clearData(this.__ptr)

+ 21 - 13
bindings/javascript/Polycode/Image.js

@@ -2,11 +2,11 @@ function Image() {
 }
 
 Image.prototype.loadImage = function(fileName) {
-	Polycode.Image_loadImage(this.__ptr, fileName)
+	return Polycode.Image_loadImage(this.__ptr, fileName)
 }
 
 Image.prototype.saveImage = function(fileName) {
-	Polycode.Image_saveImage(this.__ptr, fileName)
+	return Polycode.Image_saveImage(this.__ptr, fileName)
 }
 
 Image.prototype.pasteImage = function(image,x,y,blendingMode,blendAmount,blendColor) {
@@ -26,7 +26,9 @@ Image.prototype.setPixel = function(x,y,r,g,b,a) {
 }
 
 Image.prototype.getPixel = function(x,y) {
-	Polycode.Image_getPixel(this.__ptr, x,y)
+	var retVal = new Color()
+	retVal.__ptr = Polycode.Image_getPixel(this.__ptr, x,y)
+	return retVal
 }
 
 Image.prototype.swap = function(v1,v2) {
@@ -70,39 +72,45 @@ Image.prototype.fastBlurHor = function(blurSize) {
 }
 
 Image.prototype.getPixelsInRect = function(x,y,width,height) {
-	Polycode.Image_getPixelsInRect(this.__ptr, x,y,width,height)
+	var retVal = new char()
+	retVal.__ptr = Polycode.Image_getPixelsInRect(this.__ptr, x,y,width,height)
+	return retVal
 }
 
 Image.prototype.getImagePart = function(subRect) {
-	Polycode.Image_getImagePart(this.__ptr, subRect)
+	var retVal = new Image()
+	retVal.__ptr = Polycode.Image_getImagePart(this.__ptr, subRect)
+	return retVal
 }
 
 Image.prototype.getBrushX = function() {
-	Polycode.Image_getBrushX(this.__ptr)
+	return Polycode.Image_getBrushX(this.__ptr)
 }
 
 Image.prototype.getBrushY = function() {
-	Polycode.Image_getBrushY(this.__ptr)
+	return Polycode.Image_getBrushY(this.__ptr)
 }
 
 Image.prototype.isLoaded = function() {
-	Polycode.Image_isLoaded(this.__ptr)
+	return Polycode.Image_isLoaded(this.__ptr)
 }
 
 Image.prototype.getType = function() {
-	Polycode.Image_getType(this.__ptr)
+	return Polycode.Image_getType(this.__ptr)
 }
 
 Image.prototype.getWidth = function() {
-	Polycode.Image_getWidth(this.__ptr)
+	return Polycode.Image_getWidth(this.__ptr)
 }
 
 Image.prototype.getHeight = function() {
-	Polycode.Image_getHeight(this.__ptr)
+	return Polycode.Image_getHeight(this.__ptr)
 }
 
 Image.prototype.getPixels = function() {
-	Polycode.Image_getPixels(this.__ptr)
+	var retVal = new char()
+	retVal.__ptr = Polycode.Image_getPixels(this.__ptr)
+	return retVal
 }
 
 Image.prototype.premultiplyAlpha = function() {
@@ -110,5 +118,5 @@ Image.prototype.premultiplyAlpha = function() {
 }
 
 Image.prototype.savePNG = function(fileName) {
-	Polycode.Image_savePNG(this.__ptr, fileName)
+	return Polycode.Image_savePNG(this.__ptr, fileName)
 }

+ 1 - 1
bindings/javascript/Polycode/IndexDataArray.js

@@ -6,5 +6,5 @@ IndexDataArray.prototype.getArrayData = function() {
 }
 
 IndexDataArray.prototype.getDataSize = function() {
-	Polycode.IndexDataArray_getDataSize(this.__ptr)
+	return Polycode.IndexDataArray_getDataSize(this.__ptr)
 }

+ 134 - 5
bindings/javascript/Polycode/InputEvent.js

@@ -1,22 +1,151 @@
 function InputEvent() {
+	Object.defineProperties(this, {
+		'mouseButton': { enumerable: true, configurable: true, get: InputEvent.prototype.__get_mouseButton, set: InputEvent.prototype.__set_mouseButton},
+		'mousePosition': { enumerable: true, configurable: true, get: InputEvent.prototype.__get_mousePosition, set: InputEvent.prototype.__set_mousePosition},
+		'key': { enumerable: true, configurable: true, get: InputEvent.prototype.__get_key, set: InputEvent.prototype.__set_key},
+		'charCode': { enumerable: true, configurable: true, get: InputEvent.prototype.__get_charCode, set: InputEvent.prototype.__set_charCode},
+		'timestamp': { enumerable: true, configurable: true, get: InputEvent.prototype.__get_timestamp, set: InputEvent.prototype.__set_timestamp},
+		'touch': { enumerable: true, configurable: true, get: InputEvent.prototype.__get_touch, set: InputEvent.prototype.__set_touch},
+		'touchType': { enumerable: true, configurable: true, get: InputEvent.prototype.__get_touchType, set: InputEvent.prototype.__set_touchType},
+		'joystickDeviceID': { enumerable: true, configurable: true, get: InputEvent.prototype.__get_joystickDeviceID, set: InputEvent.prototype.__set_joystickDeviceID},
+		'joystickAxisValue': { enumerable: true, configurable: true, get: InputEvent.prototype.__get_joystickAxisValue, set: InputEvent.prototype.__set_joystickAxisValue},
+		'joystickButton': { enumerable: true, configurable: true, get: InputEvent.prototype.__get_joystickButton, set: InputEvent.prototype.__set_joystickButton},
+		'joystickAxis': { enumerable: true, configurable: true, get: InputEvent.prototype.__get_joystickAxis, set: InputEvent.prototype.__set_joystickAxis},
+		'joystickIndex': { enumerable: true, configurable: true, get: InputEvent.prototype.__get_joystickIndex, set: InputEvent.prototype.__set_joystickIndex},
+		'hitDistance': { enumerable: true, configurable: true, get: InputEvent.prototype.__get_hitDistance, set: InputEvent.prototype.__set_hitDistance}
+	})
 }
+InputEvent.prototype.__get_mouseButton = function() {
+	return Polycode.InputEvent__get_mouseButton(this.__ptr)
+}
+
+InputEvent.prototype.__set_mouseButton = function(val) {
+	Polycode.InputEvent__set_mouseButton(this.__ptr, val)
+}
+
+InputEvent.prototype.__get_mousePosition = function() {
+	var retVal = new Vector2()
+	retVal.__ptr = 	Polycode.InputEvent__get_mousePosition(this.__ptr)
+	return retVal
+}
+
+InputEvent.prototype.__set_mousePosition = function(val) {
+	Polycode.InputEvent__set_mousePosition(this.__ptr, val.__ptr)
+}
+
+InputEvent.prototype.__get_key = function() {
+	return Polycode.InputEvent__get_key(this.__ptr)
+}
+
+InputEvent.prototype.__set_key = function(val) {
+	Polycode.InputEvent__set_key(this.__ptr, val)
+}
+
+InputEvent.prototype.__get_charCode = function() {
+	var retVal = new wchar_t()
+	retVal.__ptr = 	Polycode.InputEvent__get_charCode(this.__ptr)
+	return retVal
+}
+
+InputEvent.prototype.__set_charCode = function(val) {
+	Polycode.InputEvent__set_charCode(this.__ptr, val.__ptr)
+}
+
+InputEvent.prototype.__get_timestamp = function() {
+	return Polycode.InputEvent__get_timestamp(this.__ptr)
+}
+
+InputEvent.prototype.__set_timestamp = function(val) {
+	Polycode.InputEvent__set_timestamp(this.__ptr, val)
+}
+
+InputEvent.prototype.__get_touch = function() {
+	var retVal = new TouchInfo()
+	retVal.__ptr = 	Polycode.InputEvent__get_touch(this.__ptr)
+	return retVal
+}
+
+InputEvent.prototype.__set_touch = function(val) {
+	Polycode.InputEvent__set_touch(this.__ptr, val.__ptr)
+}
+
+InputEvent.prototype.__get_touchType = function() {
+	return Polycode.InputEvent__get_touchType(this.__ptr)
+}
+
+InputEvent.prototype.__set_touchType = function(val) {
+	Polycode.InputEvent__set_touchType(this.__ptr, val)
+}
+
+InputEvent.prototype.__get_joystickDeviceID = function() {
+	return Polycode.InputEvent__get_joystickDeviceID(this.__ptr)
+}
+
+InputEvent.prototype.__set_joystickDeviceID = function(val) {
+	Polycode.InputEvent__set_joystickDeviceID(this.__ptr, val)
+}
+
+InputEvent.prototype.__get_joystickAxisValue = function() {
+	return Polycode.InputEvent__get_joystickAxisValue(this.__ptr)
+}
+
+InputEvent.prototype.__set_joystickAxisValue = function(val) {
+	Polycode.InputEvent__set_joystickAxisValue(this.__ptr, val)
+}
+
+InputEvent.prototype.__get_joystickButton = function() {
+	return Polycode.InputEvent__get_joystickButton(this.__ptr)
+}
+
+InputEvent.prototype.__set_joystickButton = function(val) {
+	Polycode.InputEvent__set_joystickButton(this.__ptr, val)
+}
+
+InputEvent.prototype.__get_joystickAxis = function() {
+	return Polycode.InputEvent__get_joystickAxis(this.__ptr)
+}
+
+InputEvent.prototype.__set_joystickAxis = function(val) {
+	Polycode.InputEvent__set_joystickAxis(this.__ptr, val)
+}
+
+InputEvent.prototype.__get_joystickIndex = function() {
+	return Polycode.InputEvent__get_joystickIndex(this.__ptr)
+}
+
+InputEvent.prototype.__set_joystickIndex = function(val) {
+	Polycode.InputEvent__set_joystickIndex(this.__ptr, val)
+}
+
+InputEvent.prototype.__get_hitDistance = function() {
+	return Polycode.InputEvent__get_hitDistance(this.__ptr)
+}
+
+InputEvent.prototype.__set_hitDistance = function(val) {
+	Polycode.InputEvent__set_hitDistance(this.__ptr, val)
+}
+
 
 InputEvent.prototype.getMousePosition = function() {
-	Polycode.InputEvent_getMousePosition(this.__ptr)
+	var retVal = new Vector2()
+	retVal.__ptr = Polycode.InputEvent_getMousePosition(this.__ptr)
+	return retVal
 }
 
 InputEvent.prototype.getKey = function() {
-	Polycode.InputEvent_getKey(this.__ptr)
+	return Polycode.InputEvent_getKey(this.__ptr)
 }
 
 InputEvent.prototype.getMouseButton = function() {
-	Polycode.InputEvent_getMouseButton(this.__ptr)
+	return Polycode.InputEvent_getMouseButton(this.__ptr)
 }
 
 InputEvent.prototype.getCharCode = function() {
-	Polycode.InputEvent_getCharCode(this.__ptr)
+	var retVal = new wchar_t()
+	retVal.__ptr = Polycode.InputEvent_getCharCode(this.__ptr)
+	return retVal
 }
 
 InputEvent.prototype.keyCode = function() {
-	Polycode.InputEvent_keyCode(this.__ptr)
+	return Polycode.InputEvent_keyCode(this.__ptr)
 }

+ 13 - 0
bindings/javascript/Polycode/JSScriptInstance.js

@@ -1,2 +1,15 @@
 function JSScriptInstance() {
+	Object.defineProperties(this, {
+		'objectRef': { enumerable: true, configurable: true, get: JSScriptInstance.prototype.__get_objectRef, set: JSScriptInstance.prototype.__set_objectRef}
+	})
 }
+JSScriptInstance.prototype.__get_objectRef = function() {
+	var retVal = new void()
+	retVal.__ptr = 	Polycode.JSScriptInstance__get_objectRef(this.__ptr)
+	return retVal
+}
+
+JSScriptInstance.prototype.__set_objectRef = function(val) {
+	Polycode.JSScriptInstance__set_objectRef(this.__ptr, val.__ptr)
+}
+

+ 20 - 0
bindings/javascript/Polycode/JoystickInfo.js

@@ -1,2 +1,22 @@
 function JoystickInfo() {
+	Object.defineProperties(this, {
+		'deviceID': { enumerable: true, configurable: true, get: JoystickInfo.prototype.__get_deviceID, set: JoystickInfo.prototype.__set_deviceID},
+		'deviceIndex': { enumerable: true, configurable: true, get: JoystickInfo.prototype.__get_deviceIndex, set: JoystickInfo.prototype.__set_deviceIndex}
+	})
 }
+JoystickInfo.prototype.__get_deviceID = function() {
+	return Polycode.JoystickInfo__get_deviceID(this.__ptr)
+}
+
+JoystickInfo.prototype.__set_deviceID = function(val) {
+	Polycode.JoystickInfo__set_deviceID(this.__ptr, val)
+}
+
+JoystickInfo.prototype.__get_deviceIndex = function() {
+	return Polycode.JoystickInfo__get_deviceIndex(this.__ptr)
+}
+
+JoystickInfo.prototype.__set_deviceIndex = function(val) {
+	Polycode.JoystickInfo__set_deviceIndex(this.__ptr, val)
+}
+

+ 22 - 14
bindings/javascript/Polycode/Label.js

@@ -6,23 +6,23 @@ Label.prototype.setText = function(text) {
 }
 
 Label.prototype.getText = function() {
-	Polycode.Label_getText(this.__ptr)
+	return Polycode.Label_getText(this.__ptr)
 }
 
 Label.prototype.getTextWidthForString = function(text) {
-	Polycode.Label_getTextWidthForString(this.__ptr, text)
+	return Polycode.Label_getTextWidthForString(this.__ptr, text)
 }
 
 Label.prototype.getTextHeightForString = function(text) {
-	Polycode.Label_getTextHeightForString(this.__ptr, text)
+	return Polycode.Label_getTextHeightForString(this.__ptr, text)
 }
 
 Label.prototype.getTextWidth = function() {
-	Polycode.Label_getTextWidth(this.__ptr)
+	return Polycode.Label_getTextWidth(this.__ptr)
 }
 
 Label.prototype.getTextHeight = function() {
-	Polycode.Label_getTextHeight(this.__ptr)
+	return Polycode.Label_getTextHeight(this.__ptr)
 }
 
 Label.prototype.setColorForRange = function(color,rangeStart,rangeEnd) {
@@ -34,11 +34,13 @@ Label.prototype.clearColors = function() {
 }
 
 Label.prototype.getColorForIndex = function(index) {
-	Polycode.Label_getColorForIndex(this.__ptr, index)
+	var retVal = new Color()
+	retVal.__ptr = Polycode.Label_getColorForIndex(this.__ptr, index)
+	return retVal
 }
 
 Label.prototype.getPremultiplyAlpha = function() {
-	Polycode.Label_getPremultiplyAlpha(this.__ptr)
+	return Polycode.Label_getPremultiplyAlpha(this.__ptr)
 }
 
 Label.prototype.setPremultiplyAlpha = function(val) {
@@ -50,7 +52,9 @@ Label.prototype.setFont = function(newFont) {
 }
 
 Label.prototype.getFont = function() {
-	Polycode.Label_getFont(this.__ptr)
+	var retVal = new Font()
+	retVal.__ptr = Polycode.Label_getFont(this.__ptr)
+	return retVal
 }
 
 Label.prototype.setSize = function(newSize) {
@@ -58,11 +62,11 @@ Label.prototype.setSize = function(newSize) {
 }
 
 Label.prototype.getSize = function() {
-	Polycode.Label_getSize(this.__ptr)
+	return Polycode.Label_getSize(this.__ptr)
 }
 
 Label.prototype.getAntialiasMode = function() {
-	Polycode.Label_getAntialiasMode(this.__ptr)
+	return Polycode.Label_getAntialiasMode(this.__ptr)
 }
 
 Label.prototype.setAntialiasMode = function(newMode) {
@@ -70,7 +74,7 @@ Label.prototype.setAntialiasMode = function(newMode) {
 }
 
 Label.prototype.getBaselineAdjust = function() {
-	Polycode.Label_getBaselineAdjust(this.__ptr)
+	return Polycode.Label_getBaselineAdjust(this.__ptr)
 }
 
 Label.prototype.setBackgroundColor = function(color) {
@@ -86,13 +90,17 @@ Label.prototype.setColors = function(backgroundColor,foregroundColor) {
 }
 
 Label.prototype.getBackgroundColor = function() {
-	Polycode.Label_getBackgroundColor(this.__ptr)
+	var retVal = new Color()
+	retVal.__ptr = Polycode.Label_getBackgroundColor(this.__ptr)
+	return retVal
 }
 
 Label.prototype.getForegroundColor = function() {
-	Polycode.Label_getForegroundColor(this.__ptr)
+	var retVal = new Color()
+	retVal.__ptr = Polycode.Label_getForegroundColor(this.__ptr)
+	return retVal
 }
 
 Label.prototype.optionsChanged = function() {
-	Polycode.Label_optionsChanged(this.__ptr)
+	return Polycode.Label_optionsChanged(this.__ptr)
 }

+ 149 - 0
bindings/javascript/Polycode/LightInfo.js

@@ -1,2 +1,151 @@
 function LightInfo() {
+	Object.defineProperties(this, {
+		'importance': { enumerable: true, configurable: true, get: LightInfo.prototype.__get_importance, set: LightInfo.prototype.__set_importance},
+		'position': { enumerable: true, configurable: true, get: LightInfo.prototype.__get_position, set: LightInfo.prototype.__set_position},
+		'direction': { enumerable: true, configurable: true, get: LightInfo.prototype.__get_direction, set: LightInfo.prototype.__set_direction},
+		'type': { enumerable: true, configurable: true, get: LightInfo.prototype.__get_type, set: LightInfo.prototype.__set_type},
+		'diffuseColor': { enumerable: true, configurable: true, get: LightInfo.prototype.__get_diffuseColor, set: LightInfo.prototype.__set_diffuseColor},
+		'specularColor': { enumerable: true, configurable: true, get: LightInfo.prototype.__get_specularColor, set: LightInfo.prototype.__set_specularColor},
+		'constantAttenuation': { enumerable: true, configurable: true, get: LightInfo.prototype.__get_constantAttenuation, set: LightInfo.prototype.__set_constantAttenuation},
+		'linearAttenuation': { enumerable: true, configurable: true, get: LightInfo.prototype.__get_linearAttenuation, set: LightInfo.prototype.__set_linearAttenuation},
+		'quadraticAttenuation': { enumerable: true, configurable: true, get: LightInfo.prototype.__get_quadraticAttenuation, set: LightInfo.prototype.__set_quadraticAttenuation},
+		'intensity': { enumerable: true, configurable: true, get: LightInfo.prototype.__get_intensity, set: LightInfo.prototype.__set_intensity},
+		'spotlightCutoff': { enumerable: true, configurable: true, get: LightInfo.prototype.__get_spotlightCutoff, set: LightInfo.prototype.__set_spotlightCutoff},
+		'spotlightExponent': { enumerable: true, configurable: true, get: LightInfo.prototype.__get_spotlightExponent, set: LightInfo.prototype.__set_spotlightExponent},
+		'shadowsEnabled': { enumerable: true, configurable: true, get: LightInfo.prototype.__get_shadowsEnabled, set: LightInfo.prototype.__set_shadowsEnabled},
+		'shadowMapTexture': { enumerable: true, configurable: true, get: LightInfo.prototype.__get_shadowMapTexture, set: LightInfo.prototype.__set_shadowMapTexture},
+		'lightViewMatrix': { enumerable: true, configurable: true, get: LightInfo.prototype.__get_lightViewMatrix, set: LightInfo.prototype.__set_lightViewMatrix}
+	})
 }
+LightInfo.prototype.__get_importance = function() {
+	return Polycode.LightInfo__get_importance(this.__ptr)
+}
+
+LightInfo.prototype.__set_importance = function(val) {
+	Polycode.LightInfo__set_importance(this.__ptr, val)
+}
+
+LightInfo.prototype.__get_position = function() {
+	var retVal = new Vector3()
+	retVal.__ptr = 	Polycode.LightInfo__get_position(this.__ptr)
+	return retVal
+}
+
+LightInfo.prototype.__set_position = function(val) {
+	Polycode.LightInfo__set_position(this.__ptr, val.__ptr)
+}
+
+LightInfo.prototype.__get_direction = function() {
+	var retVal = new Vector3()
+	retVal.__ptr = 	Polycode.LightInfo__get_direction(this.__ptr)
+	return retVal
+}
+
+LightInfo.prototype.__set_direction = function(val) {
+	Polycode.LightInfo__set_direction(this.__ptr, val.__ptr)
+}
+
+LightInfo.prototype.__get_type = function() {
+	return Polycode.LightInfo__get_type(this.__ptr)
+}
+
+LightInfo.prototype.__set_type = function(val) {
+	Polycode.LightInfo__set_type(this.__ptr, val)
+}
+
+LightInfo.prototype.__get_diffuseColor = function() {
+	var retVal = new Color()
+	retVal.__ptr = 	Polycode.LightInfo__get_diffuseColor(this.__ptr)
+	return retVal
+}
+
+LightInfo.prototype.__set_diffuseColor = function(val) {
+	Polycode.LightInfo__set_diffuseColor(this.__ptr, val.__ptr)
+}
+
+LightInfo.prototype.__get_specularColor = function() {
+	var retVal = new Color()
+	retVal.__ptr = 	Polycode.LightInfo__get_specularColor(this.__ptr)
+	return retVal
+}
+
+LightInfo.prototype.__set_specularColor = function(val) {
+	Polycode.LightInfo__set_specularColor(this.__ptr, val.__ptr)
+}
+
+LightInfo.prototype.__get_constantAttenuation = function() {
+	return Polycode.LightInfo__get_constantAttenuation(this.__ptr)
+}
+
+LightInfo.prototype.__set_constantAttenuation = function(val) {
+	Polycode.LightInfo__set_constantAttenuation(this.__ptr, val)
+}
+
+LightInfo.prototype.__get_linearAttenuation = function() {
+	return Polycode.LightInfo__get_linearAttenuation(this.__ptr)
+}
+
+LightInfo.prototype.__set_linearAttenuation = function(val) {
+	Polycode.LightInfo__set_linearAttenuation(this.__ptr, val)
+}
+
+LightInfo.prototype.__get_quadraticAttenuation = function() {
+	return Polycode.LightInfo__get_quadraticAttenuation(this.__ptr)
+}
+
+LightInfo.prototype.__set_quadraticAttenuation = function(val) {
+	Polycode.LightInfo__set_quadraticAttenuation(this.__ptr, val)
+}
+
+LightInfo.prototype.__get_intensity = function() {
+	return Polycode.LightInfo__get_intensity(this.__ptr)
+}
+
+LightInfo.prototype.__set_intensity = function(val) {
+	Polycode.LightInfo__set_intensity(this.__ptr, val)
+}
+
+LightInfo.prototype.__get_spotlightCutoff = function() {
+	return Polycode.LightInfo__get_spotlightCutoff(this.__ptr)
+}
+
+LightInfo.prototype.__set_spotlightCutoff = function(val) {
+	Polycode.LightInfo__set_spotlightCutoff(this.__ptr, val)
+}
+
+LightInfo.prototype.__get_spotlightExponent = function() {
+	return Polycode.LightInfo__get_spotlightExponent(this.__ptr)
+}
+
+LightInfo.prototype.__set_spotlightExponent = function(val) {
+	Polycode.LightInfo__set_spotlightExponent(this.__ptr, val)
+}
+
+LightInfo.prototype.__get_shadowsEnabled = function() {
+	return Polycode.LightInfo__get_shadowsEnabled(this.__ptr)
+}
+
+LightInfo.prototype.__set_shadowsEnabled = function(val) {
+	Polycode.LightInfo__set_shadowsEnabled(this.__ptr, val)
+}
+
+LightInfo.prototype.__get_shadowMapTexture = function() {
+	var retVal = new Texture()
+	retVal.__ptr = 	Polycode.LightInfo__get_shadowMapTexture(this.__ptr)
+	return retVal
+}
+
+LightInfo.prototype.__set_shadowMapTexture = function(val) {
+	Polycode.LightInfo__set_shadowMapTexture(this.__ptr, val.__ptr)
+}
+
+LightInfo.prototype.__get_lightViewMatrix = function() {
+	var retVal = new Matrix4()
+	retVal.__ptr = 	Polycode.LightInfo__get_lightViewMatrix(this.__ptr)
+	return retVal
+}
+
+LightInfo.prototype.__set_lightViewMatrix = function(val) {
+	Polycode.LightInfo__set_lightViewMatrix(this.__ptr, val.__ptr)
+}
+

+ 112 - 0
bindings/javascript/Polycode/LightInfoBinding.js

@@ -1,2 +1,114 @@
 function LightInfoBinding() {
+	Object.defineProperties(this, {
+		'position': { enumerable: true, configurable: true, get: LightInfoBinding.prototype.__get_position, set: LightInfoBinding.prototype.__set_position},
+		'direction': { enumerable: true, configurable: true, get: LightInfoBinding.prototype.__get_direction, set: LightInfoBinding.prototype.__set_direction},
+		'specular': { enumerable: true, configurable: true, get: LightInfoBinding.prototype.__get_specular, set: LightInfoBinding.prototype.__set_specular},
+		'diffuse': { enumerable: true, configurable: true, get: LightInfoBinding.prototype.__get_diffuse, set: LightInfoBinding.prototype.__set_diffuse},
+		'spotExponent': { enumerable: true, configurable: true, get: LightInfoBinding.prototype.__get_spotExponent, set: LightInfoBinding.prototype.__set_spotExponent},
+		'spotCosCutoff': { enumerable: true, configurable: true, get: LightInfoBinding.prototype.__get_spotCosCutoff, set: LightInfoBinding.prototype.__set_spotCosCutoff},
+		'constantAttenuation': { enumerable: true, configurable: true, get: LightInfoBinding.prototype.__get_constantAttenuation, set: LightInfoBinding.prototype.__set_constantAttenuation},
+		'linearAttenuation': { enumerable: true, configurable: true, get: LightInfoBinding.prototype.__get_linearAttenuation, set: LightInfoBinding.prototype.__set_linearAttenuation},
+		'quadraticAttenuation': { enumerable: true, configurable: true, get: LightInfoBinding.prototype.__get_quadraticAttenuation, set: LightInfoBinding.prototype.__set_quadraticAttenuation},
+		'shadowEnabled': { enumerable: true, configurable: true, get: LightInfoBinding.prototype.__get_shadowEnabled, set: LightInfoBinding.prototype.__set_shadowEnabled}
+	})
 }
+LightInfoBinding.prototype.__get_position = function() {
+	var retVal = new LocalShaderParam()
+	retVal.__ptr = 	Polycode.LightInfoBinding__get_position(this.__ptr)
+	return retVal
+}
+
+LightInfoBinding.prototype.__set_position = function(val) {
+	Polycode.LightInfoBinding__set_position(this.__ptr, val.__ptr)
+}
+
+LightInfoBinding.prototype.__get_direction = function() {
+	var retVal = new LocalShaderParam()
+	retVal.__ptr = 	Polycode.LightInfoBinding__get_direction(this.__ptr)
+	return retVal
+}
+
+LightInfoBinding.prototype.__set_direction = function(val) {
+	Polycode.LightInfoBinding__set_direction(this.__ptr, val.__ptr)
+}
+
+LightInfoBinding.prototype.__get_specular = function() {
+	var retVal = new LocalShaderParam()
+	retVal.__ptr = 	Polycode.LightInfoBinding__get_specular(this.__ptr)
+	return retVal
+}
+
+LightInfoBinding.prototype.__set_specular = function(val) {
+	Polycode.LightInfoBinding__set_specular(this.__ptr, val.__ptr)
+}
+
+LightInfoBinding.prototype.__get_diffuse = function() {
+	var retVal = new LocalShaderParam()
+	retVal.__ptr = 	Polycode.LightInfoBinding__get_diffuse(this.__ptr)
+	return retVal
+}
+
+LightInfoBinding.prototype.__set_diffuse = function(val) {
+	Polycode.LightInfoBinding__set_diffuse(this.__ptr, val.__ptr)
+}
+
+LightInfoBinding.prototype.__get_spotExponent = function() {
+	var retVal = new LocalShaderParam()
+	retVal.__ptr = 	Polycode.LightInfoBinding__get_spotExponent(this.__ptr)
+	return retVal
+}
+
+LightInfoBinding.prototype.__set_spotExponent = function(val) {
+	Polycode.LightInfoBinding__set_spotExponent(this.__ptr, val.__ptr)
+}
+
+LightInfoBinding.prototype.__get_spotCosCutoff = function() {
+	var retVal = new LocalShaderParam()
+	retVal.__ptr = 	Polycode.LightInfoBinding__get_spotCosCutoff(this.__ptr)
+	return retVal
+}
+
+LightInfoBinding.prototype.__set_spotCosCutoff = function(val) {
+	Polycode.LightInfoBinding__set_spotCosCutoff(this.__ptr, val.__ptr)
+}
+
+LightInfoBinding.prototype.__get_constantAttenuation = function() {
+	var retVal = new LocalShaderParam()
+	retVal.__ptr = 	Polycode.LightInfoBinding__get_constantAttenuation(this.__ptr)
+	return retVal
+}
+
+LightInfoBinding.prototype.__set_constantAttenuation = function(val) {
+	Polycode.LightInfoBinding__set_constantAttenuation(this.__ptr, val.__ptr)
+}
+
+LightInfoBinding.prototype.__get_linearAttenuation = function() {
+	var retVal = new LocalShaderParam()
+	retVal.__ptr = 	Polycode.LightInfoBinding__get_linearAttenuation(this.__ptr)
+	return retVal
+}
+
+LightInfoBinding.prototype.__set_linearAttenuation = function(val) {
+	Polycode.LightInfoBinding__set_linearAttenuation(this.__ptr, val.__ptr)
+}
+
+LightInfoBinding.prototype.__get_quadraticAttenuation = function() {
+	var retVal = new LocalShaderParam()
+	retVal.__ptr = 	Polycode.LightInfoBinding__get_quadraticAttenuation(this.__ptr)
+	return retVal
+}
+
+LightInfoBinding.prototype.__set_quadraticAttenuation = function(val) {
+	Polycode.LightInfoBinding__set_quadraticAttenuation(this.__ptr, val.__ptr)
+}
+
+LightInfoBinding.prototype.__get_shadowEnabled = function() {
+	var retVal = new LocalShaderParam()
+	retVal.__ptr = 	Polycode.LightInfoBinding__get_shadowEnabled(this.__ptr)
+	return retVal
+}
+
+LightInfoBinding.prototype.__set_shadowEnabled = function(val) {
+	Polycode.LightInfoBinding__set_shadowEnabled(this.__ptr, val.__ptr)
+}
+

+ 24 - 0
bindings/javascript/Polycode/LightShadowInfoBinding.js

@@ -1,2 +1,26 @@
 function LightShadowInfoBinding() {
+	Object.defineProperties(this, {
+		'shadowMatrix': { enumerable: true, configurable: true, get: LightShadowInfoBinding.prototype.__get_shadowMatrix, set: LightShadowInfoBinding.prototype.__set_shadowMatrix},
+		'shadowBuffer': { enumerable: true, configurable: true, get: LightShadowInfoBinding.prototype.__get_shadowBuffer, set: LightShadowInfoBinding.prototype.__set_shadowBuffer}
+	})
 }
+LightShadowInfoBinding.prototype.__get_shadowMatrix = function() {
+	var retVal = new LocalShaderParam()
+	retVal.__ptr = 	Polycode.LightShadowInfoBinding__get_shadowMatrix(this.__ptr)
+	return retVal
+}
+
+LightShadowInfoBinding.prototype.__set_shadowMatrix = function(val) {
+	Polycode.LightShadowInfoBinding__set_shadowMatrix(this.__ptr, val.__ptr)
+}
+
+LightShadowInfoBinding.prototype.__get_shadowBuffer = function() {
+	var retVal = new LocalShaderParam()
+	retVal.__ptr = 	Polycode.LightShadowInfoBinding__get_shadowBuffer(this.__ptr)
+	return retVal
+}
+
+LightShadowInfoBinding.prototype.__set_shadowBuffer = function(val) {
+	Polycode.LightShadowInfoBinding__set_shadowBuffer(this.__ptr, val.__ptr)
+}
+

+ 82 - 8
bindings/javascript/Polycode/LocalShaderParam.js

@@ -1,28 +1,98 @@
 function LocalShaderParam() {
+	Object.defineProperties(this, {
+		'name': { enumerable: true, configurable: true, get: LocalShaderParam.prototype.__get_name, set: LocalShaderParam.prototype.__set_name},
+		'data': { enumerable: true, configurable: true, get: LocalShaderParam.prototype.__get_data, set: LocalShaderParam.prototype.__set_data},
+		'type': { enumerable: true, configurable: true, get: LocalShaderParam.prototype.__get_type, set: LocalShaderParam.prototype.__set_type},
+		'ownsPointer': { enumerable: true, configurable: true, get: LocalShaderParam.prototype.__get_ownsPointer, set: LocalShaderParam.prototype.__set_ownsPointer},
+		'arraySize': { enumerable: true, configurable: true, get: LocalShaderParam.prototype.__get_arraySize, set: LocalShaderParam.prototype.__set_arraySize},
+		'param': { enumerable: true, configurable: true, get: LocalShaderParam.prototype.__get_param, set: LocalShaderParam.prototype.__set_param}
+	})
 }
+LocalShaderParam.prototype.__get_name = function() {
+	return Polycode.LocalShaderParam__get_name(this.__ptr)
+}
+
+LocalShaderParam.prototype.__set_name = function(val) {
+	Polycode.LocalShaderParam__set_name(this.__ptr, val)
+}
+
+LocalShaderParam.prototype.__get_data = function() {
+	var retVal = new void()
+	retVal.__ptr = 	Polycode.LocalShaderParam__get_data(this.__ptr)
+	return retVal
+}
+
+LocalShaderParam.prototype.__set_data = function(val) {
+	Polycode.LocalShaderParam__set_data(this.__ptr, val.__ptr)
+}
+
+LocalShaderParam.prototype.__get_type = function() {
+	return Polycode.LocalShaderParam__get_type(this.__ptr)
+}
+
+LocalShaderParam.prototype.__set_type = function(val) {
+	Polycode.LocalShaderParam__set_type(this.__ptr, val)
+}
+
+LocalShaderParam.prototype.__get_ownsPointer = function() {
+	return Polycode.LocalShaderParam__get_ownsPointer(this.__ptr)
+}
+
+LocalShaderParam.prototype.__set_ownsPointer = function(val) {
+	Polycode.LocalShaderParam__set_ownsPointer(this.__ptr, val)
+}
+
+LocalShaderParam.prototype.__get_arraySize = function() {
+	return Polycode.LocalShaderParam__get_arraySize(this.__ptr)
+}
+
+LocalShaderParam.prototype.__set_arraySize = function(val) {
+	Polycode.LocalShaderParam__set_arraySize(this.__ptr, val)
+}
+
+LocalShaderParam.prototype.__get_param = function() {
+	var retVal = new ProgramParam()
+	retVal.__ptr = 	Polycode.LocalShaderParam__get_param(this.__ptr)
+	return retVal
+}
+
+LocalShaderParam.prototype.__set_param = function(val) {
+	Polycode.LocalShaderParam__set_param(this.__ptr, val.__ptr)
+}
+
 
 LocalShaderParam.prototype.Copy = function() {
-	Polycode.LocalShaderParam_Copy(this.__ptr)
+	var retVal = new LocalShaderParam()
+	retVal.__ptr = Polycode.LocalShaderParam_Copy(this.__ptr)
+	return retVal
 }
 
 LocalShaderParam.prototype.getNumber = function() {
-	Polycode.LocalShaderParam_getNumber(this.__ptr)
+	return Polycode.LocalShaderParam_getNumber(this.__ptr)
 }
 
 LocalShaderParam.prototype.getVector2 = function() {
-	Polycode.LocalShaderParam_getVector2(this.__ptr)
+	var retVal = new Vector2()
+	retVal.__ptr = Polycode.LocalShaderParam_getVector2(this.__ptr)
+	return retVal
 }
 
 LocalShaderParam.prototype.getVector3 = function() {
-	Polycode.LocalShaderParam_getVector3(this.__ptr)
+	var retVal = new Vector3()
+	retVal.__ptr = Polycode.LocalShaderParam_getVector3(this.__ptr)
+	return retVal
 }
 
 LocalShaderParam.prototype.getMatrix4 = function() {
-	Polycode.LocalShaderParam_getMatrix4(this.__ptr)
+	var retVal = new Matrix4()
+	retVal.__ptr = Polycode.LocalShaderParam_getMatrix4(this.__ptr)
+	return retVal
 }
 
 LocalShaderParam.prototype.getColor = function() {
-	Polycode.LocalShaderParam_getColor(this.__ptr)
+	var retVal = new Color()
+	retVal.__ptr = Polycode.LocalShaderParam_getColor(this.__ptr)
+	return retVal
 }
 
 LocalShaderParam.prototype.setNumber = function(x) {
@@ -50,7 +120,9 @@ LocalShaderParam.prototype.setTexture = function(texture) {
 }
 
 LocalShaderParam.prototype.getTexture = function() {
-	Polycode.LocalShaderParam_getTexture(this.__ptr)
+	var retVal = new Texture()
+	retVal.__ptr = Polycode.LocalShaderParam_getTexture(this.__ptr)
+	return retVal
 }
 
 LocalShaderParam.prototype.setCubemap = function(cubemap) {
@@ -58,7 +130,9 @@ LocalShaderParam.prototype.setCubemap = function(cubemap) {
 }
 
 LocalShaderParam.prototype.getCubemap = function() {
-	Polycode.LocalShaderParam_getCubemap(this.__ptr)
+	var retVal = new Cubemap()
+	retVal.__ptr = Polycode.LocalShaderParam_getCubemap(this.__ptr)
+	return retVal
 }
 
 LocalShaderParam.prototype.setParamValueFromString = function(type,pvalue) {

+ 11 - 0
bindings/javascript/Polycode/LuaScriptInstance.js

@@ -1,2 +1,13 @@
 function LuaScriptInstance() {
+	Object.defineProperties(this, {
+		'tableRef': { enumerable: true, configurable: true, get: LuaScriptInstance.prototype.__get_tableRef, set: LuaScriptInstance.prototype.__set_tableRef}
+	})
 }
+LuaScriptInstance.prototype.__get_tableRef = function() {
+	return Polycode.LuaScriptInstance__get_tableRef(this.__ptr)
+}
+
+LuaScriptInstance.prototype.__set_tableRef = function(val) {
+	Polycode.LuaScriptInstance__set_tableRef(this.__ptr, val)
+}
+

+ 55 - 7
bindings/javascript/Polycode/Material.js

@@ -1,5 +1,45 @@
 function Material() {
+	Object.defineProperties(this, {
+		'fp16RenderTargets': { enumerable: true, configurable: true, get: Material.prototype.__get_fp16RenderTargets, set: Material.prototype.__set_fp16RenderTargets},
+		'shaderModule': { enumerable: true, configurable: true, get: Material.prototype.__get_shaderModule, set: Material.prototype.__set_shaderModule},
+		'blendingMode': { enumerable: true, configurable: true, get: Material.prototype.__get_blendingMode, set: Material.prototype.__set_blendingMode},
+		'screenMaterial': { enumerable: true, configurable: true, get: Material.prototype.__get_screenMaterial, set: Material.prototype.__set_screenMaterial}
+	})
 }
+Material.prototype.__get_fp16RenderTargets = function() {
+	return Polycode.Material__get_fp16RenderTargets(this.__ptr)
+}
+
+Material.prototype.__set_fp16RenderTargets = function(val) {
+	Polycode.Material__set_fp16RenderTargets(this.__ptr, val)
+}
+
+Material.prototype.__get_shaderModule = function() {
+	var retVal = new void()
+	retVal.__ptr = 	Polycode.Material__get_shaderModule(this.__ptr)
+	return retVal
+}
+
+Material.prototype.__set_shaderModule = function(val) {
+	Polycode.Material__set_shaderModule(this.__ptr, val.__ptr)
+}
+
+Material.prototype.__get_blendingMode = function() {
+	return Polycode.Material__get_blendingMode(this.__ptr)
+}
+
+Material.prototype.__set_blendingMode = function(val) {
+	Polycode.Material__set_blendingMode(this.__ptr, val)
+}
+
+Material.prototype.__get_screenMaterial = function() {
+	return Polycode.Material__get_screenMaterial(this.__ptr)
+}
+
+Material.prototype.__set_screenMaterial = function(val) {
+	Polycode.Material__set_screenMaterial(this.__ptr, val)
+}
+
 
 Material.prototype.addShaderPass = function(pass) {
 	Polycode.Material_addShaderPass(this.__ptr, pass)
@@ -18,7 +58,7 @@ Material.prototype.addShaderAtIndex = function(shader,shaderBinding,shaderIndex)
 }
 
 Material.prototype.getNumShaderPasses = function() {
-	Polycode.Material_getNumShaderPasses(this.__ptr)
+	return Polycode.Material_getNumShaderPasses(this.__ptr)
 }
 
 Material.prototype.removeShaderPass = function(shaderIndex) {
@@ -34,11 +74,13 @@ Material.prototype.addShaderRenderTarget = function(newTarget) {
 }
 
 Material.prototype.getNumShaderRenderTargets = function() {
-	Polycode.Material_getNumShaderRenderTargets(this.__ptr)
+	return Polycode.Material_getNumShaderRenderTargets(this.__ptr)
 }
 
 Material.prototype.getShaderRenderTarget = function(index) {
-	Polycode.Material_getShaderRenderTarget(this.__ptr, index)
+	var retVal = new ShaderRenderTarget()
+	retVal.__ptr = Polycode.Material_getShaderRenderTarget(this.__ptr, index)
+	return retVal
 }
 
 Material.prototype.removeShaderRenderTarget = function(index) {
@@ -54,19 +96,25 @@ Material.prototype.recreateRenderTargets = function() {
 }
 
 Material.prototype.getName = function() {
-	Polycode.Material_getName(this.__ptr)
+	return Polycode.Material_getName(this.__ptr)
 }
 
 Material.prototype.getShaderPass = function(index) {
-	Polycode.Material_getShaderPass(this.__ptr, index)
+	var retVal = new ShaderPass()
+	retVal.__ptr = Polycode.Material_getShaderPass(this.__ptr, index)
+	return retVal
 }
 
 Material.prototype.getShaderBinding = function(index) {
-	Polycode.Material_getShaderBinding(this.__ptr, index)
+	var retVal = new ShaderBinding()
+	retVal.__ptr = Polycode.Material_getShaderBinding(this.__ptr, index)
+	return retVal
 }
 
 Material.prototype.getShader = function(index) {
-	Polycode.Material_getShader(this.__ptr, index)
+	var retVal = new Shader()
+	retVal.__ptr = Polycode.Material_getShader(this.__ptr, index)
+	return retVal
 }
 
 Material.prototype.loadMaterial = function(fileName) {

+ 79 - 15
bindings/javascript/Polycode/MaterialManager.js

@@ -1,24 +1,70 @@
 function MaterialManager() {
+	Object.defineProperties(this, {
+		'premultiplyAlphaOnLoad': { enumerable: true, configurable: true, get: MaterialManager.prototype.__get_premultiplyAlphaOnLoad, set: MaterialManager.prototype.__set_premultiplyAlphaOnLoad},
+		'clampDefault': { enumerable: true, configurable: true, get: MaterialManager.prototype.__get_clampDefault, set: MaterialManager.prototype.__set_clampDefault},
+		'mipmapsDefault': { enumerable: true, configurable: true, get: MaterialManager.prototype.__get_mipmapsDefault, set: MaterialManager.prototype.__set_mipmapsDefault},
+		'keepTextureData': { enumerable: true, configurable: true, get: MaterialManager.prototype.__get_keepTextureData, set: MaterialManager.prototype.__set_keepTextureData}
+	})
 }
+MaterialManager.prototype.__get_premultiplyAlphaOnLoad = function() {
+	return Polycode.MaterialManager__get_premultiplyAlphaOnLoad(this.__ptr)
+}
+
+MaterialManager.prototype.__set_premultiplyAlphaOnLoad = function(val) {
+	Polycode.MaterialManager__set_premultiplyAlphaOnLoad(this.__ptr, val)
+}
+
+MaterialManager.prototype.__get_clampDefault = function() {
+	return Polycode.MaterialManager__get_clampDefault(this.__ptr)
+}
+
+MaterialManager.prototype.__set_clampDefault = function(val) {
+	Polycode.MaterialManager__set_clampDefault(this.__ptr, val)
+}
+
+MaterialManager.prototype.__get_mipmapsDefault = function() {
+	return Polycode.MaterialManager__get_mipmapsDefault(this.__ptr)
+}
+
+MaterialManager.prototype.__set_mipmapsDefault = function(val) {
+	Polycode.MaterialManager__set_mipmapsDefault(this.__ptr, val)
+}
+
+MaterialManager.prototype.__get_keepTextureData = function() {
+	return Polycode.MaterialManager__get_keepTextureData(this.__ptr)
+}
+
+MaterialManager.prototype.__set_keepTextureData = function(val) {
+	Polycode.MaterialManager__set_keepTextureData(this.__ptr, val)
+}
+
 
 MaterialManager.prototype.Update = function(elapsed) {
 	Polycode.MaterialManager_Update(this.__ptr, elapsed)
 }
 
 MaterialManager.prototype.createTexture = function(width,height,imageData,clamp,createMipmaps,type) {
-	Polycode.MaterialManager_createTexture(this.__ptr, width,height,imageData,clamp,createMipmaps,type)
+	var retVal = new Texture()
+	retVal.__ptr = Polycode.MaterialManager_createTexture(this.__ptr, width,height,imageData,clamp,createMipmaps,type)
+	return retVal
 }
 
 MaterialManager.prototype.createNewTexture = function(width,height,clamp,createMipmaps,type) {
-	Polycode.MaterialManager_createNewTexture(this.__ptr, width,height,clamp,createMipmaps,type)
+	var retVal = new Texture()
+	retVal.__ptr = Polycode.MaterialManager_createNewTexture(this.__ptr, width,height,clamp,createMipmaps,type)
+	return retVal
 }
 
 MaterialManager.prototype.createTextureFromImage = function(image,clamp,createMipmaps) {
-	Polycode.MaterialManager_createTextureFromImage(this.__ptr, image,clamp,createMipmaps)
+	var retVal = new Texture()
+	retVal.__ptr = Polycode.MaterialManager_createTextureFromImage(this.__ptr, image,clamp,createMipmaps)
+	return retVal
 }
 
 MaterialManager.prototype.createTextureFromFile = function(fileName,clamp,createMipmaps,resourcePool) {
-	Polycode.MaterialManager_createTextureFromFile(this.__ptr, fileName,clamp,createMipmaps,resourcePool)
+	var retVal = new Texture()
+	retVal.__ptr = Polycode.MaterialManager_createTextureFromFile(this.__ptr, fileName,clamp,createMipmaps,resourcePool)
+	return retVal
 }
 
 MaterialManager.prototype.deleteTexture = function(texture) {
@@ -38,11 +84,15 @@ MaterialManager.prototype.reloadPrograms = function() {
 }
 
 MaterialManager.prototype.getTextureByResourcePath = function(resourcePath) {
-	Polycode.MaterialManager_getTextureByResourcePath(this.__ptr, resourcePath)
+	var retVal = new Texture()
+	retVal.__ptr = Polycode.MaterialManager_getTextureByResourcePath(this.__ptr, resourcePath)
+	return retVal
 }
 
 MaterialManager.prototype.createProgramFromFile = function(programPath) {
-	Polycode.MaterialManager_createProgramFromFile(this.__ptr, programPath)
+	var retVal = new ShaderProgram()
+	retVal.__ptr = Polycode.MaterialManager_createProgramFromFile(this.__ptr, programPath)
+	return retVal
 }
 
 MaterialManager.prototype.loadMaterialLibraryIntoPool = function(pool,materialFile) {
@@ -50,27 +100,39 @@ MaterialManager.prototype.loadMaterialLibraryIntoPool = function(pool,materialFi
 }
 
 MaterialManager.prototype.cubemapFromXMLNode = function(node) {
-	Polycode.MaterialManager_cubemapFromXMLNode(this.__ptr, node)
+	var retVal = new Cubemap()
+	retVal.__ptr = Polycode.MaterialManager_cubemapFromXMLNode(this.__ptr, node)
+	return retVal
 }
 
 MaterialManager.prototype.materialFromXMLNode = function(resourcePool,node) {
-	Polycode.MaterialManager_materialFromXMLNode(this.__ptr, resourcePool,node)
+	var retVal = new Material()
+	retVal.__ptr = Polycode.MaterialManager_materialFromXMLNode(this.__ptr, resourcePool,node)
+	return retVal
 }
 
 MaterialManager.prototype.createMaterial = function(resourcePool,materialName,shaderName) {
-	Polycode.MaterialManager_createMaterial(this.__ptr, resourcePool,materialName,shaderName)
+	var retVal = new Material()
+	retVal.__ptr = Polycode.MaterialManager_createMaterial(this.__ptr, resourcePool,materialName,shaderName)
+	return retVal
 }
 
 MaterialManager.prototype.setShaderFromXMLNode = function(resourcePool,node) {
-	Polycode.MaterialManager_setShaderFromXMLNode(this.__ptr, resourcePool,node)
+	var retVal = new Shader()
+	retVal.__ptr = Polycode.MaterialManager_setShaderFromXMLNode(this.__ptr, resourcePool,node)
+	return retVal
 }
 
 MaterialManager.prototype.createShaderFromXMLNode = function(resourcePool,node) {
-	Polycode.MaterialManager_createShaderFromXMLNode(this.__ptr, resourcePool,node)
+	var retVal = new Shader()
+	retVal.__ptr = Polycode.MaterialManager_createShaderFromXMLNode(this.__ptr, resourcePool,node)
+	return retVal
 }
 
 MaterialManager.prototype.createShader = function(resourcePool,shaderType,name,vpName,fpName,screenShader) {
-	Polycode.MaterialManager_createShader(this.__ptr, resourcePool,shaderType,name,vpName,fpName,screenShader)
+	var retVal = new Shader()
+	retVal.__ptr = Polycode.MaterialManager_createShader(this.__ptr, resourcePool,shaderType,name,vpName,fpName,screenShader)
+	return retVal
 }
 
 MaterialManager.prototype.loadMaterialsFromFile = function(resourcePool,fileName) {
@@ -94,7 +156,7 @@ MaterialManager.prototype.setTextureFilteringMode = function(textureFilteringMod
 }
 
 MaterialManager.prototype.getTextureFilteringMode = function() {
-	Polycode.MaterialManager_getTextureFilteringMode(this.__ptr)
+	return Polycode.MaterialManager_getTextureFilteringMode(this.__ptr)
 }
 
 MaterialManager.prototype.addMaterial = function(material) {
@@ -106,9 +168,11 @@ MaterialManager.prototype.addShader = function(shader) {
 }
 
 MaterialManager.prototype.getNumShaders = function() {
-	Polycode.MaterialManager_getNumShaders(this.__ptr)
+	return Polycode.MaterialManager_getNumShaders(this.__ptr)
 }
 
 MaterialManager.prototype.getShaderByIndex = function(index) {
-	Polycode.MaterialManager_getShaderByIndex(this.__ptr, index)
+	var retVal = new Shader()
+	retVal.__ptr = Polycode.MaterialManager_getShaderByIndex(this.__ptr, index)
+	return retVal
 }

+ 3 - 1
bindings/javascript/Polycode/MaterialResourceLoader.js

@@ -2,5 +2,7 @@ function MaterialResourceLoader() {
 }
 
 MaterialResourceLoader.prototype.loadResource = function(path,targetPool) {
-	Polycode.MaterialResourceLoader_loadResource(this.__ptr, path,targetPool)
+	var retVal = new Resource()
+	retVal.__ptr = Polycode.MaterialResourceLoader_loadResource(this.__ptr, path,targetPool)
+	return retVal
 }

+ 25 - 9
bindings/javascript/Polycode/Matrix4.js

@@ -6,23 +6,33 @@ Matrix4.prototype.identity = function() {
 }
 
 Matrix4.prototype.rotateVector = function(v2) {
-	Polycode.Matrix4_rotateVector(this.__ptr, v2)
+	var retVal = new Vector3()
+	retVal.__ptr = Polycode.Matrix4_rotateVector(this.__ptr, v2)
+	return retVal
 }
 
 Matrix4.prototype.getPosition = function() {
-	Polycode.Matrix4_getPosition(this.__ptr)
+	var retVal = new Vector3()
+	retVal.__ptr = Polycode.Matrix4_getPosition(this.__ptr)
+	return retVal
 }
 
 Matrix4.prototype.multiplyWithPerspective = function(v2) {
-	Polycode.Matrix4_multiplyWithPerspective(this.__ptr, v2)
+	var retVal = new Vector3()
+	retVal.__ptr = Polycode.Matrix4_multiplyWithPerspective(this.__ptr, v2)
+	return retVal
 }
 
 Matrix4.prototype.multVector3 = function(v2) {
-	Polycode.Matrix4_multVector3(this.__ptr, v2)
+	var retVal = new Vector3()
+	retVal.__ptr = Polycode.Matrix4_multVector3(this.__ptr, v2)
+	return retVal
 }
 
 Matrix4.prototype.multVector4 = function(v2) {
-	Polycode.Matrix4_multVector4(this.__ptr, v2)
+	var retVal = new Vector4()
+	retVal.__ptr = Polycode.Matrix4_multVector4(this.__ptr, v2)
+	return retVal
 }
 
 Matrix4.prototype.Translate = function(x,y,z) {
@@ -42,19 +52,25 @@ Matrix4.prototype.getEulerAngles = function(ax,ay,az) {
 }
 
 Matrix4.prototype.transpose = function() {
-	Polycode.Matrix4_transpose(this.__ptr)
+	var retVal = new Matrix4()
+	retVal.__ptr = Polycode.Matrix4_transpose(this.__ptr)
+	return retVal
 }
 
 Matrix4.prototype.Inverse = function() {
-	Polycode.Matrix4_Inverse(this.__ptr)
+	var retVal = new Matrix4()
+	retVal.__ptr = Polycode.Matrix4_Inverse(this.__ptr)
+	return retVal
 }
 
 Matrix4.prototype.inverseAffine = function() {
-	Polycode.Matrix4_inverseAffine(this.__ptr)
+	var retVal = new Matrix4()
+	retVal.__ptr = Polycode.Matrix4_inverseAffine(this.__ptr)
+	return retVal
 }
 
 Matrix4.prototype.determinant = function() {
-	Polycode.Matrix4_determinant(this.__ptr)
+	return Polycode.Matrix4_determinant(this.__ptr)
 }
 
 Matrix4.prototype.setOrthoProjection = function(left,right,bottom,top,zNear,zFar) {

+ 39 - 14
bindings/javascript/Polycode/Mesh.js

@@ -1,5 +1,16 @@
 function Mesh() {
+	Object.defineProperties(this, {
+		'indexedMesh': { enumerable: true, configurable: true, get: Mesh.prototype.__get_indexedMesh, set: Mesh.prototype.__set_indexedMesh}
+	})
 }
+Mesh.prototype.__get_indexedMesh = function() {
+	return Polycode.Mesh__get_indexedMesh(this.__ptr)
+}
+
+Mesh.prototype.__set_indexedMesh = function(val) {
+	Polycode.Mesh__set_indexedMesh(this.__ptr, val)
+}
+
 
 Mesh.prototype.loadMesh = function(fileName) {
 	Polycode.Mesh_loadMesh(this.__ptr, fileName)
@@ -18,7 +29,7 @@ Mesh.prototype.loadFromFile = function(inFile) {
 }
 
 Mesh.prototype.getVertexCount = function() {
-	Polycode.Mesh_getVertexCount(this.__ptr)
+	return Polycode.Mesh_getVertexCount(this.__ptr)
 }
 
 Mesh.prototype.createPlane = function(w,h,tilingValue) {
@@ -66,7 +77,9 @@ Mesh.prototype.createCone = function(height,radius,numSegments,tilingValue) {
 }
 
 Mesh.prototype.recenterMesh = function() {
-	Polycode.Mesh_recenterMesh(this.__ptr)
+	var retVal = new Vector3()
+	retVal.__ptr = Polycode.Mesh_recenterMesh(this.__ptr)
+	return retVal
 }
 
 Mesh.prototype.setVertexAtOffset = function(offset,x,y,z) {
@@ -110,27 +123,37 @@ Mesh.prototype.addColor = function(r,g,b,a) {
 }
 
 Mesh.prototype.getVertexPosition = function(vertexOffset) {
-	Polycode.Mesh_getVertexPosition(this.__ptr, vertexOffset)
+	var retVal = new Vector3()
+	retVal.__ptr = Polycode.Mesh_getVertexPosition(this.__ptr, vertexOffset)
+	return retVal
 }
 
 Mesh.prototype.getVertexPositionAtIndex = function(index) {
-	Polycode.Mesh_getVertexPositionAtIndex(this.__ptr, index)
+	var retVal = new Vector3()
+	retVal.__ptr = Polycode.Mesh_getVertexPositionAtIndex(this.__ptr, index)
+	return retVal
 }
 
 Mesh.prototype.getVertexTexCoord = function(vertexOffset) {
-	Polycode.Mesh_getVertexTexCoord(this.__ptr, vertexOffset)
+	var retVal = new Vector2()
+	retVal.__ptr = Polycode.Mesh_getVertexTexCoord(this.__ptr, vertexOffset)
+	return retVal
 }
 
 Mesh.prototype.getVertexTexCoordAtIndex = function(index) {
-	Polycode.Mesh_getVertexTexCoordAtIndex(this.__ptr, index)
+	var retVal = new Vector2()
+	retVal.__ptr = Polycode.Mesh_getVertexTexCoordAtIndex(this.__ptr, index)
+	return retVal
 }
 
 Mesh.prototype.Copy = function() {
-	Polycode.Mesh_Copy(this.__ptr)
+	var retVal = new Mesh()
+	retVal.__ptr = Polycode.Mesh_Copy(this.__ptr)
+	return retVal
 }
 
 Mesh.prototype.getRadius = function() {
-	Polycode.Mesh_getRadius(this.__ptr)
+	return Polycode.Mesh_getRadius(this.__ptr)
 }
 
 Mesh.prototype.calculateNormals = function() {
@@ -142,7 +165,7 @@ Mesh.prototype.calculateTangents = function() {
 }
 
 Mesh.prototype.getMeshType = function() {
-	Polycode.Mesh_getMeshType(this.__ptr)
+	return Polycode.Mesh_getMeshType(this.__ptr)
 }
 
 Mesh.prototype.setMeshType = function(newType) {
@@ -150,15 +173,17 @@ Mesh.prototype.setMeshType = function(newType) {
 }
 
 Mesh.prototype.getIndexGroupSize = function() {
-	Polycode.Mesh_getIndexGroupSize(this.__ptr)
+	return Polycode.Mesh_getIndexGroupSize(this.__ptr)
 }
 
 Mesh.prototype.calculateBBox = function() {
-	Polycode.Mesh_calculateBBox(this.__ptr)
+	var retVal = new Vector3()
+	retVal.__ptr = Polycode.Mesh_calculateBBox(this.__ptr)
+	return retVal
 }
 
 Mesh.prototype.hasVertexBuffer = function() {
-	Polycode.Mesh_hasVertexBuffer(this.__ptr)
+	return Polycode.Mesh_hasVertexBuffer(this.__ptr)
 }
 
 Mesh.prototype.addIndexedFace = function(i1,i2) {
@@ -178,11 +203,11 @@ Mesh.prototype.removeFace = function(faceIndex) {
 }
 
 Mesh.prototype.removeUnusedVertices = function() {
-	Polycode.Mesh_removeUnusedVertices(this.__ptr)
+	return Polycode.Mesh_removeUnusedVertices(this.__ptr)
 }
 
 Mesh.prototype.getIndexCount = function() {
-	Polycode.Mesh_getIndexCount(this.__ptr)
+	return Polycode.Mesh_getIndexCount(this.__ptr)
 }
 
 Mesh.prototype.subdivideToRadius = function(radius,subdivisions) {

+ 3 - 1
bindings/javascript/Polycode/MeshResourceLoader.js

@@ -2,5 +2,7 @@ function MeshResourceLoader() {
 }
 
 MeshResourceLoader.prototype.loadResource = function(path,targetPool) {
-	Polycode.MeshResourceLoader_loadResource(this.__ptr, path,targetPool)
+	var retVal = new Resource()
+	retVal.__ptr = Polycode.MeshResourceLoader_loadResource(this.__ptr, path,targetPool)
+	return retVal
 }

+ 20 - 0
bindings/javascript/Polycode/MouseEventResult.js

@@ -1,2 +1,22 @@
 function MouseEventResult() {
+	Object.defineProperties(this, {
+		'hit': { enumerable: true, configurable: true, get: MouseEventResult.prototype.__get_hit, set: MouseEventResult.prototype.__set_hit},
+		'blocked': { enumerable: true, configurable: true, get: MouseEventResult.prototype.__get_blocked, set: MouseEventResult.prototype.__set_blocked}
+	})
 }
+MouseEventResult.prototype.__get_hit = function() {
+	return Polycode.MouseEventResult__get_hit(this.__ptr)
+}
+
+MouseEventResult.prototype.__set_hit = function(val) {
+	Polycode.MouseEventResult__set_hit(this.__ptr, val)
+}
+
+MouseEventResult.prototype.__get_blocked = function() {
+	return Polycode.MouseEventResult__get_blocked(this.__ptr)
+}
+
+MouseEventResult.prototype.__set_blocked = function(val) {
+	Polycode.MouseEventResult__set_blocked(this.__ptr, val)
+}
+

+ 56 - 0
bindings/javascript/Polycode/OSFileEntry.js

@@ -1,5 +1,61 @@
 function OSFileEntry() {
+	Object.defineProperties(this, {
+		'name': { enumerable: true, configurable: true, get: OSFileEntry.prototype.__get_name, set: OSFileEntry.prototype.__set_name},
+		'extension': { enumerable: true, configurable: true, get: OSFileEntry.prototype.__get_extension, set: OSFileEntry.prototype.__set_extension},
+		'nameWithoutExtension': { enumerable: true, configurable: true, get: OSFileEntry.prototype.__get_nameWithoutExtension, set: OSFileEntry.prototype.__set_nameWithoutExtension},
+		'basePath': { enumerable: true, configurable: true, get: OSFileEntry.prototype.__get_basePath, set: OSFileEntry.prototype.__set_basePath},
+		'fullPath': { enumerable: true, configurable: true, get: OSFileEntry.prototype.__get_fullPath, set: OSFileEntry.prototype.__set_fullPath},
+		'type': { enumerable: true, configurable: true, get: OSFileEntry.prototype.__get_type, set: OSFileEntry.prototype.__set_type}
+	})
 }
+OSFileEntry.prototype.__get_name = function() {
+	return Polycode.OSFileEntry__get_name(this.__ptr)
+}
+
+OSFileEntry.prototype.__set_name = function(val) {
+	Polycode.OSFileEntry__set_name(this.__ptr, val)
+}
+
+OSFileEntry.prototype.__get_extension = function() {
+	return Polycode.OSFileEntry__get_extension(this.__ptr)
+}
+
+OSFileEntry.prototype.__set_extension = function(val) {
+	Polycode.OSFileEntry__set_extension(this.__ptr, val)
+}
+
+OSFileEntry.prototype.__get_nameWithoutExtension = function() {
+	return Polycode.OSFileEntry__get_nameWithoutExtension(this.__ptr)
+}
+
+OSFileEntry.prototype.__set_nameWithoutExtension = function(val) {
+	Polycode.OSFileEntry__set_nameWithoutExtension(this.__ptr, val)
+}
+
+OSFileEntry.prototype.__get_basePath = function() {
+	return Polycode.OSFileEntry__get_basePath(this.__ptr)
+}
+
+OSFileEntry.prototype.__set_basePath = function(val) {
+	Polycode.OSFileEntry__set_basePath(this.__ptr, val)
+}
+
+OSFileEntry.prototype.__get_fullPath = function() {
+	return Polycode.OSFileEntry__get_fullPath(this.__ptr)
+}
+
+OSFileEntry.prototype.__set_fullPath = function(val) {
+	Polycode.OSFileEntry__set_fullPath(this.__ptr, val)
+}
+
+OSFileEntry.prototype.__get_type = function() {
+	return Polycode.OSFileEntry__get_type(this.__ptr)
+}
+
+OSFileEntry.prototype.__set_type = function(val) {
+	Polycode.OSFileEntry__set_type(this.__ptr, val)
+}
+
 
 OSFileEntry.prototype.init = function(path,name,type) {
 	Polycode.OSFileEntry_init(this.__ptr, path,name,type)

+ 72 - 5
bindings/javascript/Polycode/ObjectEntry.js

@@ -1,24 +1,91 @@
 function ObjectEntry() {
+	Object.defineProperties(this, {
+		'type': { enumerable: true, configurable: true, get: ObjectEntry.prototype.__get_type, set: ObjectEntry.prototype.__set_type},
+		'name': { enumerable: true, configurable: true, get: ObjectEntry.prototype.__get_name, set: ObjectEntry.prototype.__set_name},
+		'NumberVal': { enumerable: true, configurable: true, get: ObjectEntry.prototype.__get_NumberVal, set: ObjectEntry.prototype.__set_NumberVal},
+		'intVal': { enumerable: true, configurable: true, get: ObjectEntry.prototype.__get_intVal, set: ObjectEntry.prototype.__set_intVal},
+		'stringVal': { enumerable: true, configurable: true, get: ObjectEntry.prototype.__get_stringVal, set: ObjectEntry.prototype.__set_stringVal},
+		'boolVal': { enumerable: true, configurable: true, get: ObjectEntry.prototype.__get_boolVal, set: ObjectEntry.prototype.__set_boolVal},
+		'length': { enumerable: true, configurable: true, get: ObjectEntry.prototype.__get_length, set: ObjectEntry.prototype.__set_length}
+	})
 }
+ObjectEntry.prototype.__get_type = function() {
+	return Polycode.ObjectEntry__get_type(this.__ptr)
+}
+
+ObjectEntry.prototype.__set_type = function(val) {
+	Polycode.ObjectEntry__set_type(this.__ptr, val)
+}
+
+ObjectEntry.prototype.__get_name = function() {
+	return Polycode.ObjectEntry__get_name(this.__ptr)
+}
+
+ObjectEntry.prototype.__set_name = function(val) {
+	Polycode.ObjectEntry__set_name(this.__ptr, val)
+}
+
+ObjectEntry.prototype.__get_NumberVal = function() {
+	return Polycode.ObjectEntry__get_NumberVal(this.__ptr)
+}
+
+ObjectEntry.prototype.__set_NumberVal = function(val) {
+	Polycode.ObjectEntry__set_NumberVal(this.__ptr, val)
+}
+
+ObjectEntry.prototype.__get_intVal = function() {
+	return Polycode.ObjectEntry__get_intVal(this.__ptr)
+}
+
+ObjectEntry.prototype.__set_intVal = function(val) {
+	Polycode.ObjectEntry__set_intVal(this.__ptr, val)
+}
+
+ObjectEntry.prototype.__get_stringVal = function() {
+	return Polycode.ObjectEntry__get_stringVal(this.__ptr)
+}
+
+ObjectEntry.prototype.__set_stringVal = function(val) {
+	Polycode.ObjectEntry__set_stringVal(this.__ptr, val)
+}
+
+ObjectEntry.prototype.__get_boolVal = function() {
+	return Polycode.ObjectEntry__get_boolVal(this.__ptr)
+}
+
+ObjectEntry.prototype.__set_boolVal = function(val) {
+	Polycode.ObjectEntry__set_boolVal(this.__ptr, val)
+}
+
+ObjectEntry.prototype.__get_length = function() {
+	return Polycode.ObjectEntry__get_length(this.__ptr)
+}
+
+ObjectEntry.prototype.__set_length = function(val) {
+	Polycode.ObjectEntry__set_length(this.__ptr, val)
+}
+
 
 ObjectEntry.prototype.readNumber = function(key,out) {
-	Polycode.ObjectEntry_readNumber(this.__ptr, key,out)
+	return Polycode.ObjectEntry_readNumber(this.__ptr, key,out)
 }
 
 ObjectEntry.prototype.readString = function(key,out) {
-	Polycode.ObjectEntry_readString(this.__ptr, key,out)
+	return Polycode.ObjectEntry_readString(this.__ptr, key,out)
 }
 
 ObjectEntry.prototype.readBool = function(key,out) {
-	Polycode.ObjectEntry_readBool(this.__ptr, key,out)
+	return Polycode.ObjectEntry_readBool(this.__ptr, key,out)
 }
 
 ObjectEntry.prototype.addChild = function(name) {
-	Polycode.ObjectEntry_addChild(this.__ptr, name)
+	var retVal = new ObjectEntry()
+	retVal.__ptr = Polycode.ObjectEntry_addChild(this.__ptr, name)
+	return retVal
 }
 
 ObjectEntry.prototype.getTypedName = function() {
-	Polycode.ObjectEntry_getTypedName(this.__ptr)
+	return Polycode.ObjectEntry_getTypedName(this.__ptr)
 }
 
 ObjectEntry.prototype.setTypedName = function(str) {

+ 4 - 4
bindings/javascript/Polycode/Perlin.js

@@ -2,17 +2,17 @@ function Perlin() {
 }
 
 Perlin.prototype.Get2DTiledX = function(x,y,t) {
-	Polycode.Perlin_Get2DTiledX(this.__ptr, x,y,t)
+	return Polycode.Perlin_Get2DTiledX(this.__ptr, x,y,t)
 }
 
 Perlin.prototype.Get = function(x,y) {
-	Polycode.Perlin_Get(this.__ptr, x,y)
+	return Polycode.Perlin_Get(this.__ptr, x,y)
 }
 
 Perlin.prototype.Get2D = function(x,y) {
-	Polycode.Perlin_Get2D(this.__ptr, x,y)
+	return Polycode.Perlin_Get2D(this.__ptr, x,y)
 }
 
 Perlin.prototype.Get3D = function(x,y,z) {
-	Polycode.Perlin_Get3D(this.__ptr, x,y,z)
+	return Polycode.Perlin_Get3D(this.__ptr, x,y,z)
 }

+ 22 - 0
bindings/javascript/Polycode/PolycodeViewBase.js

@@ -1,2 +1,24 @@
 function PolycodeViewBase() {
+	Object.defineProperties(this, {
+		'windowData': { enumerable: true, configurable: true, get: PolycodeViewBase.prototype.__get_windowData, set: PolycodeViewBase.prototype.__set_windowData},
+		'resizable': { enumerable: true, configurable: true, get: PolycodeViewBase.prototype.__get_resizable, set: PolycodeViewBase.prototype.__set_resizable}
+	})
 }
+PolycodeViewBase.prototype.__get_windowData = function() {
+	var retVal = new void()
+	retVal.__ptr = 	Polycode.PolycodeViewBase__get_windowData(this.__ptr)
+	return retVal
+}
+
+PolycodeViewBase.prototype.__set_windowData = function(val) {
+	Polycode.PolycodeViewBase__set_windowData(this.__ptr, val.__ptr)
+}
+
+PolycodeViewBase.prototype.__get_resizable = function() {
+	return Polycode.PolycodeViewBase__get_resizable(this.__ptr)
+}
+
+PolycodeViewBase.prototype.__set_resizable = function(val) {
+	Polycode.PolycodeViewBase__set_resizable(this.__ptr, val)
+}
+

+ 31 - 0
bindings/javascript/Polycode/ProgramAttribute.js

@@ -1,2 +1,33 @@
 function ProgramAttribute() {
+	Object.defineProperties(this, {
+		'size': { enumerable: true, configurable: true, get: ProgramAttribute.prototype.__get_size, set: ProgramAttribute.prototype.__set_size},
+		'name': { enumerable: true, configurable: true, get: ProgramAttribute.prototype.__get_name, set: ProgramAttribute.prototype.__set_name},
+		'platformData': { enumerable: true, configurable: true, get: ProgramAttribute.prototype.__get_platformData, set: ProgramAttribute.prototype.__set_platformData}
+	})
 }
+ProgramAttribute.prototype.__get_size = function() {
+	return Polycode.ProgramAttribute__get_size(this.__ptr)
+}
+
+ProgramAttribute.prototype.__set_size = function(val) {
+	Polycode.ProgramAttribute__set_size(this.__ptr, val)
+}
+
+ProgramAttribute.prototype.__get_name = function() {
+	return Polycode.ProgramAttribute__get_name(this.__ptr)
+}
+
+ProgramAttribute.prototype.__set_name = function(val) {
+	Polycode.ProgramAttribute__set_name(this.__ptr, val)
+}
+
+ProgramAttribute.prototype.__get_platformData = function() {
+	var retVal = new void()
+	retVal.__ptr = 	Polycode.ProgramAttribute__get_platformData(this.__ptr)
+	return retVal
+}
+
+ProgramAttribute.prototype.__set_platformData = function(val) {
+	Polycode.ProgramAttribute__set_platformData(this.__ptr, val.__ptr)
+}
+

+ 42 - 0
bindings/javascript/Polycode/ProgramParam.js

@@ -1,2 +1,44 @@
 function ProgramParam() {
+	Object.defineProperties(this, {
+		'name': { enumerable: true, configurable: true, get: ProgramParam.prototype.__get_name, set: ProgramParam.prototype.__set_name},
+		'type': { enumerable: true, configurable: true, get: ProgramParam.prototype.__get_type, set: ProgramParam.prototype.__set_type},
+		'platformData': { enumerable: true, configurable: true, get: ProgramParam.prototype.__get_platformData, set: ProgramParam.prototype.__set_platformData},
+		'globalParam': { enumerable: true, configurable: true, get: ProgramParam.prototype.__get_globalParam, set: ProgramParam.prototype.__set_globalParam}
+	})
 }
+ProgramParam.prototype.__get_name = function() {
+	return Polycode.ProgramParam__get_name(this.__ptr)
+}
+
+ProgramParam.prototype.__set_name = function(val) {
+	Polycode.ProgramParam__set_name(this.__ptr, val)
+}
+
+ProgramParam.prototype.__get_type = function() {
+	return Polycode.ProgramParam__get_type(this.__ptr)
+}
+
+ProgramParam.prototype.__set_type = function(val) {
+	Polycode.ProgramParam__set_type(this.__ptr, val)
+}
+
+ProgramParam.prototype.__get_platformData = function() {
+	var retVal = new void()
+	retVal.__ptr = 	Polycode.ProgramParam__get_platformData(this.__ptr)
+	return retVal
+}
+
+ProgramParam.prototype.__set_platformData = function(val) {
+	Polycode.ProgramParam__set_platformData(this.__ptr, val.__ptr)
+}
+
+ProgramParam.prototype.__get_globalParam = function() {
+	var retVal = new LocalShaderParam()
+	retVal.__ptr = 	Polycode.ProgramParam__get_globalParam(this.__ptr)
+	return retVal
+}
+
+ProgramParam.prototype.__set_globalParam = function(val) {
+	Polycode.ProgramParam__set_globalParam(this.__ptr, val.__ptr)
+}
+

+ 3 - 1
bindings/javascript/Polycode/ProgramResourceLoader.js

@@ -2,5 +2,7 @@ function ProgramResourceLoader() {
 }
 
 ProgramResourceLoader.prototype.loadResource = function(path,targetPool) {
-	Polycode.ProgramResourceLoader_loadResource(this.__ptr, path,targetPool)
+	var retVal = new Resource()
+	retVal.__ptr = Polycode.ProgramResourceLoader_loadResource(this.__ptr, path,targetPool)
+	return retVal
 }

+ 44 - 0
bindings/javascript/Polycode/QuatTriple.js

@@ -1,2 +1,46 @@
 function QuatTriple() {
+	Object.defineProperties(this, {
+		'q1': { enumerable: true, configurable: true, get: QuatTriple.prototype.__get_q1, set: QuatTriple.prototype.__set_q1},
+		'q2': { enumerable: true, configurable: true, get: QuatTriple.prototype.__get_q2, set: QuatTriple.prototype.__set_q2},
+		'q3': { enumerable: true, configurable: true, get: QuatTriple.prototype.__get_q3, set: QuatTriple.prototype.__set_q3},
+		'time': { enumerable: true, configurable: true, get: QuatTriple.prototype.__get_time, set: QuatTriple.prototype.__set_time}
+	})
 }
+QuatTriple.prototype.__get_q1 = function() {
+	var retVal = new Quaternion()
+	retVal.__ptr = 	Polycode.QuatTriple__get_q1(this.__ptr)
+	return retVal
+}
+
+QuatTriple.prototype.__set_q1 = function(val) {
+	Polycode.QuatTriple__set_q1(this.__ptr, val.__ptr)
+}
+
+QuatTriple.prototype.__get_q2 = function() {
+	var retVal = new Quaternion()
+	retVal.__ptr = 	Polycode.QuatTriple__get_q2(this.__ptr)
+	return retVal
+}
+
+QuatTriple.prototype.__set_q2 = function(val) {
+	Polycode.QuatTriple__set_q2(this.__ptr, val.__ptr)
+}
+
+QuatTriple.prototype.__get_q3 = function() {
+	var retVal = new Quaternion()
+	retVal.__ptr = 	Polycode.QuatTriple__get_q3(this.__ptr)
+	return retVal
+}
+
+QuatTriple.prototype.__set_q3 = function(val) {
+	Polycode.QuatTriple__set_q3(this.__ptr, val.__ptr)
+}
+
+QuatTriple.prototype.__get_time = function() {
+	return Polycode.QuatTriple__get_time(this.__ptr)
+}
+
+QuatTriple.prototype.__set_time = function(val) {
+	Polycode.QuatTriple__set_time(this.__ptr, val)
+}
+

+ 60 - 10
bindings/javascript/Polycode/Quaternion.js

@@ -1,28 +1,70 @@
 function Quaternion() {
+	Object.defineProperties(this, {
+		'x': { enumerable: true, configurable: true, get: Quaternion.prototype.__get_x, set: Quaternion.prototype.__set_x},
+		'y': { enumerable: true, configurable: true, get: Quaternion.prototype.__get_y, set: Quaternion.prototype.__set_y},
+		'z': { enumerable: true, configurable: true, get: Quaternion.prototype.__get_z, set: Quaternion.prototype.__set_z},
+		'w': { enumerable: true, configurable: true, get: Quaternion.prototype.__get_w, set: Quaternion.prototype.__set_w}
+	})
 }
+Quaternion.prototype.__get_x = function() {
+	return Polycode.Quaternion__get_x(this.__ptr)
+}
+
+Quaternion.prototype.__set_x = function(val) {
+	Polycode.Quaternion__set_x(this.__ptr, val)
+}
+
+Quaternion.prototype.__get_y = function() {
+	return Polycode.Quaternion__get_y(this.__ptr)
+}
+
+Quaternion.prototype.__set_y = function(val) {
+	Polycode.Quaternion__set_y(this.__ptr, val)
+}
+
+Quaternion.prototype.__get_z = function() {
+	return Polycode.Quaternion__get_z(this.__ptr)
+}
+
+Quaternion.prototype.__set_z = function(val) {
+	Polycode.Quaternion__set_z(this.__ptr, val)
+}
+
+Quaternion.prototype.__get_w = function() {
+	return Polycode.Quaternion__get_w(this.__ptr)
+}
+
+Quaternion.prototype.__set_w = function(val) {
+	Polycode.Quaternion__set_w(this.__ptr, val)
+}
+
 
 Quaternion.prototype.setFromMatrix = function(_mat) {
 	Polycode.Quaternion_setFromMatrix(this.__ptr, _mat)
 }
 
 Quaternion.prototype.Dot = function(rkQ) {
-	Polycode.Quaternion_Dot(this.__ptr, rkQ)
+	return Polycode.Quaternion_Dot(this.__ptr, rkQ)
 }
 
 Quaternion.prototype.Log = function() {
-	Polycode.Quaternion_Log(this.__ptr)
+	var retVal = new Quaternion()
+	retVal.__ptr = Polycode.Quaternion_Log(this.__ptr)
+	return retVal
 }
 
 Quaternion.prototype.Exp = function() {
-	Polycode.Quaternion_Exp(this.__ptr)
+	var retVal = new Quaternion()
+	retVal.__ptr = Polycode.Quaternion_Exp(this.__ptr)
+	return retVal
 }
 
 Quaternion.prototype.Norm = function() {
-	Polycode.Quaternion_Norm(this.__ptr)
+	return Polycode.Quaternion_Norm(this.__ptr)
 }
 
 Quaternion.prototype.Normalize = function() {
-	Polycode.Quaternion_Normalize(this.__ptr)
+	return Polycode.Quaternion_Normalize(this.__ptr)
 }
 
 Quaternion.prototype.lookAt = function(D,upVector) {
@@ -34,7 +76,9 @@ Quaternion.prototype.createFromMatrix = function(matrix) {
 }
 
 Quaternion.prototype.Inverse = function() {
-	Polycode.Quaternion_Inverse(this.__ptr)
+	var retVal = new Quaternion()
+	retVal.__ptr = Polycode.Quaternion_Inverse(this.__ptr)
+	return retVal
 }
 
 Quaternion.prototype.set = function(w,x,y,z) {
@@ -42,7 +86,7 @@ Quaternion.prototype.set = function(w,x,y,z) {
 }
 
 Quaternion.prototype.InvSqrt = function(x) {
-	Polycode.Quaternion_InvSqrt(this.__ptr, x)
+	return Polycode.Quaternion_InvSqrt(this.__ptr, x)
 }
 
 Quaternion.prototype.fromAxes = function(az,ay,ax) {
@@ -54,7 +98,9 @@ Quaternion.prototype.fromAngleAxis = function(rfAngle,rkAxis) {
 }
 
 Quaternion.prototype.toEulerAngles = function() {
-	Polycode.Quaternion_toEulerAngles(this.__ptr)
+	var retVal = new Vector3()
+	retVal.__ptr = Polycode.Quaternion_toEulerAngles(this.__ptr)
+	return retVal
 }
 
 Quaternion.prototype.toAngleAxis = function(rfAngle,rkAxis) {
@@ -66,9 +112,13 @@ Quaternion.prototype.createFromAxisAngle = function(x,y,z,degrees) {
 }
 
 Quaternion.prototype.createMatrix = function() {
-	Polycode.Quaternion_createMatrix(this.__ptr)
+	var retVal = new Matrix4()
+	retVal.__ptr = Polycode.Quaternion_createMatrix(this.__ptr)
+	return retVal
 }
 
 Quaternion.prototype.applyTo = function(v) {
-	Polycode.Quaternion_applyTo(this.__ptr, v)
+	var retVal = new Vector3()
+	retVal.__ptr = Polycode.Quaternion_applyTo(this.__ptr, v)
+	return retVal
 }

+ 3 - 1
bindings/javascript/Polycode/QuaternionCurve.js

@@ -2,7 +2,9 @@ function QuaternionCurve() {
 }
 
 QuaternionCurve.prototype.interpolate = function(t,useShortestPath) {
-	Polycode.QuaternionCurve_interpolate(this.__ptr, t,useShortestPath)
+	var retVal = new Quaternion()
+	retVal.__ptr = Polycode.QuaternionCurve_interpolate(this.__ptr, t,useShortestPath)
+	return retVal
 }
 
 QuaternionCurve.prototype.generatePointsFromCurves = function(wCurve,xCurve,yCurve,zCurve) {

+ 47 - 6
bindings/javascript/Polycode/Ray.js

@@ -1,26 +1,67 @@
 function Ray() {
+	Object.defineProperties(this, {
+		'origin': { enumerable: true, configurable: true, get: Ray.prototype.__get_origin, set: Ray.prototype.__set_origin},
+		'direction': { enumerable: true, configurable: true, get: Ray.prototype.__get_direction, set: Ray.prototype.__set_direction},
+		'inv_direction': { enumerable: true, configurable: true, get: Ray.prototype.__get_inv_direction, set: Ray.prototype.__set_inv_direction}
+	})
 }
+Ray.prototype.__get_origin = function() {
+	var retVal = new Vector3()
+	retVal.__ptr = 	Polycode.Ray__get_origin(this.__ptr)
+	return retVal
+}
+
+Ray.prototype.__set_origin = function(val) {
+	Polycode.Ray__set_origin(this.__ptr, val.__ptr)
+}
+
+Ray.prototype.__get_direction = function() {
+	var retVal = new Vector3()
+	retVal.__ptr = 	Polycode.Ray__get_direction(this.__ptr)
+	return retVal
+}
+
+Ray.prototype.__set_direction = function(val) {
+	Polycode.Ray__set_direction(this.__ptr, val.__ptr)
+}
+
+Ray.prototype.__get_inv_direction = function() {
+	var retVal = new Vector3()
+	retVal.__ptr = 	Polycode.Ray__get_inv_direction(this.__ptr)
+	return retVal
+}
+
+Ray.prototype.__set_inv_direction = function(val) {
+	Polycode.Ray__set_inv_direction(this.__ptr, val.__ptr)
+}
+
 
 Ray.prototype.boxIntersect = function(box,transformMatrix,near,far) {
-	Polycode.Ray_boxIntersect(this.__ptr, box,transformMatrix,near,far)
+	return Polycode.Ray_boxIntersect(this.__ptr, box,transformMatrix,near,far)
 }
 
 Ray.prototype.planeIntersectPoint = function(planeNormal,planeDistance) {
-	Polycode.Ray_planeIntersectPoint(this.__ptr, planeNormal,planeDistance)
+	var retVal = new Vector3()
+	retVal.__ptr = Polycode.Ray_planeIntersectPoint(this.__ptr, planeNormal,planeDistance)
+	return retVal
 }
 
 Ray.prototype.tranformByMatrix = function(matrix) {
-	Polycode.Ray_tranformByMatrix(this.__ptr, matrix)
+	var retVal = new Ray()
+	retVal.__ptr = Polycode.Ray_tranformByMatrix(this.__ptr, matrix)
+	return retVal
 }
 
 Ray.prototype.closestPointOnRay = function(point) {
-	Polycode.Ray_closestPointOnRay(this.__ptr, point)
+	var retVal = new Vector3()
+	retVal.__ptr = Polycode.Ray_closestPointOnRay(this.__ptr, point)
+	return retVal
 }
 
 Ray.prototype.closestPointsBetween = function(ray2,point1,point2) {
-	Polycode.Ray_closestPointsBetween(this.__ptr, ray2,point1,point2)
+	return Polycode.Ray_closestPointsBetween(this.__ptr, ray2,point1,point2)
 }
 
 Ray.prototype.polygonIntersect = function(v1,v2,v3) {
-	Polycode.Ray_polygonIntersect(this.__ptr, v1,v2,v3)
+	return Polycode.Ray_polygonIntersect(this.__ptr, v1,v2,v3)
 }

+ 45 - 5
bindings/javascript/Polycode/Rectangle.js

@@ -1,26 +1,66 @@
 function Rectangle() {
+	Object.defineProperties(this, {
+		'x': { enumerable: true, configurable: true, get: Rectangle.prototype.__get_x, set: Rectangle.prototype.__set_x},
+		'y': { enumerable: true, configurable: true, get: Rectangle.prototype.__get_y, set: Rectangle.prototype.__set_y},
+		'w': { enumerable: true, configurable: true, get: Rectangle.prototype.__get_w, set: Rectangle.prototype.__set_w},
+		'h': { enumerable: true, configurable: true, get: Rectangle.prototype.__get_h, set: Rectangle.prototype.__set_h}
+	})
 }
+Rectangle.prototype.__get_x = function() {
+	return Polycode.Rectangle__get_x(this.__ptr)
+}
+
+Rectangle.prototype.__set_x = function(val) {
+	Polycode.Rectangle__set_x(this.__ptr, val)
+}
+
+Rectangle.prototype.__get_y = function() {
+	return Polycode.Rectangle__get_y(this.__ptr)
+}
+
+Rectangle.prototype.__set_y = function(val) {
+	Polycode.Rectangle__set_y(this.__ptr, val)
+}
+
+Rectangle.prototype.__get_w = function() {
+	return Polycode.Rectangle__get_w(this.__ptr)
+}
+
+Rectangle.prototype.__set_w = function(val) {
+	Polycode.Rectangle__set_w(this.__ptr, val)
+}
+
+Rectangle.prototype.__get_h = function() {
+	return Polycode.Rectangle__get_h(this.__ptr)
+}
+
+Rectangle.prototype.__set_h = function(val) {
+	Polycode.Rectangle__set_h(this.__ptr, val)
+}
+
 
 Rectangle.prototype.setRect = function(x,y,w,h) {
 	Polycode.Rectangle_setRect(this.__ptr, x,y,w,h)
 }
 
 Rectangle.prototype.Clipped = function(rect) {
-	Polycode.Rectangle_Clipped(this.__ptr, rect)
+	var retVal = new Rectangle()
+	retVal.__ptr = Polycode.Rectangle_Clipped(this.__ptr, rect)
+	return retVal
 }
 
 Rectangle.prototype.minX = function() {
-	Polycode.Rectangle_minX(this.__ptr)
+	return Polycode.Rectangle_minX(this.__ptr)
 }
 
 Rectangle.prototype.maxX = function() {
-	Polycode.Rectangle_maxX(this.__ptr)
+	return Polycode.Rectangle_maxX(this.__ptr)
 }
 
 Rectangle.prototype.minY = function() {
-	Polycode.Rectangle_minY(this.__ptr)
+	return Polycode.Rectangle_minY(this.__ptr)
 }
 
 Rectangle.prototype.maxY = function() {
-	Polycode.Rectangle_maxY(this.__ptr)
+	return Polycode.Rectangle_maxY(this.__ptr)
 }

+ 48 - 2
bindings/javascript/Polycode/RenderBuffer.js

@@ -1,10 +1,56 @@
 function RenderBuffer() {
+	Object.defineProperties(this, {
+		'colorTexture': { enumerable: true, configurable: true, get: RenderBuffer.prototype.__get_colorTexture, set: RenderBuffer.prototype.__set_colorTexture},
+		'depthTexture': { enumerable: true, configurable: true, get: RenderBuffer.prototype.__get_depthTexture, set: RenderBuffer.prototype.__set_depthTexture},
+		'platformData': { enumerable: true, configurable: true, get: RenderBuffer.prototype.__get_platformData, set: RenderBuffer.prototype.__set_platformData},
+		'depthBufferPlatformData': { enumerable: true, configurable: true, get: RenderBuffer.prototype.__get_depthBufferPlatformData, set: RenderBuffer.prototype.__set_depthBufferPlatformData}
+	})
 }
+RenderBuffer.prototype.__get_colorTexture = function() {
+	var retVal = new Texture()
+	retVal.__ptr = 	Polycode.RenderBuffer__get_colorTexture(this.__ptr)
+	return retVal
+}
+
+RenderBuffer.prototype.__set_colorTexture = function(val) {
+	Polycode.RenderBuffer__set_colorTexture(this.__ptr, val.__ptr)
+}
+
+RenderBuffer.prototype.__get_depthTexture = function() {
+	var retVal = new Texture()
+	retVal.__ptr = 	Polycode.RenderBuffer__get_depthTexture(this.__ptr)
+	return retVal
+}
+
+RenderBuffer.prototype.__set_depthTexture = function(val) {
+	Polycode.RenderBuffer__set_depthTexture(this.__ptr, val.__ptr)
+}
+
+RenderBuffer.prototype.__get_platformData = function() {
+	var retVal = new void()
+	retVal.__ptr = 	Polycode.RenderBuffer__get_platformData(this.__ptr)
+	return retVal
+}
+
+RenderBuffer.prototype.__set_platformData = function(val) {
+	Polycode.RenderBuffer__set_platformData(this.__ptr, val.__ptr)
+}
+
+RenderBuffer.prototype.__get_depthBufferPlatformData = function() {
+	var retVal = new void()
+	retVal.__ptr = 	Polycode.RenderBuffer__get_depthBufferPlatformData(this.__ptr)
+	return retVal
+}
+
+RenderBuffer.prototype.__set_depthBufferPlatformData = function(val) {
+	Polycode.RenderBuffer__set_depthBufferPlatformData(this.__ptr, val.__ptr)
+}
+
 
 RenderBuffer.prototype.getWidth = function() {
-	Polycode.RenderBuffer_getWidth(this.__ptr)
+	return Polycode.RenderBuffer_getWidth(this.__ptr)
 }
 
 RenderBuffer.prototype.getHeight = function() {
-	Polycode.RenderBuffer_getHeight(this.__ptr)
+	return Polycode.RenderBuffer_getHeight(this.__ptr)
 }

+ 41 - 1
bindings/javascript/Polycode/RenderDataArray.js

@@ -1,10 +1,50 @@
 function RenderDataArray() {
+	Object.defineProperties(this, {
+		'type': { enumerable: true, configurable: true, get: RenderDataArray.prototype.__get_type, set: RenderDataArray.prototype.__set_type},
+		'customArrayName': { enumerable: true, configurable: true, get: RenderDataArray.prototype.__get_customArrayName, set: RenderDataArray.prototype.__set_customArrayName},
+		'hasVBO': { enumerable: true, configurable: true, get: RenderDataArray.prototype.__get_hasVBO, set: RenderDataArray.prototype.__set_hasVBO},
+		'platformData': { enumerable: true, configurable: true, get: RenderDataArray.prototype.__get_platformData, set: RenderDataArray.prototype.__set_platformData}
+	})
 }
+RenderDataArray.prototype.__get_type = function() {
+	return Polycode.RenderDataArray__get_type(this.__ptr)
+}
+
+RenderDataArray.prototype.__set_type = function(val) {
+	Polycode.RenderDataArray__set_type(this.__ptr, val)
+}
+
+RenderDataArray.prototype.__get_customArrayName = function() {
+	return Polycode.RenderDataArray__get_customArrayName(this.__ptr)
+}
+
+RenderDataArray.prototype.__set_customArrayName = function(val) {
+	Polycode.RenderDataArray__set_customArrayName(this.__ptr, val)
+}
+
+RenderDataArray.prototype.__get_hasVBO = function() {
+	return Polycode.RenderDataArray__get_hasVBO(this.__ptr)
+}
+
+RenderDataArray.prototype.__set_hasVBO = function(val) {
+	Polycode.RenderDataArray__set_hasVBO(this.__ptr, val)
+}
+
+RenderDataArray.prototype.__get_platformData = function() {
+	var retVal = new void()
+	retVal.__ptr = 	Polycode.RenderDataArray__get_platformData(this.__ptr)
+	return retVal
+}
+
+RenderDataArray.prototype.__set_platformData = function(val) {
+	Polycode.RenderDataArray__set_platformData(this.__ptr, val.__ptr)
+}
+
 
 RenderDataArray.prototype.getArrayData = function() {
 	Polycode.RenderDataArray_getArrayData(this.__ptr)
 }
 
 RenderDataArray.prototype.getDataSize = function() {
-	Polycode.RenderDataArray_getDataSize(this.__ptr)
+	return Polycode.RenderDataArray_getDataSize(this.__ptr)
 }

+ 13 - 0
bindings/javascript/Polycode/RenderFrame.js

@@ -1,2 +1,15 @@
 function RenderFrame() {
+	Object.defineProperties(this, {
+		'jobQueue': { enumerable: true, configurable: true, get: RenderFrame.prototype.__get_jobQueue, set: RenderFrame.prototype.__set_jobQueue}
+	})
 }
+RenderFrame.prototype.__get_jobQueue = function() {
+	var retVal = new queue<RendererThreadJob>()
+	retVal.__ptr = 	Polycode.RenderFrame__get_jobQueue(this.__ptr)
+	return retVal
+}
+
+RenderFrame.prototype.__set_jobQueue = function(val) {
+	Polycode.RenderFrame__set_jobQueue(this.__ptr, val.__ptr)
+}
+

+ 40 - 0
bindings/javascript/Polycode/RenderTargetBinding.js

@@ -1,2 +1,42 @@
 function RenderTargetBinding() {
+	Object.defineProperties(this, {
+		'id': { enumerable: true, configurable: true, get: RenderTargetBinding.prototype.__get_id, set: RenderTargetBinding.prototype.__set_id},
+		'name': { enumerable: true, configurable: true, get: RenderTargetBinding.prototype.__get_name, set: RenderTargetBinding.prototype.__set_name},
+		'mode': { enumerable: true, configurable: true, get: RenderTargetBinding.prototype.__get_mode, set: RenderTargetBinding.prototype.__set_mode},
+		'buffer': { enumerable: true, configurable: true, get: RenderTargetBinding.prototype.__get_buffer, set: RenderTargetBinding.prototype.__set_buffer}
+	})
 }
+RenderTargetBinding.prototype.__get_id = function() {
+	return Polycode.RenderTargetBinding__get_id(this.__ptr)
+}
+
+RenderTargetBinding.prototype.__set_id = function(val) {
+	Polycode.RenderTargetBinding__set_id(this.__ptr, val)
+}
+
+RenderTargetBinding.prototype.__get_name = function() {
+	return Polycode.RenderTargetBinding__get_name(this.__ptr)
+}
+
+RenderTargetBinding.prototype.__set_name = function(val) {
+	Polycode.RenderTargetBinding__set_name(this.__ptr, val)
+}
+
+RenderTargetBinding.prototype.__get_mode = function() {
+	return Polycode.RenderTargetBinding__get_mode(this.__ptr)
+}
+
+RenderTargetBinding.prototype.__set_mode = function(val) {
+	Polycode.RenderTargetBinding__set_mode(this.__ptr, val)
+}
+
+RenderTargetBinding.prototype.__get_buffer = function() {
+	var retVal = new RenderBuffer()
+	retVal.__ptr = 	Polycode.RenderTargetBinding__get_buffer(this.__ptr)
+	return retVal
+}
+
+RenderTargetBinding.prototype.__set_buffer = function(val) {
+	Polycode.RenderTargetBinding__set_buffer(this.__ptr, val.__ptr)
+}
+

+ 6 - 2
bindings/javascript/Polycode/RenderThread.js

@@ -22,7 +22,9 @@ RenderThread.prototype.processJob = function(job) {
 }
 
 RenderThread.prototype.getShaderBinding = function() {
-	Polycode.RenderThread_getShaderBinding(this.__ptr)
+	var retVal = new ShaderBinding()
+	retVal.__ptr = Polycode.RenderThread_getShaderBinding(this.__ptr)
+	return retVal
 }
 
 RenderThread.prototype.processDrawBuffer = function(buffer) {
@@ -30,7 +32,9 @@ RenderThread.prototype.processDrawBuffer = function(buffer) {
 }
 
 RenderThread.prototype.getFrameInfo = function() {
-	Polycode.RenderThread_getFrameInfo(this.__ptr)
+	var retVal = new RenderThreadDebugInfo()
+	retVal.__ptr = Polycode.RenderThread_getFrameInfo(this.__ptr)
+	return retVal
 }
 
 RenderThread.prototype.clearFrameQueue = function() {

+ 29 - 0
bindings/javascript/Polycode/RenderThreadDebugInfo.js

@@ -1,2 +1,31 @@
 function RenderThreadDebugInfo() {
+	Object.defineProperties(this, {
+		'buffersProcessed': { enumerable: true, configurable: true, get: RenderThreadDebugInfo.prototype.__get_buffersProcessed, set: RenderThreadDebugInfo.prototype.__set_buffersProcessed},
+		'drawCallsProcessed': { enumerable: true, configurable: true, get: RenderThreadDebugInfo.prototype.__get_drawCallsProcessed, set: RenderThreadDebugInfo.prototype.__set_drawCallsProcessed},
+		'timeTaken': { enumerable: true, configurable: true, get: RenderThreadDebugInfo.prototype.__get_timeTaken, set: RenderThreadDebugInfo.prototype.__set_timeTaken}
+	})
 }
+RenderThreadDebugInfo.prototype.__get_buffersProcessed = function() {
+	return Polycode.RenderThreadDebugInfo__get_buffersProcessed(this.__ptr)
+}
+
+RenderThreadDebugInfo.prototype.__set_buffersProcessed = function(val) {
+	Polycode.RenderThreadDebugInfo__set_buffersProcessed(this.__ptr, val)
+}
+
+RenderThreadDebugInfo.prototype.__get_drawCallsProcessed = function() {
+	return Polycode.RenderThreadDebugInfo__get_drawCallsProcessed(this.__ptr)
+}
+
+RenderThreadDebugInfo.prototype.__set_drawCallsProcessed = function(val) {
+	Polycode.RenderThreadDebugInfo__set_drawCallsProcessed(this.__ptr, val)
+}
+
+RenderThreadDebugInfo.prototype.__get_timeTaken = function() {
+	return Polycode.RenderThreadDebugInfo__get_timeTaken(this.__ptr)
+}
+
+RenderThreadDebugInfo.prototype.__set_timeTaken = function(val) {
+	Polycode.RenderThreadDebugInfo__set_timeTaken(this.__ptr, val)
+}
+

+ 24 - 10
bindings/javascript/Polycode/Renderer.js

@@ -6,19 +6,27 @@ Renderer.prototype.setGraphicsInterface = function(core,graphicsInterface) {
 }
 
 Renderer.prototype.getRenderThread = function() {
-	Polycode.Renderer_getRenderThread(this.__ptr)
+	var retVal = new RenderThread()
+	retVal.__ptr = Polycode.Renderer_getRenderThread(this.__ptr)
+	return retVal
 }
 
 Renderer.prototype.createCubemap = function(t0,t1,t2,t3,t4,t5) {
-	Polycode.Renderer_createCubemap(this.__ptr, t0,t1,t2,t3,t4,t5)
+	var retVal = new Cubemap()
+	retVal.__ptr = Polycode.Renderer_createCubemap(this.__ptr, t0,t1,t2,t3,t4,t5)
+	return retVal
 }
 
 Renderer.prototype.createTexture = function(width,height,textureData,clamp,createMipmaps,type,filteringMode,anisotropy,framebufferTexture) {
-	Polycode.Renderer_createTexture(this.__ptr, width,height,textureData,clamp,createMipmaps,type,filteringMode,anisotropy,framebufferTexture)
+	var retVal = new Texture()
+	retVal.__ptr = Polycode.Renderer_createTexture(this.__ptr, width,height,textureData,clamp,createMipmaps,type,filteringMode,anisotropy,framebufferTexture)
+	return retVal
 }
 
 Renderer.prototype.createRenderBuffer = function(width,height,attachDepthBuffer,floatingPoint) {
-	Polycode.Renderer_createRenderBuffer(this.__ptr, width,height,attachDepthBuffer,floatingPoint)
+	var retVal = new RenderBuffer()
+	retVal.__ptr = Polycode.Renderer_createRenderBuffer(this.__ptr, width,height,attachDepthBuffer,floatingPoint)
+	return retVal
 }
 
 Renderer.prototype.destroyRenderBuffer = function(buffer) {
@@ -38,19 +46,23 @@ Renderer.prototype.setBackingResolutionScale = function(xScale,yScale) {
 }
 
 Renderer.prototype.getBackingResolutionScaleX = function() {
-	Polycode.Renderer_getBackingResolutionScaleX(this.__ptr)
+	return Polycode.Renderer_getBackingResolutionScaleX(this.__ptr)
 }
 
 Renderer.prototype.getBackingResolutionScaleY = function() {
-	Polycode.Renderer_getBackingResolutionScaleY(this.__ptr)
+	return Polycode.Renderer_getBackingResolutionScaleY(this.__ptr)
 }
 
 Renderer.prototype.createProgram = function(fileName) {
-	Polycode.Renderer_createProgram(this.__ptr, fileName)
+	var retVal = new ShaderProgram()
+	retVal.__ptr = Polycode.Renderer_createProgram(this.__ptr, fileName)
+	return retVal
 }
 
 Renderer.prototype.createShader = function(vertexProgram,fragmentProgram) {
-	Polycode.Renderer_createShader(this.__ptr, vertexProgram,fragmentProgram)
+	var retVal = new Shader()
+	retVal.__ptr = Polycode.Renderer_createShader(this.__ptr, vertexProgram,fragmentProgram)
+	return retVal
 }
 
 Renderer.prototype.createVertexBuffers = function(mesh) {
@@ -90,11 +102,13 @@ Renderer.prototype.setAnisotropyAmount = function(amount) {
 }
 
 Renderer.prototype.getAnisotropyAmount = function() {
-	Polycode.Renderer_getAnisotropyAmount(this.__ptr)
+	return Polycode.Renderer_getAnisotropyAmount(this.__ptr)
 }
 
 Renderer.prototype.createMesh = function(fileName) {
-	Polycode.Renderer_createMesh(this.__ptr, fileName)
+	var retVal = new Mesh()
+	retVal.__ptr = Polycode.Renderer_createMesh(this.__ptr, fileName)
+	return retVal
 }
 
 Renderer.prototype.destroyMesh = function(mesh) {

+ 33 - 0
bindings/javascript/Polycode/RendererThreadJob.js

@@ -1,2 +1,35 @@
 function RendererThreadJob() {
+	Object.defineProperties(this, {
+		'jobType': { enumerable: true, configurable: true, get: RendererThreadJob.prototype.__get_jobType, set: RendererThreadJob.prototype.__set_jobType},
+		'data': { enumerable: true, configurable: true, get: RendererThreadJob.prototype.__get_data, set: RendererThreadJob.prototype.__set_data},
+		'data2': { enumerable: true, configurable: true, get: RendererThreadJob.prototype.__get_data2, set: RendererThreadJob.prototype.__set_data2}
+	})
 }
+RendererThreadJob.prototype.__get_jobType = function() {
+	return Polycode.RendererThreadJob__get_jobType(this.__ptr)
+}
+
+RendererThreadJob.prototype.__set_jobType = function(val) {
+	Polycode.RendererThreadJob__set_jobType(this.__ptr, val)
+}
+
+RendererThreadJob.prototype.__get_data = function() {
+	var retVal = new void()
+	retVal.__ptr = 	Polycode.RendererThreadJob__get_data(this.__ptr)
+	return retVal
+}
+
+RendererThreadJob.prototype.__set_data = function(val) {
+	Polycode.RendererThreadJob__set_data(this.__ptr, val.__ptr)
+}
+
+RendererThreadJob.prototype.__get_data2 = function() {
+	var retVal = new void()
+	retVal.__ptr = 	Polycode.RendererThreadJob__get_data2(this.__ptr)
+	return retVal
+}
+
+RendererThreadJob.prototype.__set_data2 = function(val) {
+	Polycode.RendererThreadJob__set_data2(this.__ptr, val.__ptr)
+}
+

+ 36 - 3
bindings/javascript/Polycode/Resource.js

@@ -1,16 +1,49 @@
 function Resource() {
+	Object.defineProperties(this, {
+		'reloadOnFileModify': { enumerable: true, configurable: true, get: Resource.prototype.__get_reloadOnFileModify, set: Resource.prototype.__set_reloadOnFileModify},
+		'resourceFileTime': { enumerable: true, configurable: true, get: Resource.prototype.__get_resourceFileTime, set: Resource.prototype.__set_resourceFileTime},
+		'platformData': { enumerable: true, configurable: true, get: Resource.prototype.__get_platformData, set: Resource.prototype.__set_platformData}
+	})
 }
+Resource.prototype.__get_reloadOnFileModify = function() {
+	return Polycode.Resource__get_reloadOnFileModify(this.__ptr)
+}
+
+Resource.prototype.__set_reloadOnFileModify = function(val) {
+	Polycode.Resource__set_reloadOnFileModify(this.__ptr, val)
+}
+
+Resource.prototype.__get_resourceFileTime = function() {
+	var retVal = new time_t()
+	retVal.__ptr = 	Polycode.Resource__get_resourceFileTime(this.__ptr)
+	return retVal
+}
+
+Resource.prototype.__set_resourceFileTime = function(val) {
+	Polycode.Resource__set_resourceFileTime(this.__ptr, val.__ptr)
+}
+
+Resource.prototype.__get_platformData = function() {
+	var retVal = new void()
+	retVal.__ptr = 	Polycode.Resource__get_platformData(this.__ptr)
+	return retVal
+}
+
+Resource.prototype.__set_platformData = function(val) {
+	Polycode.Resource__set_platformData(this.__ptr, val.__ptr)
+}
+
 
 Resource.prototype.reloadResource = function() {
 	Polycode.Resource_reloadResource(this.__ptr)
 }
 
 Resource.prototype.getResourceName = function() {
-	Polycode.Resource_getResourceName(this.__ptr)
+	return Polycode.Resource_getResourceName(this.__ptr)
 }
 
 Resource.prototype.getResourceType = function() {
-	Polycode.Resource_getResourceType(this.__ptr)
+	return Polycode.Resource_getResourceType(this.__ptr)
 }
 
 Resource.prototype.setResourceName = function(newName) {
@@ -22,5 +55,5 @@ Resource.prototype.setResourcePath = function(path) {
 }
 
 Resource.prototype.getResourcePath = function() {
-	Polycode.Resource_getResourcePath(this.__ptr)
+	return Polycode.Resource_getResourcePath(this.__ptr)
 }

+ 13 - 5
bindings/javascript/Polycode/ResourceManager.js

@@ -2,11 +2,15 @@ function ResourceManager() {
 }
 
 ResourceManager.prototype.getGlobalPool = function() {
-	Polycode.ResourceManager_getGlobalPool(this.__ptr)
+	var retVal = new ResourcePool()
+	retVal.__ptr = Polycode.ResourceManager_getGlobalPool(this.__ptr)
+	return retVal
 }
 
 ResourceManager.prototype.getResourcePoolByName = function(name) {
-	Polycode.ResourceManager_getResourcePoolByName(this.__ptr, name)
+	var retVal = new ResourcePool()
+	retVal.__ptr = Polycode.ResourceManager_getResourcePoolByName(this.__ptr, name)
+	return retVal
 }
 
 ResourceManager.prototype.addResourceLoader = function(loader) {
@@ -14,7 +18,9 @@ ResourceManager.prototype.addResourceLoader = function(loader) {
 }
 
 ResourceManager.prototype.getResourceLoaderForExtension = function(extension) {
-	Polycode.ResourceManager_getResourceLoaderForExtension(this.__ptr, extension)
+	var retVal = new ResourceLoader()
+	retVal.__ptr = Polycode.ResourceManager_getResourceLoaderForExtension(this.__ptr, extension)
+	return retVal
 }
 
 ResourceManager.prototype.removeResourceLoader = function(loader) {
@@ -22,11 +28,13 @@ ResourceManager.prototype.removeResourceLoader = function(loader) {
 }
 
 ResourceManager.prototype.getNumResourceLoaders = function() {
-	Polycode.ResourceManager_getNumResourceLoaders(this.__ptr)
+	return Polycode.ResourceManager_getNumResourceLoaders(this.__ptr)
 }
 
 ResourceManager.prototype.getResourceLoaderAtIndex = function(index) {
-	Polycode.ResourceManager_getResourceLoaderAtIndex(this.__ptr, index)
+	var retVal = new ResourceLoader()
+	retVal.__ptr = Polycode.ResourceManager_getResourceLoaderAtIndex(this.__ptr, index)
+	return retVal
 }
 
 ResourceManager.prototype.addResourcePool = function(pool) {

+ 52 - 6
bindings/javascript/Polycode/ResourcePool.js

@@ -1,5 +1,43 @@
 function ResourcePool() {
+	Object.defineProperties(this, {
+		'reloadResourcesOnModify': { enumerable: true, configurable: true, get: ResourcePool.prototype.__get_reloadResourcesOnModify, set: ResourcePool.prototype.__set_reloadResourcesOnModify},
+		'dispatchChangeEvents': { enumerable: true, configurable: true, get: ResourcePool.prototype.__get_dispatchChangeEvents, set: ResourcePool.prototype.__set_dispatchChangeEvents},
+		'resourceSubscribers': { enumerable: true, configurable: true, get: ResourcePool.prototype.__get_resourceSubscribers, set: ResourcePool.prototype.__set_resourceSubscribers},
+		'deleteOnUnsubscribe': { enumerable: true, configurable: true, get: ResourcePool.prototype.__get_deleteOnUnsubscribe, set: ResourcePool.prototype.__set_deleteOnUnsubscribe}
+	})
 }
+ResourcePool.prototype.__get_reloadResourcesOnModify = function() {
+	return Polycode.ResourcePool__get_reloadResourcesOnModify(this.__ptr)
+}
+
+ResourcePool.prototype.__set_reloadResourcesOnModify = function(val) {
+	Polycode.ResourcePool__set_reloadResourcesOnModify(this.__ptr, val)
+}
+
+ResourcePool.prototype.__get_dispatchChangeEvents = function() {
+	return Polycode.ResourcePool__get_dispatchChangeEvents(this.__ptr)
+}
+
+ResourcePool.prototype.__set_dispatchChangeEvents = function(val) {
+	Polycode.ResourcePool__set_dispatchChangeEvents(this.__ptr, val)
+}
+
+ResourcePool.prototype.__get_resourceSubscribers = function() {
+	return Polycode.ResourcePool__get_resourceSubscribers(this.__ptr)
+}
+
+ResourcePool.prototype.__set_resourceSubscribers = function(val) {
+	Polycode.ResourcePool__set_resourceSubscribers(this.__ptr, val)
+}
+
+ResourcePool.prototype.__get_deleteOnUnsubscribe = function() {
+	return Polycode.ResourcePool__get_deleteOnUnsubscribe(this.__ptr)
+}
+
+ResourcePool.prototype.__set_deleteOnUnsubscribe = function(val) {
+	Polycode.ResourcePool__set_deleteOnUnsubscribe(this.__ptr, val)
+}
+
 
 ResourcePool.prototype.setFallbackPool = function(pool) {
 	Polycode.ResourcePool_setFallbackPool(this.__ptr, pool)
@@ -14,7 +52,7 @@ ResourcePool.prototype.removeResource = function(resource) {
 }
 
 ResourcePool.prototype.hasResource = function(resource) {
-	Polycode.ResourcePool_hasResource(this.__ptr, resource)
+	return Polycode.ResourcePool_hasResource(this.__ptr, resource)
 }
 
 ResourcePool.prototype.loadResourcesFromFolder = function(folder,recursive) {
@@ -22,19 +60,25 @@ ResourcePool.prototype.loadResourcesFromFolder = function(folder,recursive) {
 }
 
 ResourcePool.prototype.loadResource = function(path) {
-	Polycode.ResourcePool_loadResource(this.__ptr, path)
+	var retVal = new Resource()
+	retVal.__ptr = Polycode.ResourcePool_loadResource(this.__ptr, path)
+	return retVal
 }
 
 ResourcePool.prototype.loadResourceWithName = function(path,name) {
-	Polycode.ResourcePool_loadResourceWithName(this.__ptr, path,name)
+	var retVal = new Resource()
+	retVal.__ptr = Polycode.ResourcePool_loadResourceWithName(this.__ptr, path,name)
+	return retVal
 }
 
 ResourcePool.prototype.getResource = function(resourceType,resourceName) {
-	Polycode.ResourcePool_getResource(this.__ptr, resourceType,resourceName)
+	var retVal = new Resource()
+	retVal.__ptr = Polycode.ResourcePool_getResource(this.__ptr, resourceType,resourceName)
+	return retVal
 }
 
 ResourcePool.prototype.getName = function() {
-	Polycode.ResourcePool_getName(this.__ptr)
+	return Polycode.ResourcePool_getName(this.__ptr)
 }
 
 ResourcePool.prototype.setName = function(name) {
@@ -42,7 +86,9 @@ ResourcePool.prototype.setName = function(name) {
 }
 
 ResourcePool.prototype.getResourceByPath = function(resourcePath) {
-	Polycode.ResourcePool_getResourceByPath(this.__ptr, resourcePath)
+	var retVal = new Resource()
+	retVal.__ptr = Polycode.ResourcePool_getResourceByPath(this.__ptr, resourcePath)
+	return retVal
 }
 
 ResourcePool.prototype.Update = function(elapsed) {

+ 29 - 0
bindings/javascript/Polycode/Rotation.js

@@ -1,2 +1,31 @@
 function Rotation() {
+	Object.defineProperties(this, {
+		'pitch': { enumerable: true, configurable: true, get: Rotation.prototype.__get_pitch, set: Rotation.prototype.__set_pitch},
+		'yaw': { enumerable: true, configurable: true, get: Rotation.prototype.__get_yaw, set: Rotation.prototype.__set_yaw},
+		'roll': { enumerable: true, configurable: true, get: Rotation.prototype.__get_roll, set: Rotation.prototype.__set_roll}
+	})
 }
+Rotation.prototype.__get_pitch = function() {
+	return Polycode.Rotation__get_pitch(this.__ptr)
+}
+
+Rotation.prototype.__set_pitch = function(val) {
+	Polycode.Rotation__set_pitch(this.__ptr, val)
+}
+
+Rotation.prototype.__get_yaw = function() {
+	return Polycode.Rotation__get_yaw(this.__ptr)
+}
+
+Rotation.prototype.__set_yaw = function(val) {
+	Polycode.Rotation__set_yaw(this.__ptr, val)
+}
+
+Rotation.prototype.__get_roll = function() {
+	return Polycode.Rotation__get_roll(this.__ptr)
+}
+
+Rotation.prototype.__set_roll = function(val) {
+	Polycode.Rotation__set_roll(this.__ptr, val)
+}
+

+ 127 - 8
bindings/javascript/Polycode/Scene.js

@@ -1,5 +1,116 @@
 function Scene() {
+	Object.defineProperties(this, {
+		'clearColor': { enumerable: true, configurable: true, get: Scene.prototype.__get_clearColor, set: Scene.prototype.__set_clearColor},
+		'useClearColor': { enumerable: true, configurable: true, get: Scene.prototype.__get_useClearColor, set: Scene.prototype.__set_useClearColor},
+		'useClearDepth': { enumerable: true, configurable: true, get: Scene.prototype.__get_useClearDepth, set: Scene.prototype.__set_useClearDepth},
+		'ambientColor': { enumerable: true, configurable: true, get: Scene.prototype.__get_ambientColor, set: Scene.prototype.__set_ambientColor},
+		'fogColor': { enumerable: true, configurable: true, get: Scene.prototype.__get_fogColor, set: Scene.prototype.__set_fogColor},
+		'enabled': { enumerable: true, configurable: true, get: Scene.prototype.__get_enabled, set: Scene.prototype.__set_enabled},
+		'ownsChildren': { enumerable: true, configurable: true, get: Scene.prototype.__get_ownsChildren, set: Scene.prototype.__set_ownsChildren},
+		'rootEntity': { enumerable: true, configurable: true, get: Scene.prototype.__get_rootEntity, set: Scene.prototype.__set_rootEntity},
+		'sceneMouseRect': { enumerable: true, configurable: true, get: Scene.prototype.__get_sceneMouseRect, set: Scene.prototype.__set_sceneMouseRect},
+		'remapMouse': { enumerable: true, configurable: true, get: Scene.prototype.__get_remapMouse, set: Scene.prototype.__set_remapMouse},
+		'constrainPickingToViewport': { enumerable: true, configurable: true, get: Scene.prototype.__get_constrainPickingToViewport, set: Scene.prototype.__set_constrainPickingToViewport}
+	})
 }
+Scene.prototype.__get_clearColor = function() {
+	var retVal = new Color()
+	retVal.__ptr = 	Polycode.Scene__get_clearColor(this.__ptr)
+	return retVal
+}
+
+Scene.prototype.__set_clearColor = function(val) {
+	Polycode.Scene__set_clearColor(this.__ptr, val.__ptr)
+}
+
+Scene.prototype.__get_useClearColor = function() {
+	return Polycode.Scene__get_useClearColor(this.__ptr)
+}
+
+Scene.prototype.__set_useClearColor = function(val) {
+	Polycode.Scene__set_useClearColor(this.__ptr, val)
+}
+
+Scene.prototype.__get_useClearDepth = function() {
+	return Polycode.Scene__get_useClearDepth(this.__ptr)
+}
+
+Scene.prototype.__set_useClearDepth = function(val) {
+	Polycode.Scene__set_useClearDepth(this.__ptr, val)
+}
+
+Scene.prototype.__get_ambientColor = function() {
+	var retVal = new Color()
+	retVal.__ptr = 	Polycode.Scene__get_ambientColor(this.__ptr)
+	return retVal
+}
+
+Scene.prototype.__set_ambientColor = function(val) {
+	Polycode.Scene__set_ambientColor(this.__ptr, val.__ptr)
+}
+
+Scene.prototype.__get_fogColor = function() {
+	var retVal = new Color()
+	retVal.__ptr = 	Polycode.Scene__get_fogColor(this.__ptr)
+	return retVal
+}
+
+Scene.prototype.__set_fogColor = function(val) {
+	Polycode.Scene__set_fogColor(this.__ptr, val.__ptr)
+}
+
+Scene.prototype.__get_enabled = function() {
+	return Polycode.Scene__get_enabled(this.__ptr)
+}
+
+Scene.prototype.__set_enabled = function(val) {
+	Polycode.Scene__set_enabled(this.__ptr, val)
+}
+
+Scene.prototype.__get_ownsChildren = function() {
+	return Polycode.Scene__get_ownsChildren(this.__ptr)
+}
+
+Scene.prototype.__set_ownsChildren = function(val) {
+	Polycode.Scene__set_ownsChildren(this.__ptr, val)
+}
+
+Scene.prototype.__get_rootEntity = function() {
+	var retVal = new Entity()
+	retVal.__ptr = 	Polycode.Scene__get_rootEntity(this.__ptr)
+	return retVal
+}
+
+Scene.prototype.__set_rootEntity = function(val) {
+	Polycode.Scene__set_rootEntity(this.__ptr, val.__ptr)
+}
+
+Scene.prototype.__get_sceneMouseRect = function() {
+	var retVal = new Rectangle()
+	retVal.__ptr = 	Polycode.Scene__get_sceneMouseRect(this.__ptr)
+	return retVal
+}
+
+Scene.prototype.__set_sceneMouseRect = function(val) {
+	Polycode.Scene__set_sceneMouseRect(this.__ptr, val.__ptr)
+}
+
+Scene.prototype.__get_remapMouse = function() {
+	return Polycode.Scene__get_remapMouse(this.__ptr)
+}
+
+Scene.prototype.__set_remapMouse = function(val) {
+	Polycode.Scene__set_remapMouse(this.__ptr, val)
+}
+
+Scene.prototype.__get_constrainPickingToViewport = function() {
+	return Polycode.Scene__get_constrainPickingToViewport(this.__ptr)
+}
+
+Scene.prototype.__set_constrainPickingToViewport = function(val) {
+	Polycode.Scene__set_constrainPickingToViewport(this.__ptr, val)
+}
+
 
 Scene.prototype.addEntity = function(entity) {
 	Polycode.Scene_addEntity(this.__ptr, entity)
@@ -14,11 +125,15 @@ Scene.prototype.removeEntity = function(entity) {
 }
 
 Scene.prototype.getDefaultCamera = function() {
-	Polycode.Scene_getDefaultCamera(this.__ptr)
+	var retVal = new Camera()
+	retVal.__ptr = Polycode.Scene_getDefaultCamera(this.__ptr)
+	return retVal
 }
 
 Scene.prototype.getActiveCamera = function() {
-	Polycode.Scene_getActiveCamera(this.__ptr)
+	var retVal = new Camera()
+	retVal.__ptr = Polycode.Scene_getActiveCamera(this.__ptr)
+	return retVal
 }
 
 Scene.prototype.setActiveCamera = function(camera) {
@@ -50,11 +165,11 @@ Scene.prototype.setVirtual = function(val) {
 }
 
 Scene.prototype.isVirtual = function() {
-	Polycode.Scene_isVirtual(this.__ptr)
+	return Polycode.Scene_isVirtual(this.__ptr)
 }
 
 Scene.prototype.isEnabled = function() {
-	Polycode.Scene_isEnabled(this.__ptr)
+	return Polycode.Scene_isEnabled(this.__ptr)
 }
 
 Scene.prototype.setEnabled = function(enabled) {
@@ -70,7 +185,9 @@ Scene.prototype.setOverrideMaterial = function(material) {
 }
 
 Scene.prototype.projectRayFromCameraAndViewportCoordinate = function(camera,coordinate) {
-	Polycode.Scene_projectRayFromCameraAndViewportCoordinate(this.__ptr, camera,coordinate)
+	var retVal = new Ray()
+	retVal.__ptr = Polycode.Scene_projectRayFromCameraAndViewportCoordinate(this.__ptr, camera,coordinate)
+	return retVal
 }
 
 Scene.prototype.addLight = function(light) {
@@ -82,11 +199,13 @@ Scene.prototype.removeLight = function(light) {
 }
 
 Scene.prototype.getNumLights = function() {
-	Polycode.Scene_getNumLights(this.__ptr)
+	return Polycode.Scene_getNumLights(this.__ptr)
 }
 
 Scene.prototype.getLight = function(index) {
-	Polycode.Scene_getLight(this.__ptr, index)
+	var retVal = new SceneLight()
+	retVal.__ptr = Polycode.Scene_getLight(this.__ptr, index)
+	return retVal
 }
 
 Scene.prototype.doVisibilityChecking = function(val) {
@@ -94,5 +213,5 @@ Scene.prototype.doVisibilityChecking = function(val) {
 }
 
 Scene.prototype.doesVisibilityChecking = function() {
-	Polycode.Scene_doesVisibilityChecking(this.__ptr)
+	return Polycode.Scene_doesVisibilityChecking(this.__ptr)
 }

+ 29 - 3
bindings/javascript/Polycode/SceneCurve.js

@@ -1,8 +1,30 @@
 function SceneCurve() {
+	Object.defineProperties(this, {
+		'renderCurve': { enumerable: true, configurable: true, get: SceneCurve.prototype.__get_renderCurve, set: SceneCurve.prototype.__set_renderCurve},
+		'curveResolution': { enumerable: true, configurable: true, get: SceneCurve.prototype.__get_curveResolution, set: SceneCurve.prototype.__set_curveResolution}
+	})
 }
+SceneCurve.prototype.__get_renderCurve = function() {
+	return Polycode.SceneCurve__get_renderCurve(this.__ptr)
+}
+
+SceneCurve.prototype.__set_renderCurve = function(val) {
+	Polycode.SceneCurve__set_renderCurve(this.__ptr, val)
+}
+
+SceneCurve.prototype.__get_curveResolution = function() {
+	return Polycode.SceneCurve__get_curveResolution(this.__ptr)
+}
+
+SceneCurve.prototype.__set_curveResolution = function(val) {
+	Polycode.SceneCurve__set_curveResolution(this.__ptr, val)
+}
+
 
 SceneCurve.prototype.getWorldPointAt = function(t) {
-	Polycode.SceneCurve_getWorldPointAt(this.__ptr, t)
+	var retVal = new Vector3()
+	retVal.__ptr = Polycode.SceneCurve_getWorldPointAt(this.__ptr, t)
+	return retVal
 }
 
 SceneCurve.prototype.Update = function() {
@@ -10,7 +32,9 @@ SceneCurve.prototype.Update = function() {
 }
 
 SceneCurve.prototype.Clone = function(deepClone,ignoreEditorOnly) {
-	Polycode.SceneCurve_Clone(this.__ptr, deepClone,ignoreEditorOnly)
+	var retVal = new Entity()
+	retVal.__ptr = Polycode.SceneCurve_Clone(this.__ptr, deepClone,ignoreEditorOnly)
+	return retVal
 }
 
 SceneCurve.prototype.applyClone = function(clone,deepClone,ignoreEditorOnly) {
@@ -18,5 +42,7 @@ SceneCurve.prototype.applyClone = function(clone,deepClone,ignoreEditorOnly) {
 }
 
 SceneCurve.prototype.getCurve = function() {
-	Polycode.SceneCurve_getCurve(this.__ptr)
+	var retVal = new BezierCurve()
+	retVal.__ptr = Polycode.SceneCurve_getCurve(this.__ptr)
+	return retVal
 }

+ 46 - 12
bindings/javascript/Polycode/SceneEntityInstance.js

@@ -1,8 +1,30 @@
 function SceneEntityInstance() {
+	Object.defineProperties(this, {
+		'cloneUsingReload': { enumerable: true, configurable: true, get: SceneEntityInstance.prototype.__get_cloneUsingReload, set: SceneEntityInstance.prototype.__set_cloneUsingReload},
+		'fileName': { enumerable: true, configurable: true, get: SceneEntityInstance.prototype.__get_fileName, set: SceneEntityInstance.prototype.__set_fileName}
+	})
 }
+SceneEntityInstance.prototype.__get_cloneUsingReload = function() {
+	return Polycode.SceneEntityInstance__get_cloneUsingReload(this.__ptr)
+}
+
+SceneEntityInstance.prototype.__set_cloneUsingReload = function(val) {
+	Polycode.SceneEntityInstance__set_cloneUsingReload(this.__ptr, val)
+}
+
+SceneEntityInstance.prototype.__get_fileName = function() {
+	return Polycode.SceneEntityInstance__get_fileName(this.__ptr)
+}
+
+SceneEntityInstance.prototype.__set_fileName = function(val) {
+	Polycode.SceneEntityInstance__set_fileName(this.__ptr, val)
+}
+
 
 SceneEntityInstance.prototype.Clone = function(deepClone,ignoreEditorOnly) {
-	Polycode.SceneEntityInstance_Clone(this.__ptr, deepClone,ignoreEditorOnly)
+	var retVal = new Entity()
+	retVal.__ptr = Polycode.SceneEntityInstance_Clone(this.__ptr, deepClone,ignoreEditorOnly)
+	return retVal
 }
 
 SceneEntityInstance.prototype.applyClone = function(clone,deepClone,ignoreEditorOnly) {
@@ -22,11 +44,13 @@ SceneEntityInstance.prototype.parseObjectIntoCurve = function(entry,curve) {
 }
 
 SceneEntityInstance.prototype.loadObjectEntryIntoEntity = function(entry,targetEntity,entityFileVersion) {
-	Polycode.SceneEntityInstance_loadObjectEntryIntoEntity(this.__ptr, entry,targetEntity,entityFileVersion)
+	var retVal = new Entity()
+	retVal.__ptr = Polycode.SceneEntityInstance_loadObjectEntryIntoEntity(this.__ptr, entry,targetEntity,entityFileVersion)
+	return retVal
 }
 
 SceneEntityInstance.prototype.loadFromFile = function(fileName) {
-	Polycode.SceneEntityInstance_loadFromFile(this.__ptr, fileName)
+	return Polycode.SceneEntityInstance_loadFromFile(this.__ptr, fileName)
 }
 
 SceneEntityInstance.prototype.applySceneMesh = function(entry,sceneMesh) {
@@ -38,11 +62,13 @@ SceneEntityInstance.prototype.linkResourcePool = function(pool) {
 }
 
 SceneEntityInstance.prototype.getNumLinkedResourePools = function() {
-	Polycode.SceneEntityInstance_getNumLinkedResourePools(this.__ptr)
+	return Polycode.SceneEntityInstance_getNumLinkedResourePools(this.__ptr)
 }
 
 SceneEntityInstance.prototype.getLinkedResourcePoolAtIndex = function(index) {
-	Polycode.SceneEntityInstance_getLinkedResourcePoolAtIndex(this.__ptr, index)
+	var retVal = new ResourcePool()
+	retVal.__ptr = Polycode.SceneEntityInstance_getLinkedResourcePoolAtIndex(this.__ptr, index)
+	return retVal
 }
 
 SceneEntityInstance.prototype.unlinkResourcePool = function(pool) {
@@ -50,23 +76,29 @@ SceneEntityInstance.prototype.unlinkResourcePool = function(pool) {
 }
 
 SceneEntityInstance.prototype.getResourceEntry = function() {
-	Polycode.SceneEntityInstance_getResourceEntry(this.__ptr)
+	var retVal = new SceneEntityInstanceResourceEntry()
+	retVal.__ptr = Polycode.SceneEntityInstance_getResourceEntry(this.__ptr)
+	return retVal
 }
 
 SceneEntityInstance.prototype.getTopLevelResourcePool = function() {
-	Polycode.SceneEntityInstance_getTopLevelResourcePool(this.__ptr)
+	var retVal = new ResourcePool()
+	retVal.__ptr = Polycode.SceneEntityInstance_getTopLevelResourcePool(this.__ptr)
+	return retVal
 }
 
 SceneEntityInstance.prototype.hasLayerID = function(layerID) {
-	Polycode.SceneEntityInstance_hasLayerID(this.__ptr, layerID)
+	return Polycode.SceneEntityInstance_hasLayerID(this.__ptr, layerID)
 }
 
 SceneEntityInstance.prototype.getNumLayers = function() {
-	Polycode.SceneEntityInstance_getNumLayers(this.__ptr)
+	return Polycode.SceneEntityInstance_getNumLayers(this.__ptr)
 }
 
 SceneEntityInstance.prototype.getLayerAtIndex = function(index) {
-	Polycode.SceneEntityInstance_getLayerAtIndex(this.__ptr, index)
+	var retVal = new SceneEntityInstanceLayer()
+	retVal.__ptr = Polycode.SceneEntityInstance_getLayerAtIndex(this.__ptr, index)
+	return retVal
 }
 
 SceneEntityInstance.prototype.removeLayer = function(layer) {
@@ -74,9 +106,11 @@ SceneEntityInstance.prototype.removeLayer = function(layer) {
 }
 
 SceneEntityInstance.prototype.createNewLayer = function(name) {
-	Polycode.SceneEntityInstance_createNewLayer(this.__ptr, name)
+	var retVal = new SceneEntityInstanceLayer()
+	retVal.__ptr = Polycode.SceneEntityInstance_createNewLayer(this.__ptr, name)
+	return retVal
 }
 
 SceneEntityInstance.prototype.getFileName = function() {
-	Polycode.SceneEntityInstance_getFileName(this.__ptr)
+	return Polycode.SceneEntityInstance_getFileName(this.__ptr)
 }

+ 42 - 0
bindings/javascript/Polycode/SceneEntityInstanceLayer.js

@@ -1,5 +1,47 @@
 function SceneEntityInstanceLayer() {
+	Object.defineProperties(this, {
+		'name': { enumerable: true, configurable: true, get: SceneEntityInstanceLayer.prototype.__get_name, set: SceneEntityInstanceLayer.prototype.__set_name},
+		'layerID': { enumerable: true, configurable: true, get: SceneEntityInstanceLayer.prototype.__get_layerID, set: SceneEntityInstanceLayer.prototype.__set_layerID},
+		'visible': { enumerable: true, configurable: true, get: SceneEntityInstanceLayer.prototype.__get_visible, set: SceneEntityInstanceLayer.prototype.__set_visible},
+		'instance': { enumerable: true, configurable: true, get: SceneEntityInstanceLayer.prototype.__get_instance, set: SceneEntityInstanceLayer.prototype.__set_instance}
+	})
 }
+SceneEntityInstanceLayer.prototype.__get_name = function() {
+	return Polycode.SceneEntityInstanceLayer__get_name(this.__ptr)
+}
+
+SceneEntityInstanceLayer.prototype.__set_name = function(val) {
+	Polycode.SceneEntityInstanceLayer__set_name(this.__ptr, val)
+}
+
+SceneEntityInstanceLayer.prototype.__get_layerID = function() {
+	var retVal = new char()
+	retVal.__ptr = 	Polycode.SceneEntityInstanceLayer__get_layerID(this.__ptr)
+	return retVal
+}
+
+SceneEntityInstanceLayer.prototype.__set_layerID = function(val) {
+	Polycode.SceneEntityInstanceLayer__set_layerID(this.__ptr, val.__ptr)
+}
+
+SceneEntityInstanceLayer.prototype.__get_visible = function() {
+	return Polycode.SceneEntityInstanceLayer__get_visible(this.__ptr)
+}
+
+SceneEntityInstanceLayer.prototype.__set_visible = function(val) {
+	Polycode.SceneEntityInstanceLayer__set_visible(this.__ptr, val)
+}
+
+SceneEntityInstanceLayer.prototype.__get_instance = function() {
+	var retVal = new SceneEntityInstance()
+	retVal.__ptr = 	Polycode.SceneEntityInstanceLayer__get_instance(this.__ptr)
+	return retVal
+}
+
+SceneEntityInstanceLayer.prototype.__set_instance = function(val) {
+	Polycode.SceneEntityInstanceLayer__set_instance(this.__ptr, val.__ptr)
+}
+
 
 SceneEntityInstanceLayer.prototype.setLayerVisibility = function(val) {
 	Polycode.SceneEntityInstanceLayer_setLayerVisibility(this.__ptr, val)

+ 3 - 1
bindings/javascript/Polycode/SceneEntityInstanceResourceEntry.js

@@ -2,7 +2,9 @@ function SceneEntityInstanceResourceEntry() {
 }
 
 SceneEntityInstanceResourceEntry.prototype.getInstance = function() {
-	Polycode.SceneEntityInstanceResourceEntry_getInstance(this.__ptr)
+	var retVal = new SceneEntityInstance()
+	retVal.__ptr = Polycode.SceneEntityInstanceResourceEntry_getInstance(this.__ptr)
+	return retVal
 }
 
 SceneEntityInstanceResourceEntry.prototype.reloadResource = function() {

+ 5 - 3
bindings/javascript/Polycode/SceneImage.js

@@ -2,7 +2,9 @@ function SceneImage() {
 }
 
 SceneImage.prototype.Clone = function(deepClone,ignoreEditorOnly) {
-	Polycode.SceneImage_Clone(this.__ptr, deepClone,ignoreEditorOnly)
+	var retVal = new Entity()
+	retVal.__ptr = Polycode.SceneImage_Clone(this.__ptr, deepClone,ignoreEditorOnly)
+	return retVal
 }
 
 SceneImage.prototype.applyClone = function(clone,deepClone,ignoreEditorOnly) {
@@ -14,9 +16,9 @@ SceneImage.prototype.setImageCoordinates = function(x,y,width,height,realWidth,r
 }
 
 SceneImage.prototype.getImageWidth = function() {
-	Polycode.SceneImage_getImageWidth(this.__ptr)
+	return Polycode.SceneImage_getImageWidth(this.__ptr)
 }
 
 SceneImage.prototype.getImageHeight = function() {
-	Polycode.SceneImage_getImageHeight(this.__ptr)
+	return Polycode.SceneImage_getImageHeight(this.__ptr)
 }

+ 20 - 5
bindings/javascript/Polycode/SceneLabel.js

@@ -1,8 +1,19 @@
 function SceneLabel() {
+	Object.defineProperties(this, {
+		'positionAtBaseline': { enumerable: true, configurable: true, get: SceneLabel.prototype.__get_positionAtBaseline, set: SceneLabel.prototype.__set_positionAtBaseline}
+	})
 }
+SceneLabel.prototype.__get_positionAtBaseline = function() {
+	return Polycode.SceneLabel__get_positionAtBaseline(this.__ptr)
+}
+
+SceneLabel.prototype.__set_positionAtBaseline = function(val) {
+	Polycode.SceneLabel__set_positionAtBaseline(this.__ptr, val)
+}
+
 
 SceneLabel.prototype.getText = function() {
-	Polycode.SceneLabel_getText(this.__ptr)
+	return Polycode.SceneLabel_getText(this.__ptr)
 }
 
 SceneLabel.prototype.setLabelActualHeight = function(actualHeight) {
@@ -10,7 +21,7 @@ SceneLabel.prototype.setLabelActualHeight = function(actualHeight) {
 }
 
 SceneLabel.prototype.getLabelActualHeight = function() {
-	Polycode.SceneLabel_getLabelActualHeight(this.__ptr)
+	return Polycode.SceneLabel_getLabelActualHeight(this.__ptr)
 }
 
 SceneLabel.prototype.Render = function(buffer) {
@@ -18,7 +29,7 @@ SceneLabel.prototype.Render = function(buffer) {
 }
 
 SceneLabel.prototype.getTextWidthForString = function(text) {
-	Polycode.SceneLabel_getTextWidthForString(this.__ptr, text)
+	return Polycode.SceneLabel_getTextWidthForString(this.__ptr, text)
 }
 
 SceneLabel.prototype.setText = function(newText) {
@@ -26,7 +37,9 @@ SceneLabel.prototype.setText = function(newText) {
 }
 
 SceneLabel.prototype.Clone = function(deepClone,ignoreEditorOnly) {
-	Polycode.SceneLabel_Clone(this.__ptr, deepClone,ignoreEditorOnly)
+	var retVal = new Entity()
+	retVal.__ptr = Polycode.SceneLabel_Clone(this.__ptr, deepClone,ignoreEditorOnly)
+	return retVal
 }
 
 SceneLabel.prototype.applyClone = function(clone,deepClone,ignoreEditorOnly) {
@@ -38,5 +51,7 @@ SceneLabel.prototype.updateFromLabel = function() {
 }
 
 SceneLabel.prototype.getLabel = function() {
-	Polycode.SceneLabel_getLabel(this.__ptr)
+	var retVal = new Label()
+	retVal.__ptr = Polycode.SceneLabel_getLabel(this.__ptr)
+	return retVal
 }

+ 27 - 17
bindings/javascript/Polycode/SceneLight.js

@@ -2,7 +2,7 @@ function SceneLight() {
 }
 
 SceneLight.prototype.getIntensity = function() {
-	Polycode.SceneLight_getIntensity(this.__ptr)
+	return Polycode.SceneLight_getIntensity(this.__ptr)
 }
 
 SceneLight.prototype.setIntensity = function(newIntensity) {
@@ -14,19 +14,19 @@ SceneLight.prototype.setAttenuation = function(constantAttenuation,linearAttenua
 }
 
 SceneLight.prototype.getConstantAttenuation = function() {
-	Polycode.SceneLight_getConstantAttenuation(this.__ptr)
+	return Polycode.SceneLight_getConstantAttenuation(this.__ptr)
 }
 
 SceneLight.prototype.getLinearAttenuation = function() {
-	Polycode.SceneLight_getLinearAttenuation(this.__ptr)
+	return Polycode.SceneLight_getLinearAttenuation(this.__ptr)
 }
 
 SceneLight.prototype.getQuadraticAttenuation = function() {
-	Polycode.SceneLight_getQuadraticAttenuation(this.__ptr)
+	return Polycode.SceneLight_getQuadraticAttenuation(this.__ptr)
 }
 
 SceneLight.prototype.getType = function() {
-	Polycode.SceneLight_getType(this.__ptr)
+	return Polycode.SceneLight_getType(this.__ptr)
 }
 
 SceneLight.prototype.renderDepthMap = function(scene) {
@@ -34,7 +34,9 @@ SceneLight.prototype.renderDepthMap = function(scene) {
 }
 
 SceneLight.prototype.getZBufferTexture = function() {
-	Polycode.SceneLight_getZBufferTexture(this.__ptr)
+	var retVal = new Texture()
+	retVal.__ptr = Polycode.SceneLight_getZBufferTexture(this.__ptr)
+	return retVal
 }
 
 SceneLight.prototype.setSpecularLightColor = function(r,g,b,a) {
@@ -54,11 +56,11 @@ SceneLight.prototype.setSpotlightProperties = function(spotlightCutoff,spotlight
 }
 
 SceneLight.prototype.getSpotlightCutoff = function() {
-	Polycode.SceneLight_getSpotlightCutoff(this.__ptr)
+	return Polycode.SceneLight_getSpotlightCutoff(this.__ptr)
 }
 
 SceneLight.prototype.getSpotlightExponent = function() {
-	Polycode.SceneLight_getSpotlightExponent(this.__ptr)
+	return Polycode.SceneLight_getSpotlightExponent(this.__ptr)
 }
 
 SceneLight.prototype.enableShadows = function(val,resolution) {
@@ -70,19 +72,19 @@ SceneLight.prototype.setShadowMapFOV = function(fov) {
 }
 
 SceneLight.prototype.getShadowMapFOV = function() {
-	Polycode.SceneLight_getShadowMapFOV(this.__ptr)
+	return Polycode.SceneLight_getShadowMapFOV(this.__ptr)
 }
 
 SceneLight.prototype.getShadowMapResolution = function() {
-	Polycode.SceneLight_getShadowMapResolution(this.__ptr)
+	return Polycode.SceneLight_getShadowMapResolution(this.__ptr)
 }
 
 SceneLight.prototype.areShadowsEnabled = function() {
-	Polycode.SceneLight_areShadowsEnabled(this.__ptr)
+	return Polycode.SceneLight_areShadowsEnabled(this.__ptr)
 }
 
 SceneLight.prototype.getLightType = function() {
-	Polycode.SceneLight_getLightType(this.__ptr)
+	return Polycode.SceneLight_getLightType(this.__ptr)
 }
 
 SceneLight.prototype.setLightImportance = function(newImportance) {
@@ -90,7 +92,7 @@ SceneLight.prototype.setLightImportance = function(newImportance) {
 }
 
 SceneLight.prototype.getLightImportance = function() {
-	Polycode.SceneLight_getLightImportance(this.__ptr)
+	return Polycode.SceneLight_getLightImportance(this.__ptr)
 }
 
 SceneLight.prototype.setLightType = function(lightType) {
@@ -98,7 +100,9 @@ SceneLight.prototype.setLightType = function(lightType) {
 }
 
 SceneLight.prototype.Clone = function(deepClone,ignoreEditorOnly) {
-	Polycode.SceneLight_Clone(this.__ptr, deepClone,ignoreEditorOnly)
+	var retVal = new Entity()
+	retVal.__ptr = Polycode.SceneLight_Clone(this.__ptr, deepClone,ignoreEditorOnly)
+	return retVal
 }
 
 SceneLight.prototype.applyClone = function(clone,deepClone,ignoreEditorOnly) {
@@ -106,7 +110,9 @@ SceneLight.prototype.applyClone = function(clone,deepClone,ignoreEditorOnly) {
 }
 
 SceneLight.prototype.getParentScene = function() {
-	Polycode.SceneLight_getParentScene(this.__ptr)
+	var retVal = new Scene()
+	retVal.__ptr = Polycode.SceneLight_getParentScene(this.__ptr)
+	return retVal
 }
 
 SceneLight.prototype.setParentScene = function(scene) {
@@ -114,9 +120,13 @@ SceneLight.prototype.setParentScene = function(scene) {
 }
 
 SceneLight.prototype.getSpotlightCamera = function() {
-	Polycode.SceneLight_getSpotlightCamera(this.__ptr)
+	var retVal = new Camera()
+	retVal.__ptr = Polycode.SceneLight_getSpotlightCamera(this.__ptr)
+	return retVal
 }
 
 SceneLight.prototype.getLightInfo = function() {
-	Polycode.SceneLight_getLightInfo(this.__ptr)
+	var retVal = new LightInfo()
+	retVal.__ptr = Polycode.SceneLight_getLightInfo(this.__ptr)
+	return retVal
 }

+ 105 - 10
bindings/javascript/Polycode/SceneMesh.js

@@ -1,16 +1,101 @@
 function SceneMesh() {
+	Object.defineProperties(this, {
+		'lineWidth': { enumerable: true, configurable: true, get: SceneMesh.prototype.__get_lineWidth, set: SceneMesh.prototype.__set_lineWidth},
+		'lineSmooth': { enumerable: true, configurable: true, get: SceneMesh.prototype.__get_lineSmooth, set: SceneMesh.prototype.__set_lineSmooth},
+		'pointSmooth': { enumerable: true, configurable: true, get: SceneMesh.prototype.__get_pointSmooth, set: SceneMesh.prototype.__set_pointSmooth},
+		'ownsMesh': { enumerable: true, configurable: true, get: SceneMesh.prototype.__get_ownsMesh, set: SceneMesh.prototype.__set_ownsMesh},
+		'ownsSkeleton': { enumerable: true, configurable: true, get: SceneMesh.prototype.__get_ownsSkeleton, set: SceneMesh.prototype.__set_ownsSkeleton},
+		'useGeometryHitDetection': { enumerable: true, configurable: true, get: SceneMesh.prototype.__get_useGeometryHitDetection, set: SceneMesh.prototype.__set_useGeometryHitDetection},
+		'alphaTest': { enumerable: true, configurable: true, get: SceneMesh.prototype.__get_alphaTest, set: SceneMesh.prototype.__set_alphaTest},
+		'backfaceCulled': { enumerable: true, configurable: true, get: SceneMesh.prototype.__get_backfaceCulled, set: SceneMesh.prototype.__set_backfaceCulled},
+		'sendBoneMatricesToMaterial': { enumerable: true, configurable: true, get: SceneMesh.prototype.__get_sendBoneMatricesToMaterial, set: SceneMesh.prototype.__set_sendBoneMatricesToMaterial}
+	})
 }
+SceneMesh.prototype.__get_lineWidth = function() {
+	return Polycode.SceneMesh__get_lineWidth(this.__ptr)
+}
+
+SceneMesh.prototype.__set_lineWidth = function(val) {
+	Polycode.SceneMesh__set_lineWidth(this.__ptr, val)
+}
+
+SceneMesh.prototype.__get_lineSmooth = function() {
+	return Polycode.SceneMesh__get_lineSmooth(this.__ptr)
+}
+
+SceneMesh.prototype.__set_lineSmooth = function(val) {
+	Polycode.SceneMesh__set_lineSmooth(this.__ptr, val)
+}
+
+SceneMesh.prototype.__get_pointSmooth = function() {
+	return Polycode.SceneMesh__get_pointSmooth(this.__ptr)
+}
+
+SceneMesh.prototype.__set_pointSmooth = function(val) {
+	Polycode.SceneMesh__set_pointSmooth(this.__ptr, val)
+}
+
+SceneMesh.prototype.__get_ownsMesh = function() {
+	return Polycode.SceneMesh__get_ownsMesh(this.__ptr)
+}
+
+SceneMesh.prototype.__set_ownsMesh = function(val) {
+	Polycode.SceneMesh__set_ownsMesh(this.__ptr, val)
+}
+
+SceneMesh.prototype.__get_ownsSkeleton = function() {
+	return Polycode.SceneMesh__get_ownsSkeleton(this.__ptr)
+}
+
+SceneMesh.prototype.__set_ownsSkeleton = function(val) {
+	Polycode.SceneMesh__set_ownsSkeleton(this.__ptr, val)
+}
+
+SceneMesh.prototype.__get_useGeometryHitDetection = function() {
+	return Polycode.SceneMesh__get_useGeometryHitDetection(this.__ptr)
+}
+
+SceneMesh.prototype.__set_useGeometryHitDetection = function(val) {
+	Polycode.SceneMesh__set_useGeometryHitDetection(this.__ptr, val)
+}
+
+SceneMesh.prototype.__get_alphaTest = function() {
+	return Polycode.SceneMesh__get_alphaTest(this.__ptr)
+}
+
+SceneMesh.prototype.__set_alphaTest = function(val) {
+	Polycode.SceneMesh__set_alphaTest(this.__ptr, val)
+}
+
+SceneMesh.prototype.__get_backfaceCulled = function() {
+	return Polycode.SceneMesh__get_backfaceCulled(this.__ptr)
+}
+
+SceneMesh.prototype.__set_backfaceCulled = function(val) {
+	Polycode.SceneMesh__set_backfaceCulled(this.__ptr, val)
+}
+
+SceneMesh.prototype.__get_sendBoneMatricesToMaterial = function() {
+	return Polycode.SceneMesh__get_sendBoneMatricesToMaterial(this.__ptr)
+}
+
+SceneMesh.prototype.__set_sendBoneMatricesToMaterial = function(val) {
+	Polycode.SceneMesh__set_sendBoneMatricesToMaterial(this.__ptr, val)
+}
+
 
 SceneMesh.prototype.Render = function(buffer) {
 	Polycode.SceneMesh_Render(this.__ptr, buffer)
 }
 
 SceneMesh.prototype.getShaderPass = function(index) {
-	Polycode.SceneMesh_getShaderPass(this.__ptr, index)
+	var retVal = new ShaderPass()
+	retVal.__ptr = Polycode.SceneMesh_getShaderPass(this.__ptr, index)
+	return retVal
 }
 
 SceneMesh.prototype.getNumShaderPasses = function() {
-	Polycode.SceneMesh_getNumShaderPasses(this.__ptr)
+	return Polycode.SceneMesh_getNumShaderPasses(this.__ptr)
 }
 
 SceneMesh.prototype.addShaderPass = function(pass) {
@@ -22,15 +107,21 @@ SceneMesh.prototype.removeShaderPass = function(shaderIndex) {
 }
 
 SceneMesh.prototype.getMesh = function() {
-	Polycode.SceneMesh_getMesh(this.__ptr)
+	var retVal = new Mesh()
+	retVal.__ptr = Polycode.SceneMesh_getMesh(this.__ptr)
+	return retVal
 }
 
 SceneMesh.prototype.getMaterial = function() {
-	Polycode.SceneMesh_getMaterial(this.__ptr)
+	var retVal = new Material()
+	retVal.__ptr = Polycode.SceneMesh_getMaterial(this.__ptr)
+	return retVal
 }
 
 SceneMesh.prototype.loadSkeleton = function(fileName) {
-	Polycode.SceneMesh_loadSkeleton(this.__ptr, fileName)
+	var retVal = new Skeleton()
+	retVal.__ptr = Polycode.SceneMesh_loadSkeleton(this.__ptr, fileName)
+	return retVal
 }
 
 SceneMesh.prototype.clearMaterial = function() {
@@ -58,7 +149,9 @@ SceneMesh.prototype.setSkeleton = function(skeleton) {
 }
 
 SceneMesh.prototype.getSkeleton = function() {
-	Polycode.SceneMesh_getSkeleton(this.__ptr)
+	var retVal = new Skeleton()
+	retVal.__ptr = Polycode.SceneMesh_getSkeleton(this.__ptr)
+	return retVal
 }
 
 SceneMesh.prototype.applySkeletonLocally = function() {
@@ -70,7 +163,7 @@ SceneMesh.prototype.setLineWidth = function(newWidth) {
 }
 
 SceneMesh.prototype.getFilename = function() {
-	Polycode.SceneMesh_getFilename(this.__ptr)
+	return Polycode.SceneMesh_getFilename(this.__ptr)
 }
 
 SceneMesh.prototype.setFilename = function(fileName) {
@@ -82,7 +175,7 @@ SceneMesh.prototype.loadFromFile = function(fileName) {
 }
 
 SceneMesh.prototype.customHitDetection = function(ray) {
-	Polycode.SceneMesh_customHitDetection(this.__ptr, ray)
+	return Polycode.SceneMesh_customHitDetection(this.__ptr, ray)
 }
 
 SceneMesh.prototype.setForceMaterial = function(forceMaterial) {
@@ -90,11 +183,13 @@ SceneMesh.prototype.setForceMaterial = function(forceMaterial) {
 }
 
 SceneMesh.prototype.getForceMaterial = function() {
-	Polycode.SceneMesh_getForceMaterial(this.__ptr)
+	return Polycode.SceneMesh_getForceMaterial(this.__ptr)
 }
 
 SceneMesh.prototype.Clone = function(deepClone,ignoreEditorOnly) {
-	Polycode.SceneMesh_Clone(this.__ptr, deepClone,ignoreEditorOnly)
+	var retVal = new Entity()
+	retVal.__ptr = Polycode.SceneMesh_Clone(this.__ptr, deepClone,ignoreEditorOnly)
+	return retVal
 }
 
 SceneMesh.prototype.applyClone = function(clone,deepClone,ignoreEditorOnly) {

+ 93 - 0
bindings/javascript/Polycode/SceneParticle.js

@@ -1,2 +1,95 @@
 function SceneParticle() {
+	Object.defineProperties(this, {
+		'lifetime': { enumerable: true, configurable: true, get: SceneParticle.prototype.__get_lifetime, set: SceneParticle.prototype.__set_lifetime},
+		'position': { enumerable: true, configurable: true, get: SceneParticle.prototype.__get_position, set: SceneParticle.prototype.__set_position},
+		'velocity': { enumerable: true, configurable: true, get: SceneParticle.prototype.__get_velocity, set: SceneParticle.prototype.__set_velocity},
+		'perlinPos': { enumerable: true, configurable: true, get: SceneParticle.prototype.__get_perlinPos, set: SceneParticle.prototype.__set_perlinPos},
+		'rotation': { enumerable: true, configurable: true, get: SceneParticle.prototype.__get_rotation, set: SceneParticle.prototype.__set_rotation},
+		'brightnessDeviation': { enumerable: true, configurable: true, get: SceneParticle.prototype.__get_brightnessDeviation, set: SceneParticle.prototype.__set_brightnessDeviation},
+		'scale': { enumerable: true, configurable: true, get: SceneParticle.prototype.__get_scale, set: SceneParticle.prototype.__set_scale},
+		'color': { enumerable: true, configurable: true, get: SceneParticle.prototype.__get_color, set: SceneParticle.prototype.__set_color},
+		'varianceIndex': { enumerable: true, configurable: true, get: SceneParticle.prototype.__get_varianceIndex, set: SceneParticle.prototype.__set_varianceIndex}
+	})
 }
+SceneParticle.prototype.__get_lifetime = function() {
+	return Polycode.SceneParticle__get_lifetime(this.__ptr)
+}
+
+SceneParticle.prototype.__set_lifetime = function(val) {
+	Polycode.SceneParticle__set_lifetime(this.__ptr, val)
+}
+
+SceneParticle.prototype.__get_position = function() {
+	var retVal = new Vector3()
+	retVal.__ptr = 	Polycode.SceneParticle__get_position(this.__ptr)
+	return retVal
+}
+
+SceneParticle.prototype.__set_position = function(val) {
+	Polycode.SceneParticle__set_position(this.__ptr, val.__ptr)
+}
+
+SceneParticle.prototype.__get_velocity = function() {
+	var retVal = new Vector3()
+	retVal.__ptr = 	Polycode.SceneParticle__get_velocity(this.__ptr)
+	return retVal
+}
+
+SceneParticle.prototype.__set_velocity = function(val) {
+	Polycode.SceneParticle__set_velocity(this.__ptr, val.__ptr)
+}
+
+SceneParticle.prototype.__get_perlinPos = function() {
+	var retVal = new Vector3()
+	retVal.__ptr = 	Polycode.SceneParticle__get_perlinPos(this.__ptr)
+	return retVal
+}
+
+SceneParticle.prototype.__set_perlinPos = function(val) {
+	Polycode.SceneParticle__set_perlinPos(this.__ptr, val.__ptr)
+}
+
+SceneParticle.prototype.__get_rotation = function() {
+	var retVal = new Vector3()
+	retVal.__ptr = 	Polycode.SceneParticle__get_rotation(this.__ptr)
+	return retVal
+}
+
+SceneParticle.prototype.__set_rotation = function(val) {
+	Polycode.SceneParticle__set_rotation(this.__ptr, val.__ptr)
+}
+
+SceneParticle.prototype.__get_brightnessDeviation = function() {
+	return Polycode.SceneParticle__get_brightnessDeviation(this.__ptr)
+}
+
+SceneParticle.prototype.__set_brightnessDeviation = function(val) {
+	Polycode.SceneParticle__set_brightnessDeviation(this.__ptr, val)
+}
+
+SceneParticle.prototype.__get_scale = function() {
+	return Polycode.SceneParticle__get_scale(this.__ptr)
+}
+
+SceneParticle.prototype.__set_scale = function(val) {
+	Polycode.SceneParticle__set_scale(this.__ptr, val)
+}
+
+SceneParticle.prototype.__get_color = function() {
+	var retVal = new Color()
+	retVal.__ptr = 	Polycode.SceneParticle__get_color(this.__ptr)
+	return retVal
+}
+
+SceneParticle.prototype.__set_color = function(val) {
+	Polycode.SceneParticle__set_color(this.__ptr, val.__ptr)
+}
+
+SceneParticle.prototype.__get_varianceIndex = function() {
+	return Polycode.SceneParticle__get_varianceIndex(this.__ptr)
+}
+
+SceneParticle.prototype.__set_varianceIndex = function(val) {
+	Polycode.SceneParticle__set_varianceIndex(this.__ptr, val)
+}
+

+ 119 - 17
bindings/javascript/Polycode/SceneParticleEmitter.js

@@ -1,12 +1,98 @@
 function SceneParticleEmitter() {
+	Object.defineProperties(this, {
+		'useScaleCurve': { enumerable: true, configurable: true, get: SceneParticleEmitter.prototype.__get_useScaleCurve, set: SceneParticleEmitter.prototype.__set_useScaleCurve},
+		'scaleCurve': { enumerable: true, configurable: true, get: SceneParticleEmitter.prototype.__get_scaleCurve, set: SceneParticleEmitter.prototype.__set_scaleCurve},
+		'useColorCurves': { enumerable: true, configurable: true, get: SceneParticleEmitter.prototype.__get_useColorCurves, set: SceneParticleEmitter.prototype.__set_useColorCurves},
+		'colorCurveR': { enumerable: true, configurable: true, get: SceneParticleEmitter.prototype.__get_colorCurveR, set: SceneParticleEmitter.prototype.__set_colorCurveR},
+		'colorCurveG': { enumerable: true, configurable: true, get: SceneParticleEmitter.prototype.__get_colorCurveG, set: SceneParticleEmitter.prototype.__set_colorCurveG},
+		'colorCurveB': { enumerable: true, configurable: true, get: SceneParticleEmitter.prototype.__get_colorCurveB, set: SceneParticleEmitter.prototype.__set_colorCurveB},
+		'colorCurveA': { enumerable: true, configurable: true, get: SceneParticleEmitter.prototype.__get_colorCurveA, set: SceneParticleEmitter.prototype.__set_colorCurveA},
+		'colorDeviation': { enumerable: true, configurable: true, get: SceneParticleEmitter.prototype.__get_colorDeviation, set: SceneParticleEmitter.prototype.__set_colorDeviation}
+	})
 }
+SceneParticleEmitter.prototype.__get_useScaleCurve = function() {
+	return Polycode.SceneParticleEmitter__get_useScaleCurve(this.__ptr)
+}
+
+SceneParticleEmitter.prototype.__set_useScaleCurve = function(val) {
+	Polycode.SceneParticleEmitter__set_useScaleCurve(this.__ptr, val)
+}
+
+SceneParticleEmitter.prototype.__get_scaleCurve = function() {
+	var retVal = new BezierCurve()
+	retVal.__ptr = 	Polycode.SceneParticleEmitter__get_scaleCurve(this.__ptr)
+	return retVal
+}
+
+SceneParticleEmitter.prototype.__set_scaleCurve = function(val) {
+	Polycode.SceneParticleEmitter__set_scaleCurve(this.__ptr, val.__ptr)
+}
+
+SceneParticleEmitter.prototype.__get_useColorCurves = function() {
+	return Polycode.SceneParticleEmitter__get_useColorCurves(this.__ptr)
+}
+
+SceneParticleEmitter.prototype.__set_useColorCurves = function(val) {
+	Polycode.SceneParticleEmitter__set_useColorCurves(this.__ptr, val)
+}
+
+SceneParticleEmitter.prototype.__get_colorCurveR = function() {
+	var retVal = new BezierCurve()
+	retVal.__ptr = 	Polycode.SceneParticleEmitter__get_colorCurveR(this.__ptr)
+	return retVal
+}
+
+SceneParticleEmitter.prototype.__set_colorCurveR = function(val) {
+	Polycode.SceneParticleEmitter__set_colorCurveR(this.__ptr, val.__ptr)
+}
+
+SceneParticleEmitter.prototype.__get_colorCurveG = function() {
+	var retVal = new BezierCurve()
+	retVal.__ptr = 	Polycode.SceneParticleEmitter__get_colorCurveG(this.__ptr)
+	return retVal
+}
+
+SceneParticleEmitter.prototype.__set_colorCurveG = function(val) {
+	Polycode.SceneParticleEmitter__set_colorCurveG(this.__ptr, val.__ptr)
+}
+
+SceneParticleEmitter.prototype.__get_colorCurveB = function() {
+	var retVal = new BezierCurve()
+	retVal.__ptr = 	Polycode.SceneParticleEmitter__get_colorCurveB(this.__ptr)
+	return retVal
+}
+
+SceneParticleEmitter.prototype.__set_colorCurveB = function(val) {
+	Polycode.SceneParticleEmitter__set_colorCurveB(this.__ptr, val.__ptr)
+}
+
+SceneParticleEmitter.prototype.__get_colorCurveA = function() {
+	var retVal = new BezierCurve()
+	retVal.__ptr = 	Polycode.SceneParticleEmitter__get_colorCurveA(this.__ptr)
+	return retVal
+}
+
+SceneParticleEmitter.prototype.__set_colorCurveA = function(val) {
+	Polycode.SceneParticleEmitter__set_colorCurveA(this.__ptr, val.__ptr)
+}
+
+SceneParticleEmitter.prototype.__get_colorDeviation = function() {
+	var retVal = new Color()
+	retVal.__ptr = 	Polycode.SceneParticleEmitter__get_colorDeviation(this.__ptr)
+	return retVal
+}
+
+SceneParticleEmitter.prototype.__set_colorDeviation = function(val) {
+	Polycode.SceneParticleEmitter__set_colorDeviation(this.__ptr, val.__ptr)
+}
+
 
 SceneParticleEmitter.prototype.setParticleCount = function(newParticleCount) {
 	Polycode.SceneParticleEmitter_setParticleCount(this.__ptr, newParticleCount)
 }
 
 SceneParticleEmitter.prototype.getParticleCount = function() {
-	Polycode.SceneParticleEmitter_getParticleCount(this.__ptr)
+	return Polycode.SceneParticleEmitter_getParticleCount(this.__ptr)
 }
 
 SceneParticleEmitter.prototype.setParticleLifetime = function(lifetime) {
@@ -14,7 +100,7 @@ SceneParticleEmitter.prototype.setParticleLifetime = function(lifetime) {
 }
 
 SceneParticleEmitter.prototype.getParticleLifetime = function() {
-	Polycode.SceneParticleEmitter_getParticleLifetime(this.__ptr)
+	return Polycode.SceneParticleEmitter_getParticleLifetime(this.__ptr)
 }
 
 SceneParticleEmitter.prototype.setDirectionDeviation = function(newDeviation) {
@@ -22,7 +108,9 @@ SceneParticleEmitter.prototype.setDirectionDeviation = function(newDeviation) {
 }
 
 SceneParticleEmitter.prototype.getDirectionDeviation = function() {
-	Polycode.SceneParticleEmitter_getDirectionDeviation(this.__ptr)
+	var retVal = new Vector3()
+	retVal.__ptr = Polycode.SceneParticleEmitter_getDirectionDeviation(this.__ptr)
+	return retVal
 }
 
 SceneParticleEmitter.prototype.setEmitterSize = function(newSize) {
@@ -30,7 +118,9 @@ SceneParticleEmitter.prototype.setEmitterSize = function(newSize) {
 }
 
 SceneParticleEmitter.prototype.getEmitterSize = function() {
-	Polycode.SceneParticleEmitter_getEmitterSize(this.__ptr)
+	var retVal = new Vector3()
+	retVal.__ptr = Polycode.SceneParticleEmitter_getEmitterSize(this.__ptr)
+	return retVal
 }
 
 SceneParticleEmitter.prototype.setGravity = function(newGravity) {
@@ -38,7 +128,9 @@ SceneParticleEmitter.prototype.setGravity = function(newGravity) {
 }
 
 SceneParticleEmitter.prototype.getGravity = function() {
-	Polycode.SceneParticleEmitter_getGravity(this.__ptr)
+	var retVal = new Vector3()
+	retVal.__ptr = Polycode.SceneParticleEmitter_getGravity(this.__ptr)
+	return retVal
 }
 
 SceneParticleEmitter.prototype.fixedUpdate = function() {
@@ -82,7 +174,7 @@ SceneParticleEmitter.prototype.setParticlesInWorldSpace = function(val) {
 }
 
 SceneParticleEmitter.prototype.getParticlesInWorldSpace = function() {
-	Polycode.SceneParticleEmitter_getParticlesInWorldSpace(this.__ptr)
+	return Polycode.SceneParticleEmitter_getParticlesInWorldSpace(this.__ptr)
 }
 
 SceneParticleEmitter.prototype.setPerlinEnabled = function(val) {
@@ -90,11 +182,11 @@ SceneParticleEmitter.prototype.setPerlinEnabled = function(val) {
 }
 
 SceneParticleEmitter.prototype.getPerlinEnabled = function() {
-	Polycode.SceneParticleEmitter_getPerlinEnabled(this.__ptr)
+	return Polycode.SceneParticleEmitter_getPerlinEnabled(this.__ptr)
 }
 
 SceneParticleEmitter.prototype.getParticleSpeed = function() {
-	Polycode.SceneParticleEmitter_getParticleSpeed(this.__ptr)
+	return Polycode.SceneParticleEmitter_getParticleSpeed(this.__ptr)
 }
 
 SceneParticleEmitter.prototype.setParticleSpeed = function(speed) {
@@ -106,7 +198,9 @@ SceneParticleEmitter.prototype.setPerlinValue = function(perlinValue) {
 }
 
 SceneParticleEmitter.prototype.getPerlinValue = function() {
-	Polycode.SceneParticleEmitter_getPerlinValue(this.__ptr)
+	var retVal = new Vector3()
+	retVal.__ptr = Polycode.SceneParticleEmitter_getPerlinValue(this.__ptr)
+	return retVal
 }
 
 SceneParticleEmitter.prototype.setParticleType = function(particleType) {
@@ -114,7 +208,7 @@ SceneParticleEmitter.prototype.setParticleType = function(particleType) {
 }
 
 SceneParticleEmitter.prototype.getParticleType = function() {
-	Polycode.SceneParticleEmitter_getParticleType(this.__ptr)
+	return Polycode.SceneParticleEmitter_getParticleType(this.__ptr)
 }
 
 SceneParticleEmitter.prototype.setParticleSize = function(particleSize) {
@@ -122,7 +216,7 @@ SceneParticleEmitter.prototype.setParticleSize = function(particleSize) {
 }
 
 SceneParticleEmitter.prototype.getParticleSize = function() {
-	Polycode.SceneParticleEmitter_getParticleSize(this.__ptr)
+	return Polycode.SceneParticleEmitter_getParticleSize(this.__ptr)
 }
 
 SceneParticleEmitter.prototype.setParticleRotationSpeed = function(rotationSpeed) {
@@ -130,7 +224,9 @@ SceneParticleEmitter.prototype.setParticleRotationSpeed = function(rotationSpeed
 }
 
 SceneParticleEmitter.prototype.getParticleRotationSpeed = function() {
-	Polycode.SceneParticleEmitter_getParticleRotationSpeed(this.__ptr)
+	var retVal = new Vector3()
+	retVal.__ptr = Polycode.SceneParticleEmitter_getParticleRotationSpeed(this.__ptr)
+	return retVal
 }
 
 SceneParticleEmitter.prototype.setParticleDirection = function(direction) {
@@ -138,7 +234,9 @@ SceneParticleEmitter.prototype.setParticleDirection = function(direction) {
 }
 
 SceneParticleEmitter.prototype.getParticleDirection = function() {
-	Polycode.SceneParticleEmitter_getParticleDirection(this.__ptr)
+	var retVal = new Vector3()
+	retVal.__ptr = Polycode.SceneParticleEmitter_getParticleDirection(this.__ptr)
+	return retVal
 }
 
 SceneParticleEmitter.prototype.setLoopParticles = function(val) {
@@ -146,7 +244,7 @@ SceneParticleEmitter.prototype.setLoopParticles = function(val) {
 }
 
 SceneParticleEmitter.prototype.getLoopParticles = function() {
-	Polycode.SceneParticleEmitter_getLoopParticles(this.__ptr)
+	return Polycode.SceneParticleEmitter_getLoopParticles(this.__ptr)
 }
 
 SceneParticleEmitter.prototype.addSourceMesh = function(mesh) {
@@ -154,11 +252,13 @@ SceneParticleEmitter.prototype.addSourceMesh = function(mesh) {
 }
 
 SceneParticleEmitter.prototype.getNumSourceMeshes = function() {
-	Polycode.SceneParticleEmitter_getNumSourceMeshes(this.__ptr)
+	return Polycode.SceneParticleEmitter_getNumSourceMeshes(this.__ptr)
 }
 
 SceneParticleEmitter.prototype.getSourcesMeshAtIndex = function(index) {
-	Polycode.SceneParticleEmitter_getSourcesMeshAtIndex(this.__ptr, index)
+	var retVal = new Mesh()
+	retVal.__ptr = Polycode.SceneParticleEmitter_getSourcesMeshAtIndex(this.__ptr, index)
+	return retVal
 }
 
 SceneParticleEmitter.prototype.removeSourceMeshAtIndex = function(index) {
@@ -170,7 +270,9 @@ SceneParticleEmitter.prototype.positionParticle = function(index) {
 }
 
 SceneParticleEmitter.prototype.Clone = function(deepClone,ignoreEditorOnly) {
-	Polycode.SceneParticleEmitter_Clone(this.__ptr, deepClone,ignoreEditorOnly)
+	var retVal = new Entity()
+	retVal.__ptr = Polycode.SceneParticleEmitter_Clone(this.__ptr, deepClone,ignoreEditorOnly)
+	return retVal
 }
 
 SceneParticleEmitter.prototype.applyClone = function(clone,deepClone,ignoreEditorOnly) {

+ 9 - 7
bindings/javascript/Polycode/ScenePrimitive.js

@@ -10,31 +10,33 @@ ScenePrimitive.prototype.recreatePrimitive = function() {
 }
 
 ScenePrimitive.prototype.getPrimitiveType = function() {
-	Polycode.ScenePrimitive_getPrimitiveType(this.__ptr)
+	return Polycode.ScenePrimitive_getPrimitiveType(this.__ptr)
 }
 
 ScenePrimitive.prototype.getPrimitiveParameter1 = function() {
-	Polycode.ScenePrimitive_getPrimitiveParameter1(this.__ptr)
+	return Polycode.ScenePrimitive_getPrimitiveParameter1(this.__ptr)
 }
 
 ScenePrimitive.prototype.getPrimitiveParameter2 = function() {
-	Polycode.ScenePrimitive_getPrimitiveParameter2(this.__ptr)
+	return Polycode.ScenePrimitive_getPrimitiveParameter2(this.__ptr)
 }
 
 ScenePrimitive.prototype.getPrimitiveParameter3 = function() {
-	Polycode.ScenePrimitive_getPrimitiveParameter3(this.__ptr)
+	return Polycode.ScenePrimitive_getPrimitiveParameter3(this.__ptr)
 }
 
 ScenePrimitive.prototype.getPrimitiveParameter4 = function() {
-	Polycode.ScenePrimitive_getPrimitiveParameter4(this.__ptr)
+	return Polycode.ScenePrimitive_getPrimitiveParameter4(this.__ptr)
 }
 
 ScenePrimitive.prototype.getPrimitiveParameter5 = function() {
-	Polycode.ScenePrimitive_getPrimitiveParameter5(this.__ptr)
+	return Polycode.ScenePrimitive_getPrimitiveParameter5(this.__ptr)
 }
 
 ScenePrimitive.prototype.Clone = function(deepClone,ignoreEditorOnly) {
-	Polycode.ScenePrimitive_Clone(this.__ptr, deepClone,ignoreEditorOnly)
+	var retVal = new Entity()
+	retVal.__ptr = Polycode.ScenePrimitive_Clone(this.__ptr, deepClone,ignoreEditorOnly)
+	return retVal
 }
 
 ScenePrimitive.prototype.applyClone = function(clone,deepClone,ignoreEditorOnly) {

+ 29 - 6
bindings/javascript/Polycode/SceneRenderTexture.js

@@ -1,16 +1,33 @@
 function SceneRenderTexture() {
+	Object.defineProperties(this, {
+		'enabled': { enumerable: true, configurable: true, get: SceneRenderTexture.prototype.__get_enabled, set: SceneRenderTexture.prototype.__set_enabled}
+	})
 }
+SceneRenderTexture.prototype.__get_enabled = function() {
+	return Polycode.SceneRenderTexture__get_enabled(this.__ptr)
+}
+
+SceneRenderTexture.prototype.__set_enabled = function(val) {
+	Polycode.SceneRenderTexture__set_enabled(this.__ptr, val)
+}
+
 
 SceneRenderTexture.prototype.getTargetTexture = function() {
-	Polycode.SceneRenderTexture_getTargetTexture(this.__ptr)
+	var retVal = new Texture()
+	retVal.__ptr = Polycode.SceneRenderTexture_getTargetTexture(this.__ptr)
+	return retVal
 }
 
 SceneRenderTexture.prototype.getFilterColorBufferTexture = function() {
-	Polycode.SceneRenderTexture_getFilterColorBufferTexture(this.__ptr)
+	var retVal = new Texture()
+	retVal.__ptr = Polycode.SceneRenderTexture_getFilterColorBufferTexture(this.__ptr)
+	return retVal
 }
 
 SceneRenderTexture.prototype.getFilterZBufferTexture = function() {
-	Polycode.SceneRenderTexture_getFilterZBufferTexture(this.__ptr)
+	var retVal = new Texture()
+	retVal.__ptr = Polycode.SceneRenderTexture_getFilterZBufferTexture(this.__ptr)
+	return retVal
 }
 
 SceneRenderTexture.prototype.Render = function() {
@@ -18,7 +35,9 @@ SceneRenderTexture.prototype.Render = function() {
 }
 
 SceneRenderTexture.prototype.saveToImage = function() {
-	Polycode.SceneRenderTexture_saveToImage(this.__ptr)
+	var retVal = new Image()
+	retVal.__ptr = Polycode.SceneRenderTexture_saveToImage(this.__ptr)
+	return retVal
 }
 
 SceneRenderTexture.prototype.resizeRenderTexture = function(newWidth,newHeight) {
@@ -26,9 +45,13 @@ SceneRenderTexture.prototype.resizeRenderTexture = function(newWidth,newHeight)
 }
 
 SceneRenderTexture.prototype.getTargetScene = function() {
-	Polycode.SceneRenderTexture_getTargetScene(this.__ptr)
+	var retVal = new Scene()
+	retVal.__ptr = Polycode.SceneRenderTexture_getTargetScene(this.__ptr)
+	return retVal
 }
 
 SceneRenderTexture.prototype.getTargetCamera = function() {
-	Polycode.SceneRenderTexture_getTargetCamera(this.__ptr)
+	var retVal = new Camera()
+	retVal.__ptr = Polycode.SceneRenderTexture_getTargetCamera(this.__ptr)
+	return retVal
 }

+ 8 - 4
bindings/javascript/Polycode/SceneSound.js

@@ -6,7 +6,9 @@ SceneSound.prototype.Update = function() {
 }
 
 SceneSound.prototype.Clone = function(deepClone,ignoreEditorOnly) {
-	Polycode.SceneSound_Clone(this.__ptr, deepClone,ignoreEditorOnly)
+	var retVal = new Entity()
+	retVal.__ptr = Polycode.SceneSound_Clone(this.__ptr, deepClone,ignoreEditorOnly)
+	return retVal
 }
 
 SceneSound.prototype.applyClone = function(clone,deepClone,ignoreEditorOnly) {
@@ -14,7 +16,7 @@ SceneSound.prototype.applyClone = function(clone,deepClone,ignoreEditorOnly) {
 }
 
 SceneSound.prototype.isDirectionalSound = function() {
-	Polycode.SceneSound_isDirectionalSound(this.__ptr)
+	return Polycode.SceneSound_isDirectionalSound(this.__ptr)
 }
 
 SceneSound.prototype.setDirectionalSound = function(val) {
@@ -22,7 +24,9 @@ SceneSound.prototype.setDirectionalSound = function(val) {
 }
 
 SceneSound.prototype.getSound = function() {
-	Polycode.SceneSound_getSound(this.__ptr)
+	var retVal = new Sound()
+	retVal.__ptr = Polycode.SceneSound_getSound(this.__ptr)
+	return retVal
 }
 
 SceneSound.prototype.setLoopOnLoad = function(val) {
@@ -30,5 +34,5 @@ SceneSound.prototype.setLoopOnLoad = function(val) {
 }
 
 SceneSound.prototype.getLoopOnLoad = function() {
-	Polycode.SceneSound_getLoopOnLoad(this.__ptr)
+	return Polycode.SceneSound_getLoopOnLoad(this.__ptr)
 }

+ 18 - 8
bindings/javascript/Polycode/SceneSprite.js

@@ -2,7 +2,9 @@ function SceneSprite() {
 }
 
 SceneSprite.prototype.Clone = function(deepClone,ignoreEditorOnly) {
-	Polycode.SceneSprite_Clone(this.__ptr, deepClone,ignoreEditorOnly)
+	var retVal = new Entity()
+	retVal.__ptr = Polycode.SceneSprite_Clone(this.__ptr, deepClone,ignoreEditorOnly)
+	return retVal
 }
 
 SceneSprite.prototype.applyClone = function(clone,deepClone,ignoreEditorOnly) {
@@ -10,11 +12,15 @@ SceneSprite.prototype.applyClone = function(clone,deepClone,ignoreEditorOnly) {
 }
 
 SceneSprite.prototype.getSpriteSet = function() {
-	Polycode.SceneSprite_getSpriteSet(this.__ptr)
+	var retVal = new SpriteSet()
+	retVal.__ptr = Polycode.SceneSprite_getSpriteSet(this.__ptr)
+	return retVal
 }
 
 SceneSprite.prototype.getCurrentSprite = function() {
-	Polycode.SceneSprite_getCurrentSprite(this.__ptr)
+	var retVal = new Sprite()
+	retVal.__ptr = Polycode.SceneSprite_getCurrentSprite(this.__ptr)
+	return retVal
 }
 
 SceneSprite.prototype.setSpriteSet = function(spriteSet) {
@@ -30,7 +36,7 @@ SceneSprite.prototype.setCurrentFrame = function(frameIndex) {
 }
 
 SceneSprite.prototype.getCurrentFrame = function() {
-	Polycode.SceneSprite_getCurrentFrame(this.__ptr)
+	return Polycode.SceneSprite_getCurrentFrame(this.__ptr)
 }
 
 SceneSprite.prototype.Update = function() {
@@ -42,7 +48,9 @@ SceneSprite.prototype.Render = function(buffer) {
 }
 
 SceneSprite.prototype.getSpriteBoundingBox = function() {
-	Polycode.SceneSprite_getSpriteBoundingBox(this.__ptr)
+	var retVal = new Vector3()
+	retVal.__ptr = Polycode.SceneSprite_getSpriteBoundingBox(this.__ptr)
+	return retVal
 }
 
 SceneSprite.prototype.setPaused = function(val) {
@@ -50,7 +58,7 @@ SceneSprite.prototype.setPaused = function(val) {
 }
 
 SceneSprite.prototype.isPaused = function() {
-	Polycode.SceneSprite_isPaused(this.__ptr)
+	return Polycode.SceneSprite_isPaused(this.__ptr)
 }
 
 SceneSprite.prototype.setSprite = function(spriteEntry) {
@@ -66,11 +74,13 @@ SceneSprite.prototype.setSpriteStateByName = function(name,startingFrame,playOnc
 }
 
 SceneSprite.prototype.getCurrentSpriteState = function() {
-	Polycode.SceneSprite_getCurrentSpriteState(this.__ptr)
+	var retVal = new SpriteState()
+	retVal.__ptr = Polycode.SceneSprite_getCurrentSpriteState(this.__ptr)
+	return retVal
 }
 
 SceneSprite.prototype.getStartOnRandomFrame = function() {
-	Polycode.SceneSprite_getStartOnRandomFrame(this.__ptr)
+	return Polycode.SceneSprite_getStartOnRandomFrame(this.__ptr)
 }
 
 SceneSprite.prototype.setStartOnRandomFrame = function(val) {

+ 13 - 0
bindings/javascript/Polycode/ScriptInstance.js

@@ -1,2 +1,15 @@
 function ScriptInstance() {
+	Object.defineProperties(this, {
+		'script': { enumerable: true, configurable: true, get: ScriptInstance.prototype.__get_script, set: ScriptInstance.prototype.__set_script}
+	})
 }
+ScriptInstance.prototype.__get_script = function() {
+	var retVal = new Script()
+	retVal.__ptr = 	Polycode.ScriptInstance__get_script(this.__ptr)
+	return retVal
+}
+
+ScriptInstance.prototype.__set_script = function(val) {
+	Polycode.ScriptInstance__set_script(this.__ptr, val.__ptr)
+}
+

+ 3 - 1
bindings/javascript/Polycode/ScriptResourceLoader.js

@@ -2,5 +2,7 @@ function ScriptResourceLoader() {
 }
 
 ScriptResourceLoader.prototype.loadResource = function(path,targetPool) {
-	Polycode.ScriptResourceLoader_loadResource(this.__ptr, path,targetPool)
+	var retVal = new Resource()
+	retVal.__ptr = Polycode.ScriptResourceLoader_loadResource(this.__ptr, path,targetPool)
+	return retVal
 }

+ 69 - 5
bindings/javascript/Polycode/Shader.js

@@ -1,8 +1,68 @@
 function Shader() {
+	Object.defineProperties(this, {
+		'numSpotLights': { enumerable: true, configurable: true, get: Shader.prototype.__get_numSpotLights, set: Shader.prototype.__set_numSpotLights},
+		'numPointLights': { enumerable: true, configurable: true, get: Shader.prototype.__get_numPointLights, set: Shader.prototype.__set_numPointLights},
+		'screenShader': { enumerable: true, configurable: true, get: Shader.prototype.__get_screenShader, set: Shader.prototype.__set_screenShader},
+		'vertexProgram': { enumerable: true, configurable: true, get: Shader.prototype.__get_vertexProgram, set: Shader.prototype.__set_vertexProgram},
+		'fragmentProgram': { enumerable: true, configurable: true, get: Shader.prototype.__get_fragmentProgram, set: Shader.prototype.__set_fragmentProgram},
+		'name': { enumerable: true, configurable: true, get: Shader.prototype.__get_name, set: Shader.prototype.__set_name}
+	})
 }
+Shader.prototype.__get_numSpotLights = function() {
+	return Polycode.Shader__get_numSpotLights(this.__ptr)
+}
+
+Shader.prototype.__set_numSpotLights = function(val) {
+	Polycode.Shader__set_numSpotLights(this.__ptr, val)
+}
+
+Shader.prototype.__get_numPointLights = function() {
+	return Polycode.Shader__get_numPointLights(this.__ptr)
+}
+
+Shader.prototype.__set_numPointLights = function(val) {
+	Polycode.Shader__set_numPointLights(this.__ptr, val)
+}
+
+Shader.prototype.__get_screenShader = function() {
+	return Polycode.Shader__get_screenShader(this.__ptr)
+}
+
+Shader.prototype.__set_screenShader = function(val) {
+	Polycode.Shader__set_screenShader(this.__ptr, val)
+}
+
+Shader.prototype.__get_vertexProgram = function() {
+	var retVal = new ShaderProgram()
+	retVal.__ptr = 	Polycode.Shader__get_vertexProgram(this.__ptr)
+	return retVal
+}
+
+Shader.prototype.__set_vertexProgram = function(val) {
+	Polycode.Shader__set_vertexProgram(this.__ptr, val.__ptr)
+}
+
+Shader.prototype.__get_fragmentProgram = function() {
+	var retVal = new ShaderProgram()
+	retVal.__ptr = 	Polycode.Shader__get_fragmentProgram(this.__ptr)
+	return retVal
+}
+
+Shader.prototype.__set_fragmentProgram = function(val) {
+	Polycode.Shader__set_fragmentProgram(this.__ptr, val.__ptr)
+}
+
+Shader.prototype.__get_name = function() {
+	return Polycode.Shader__get_name(this.__ptr)
+}
+
+Shader.prototype.__set_name = function(val) {
+	Polycode.Shader__set_name(this.__ptr, val)
+}
+
 
 Shader.prototype.getType = function() {
-	Polycode.Shader_getType(this.__ptr)
+	return Polycode.Shader_getType(this.__ptr)
 }
 
 Shader.prototype.setName = function(name) {
@@ -10,15 +70,19 @@ Shader.prototype.setName = function(name) {
 }
 
 Shader.prototype.getName = function() {
-	Polycode.Shader_getName(this.__ptr)
+	return Polycode.Shader_getName(this.__ptr)
 }
 
 Shader.prototype.getParamPointer = function(name) {
-	Polycode.Shader_getParamPointer(this.__ptr, name)
+	var retVal = new ProgramParam()
+	retVal.__ptr = Polycode.Shader_getParamPointer(this.__ptr, name)
+	return retVal
 }
 
 Shader.prototype.getAttribPointer = function(name) {
-	Polycode.Shader_getAttribPointer(this.__ptr, name)
+	var retVal = new ProgramAttribute()
+	retVal.__ptr = Polycode.Shader_getAttribPointer(this.__ptr, name)
+	return retVal
 }
 
 Shader.prototype.reload = function() {
@@ -26,7 +90,7 @@ Shader.prototype.reload = function() {
 }
 
 Shader.prototype.getExpectedParamType = function(name) {
-	Polycode.Shader_getExpectedParamType(this.__ptr, name)
+	return Polycode.Shader_getExpectedParamType(this.__ptr, name)
 }
 
 Shader.prototype.setVertexProgram = function(vp) {

+ 79 - 20
bindings/javascript/Polycode/ShaderBinding.js

@@ -1,28 +1,69 @@
 function ShaderBinding() {
+	Object.defineProperties(this, {
+		'resetAttributes': { enumerable: true, configurable: true, get: ShaderBinding.prototype.__get_resetAttributes, set: ShaderBinding.prototype.__set_resetAttributes},
+		'targetShader': { enumerable: true, configurable: true, get: ShaderBinding.prototype.__get_targetShader, set: ShaderBinding.prototype.__set_targetShader},
+		'accessMutex': { enumerable: true, configurable: true, get: ShaderBinding.prototype.__get_accessMutex, set: ShaderBinding.prototype.__set_accessMutex}
+	})
 }
+ShaderBinding.prototype.__get_resetAttributes = function() {
+	return Polycode.ShaderBinding__get_resetAttributes(this.__ptr)
+}
+
+ShaderBinding.prototype.__set_resetAttributes = function(val) {
+	Polycode.ShaderBinding__set_resetAttributes(this.__ptr, val)
+}
+
+ShaderBinding.prototype.__get_targetShader = function() {
+	var retVal = new Shader()
+	retVal.__ptr = 	Polycode.ShaderBinding__get_targetShader(this.__ptr)
+	return retVal
+}
+
+ShaderBinding.prototype.__set_targetShader = function(val) {
+	Polycode.ShaderBinding__set_targetShader(this.__ptr, val.__ptr)
+}
+
+ShaderBinding.prototype.__get_accessMutex = function() {
+	var retVal = new CoreMutex()
+	retVal.__ptr = 	Polycode.ShaderBinding__get_accessMutex(this.__ptr)
+	return retVal
+}
+
+ShaderBinding.prototype.__set_accessMutex = function(val) {
+	Polycode.ShaderBinding__set_accessMutex(this.__ptr, val.__ptr)
+}
+
 
 ShaderBinding.prototype.copyTo = function(targetBinding) {
 	Polycode.ShaderBinding_copyTo(this.__ptr, targetBinding)
 }
 
 ShaderBinding.prototype.addParam = function(type,name) {
-	Polycode.ShaderBinding_addParam(this.__ptr, type,name)
+	var retVal = new LocalShaderParam()
+	retVal.__ptr = Polycode.ShaderBinding_addParam(this.__ptr, type,name)
+	return retVal
 }
 
 ShaderBinding.prototype.addParamPointer = function(type,name,ptr) {
-	Polycode.ShaderBinding_addParamPointer(this.__ptr, type,name,ptr)
+	var retVal = new LocalShaderParam()
+	retVal.__ptr = Polycode.ShaderBinding_addParamPointer(this.__ptr, type,name,ptr)
+	return retVal
 }
 
 ShaderBinding.prototype.getNumLocalParams = function() {
-	Polycode.ShaderBinding_getNumLocalParams(this.__ptr)
+	return Polycode.ShaderBinding_getNumLocalParams(this.__ptr)
 }
 
 ShaderBinding.prototype.getLocalParam = function(index) {
-	Polycode.ShaderBinding_getLocalParam(this.__ptr, index)
+	var retVal = new LocalShaderParam()
+	retVal.__ptr = Polycode.ShaderBinding_getLocalParam(this.__ptr, index)
+	return retVal
 }
 
 ShaderBinding.prototype.getLocalParamByName = function(name) {
-	Polycode.ShaderBinding_getLocalParamByName(this.__ptr, name)
+	var retVal = new LocalShaderParam()
+	retVal.__ptr = Polycode.ShaderBinding_getLocalParamByName(this.__ptr, name)
+	return retVal
 }
 
 ShaderBinding.prototype.removeParam = function(name) {
@@ -30,7 +71,9 @@ ShaderBinding.prototype.removeParam = function(name) {
 }
 
 ShaderBinding.prototype.loadTextureForParam = function(paramName,fileName) {
-	Polycode.ShaderBinding_loadTextureForParam(this.__ptr, paramName,fileName)
+	var retVal = new Texture()
+	retVal.__ptr = Polycode.ShaderBinding_loadTextureForParam(this.__ptr, paramName,fileName)
+	return retVal
 }
 
 ShaderBinding.prototype.setTextureForParam = function(paramName,texture) {
@@ -42,19 +85,25 @@ ShaderBinding.prototype.setCubemapForParam = function(paramName,cubemap) {
 }
 
 ShaderBinding.prototype.getNumAttributeBindings = function() {
-	Polycode.ShaderBinding_getNumAttributeBindings(this.__ptr)
+	return Polycode.ShaderBinding_getNumAttributeBindings(this.__ptr)
 }
 
 ShaderBinding.prototype.getAttributeBinding = function(index) {
-	Polycode.ShaderBinding_getAttributeBinding(this.__ptr, index)
+	var retVal = new AttributeBinding()
+	retVal.__ptr = Polycode.ShaderBinding_getAttributeBinding(this.__ptr, index)
+	return retVal
 }
 
 ShaderBinding.prototype.addAttributeBinding = function(name,dataArray) {
-	Polycode.ShaderBinding_addAttributeBinding(this.__ptr, name,dataArray)
+	var retVal = new AttributeBinding()
+	retVal.__ptr = Polycode.ShaderBinding_addAttributeBinding(this.__ptr, name,dataArray)
+	return retVal
 }
 
 ShaderBinding.prototype.getAttributeBindingByName = function(name) {
-	Polycode.ShaderBinding_getAttributeBindingByName(this.__ptr, name)
+	var retVal = new AttributeBinding()
+	retVal.__ptr = Polycode.ShaderBinding_getAttributeBindingByName(this.__ptr, name)
+	return retVal
 }
 
 ShaderBinding.prototype.addRenderTargetBinding = function(binding) {
@@ -66,41 +115,51 @@ ShaderBinding.prototype.removeRenderTargetBinding = function(binding) {
 }
 
 ShaderBinding.prototype.getNumRenderTargetBindings = function() {
-	Polycode.ShaderBinding_getNumRenderTargetBindings(this.__ptr)
+	return Polycode.ShaderBinding_getNumRenderTargetBindings(this.__ptr)
 }
 
 ShaderBinding.prototype.getRenderTargetBinding = function(index) {
-	Polycode.ShaderBinding_getRenderTargetBinding(this.__ptr, index)
+	var retVal = new RenderTargetBinding()
+	retVal.__ptr = Polycode.ShaderBinding_getRenderTargetBinding(this.__ptr, index)
+	return retVal
 }
 
 ShaderBinding.prototype.getNumInTargetBindings = function() {
-	Polycode.ShaderBinding_getNumInTargetBindings(this.__ptr)
+	return Polycode.ShaderBinding_getNumInTargetBindings(this.__ptr)
 }
 
 ShaderBinding.prototype.getInTargetBinding = function(index) {
-	Polycode.ShaderBinding_getInTargetBinding(this.__ptr, index)
+	var retVal = new RenderTargetBinding()
+	retVal.__ptr = Polycode.ShaderBinding_getInTargetBinding(this.__ptr, index)
+	return retVal
 }
 
 ShaderBinding.prototype.getNumColorTargetBindings = function() {
-	Polycode.ShaderBinding_getNumColorTargetBindings(this.__ptr)
+	return Polycode.ShaderBinding_getNumColorTargetBindings(this.__ptr)
 }
 
 ShaderBinding.prototype.getColorTargetBinding = function(index) {
-	Polycode.ShaderBinding_getColorTargetBinding(this.__ptr, index)
+	var retVal = new RenderTargetBinding()
+	retVal.__ptr = Polycode.ShaderBinding_getColorTargetBinding(this.__ptr, index)
+	return retVal
 }
 
 ShaderBinding.prototype.getNumDepthTargetBindings = function() {
-	Polycode.ShaderBinding_getNumDepthTargetBindings(this.__ptr)
+	return Polycode.ShaderBinding_getNumDepthTargetBindings(this.__ptr)
 }
 
 ShaderBinding.prototype.getDepthTargetBinding = function(index) {
-	Polycode.ShaderBinding_getDepthTargetBinding(this.__ptr, index)
+	var retVal = new RenderTargetBinding()
+	retVal.__ptr = Polycode.ShaderBinding_getDepthTargetBinding(this.__ptr, index)
+	return retVal
 }
 
 ShaderBinding.prototype.getNumOutTargetBindings = function() {
-	Polycode.ShaderBinding_getNumOutTargetBindings(this.__ptr)
+	return Polycode.ShaderBinding_getNumOutTargetBindings(this.__ptr)
 }
 
 ShaderBinding.prototype.getOutTargetBinding = function(index) {
-	Polycode.ShaderBinding_getOutTargetBinding(this.__ptr, index)
+	var retVal = new RenderTargetBinding()
+	retVal.__ptr = Polycode.ShaderBinding_getOutTargetBinding(this.__ptr, index)
+	return retVal
 }

+ 53 - 0
bindings/javascript/Polycode/ShaderPass.js

@@ -1,5 +1,58 @@
 function ShaderPass() {
+	Object.defineProperties(this, {
+		'shader': { enumerable: true, configurable: true, get: ShaderPass.prototype.__get_shader, set: ShaderPass.prototype.__set_shader},
+		'wireframe': { enumerable: true, configurable: true, get: ShaderPass.prototype.__get_wireframe, set: ShaderPass.prototype.__set_wireframe},
+		'blendingMode': { enumerable: true, configurable: true, get: ShaderPass.prototype.__get_blendingMode, set: ShaderPass.prototype.__set_blendingMode},
+		'shaderBinding': { enumerable: true, configurable: true, get: ShaderPass.prototype.__get_shaderBinding, set: ShaderPass.prototype.__set_shaderBinding},
+		'materialShaderBinding': { enumerable: true, configurable: true, get: ShaderPass.prototype.__get_materialShaderBinding, set: ShaderPass.prototype.__set_materialShaderBinding}
+	})
 }
+ShaderPass.prototype.__get_shader = function() {
+	var retVal = new Shader()
+	retVal.__ptr = 	Polycode.ShaderPass__get_shader(this.__ptr)
+	return retVal
+}
+
+ShaderPass.prototype.__set_shader = function(val) {
+	Polycode.ShaderPass__set_shader(this.__ptr, val.__ptr)
+}
+
+ShaderPass.prototype.__get_wireframe = function() {
+	return Polycode.ShaderPass__get_wireframe(this.__ptr)
+}
+
+ShaderPass.prototype.__set_wireframe = function(val) {
+	Polycode.ShaderPass__set_wireframe(this.__ptr, val)
+}
+
+ShaderPass.prototype.__get_blendingMode = function() {
+	return Polycode.ShaderPass__get_blendingMode(this.__ptr)
+}
+
+ShaderPass.prototype.__set_blendingMode = function(val) {
+	Polycode.ShaderPass__set_blendingMode(this.__ptr, val)
+}
+
+ShaderPass.prototype.__get_shaderBinding = function() {
+	var retVal = new ShaderBinding()
+	retVal.__ptr = 	Polycode.ShaderPass__get_shaderBinding(this.__ptr)
+	return retVal
+}
+
+ShaderPass.prototype.__set_shaderBinding = function(val) {
+	Polycode.ShaderPass__set_shaderBinding(this.__ptr, val.__ptr)
+}
+
+ShaderPass.prototype.__get_materialShaderBinding = function() {
+	var retVal = new ShaderBinding()
+	retVal.__ptr = 	Polycode.ShaderPass__get_materialShaderBinding(this.__ptr)
+	return retVal
+}
+
+ShaderPass.prototype.__set_materialShaderBinding = function(val) {
+	Polycode.ShaderPass__set_materialShaderBinding(this.__ptr, val.__ptr)
+}
+
 
 ShaderPass.prototype.setAttributeArraysFromMesh = function(mesh) {
 	Polycode.ShaderPass_setAttributeArraysFromMesh(this.__ptr, mesh)

+ 11 - 0
bindings/javascript/Polycode/ShaderProgram.js

@@ -1,5 +1,16 @@
 function ShaderProgram() {
+	Object.defineProperties(this, {
+		'type': { enumerable: true, configurable: true, get: ShaderProgram.prototype.__get_type, set: ShaderProgram.prototype.__set_type}
+	})
 }
+ShaderProgram.prototype.__get_type = function() {
+	return Polycode.ShaderProgram__get_type(this.__ptr)
+}
+
+ShaderProgram.prototype.__set_type = function(val) {
+	Polycode.ShaderProgram__set_type(this.__ptr, val)
+}
+
 
 ShaderProgram.prototype.reloadProgram = function() {
 	Polycode.ShaderProgram_reloadProgram(this.__ptr)

+ 67 - 0
bindings/javascript/Polycode/ShaderRenderTarget.js

@@ -1,2 +1,69 @@
 function ShaderRenderTarget() {
+	Object.defineProperties(this, {
+		'id': { enumerable: true, configurable: true, get: ShaderRenderTarget.prototype.__get_id, set: ShaderRenderTarget.prototype.__set_id},
+		'width': { enumerable: true, configurable: true, get: ShaderRenderTarget.prototype.__get_width, set: ShaderRenderTarget.prototype.__set_width},
+		'height': { enumerable: true, configurable: true, get: ShaderRenderTarget.prototype.__get_height, set: ShaderRenderTarget.prototype.__set_height},
+		'sizeMode': { enumerable: true, configurable: true, get: ShaderRenderTarget.prototype.__get_sizeMode, set: ShaderRenderTarget.prototype.__set_sizeMode},
+		'buffer': { enumerable: true, configurable: true, get: ShaderRenderTarget.prototype.__get_buffer, set: ShaderRenderTarget.prototype.__set_buffer},
+		'normalizedWidth': { enumerable: true, configurable: true, get: ShaderRenderTarget.prototype.__get_normalizedWidth, set: ShaderRenderTarget.prototype.__set_normalizedWidth},
+		'normalizedHeight': { enumerable: true, configurable: true, get: ShaderRenderTarget.prototype.__get_normalizedHeight, set: ShaderRenderTarget.prototype.__set_normalizedHeight}
+	})
 }
+ShaderRenderTarget.prototype.__get_id = function() {
+	return Polycode.ShaderRenderTarget__get_id(this.__ptr)
+}
+
+ShaderRenderTarget.prototype.__set_id = function(val) {
+	Polycode.ShaderRenderTarget__set_id(this.__ptr, val)
+}
+
+ShaderRenderTarget.prototype.__get_width = function() {
+	return Polycode.ShaderRenderTarget__get_width(this.__ptr)
+}
+
+ShaderRenderTarget.prototype.__set_width = function(val) {
+	Polycode.ShaderRenderTarget__set_width(this.__ptr, val)
+}
+
+ShaderRenderTarget.prototype.__get_height = function() {
+	return Polycode.ShaderRenderTarget__get_height(this.__ptr)
+}
+
+ShaderRenderTarget.prototype.__set_height = function(val) {
+	Polycode.ShaderRenderTarget__set_height(this.__ptr, val)
+}
+
+ShaderRenderTarget.prototype.__get_sizeMode = function() {
+	return Polycode.ShaderRenderTarget__get_sizeMode(this.__ptr)
+}
+
+ShaderRenderTarget.prototype.__set_sizeMode = function(val) {
+	Polycode.ShaderRenderTarget__set_sizeMode(this.__ptr, val)
+}
+
+ShaderRenderTarget.prototype.__get_buffer = function() {
+	var retVal = new RenderBuffer()
+	retVal.__ptr = 	Polycode.ShaderRenderTarget__get_buffer(this.__ptr)
+	return retVal
+}
+
+ShaderRenderTarget.prototype.__set_buffer = function(val) {
+	Polycode.ShaderRenderTarget__set_buffer(this.__ptr, val.__ptr)
+}
+
+ShaderRenderTarget.prototype.__get_normalizedWidth = function() {
+	return Polycode.ShaderRenderTarget__get_normalizedWidth(this.__ptr)
+}
+
+ShaderRenderTarget.prototype.__set_normalizedWidth = function(val) {
+	Polycode.ShaderRenderTarget__set_normalizedWidth(this.__ptr, val)
+}
+
+ShaderRenderTarget.prototype.__get_normalizedHeight = function() {
+	return Polycode.ShaderRenderTarget__get_normalizedHeight(this.__ptr)
+}
+
+ShaderRenderTarget.prototype.__set_normalizedHeight = function(val) {
+	Polycode.ShaderRenderTarget__set_normalizedHeight(this.__ptr, val)
+}
+

+ 14 - 6
bindings/javascript/Polycode/Skeleton.js

@@ -26,7 +26,9 @@ Skeleton.prototype.stopAllAnimations = function() {
 }
 
 Skeleton.prototype.getBaseAnimation = function() {
-	Polycode.Skeleton_getBaseAnimation(this.__ptr)
+	var retVal = new SkeletonAnimation()
+	retVal.__ptr = Polycode.Skeleton_getBaseAnimation(this.__ptr)
+	return retVal
 }
 
 Skeleton.prototype.addAnimation = function(name,fileName) {
@@ -34,7 +36,9 @@ Skeleton.prototype.addAnimation = function(name,fileName) {
 }
 
 Skeleton.prototype.getAnimation = function(name) {
-	Polycode.Skeleton_getAnimation(this.__ptr, name)
+	var retVal = new SkeletonAnimation()
+	retVal.__ptr = Polycode.Skeleton_getAnimation(this.__ptr, name)
+	return retVal
 }
 
 Skeleton.prototype.stopAnimationByName = function(name) {
@@ -50,7 +54,9 @@ Skeleton.prototype.Update = function() {
 }
 
 Skeleton.prototype.getBoneByName = function(name) {
-	Polycode.Skeleton_getBoneByName(this.__ptr, name)
+	var retVal = new Bone()
+	retVal.__ptr = Polycode.Skeleton_getBoneByName(this.__ptr, name)
+	return retVal
 }
 
 Skeleton.prototype.bonesVisible = function(val) {
@@ -58,11 +64,13 @@ Skeleton.prototype.bonesVisible = function(val) {
 }
 
 Skeleton.prototype.getNumBones = function() {
-	Polycode.Skeleton_getNumBones(this.__ptr)
+	return Polycode.Skeleton_getNumBones(this.__ptr)
 }
 
 Skeleton.prototype.getBone = function(index) {
-	Polycode.Skeleton_getBone(this.__ptr, index)
+	var retVal = new Bone()
+	retVal.__ptr = Polycode.Skeleton_getBone(this.__ptr, index)
+	return retVal
 }
 
 Skeleton.prototype.addBone = function(bone) {
@@ -74,5 +82,5 @@ Skeleton.prototype.removeBone = function(bone) {
 }
 
 Skeleton.prototype.getBoneIndexByBone = function(bone) {
-	Polycode.Skeleton_getBoneIndexByBone(this.__ptr, bone)
+	return Polycode.Skeleton_getBoneIndexByBone(this.__ptr, bone)
 }

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff