-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Texture and Light issue #134
Comments
this probably has to do something with openfl. can you try with lime? |
Just tried with Lime and it is crashing. Don't know if it is a lime or a babylonHx issue but I won't have time to investigate any further for now (furthermore I am not used to pure lime apps. So I may have done something wrong in my code) Here is the code of my lime sample if you want to take a look at it:
|
you're trying to access window object in constructor. its not yet available at that point, that's why it crashes. you should initialize engine/scene in 'onPreloadComplete' lime event. here's the screenshot of what I'm geting and the fixed code:
|
OK thanks. I tried with the fixed code on my side and I have the same result as you (the rendering is the one expected. Same as with babylonjs). Anyway. Isn't openfl supposed to be built on top of lime? So why have a version of babylonHX for openfl and one for lime. Couldn't openfl apps just access the lime lib when necessary for babylonhx? |
For some time it was possible to mix 3D with 2D content on top of it using openfl/nme api which was pretty nice. At some point this stopped working as gl states/shaders/all kinds of stuff started to mix/collide between bhx and openfl and now it produces a lot of bugs/glitches in rendering that it became totally unusable. I don't have time to find out what is going on, I'd have to investigate how openfl rendering pipeline works which would be quite time consuming... Instead I would like to create framework independent 2D API that will work on top of bhx 3D content, and would be integral part of bhx. People at BJS are working on canvas2D but it looks too heavy/complex to me, and I'm not sure about it (although I've done some work in porting it to haxe...). I've ported http://lib.ivank.net/?p=demos to haxe and it works pretty well, its event faster then the original, so maybe I'll try to integrate it with bhx. Or not... maybe I'll go with canvas2D after all. Haven't decided yet |
OK well I understand. However, developing another 2D API for haxe seems a bit counter productive for me. I mean openfl already have a community, is actively developed and debugged and is well integrated with other useful 2D APIs (like actuate for 2D animations, nape or box2D for physics, starling or haxeui for gui...). By having your own 2D api, you would have developers to get use to it but you are also giving yourself extra work in the future to debug and maintain it correctly... Anyway, I still don't really understand why openfl couldn't just work with the lime version of babylonHx rather than having it's specific code. I mean if you changed all |
The thing is that I want 2D api integrated into BHx and framework independent (that will work with lime/snow/nme like BHx itself does right now - and possibly with kha at some point?!) |
I see you recently added 2D content to BHx. That's great work! |
2D is in experimental stage, right now it has pretty big impact on performance... I'm not sure if I will keep it. My cannon port works well with three.js and is quite faster then the original in some cases, but it doesn't work with bhx yet... still have some work to do on it |
I have an issue with texture lightening.
I made an example in babylonjs playground that works fine:
http://www.babylonjs-playground.com/#F3TFY#3
But in babylonHx, here is what I have:
You can see in the center a white square. It is supposed to be blue...
Here is the babylonHX source code of my example:
Also, if you rotate the shape (by swapping left-right or up-down in the babylonjs example or the babylonHx one), you can see in babylonHx some issue in regions where one box is in front of another. It is like the boxes are kind of transparents whereas they are not supposed to be...
The text was updated successfully, but these errors were encountered: