vujadin / BabylonHx

Port of Babylon.js 3D engine to Haxe.
http:/paradoxplay.com/babylonhx
Apache License 2.0
187 stars 43 forks source link

Various bug fixes and adding Gulp #82

Closed seacloud9 closed 8 years ago

seacloud9 commented 8 years ago

Added gulp to make it easier for people to start to use. Makes it easier to compile. If someone is using gulp they can have it watch the project and automagically build.

----- Bug Fixes ----- com/babylonhx/Engine.hx -> fix for postprocess bloom public function getRenderWidth(useScreen:Bool = false):Int { //Below seems to break bloom /_if (!useScreen && this._currentRenderTarget != null) { return this._currentRenderTarget.width; }/

if (lime || openfl || nme || purejs)

    return width;
    #else
    return app.width;
    #end
}

/babylonhx/layer/Layer.hx -> changed texture to dynamic in the event it is coming from dynamic texture and uses canvas

com/babylonhx/postprocess/PostProcess.hx -> was commented out this will break shadows2 demo if it is not present

if(this._textures.length > 0) {
this._effect._bindTexture("textureSampler", this._textures.data[this._currentRenderTextureInd]); }

vujadin commented 8 years ago

In BJS there's no check at all so it must be something else: https://github.com/BabylonJS/Babylon.js/blob/master/src/PostProcess/babylon.postProcess.ts#L129

this should be temporary fix