Giter Site home page Giter Site logo

babylonhx's People

Contributors

aw4kening avatar endlesscoil avatar labe-me avatar mrcdk avatar vujadin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

babylonhx's Issues

Rendering bug on windows target

When I compile the bump map example on windows (openfl legacy and openfl next) with haxeflixel, I have this error message:

Engine.hx:166: BabylonHx - Cross-Platform 3D Engine | 2015 | www.babylonhx.com
Effect.hx:220: Ver
Effect.hx:237: Unable to compile effect: color
Effect.hx:238: Defines:
Effect.hx:239: Error: Ver
Effect.hx:220: Ver
Effect.hx:237: Unable to compile effect: line
Effect.hx:238: Defines:
Effect.hx:239: Error: Ver

and the cube is not rendered correctly (I have the haxeflixel logo displayed over each face of the cube. This logo is usually displayed by haxeflixel when a sprite has an error...):

babylonflixel_windows_issue

If I try the same example with pure openfl it works great with openfl legacy but nothing is displayed if I use openfl next (black screen), both on windows and android (which is strange as the same example works correctly with haxeflixel + openfl next on android...).

However, I have to say that this example now works perfectly on android with Haxeflixel (whatever compiled with openfl legacy or openfl next). Which is a great improvement for me! ;)

Error reporting from failed shader compilation not working

I have shaders in asset/shaders, and babylonhx is reading them correctly from there. However, if I break something and the shaders do not compile, I get an useless error:

Engine.hx:168: BabylonHx - Cross-Platform 3D Engine | 2015 | www.babylonhx.com
Effect.hx:220:
Effect.hx:237: Unable to compile effect: terrainShader
Effect.hx:238: Defines: #define DIFFUSE

define NORMAL

define UV1

define HEMILIGHT0

define LIGHT0

Effect.hx:239: Error:

No more instances

When I try to create an instance from a mesh (HTML5).

Uncaught TypeError: com_babylonhx_Scene.activeMesh.get_isBlocked is not a function

Pickable InstancedMeshes

It's not possible (at least for me) to pick instanced meshes with Bhx. I tried a demo in the babylonjs playground, and there it works, but the same doesn't work with Bhx.

Android, lost/restore context

Hello, I am testing BabylonHx and it's working quite well on html5, congrats !

I have a problem on Android, when the device is rotated or the application put in the background the opengl context is lost.

openfl sends openfl.display.OpenGLView.CONTEXT_LOST and openfl.display.OpenGLView.CONTEXT_RESTORED events (flash.Lib.current.stage)

Is something planed to automatically restore the context?
If not what do you think is the best way to efficiently restore it by hand?

Thanks,
Laurent

Cpp Target

On Windows 10 for me Babylonhx is completely broken, because I don't see any meshes. ;)

When I comment out the box.material = mat; it runs, but the mesh is invisible.

scene.clearColor = new Color3(0, 0, 1);

this.scene = scene;

var dlight = new DirectionalLight("dlight", new Vector3(0, -1, 1), scene);
dlight.intensity = 0.7;     

var box = Mesh.CreateBox("mesh", 1, scene);
var mat = new StandardMaterial("mat", scene);
mat.diffuseColor = new Color3(1, 0, 0);
box.material = mat;

activeCam = new FreeCamera("freecam", new Vector3(0, 0, -4), scene);
activeCam.attachControl();

And when I apply the material there is this error:

Effect.hx:235: Unable to compile effect: default
Effect.hx:236: Defines:

define LIGHT0

define DIRLIGHT0

define NORMAL

define BonesPerMesh 0

define NUM_BONE_INFLUENCERS 0

Effect.hx:240: Error #: 0
Effect.hx:241: Error:

Another Basic Scene Failure

The basic scene test is failing for me, though with a different error:

PS C:\Users\Robert\Documents\Libs\BabylonHx-master> haxelib run lime test .\project.xml html5
com/babylonhx/physics/plugins/Body.hx:3: characters 7-24 : Type not found : oimohx.math.Mat33

Running "haxelib install oimophysics" does not fix the problem.

EDIT: This occurs when using lime.

Mouse Events problem

I've tried use scene.pick method from babylonjs docs, but it always returns pickedMesh is null. It happens on Android, on HTML5 target all is right.

RigidBody and Tools Errors

I'm getting these syntax errors in Flash Develop for RigidBody.hx in OimoHx and Tools.hx in BabylonHx.

oimohx/physics/dynamics/RigidBody.hx:342: characters 41-63 : Parameter default value should be constant
oimohx/physics/dynamics/RigidBody.hx:39: characters 0-5 : Defined in this class
com/babylonhx/tools/Tools.hx:81: characters 10-33 : haxe.Timer does not have a constructor
com/babylonhx/tools/Tools.hx:39: characters 26-31 : Defined in this class

I haven't gotten around to using either of these feature, but I was wondering if this will be an issue.

Oimohx dependecies and types not found

Hello,

After following your instructions, here are the issues I have got:

First: you have forgot to mention the need of Oimohx: https://github.com/vujadin/OimoHx

Secondly, after I put the Oimohx folder in the main folder (from your repository), an other issue occured:

src/samples/Instances2.hx:11: characters 7-45 : Type not found : com.babylonhxext.loaders.obj.ObjLoader
src/MainLime.hx:18: lines 18-164 : Defined in this class

I did not find any "loaders" folders in the folder com/babylonhx/

Have a good one.

Bug With Alpha Transparency

I think there is a bug in the alpha transparency for both textures and alpha itself. Take a look at this screenshot (https://www.dropbox.com/s/jru7a1joaa1qyyv/bhxbug.jpg?dl=0). I added a PNG with transparency I made in Photoshop as a texture and set the hasAlpha to true. I get this odd yellow box both around and under the actual image. I see a similar result when I set alpha on a material that just has diffuseColor.

        var txtrButtonImg:Texture = new Texture(("assets/img/menubutton.png"), scGameScene);
        var stmMenuButtonMat:StandardMaterial = new StandardMaterial("MenuButtonMat", scGameScene);
        stmMenuButtonMat.emissiveTexture = txtrButtonImg;
        stmMenuButtonMat.emissiveTexture.hasAlpha = true;

I'm using emissiveTexture since I disabled lighting for the mesh I applied the image to....

Edit: So I tried using just a plain old diffuseTexture and that works correctly. I need the emissive texture though because the mesh is not affected by light.

BasicScene failure (lime)

Ubuntu 14.04 LTS x86 / Cloned Bhx today just now / installed Lime new frest today just now, etc. / Haxe 3.2.0.

When I run
$ haxelib run lime run project.xml html5
in the local Bhx clone,

it does open a new browser window, but nothing appears in it at all.

The javascript console has a couple of messages in it:
Uncaught TypeError: Cannot set property 'innerHTML' of null
Failed to load resource: the server responded with a status of 404 (Not Found)

BabylonHx + Ogre3D

What do you think about Ogre3D bindings for BabylonHx? I know Kha is attractive, but the documentation is scant and its a young engine. Ogre3D is well documented, has many tutorials, and has been around for awhile. It is also feature rich and modular. The latest 2.0 branch supports WebGL so we can make it work for web too. I was also "won over" by the MyGUI plugin that really makes making menus, etc very easy. Both are MIT licensed so its maintains the spirit of Open Source. I'm thinking my time would be better spent getting Haxe to work with these guys and was curious if you thought BHx would benefit.

BabylonHx and Kha

@vujadin I've been poking around in some of the BabylonHx code and noticed some compiler directives for Kha. Also, I found a thread from about a year ago where you had interest in integrating Kha into BabylonHx. What is the status of that? I am interested in the Kha framework and was curious what it could do for BabylonHx. I plan to make games for Android and iPhone so the more efficient the code, the better. Just curious what your thoughts were.

Black Meshes

When I import a babylon file, the mesh is always black, no matter if there are materials with our without textures. Same for importing obj files.

I remember once I got it work to import babylon scene with multimaterials.

Btw. I have to change the purejs tags to html5 in the Tools functions to prevent errors while loading images and obj files.

I use lime and HTML5.

BasicScene Failure (Windows)

I tried to build for windows but I am getting the following error:

Error: The specified target path "bin_lime/windows/cpp/bin/" does not exist

BabylonHx_Lime cpp error

When compiling for the windows target, I'm getting the following error:

./src/com/babylonhx/tools/Tools.cpp(1105) : error C2039: 'LoadImageA_dyn' : is not a member of 'com::babylonhx::tools::Tools_obj'

...\cpp\obj\include\com/babylonhx/tools/Tools.h(17) : see declaration of 'com::babylonhx::tools::Tools_obj'

I'm compiling via Flashdevelop with git head at "6ca0d742bafd41e0d9a291a59ddc32c432ccdb86".

iOS glitch

I cannot reproduce in simulator but I got a lot of glitches in iOS iPad3.

A lot of triangles disappear in my scene when I rotate the camera, not always the same, and sometimes everything is ok until I move the camera again…

BasicScene failure (nme)

Ubuntu 14.04 LTS x86 / Cloned Bhx today just now / installed nme+snow+etc new fresh today just now, etc. / Haxe 3.2.0.

(1) the build.nmml file says "Assets" when the dir name in the repo is "assets". Had to manually edit that first.

(2) doesn't build:
$ haxelib run nme build build.nmml
com/babylonhx/physics/plugins/Body.hx:3: characters 7-24 : Type not found : oimohx.math.Mat33
bin_nme/linux/haxe/ApplicationMain.hx:25: lines 25-230 : Defined in this class
com/babylonhx/math/Vector3.hx:137: characters 79-93 : Class<com.babylonhx.Engine> has no field Epsilon
com/babylonhx/math/Vector3.hx:137: characters 79-93 : Parameter default value should be constant
com/babylonhx/math/Vector3.hx:138: characters 32-51 : Class<com.babylonhx.tools.Tools> has no field WithinEpsilon
com/babylonhx/math/Vector3.hx:138: characters 87-106 : Class<com.babylonhx.tools.Tools> has no field WithinEpsilon
com/babylonhx/math/Vector3.hx:138: characters 142-161 : Class<com.babylonhx.tools.Tools> has no field WithinEpsilon
com/babylonhx/math/Vector3.hx:278: characters 22-38 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:278: characters 57-73 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:278: characters 92-108 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:278: characters 115-131 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:279: characters 22-38 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:279: characters 57-73 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:279: characters 92-108 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:279: characters 115-131 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:280: characters 22-38 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:280: characters 57-73 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:280: characters 92-108 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:280: characters 116-132 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:281: characters 22-38 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:281: characters 57-73 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:281: characters 92-108 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:281: characters 116-132 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:289: characters 16-32 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:289: characters 44-60 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:289: characters 72-88 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:289: characters 95-111 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:290: characters 16-32 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:290: characters 44-60 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:290: characters 72-88 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:290: characters 95-111 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:291: characters 16-32 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:291: characters 44-60 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:291: characters 72-88 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:291: characters 96-112 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:292: characters 16-32 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:292: characters 44-60 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:292: characters 72-88 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:292: characters 96-112 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:308: characters 25-41 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:308: characters 60-76 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:308: characters 95-111 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:309: characters 25-41 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:309: characters 60-76 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:309: characters 95-111 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:310: characters 25-41 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:310: characters 60-76 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:310: characters 95-111 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:314: characters 18-34 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:314: characters 46-62 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:314: characters 74-90 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:315: characters 18-34 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:315: characters 46-62 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:315: characters 74-90 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:316: characters 18-34 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:316: characters 46-62 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:316: characters 74-90 : com.babylonhx.math.Matrix has no field m
com/babylonhx/math/Vector3.hx:410: characters 23-40 : Class<com.babylonhx.math.Matrix> has no field FromValues
com/babylonhx/math/Vector3.hx:416: characters 20-34 : com.babylonhx.math.Matrix has no field multiply
com/babylonhx/math/Vector3.hx:422: characters 15-29 : com.babylonhx.math.Matrix has no field multiply
com/babylonhx/math/Vector3.hx:426: characters 52-58 : {+ invert : Void -> Unknown<0> } should be com.babylonhx.math.Matrix
com/babylonhx/math/Vector3.hx:426: characters 52-58 : For function argument 'transformation'
com/babylonhx/math/Vector3.hx:429: characters 6-25 : Class<com.babylonhx.tools.Tools> has no field WithinEpsilon
com/babylonhx/animations/Animatable.hx:46: characters 3-20 : com.babylonhx.animations.Animation has no field _target
com/babylonhx/animations/Animatable.hx:55: characters 7-39 : com.babylonhx.animations.Animation has no field targetProperty
com/babylonhx/animations/Animatable.hx:105: characters 19-36 : com.babylonhx.animations.Animation has no field animate
com/babylonhx/math/Plane.hx:43: characters 31-43 : com.babylonhx.math.Matrix does not have a constructor
superman@superlap4300:~/Dev/BabylonHx$ haxelib run nme build build.nmml flash
com/babylonhx/utils/typedarray/Float32Array.hx:21: characters 1-23 : Module nme.utils.Float32Array does not define type Float32Array
bin_nme/flash/haxe/ApplicationMain.hx:25: lines 25-230 : Defined in this class

Camera Controls

I have been playing around with cameras and need a little help understanding how they work. In BabylonJS and the examples here the cameras seem to respond to rotation changes by clicking the mouse without having to add any code that looks like it changes any parameters. When I try this in my example though, I get no movement. I am using the Main.hx for OpenFl from GitHub. The only thing I've removed the code related to createSquares().

I assume camera controls are (or can be) set with camera.attachControl(). How exactly do we use this method? In some examples I see a "this" variable is passed but I do not see the code that actually updates camera position.

I'm using a FreeCamera btw...

lime 'web' target should be 'html5'

the instructions say:

Download complete repo from https://github.com/vujadin/BabylonHx and navigate to folder where you have downloaded files.
Then run from cmd line:
haxelib run lime run project.xml web
this should build "BasicScene" sample and run it in your browser.

but this is what happens:

/BabylonHx$ haxelib run lime run project.xml web
Error: "web" is an unknown target

Compilation error

Compillation failing with the following error when trying to compile the openfl asset on windows:

./src/com/babylonhx/tools/Tools.cpp(1105): error C2039: 'LoadImageA_dyn': is not a member of 'com::babylonhx::tools::Tools_obj'
include\com/babylonhx/tools/Tools.h(17): note: see declaration of 'com::babylonhx::tools::Tools_obj'

BasicScene failure

Hello,

I followed the instructions on the main page of babylonhx.com, but I couldn't test "BasicScene" as I get the following errors on the command line:

$ haxelib run lime test project.xml html5
src/MainLime.hx:28: lines 28-98 : Field init is declared 'override' but doesn't override any field
src/MainLime.hx:148: lines 148-152 : Field onKeyDown overloads parent class with different or incomplete type
src/MainLime.hx:148: lines 148-152 : Different number of function arguments
src/MainLime.hx:142: lines 142-146 : Field onKeyUp overloads parent class with different or incomplete type
src/MainLime.hx:142: lines 142-146 : Different number of function arguments
src/MainLime.hx:100: lines 100-104 : Field onMouseDown overloads parent class with different or incomplete type
src/MainLime.hx:100: lines 100-104 : Different number of function arguments
src/MainLime.hx:112: lines 112-116 : Field onMouseMove overloads parent class with different or incomplete type
src/MainLime.hx:112: lines 112-116 : Different number of function arguments
src/MainLime.hx:106: lines 106-110 : Field onMouseUp overloads parent class with different or incomplete type
src/MainLime.hx:106: lines 106-110 : Different number of function arguments
src/MainLime.hx:118: lines 118-122 : Field onMouseWheel overloads parent class with different or incomplete type
src/MainLime.hx:118: lines 118-122 : Different number of function arguments
src/MainLime.hx:130: lines 130-134 : Field onTouchEnd overloads parent class with different or incomplete type
src/MainLime.hx:130: lines 130-134 : Different number of function arguments
src/MainLime.hx:136: lines 136-140 : Field onTouchMove overloads parent class with different or incomplete type
src/MainLime.hx:136: lines 136-140 : Different number of function arguments
src/MainLime.hx:124: lines 124-128 : Field onTouchStart overloads parent class with different or incomplete type
src/MainLime.hx:124: lines 124-128 : Different number of function arguments
src/MainLime.hx:154: lines 154-157 : Field onWindowResize overloads parent class with different or incomplete type
src/MainLime.hx:154: lines 154-157 : Different number of function arguments

This looks more like a technical issue about how latest version of haxe works right now since it gives an error like "Field init is declared 'override' but doesn't override any field".

Or am I missing a point? 😶

Type not found : oimohx.math.Mat33

I've been trying to get into haxe for years now. I really have made some good attempts. I even once had a project that could actually compile. For about five minutes. And that was a couple years ago.

Right now, I'm following your basic tutorial. The one that says to do

haxelib run lime test project.xml html5

And, on a fresh install of everything, all I get is

com/babylonhx/physics/plugins/Body.hx:3: characters 7-24 : Type not found : oimohx.math.Mat33

I found a couple other tickets for this issue, all of them closed without any real solution given. Will any of this ever just work ?

Compiler Error and OpenFL Woes Again

I have the BasicScene example working with OpenFL. I tried loading a .babylon file and the game compiles without error. When the program executes though I get a black screen and the trace inside the Load callback is never called. Here is the compiler error:

com/babylonhx/loading/SceneLoader.hx:14: lines 14-190 : Warning : Warning : maybe loop in static generation of com.babylonhx.loading.SceneLoader
com/babylonhx/loading/SceneLoader.hx:14: lines 14-190 : Warning : Warning : maybe loop in static generation of com.babylonhx.loading.SceneLoader
com/babylonhx/loading/SceneLoader.hx:14: lines 14-190 : Warning : Warning : maybe loop in static generation of com.babylonhx.loading.SceneLoader

FreeCamera

Controls does not work any more, neither Mouse nor Keyboard. I build with Lime.

Mouse with other Camera e.g. ArcRotateCamera is working.

openfl.utils.Float32Array

I saw that you mixed openfl.utils.Float32Array and Array and it currently prevents the compilation of Skeleton.hx and Effect.hx to html5

Is there something missing to switch everything to openfl.utils.Float32Array?

Alpha of 0.0

When I set the alpha of a material to 0.0 I would have expected the mesh to turn fully invisible, but it only looks mildly ghostly. Is this a bug? Also, interestingly enough, when I set the alpha to 0.0 or even 0.01, my 2D OpenFl content looks strange. The text fields are black boxes and the corners on rounded rectangles are blacked out as well.

Working with Camera and FOV

I am working on a GUI for BabylonHx. I think the best way to go about this is to put a plane in the camera's FOV and keep it there. We can then attach materials to serve as the GUI. It's been awhile since I did geometry and linear algebra so I was wondering if anyone has a resource on the subject matter. I need to calculate where to put the plane and keep it there so it doesn't look like its moving.

'precision' Errors when building from the latest GIT repo

Hiya,

Been having a lot of fun with your port (Very good work!!) , but since last night I get the following when building code that used to work fine. I noticed you've done a lot of updates so perhaps something a miss there?

For info, I get the same errors building for mac or web (via git repo of snow)..
My app builds/starts with errors below, screen goes grey, nothing working...

Anyway, keep up the good work, I'm a big fan ...


Effect.hx:222: ERROR: 0:11: 'precision' : syntax error: syntax error

Effect.hx:222: ERROR: 0:11: 'precision' : syntax error: syntax error

Effect.hx:239: Unable to compile effect: default
Effect.hx:240: Defines: #define DIFFUSE

define NORMAL

define UV1

define SHADOWS

define LIGHT0

Effect.hx:241: Error: ERROR: 0:11: 'precision' : syntax error: syntax error

Effect.hx:222: ERROR: 0:9: 'precision' : syntax error: syntax error

Effect.hx:222: ERROR: 0:9: 'precision' : syntax error: syntax error

Effect.hx:239: Unable to compile effect: default
Effect.hx:240: Defines: #define DIFFUSE

define NORMAL

define UV1

define LIGHT0

Effect.hx:241: Error: ERROR: 0:9: 'precision' : syntax error: syntax error

MainOpenfl Not Working

I re-cloned the repository and tried to build the OpenFL examples. The MainOpenfl class is not working for me. It builds but all I get is gray screen if I try to load the BasicScene sample. No error messages. The MainLime builds and works fine though.

Here is my project.xml for OpenFl builds:

   <meta title="BabylonHx_Openfl" package="com.babylonhx" version="1.0.0" company="Krtolica Vujadin" />
   <app main="MainOpenfl" file="BabylonHx_OpenFL" path="bin_openfl" />

   <window require-shaders="true" hardware="true" depth-buffer="true" stencil-buffer="true" antialiasing="0" />

    <source path="src" />

    <haxelib name="lime" />
    <haxelib name="openfl" />
    <haxelib name="actuate" />
    <haxelib name="poly2trihx" />

    <assets path="assets" exclude="*.svg" />
    <icon path="assets/lime.svg" />

</project>

Endless loop when camera is inside of a Mesh

If the camera (freecamera) is inside of a Mesh, it often results in an endless loop (freezing). I did not notice this on earlier versions. I tried with box and sphere.

Both cpp target and html5.

OpenFL demo problems

  1. PlayState does not exist.
  2. Created a new PlayState to work with. Screen was all black, so I made the bgColor on the FlxCamera transparent, now it looks like this:

flixel_babylon

(Black boxes behind otherwise transparent areas).

  1. Cannot compile from FlashDevelop (I get 'Type not found : JoystickEvent'); only from cmd.
    Seems to have something to do with OpenFL next/legacy settings, not sure what I'm doing wrong... I've tried using both '' and '' in my project.xml, but still won't work :(
  2. Not sure about this, but since you're using a FreeCamera in the BasicExample I figured it should be possible to use the mouse to rotate the camera - but that doesn't work.
  3. "Image 'assets/img/graygrad.jpg' doesn't exist!"

User Interfaces

I was wondering what user interfaces you guys use with BabylonHx. I have a game that I will need to collect a username and password from players. I've been trying to use StablexUI but no luck. I don't think its been updated in awhile so it isn't working. Are there any ways in Babylon itself to take user input?

openfl legacy compatibility

I can't compile anymore with the -Dlegacy flag to use openfl legacy rather than openfl 3. This used to work well but since I updated lime, openfl and babylonHx, there is issues when I try to compile with the -Dlegacy tag. I don't know if it is related to lime that do not consider openfl legacy as a lime alias case for compiler conditionnal flags anymore or if you changed something in the source code of babylonhx but, to make the compiler to work with openfl legacy, I had to perform changes in:

  • com.babylonhx.tools.Tools
    -com.babylonhx.Engine
    -com.babylonhx.utils.GL
    -all the com.babylonhx.utils.typedarray classes
    to add "#if openfl" compiler condition flags when necessary.
    I was able to do it for every classes except at two point of the com.babylonhx.tools.Tools class as openfl do not have an Image class (unlike lime) and I don't know what to use in replacment.
    Did you have some time to look at it? (I can make a pull request with the changes I already done if you want)

Create texture directly from bitmapdata

Is there a way to create a texture directly from a bitmapdata? Decause currently, I only see a way to create a texture with an url parametter (so the texture as to be embeded as an asset) but I would like to create textures and bumpmaps from a custom generated 2D image (but I won't go with GL procedural textures that won't fit my need here)...

Can't run windows examples and failing at simple Hello World

Hi there, new to haxe and wanted to try BabylonHx, it looks great.

The web demos work really good.
I tried to download the windows demos and I always get a window painted black. Are there any dependencies I am missing?

So I tried to get a simple application working...
(First of all: I managed to run the SimpleOpenGLView from OpenFL so using GL works fine on my machine).

I tired other source code examples but the fog one should be the simplest.
I pulled the code, copied it into the project and compilation with neko and windows works just fine.
When I run the project, I see a black screen again and see that somehow the shader compilation is failing. I fixed it quick and dirty because the cause was quite strange (see code further below). After that no further logs but i see a bluish clear color (default I think) and nothing more (in all examples I try). Changing clear color is working and a trace in rendering is printed but here's where I'm stuck...

Maybe there's something I am missing?!

Regards
Viktor

Here's some further information:

C:\HaxeToolkit\haxe>haxelib.exe list
actuate: [1.7.2]
hxcpp: [3.1.30]
hxsl: [2.0.3]
lime-tools: [1.4.0]
lime: [0.9.7]
openfl-html5: [1.4.2-beta]
openfl-native: [1.4.0]
openfl-samples: [1.3.0]
openfl-stage3d: [0.1.6]
openfl: 1.2.2 [1.4.0]
stage3d-glsl: [0.1.0]
svg: [1.0.7]

I'm getting this output if I run the project:

Effect.hx:214: No errors.

Effect.hx:214: No errors.

Effect.hx:221: Unable to compile effect: default
Effect.hx:222: Defines: 
#define LIGHT0
#define POINTDIRLIGHT0
#define UV1
Effect.hx:223: Optional defines: [#define FOG]

So I did this in Engine.hx:

...
var error:String = GL.getProgramInfoLog(shaderProgram);
        if (error != "" && error != "No errors.\n") {
            throw(error);
        }
...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.