vujadin / BabylonHx

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

Issue with openfl samples #129

Closed ramsestom closed 7 years ago

ramsestom commented 7 years ago

openfl samples not working anymore:

Class<com.babylonhx.Engine> has no field width
Class<com.babylonhx.Engine> has no field height

would be great to perform breaking changes in the dev branch and not in the master one! Because I retried to used babylonHx after many months. Performed an update and all my apps that where working many months ago do not work anymore with the buggy current babylonhx code.

songproducer commented 7 years ago

I'm also getting this when running haxelib run lime test project.xml html5:


src/MainLime.hx:148: characters 2-14 : Class<com.babylonhx.Engine> has no field width
src/MainLime.hx:149: characters 2-15 : Class<com.babylonhx.Engine> has no field height
src/MainLime.hx:209: characters 2-14 : Class<com.babylonhx.Engine> has no field width
src/MainLime.hx:210: characters 2-15 : Class<com.babylonhx.Engine> has no field height
ramsestom commented 7 years ago

Yes seems Engine's width and height are no longer static vars. So you should do:

var engine = new Engine(canvas,...);    
engine.width=w;
engine.height=h;
songproducer commented 7 years ago

Where do I put this?

ramsestom commented 7 years ago

In MainLime.hx (lines 148-149) you replace

Engine.width = this.window.width;
Engine.height = this.window.height;

by

engine.width = this.window.width;
engine.height = this.window.height;

if you want the lime examples to work

However, as far as I am concerned, I would revert back to the version of a few months ago because te curent one is FULL of bugs (rotation is completely buggy for example, lightning too...) so I will wait for it too be stabilized and patched.

vujadin commented 7 years ago

fixed by ca45db2a6329145dc04340f18ef1699bbba9115a

songproducer commented 7 years ago

Thanks, I will do that. Though I'd still like to also help debug the latest version.

I'm now getting this:

com/babylonhx/math/Vector3.hx:13: lines 13-821 : Warning : Warning : maybe loop in static generation of com.babylonhx.math.Vector3

(Edit) will open a new issue.

songproducer commented 7 years ago

@ramsestom Also, how can I get a previous version, please?

ramsestom commented 7 years ago

You have to request a previous version of this repository with git using the history function (I had this repository forked locally so I did it with the git command line. Don't know if it is possible to make it online directly with github but probably)