kilon

Three.js

Recommended Posts

My project is ephestos, it uses smalltalk language to create a visual coding enviroment to make it possible for people not familiar with coding to create software with minimum amount of knowledge.

 

Ephestos started as a blender addon ( http://www.blender.org/ ) which I distributed via github ( https://github.com/kilon/Ephestos ) also using github as its main website ( http://kilon.github.io/Ephestos/ ) . Unfortunately I had a) hard time to implement the GUI api with own blender opengl warper called "bgl" B) ended up realising that I was using so many features of smalltalk that I could save a considerable amount of time if I ported the project from python to smalltalk. So I decided to port it to pharo ( http://www.pharo-project.org/home ) .  But again I was faced with the complexities of opengl and memory managment of C which made my life really hard. 

 

By that time I was already flirting with javascript , though more I learned javascript the more I considered it the worst language I have ever learned and added to that was the fragmentation of web technologies ( plus my dislike for anything operating outside programming languages see hmtl / css /xml etc) I was really impressed by the libraries and of course the avaibility of the web browser to the user in any platform plus the awesome amount of cool feature. Fortunately smalltalk has amber ( http://amber-lang.net/ ) which gives me the ability to have my cake ( IDE , language and other smalltalk features ) and eat it too ( uses javascript libraries and compiles to it )

 

What I want is to have both a 2d gui api and also 3d graphic api. What I am trying to achieve partly also is to create a web interface to blender ( probably through websockets) and of course a visual coding enviroment .I am considering several libraries that use webgl and fall back to canvas. I really like pixi but its clear I will be needing three.js too :)

 

Ps: Now that I think of it , maybe its better to ask at a three.js forum. I see 2 possibilities a) use just three.js B) hack pixi.js so its easy to mix with three.js

Share this post


Link to post
Share on other sites

Sounds like a really interesting project!

 

Definitely think you could tweak pixi to make it work in three.js. I guess you could make a pixi.js "container" object in three.js or make a three.js container in pixi.js. I have thought about doing this a few times as like you say, a nice 2D api would complement three.js awesome 3dness :) Let me know how it goes and if you need a hand I'd be happy to assist!

 

good luck!

Share this post


Link to post
Share on other sites

Sounds like a really interesting project!

 

Definitely think you could tweak pixi to make it work in three.js. I guess you could make a pixi.js "container" object in three.js or make a three.js container in pixi.js. I have thought about doing this a few times as like you say, a nice 2D api would complement three.js awesome 3dness :) Let me know how it goes and if you need a hand I'd be happy to assist!

 

good luck!

 

yeap does not sound like a bad idea at all , i will first get familiar with pixi.js and then slowly see if i can integrate more and more three.js in it.

 

Gread work by the way with this library :)

Share this post


Link to post
Share on other sites

You would have to rewrite all the rendering code in pixi to use three.js renderers. I wouldn't call that small "tweaks".

 

The easiest option IMO is to have two canvases (one with pixi on top for the gui, transparent) and one below using threejs for the world. But using PIXI just for a gui is overkill IMO.

Share this post


Link to post
Share on other sites

You would have to rewrite all the rendering code in pixi to use three.js renderers. I wouldn't call that small "tweaks".

 

The easiest option IMO is to have two canvases (one with pixi on top for the gui, transparent) and one below using threejs for the world. But using PIXI just for a gui is overkill IMO.

 

 

I am here to learn and receive advice. I did not know that it was possible to layer canvases using transparency this is very good news indeed. Though I was aware that a web page can have multiple canvases.

 

I just started learning web development but I am not new to coding.

 

Why you think that using pixi is overkill, actually for what I aim for nothing I have seen from web technology can reach the performance I may need in the future. Even the slightest demos seem to consume 30% cpu easily though webgl is opengl hence its gpu accelerated. I want to take advantage the latest of technologies and I want to give my user not only a smooth experience but also good performance.

 

I know that I cant expect much from a browser but I do believe things with browser swill only get better while desktop will continue to lose focus and attention as the web gets entagled more and more in our daily lives.

 

When I see webgl and asm.js its clear thing are moving toward the right direction and no longer a browser is considered just that thing that displayes your websites but slowly become an OS by itself and I dont mean ChromeOS or FirefoxOS but a full blown OS.

 

What would be your course of action ?

 

I see no reason to rewrite pixi so it uses three.js rather than allow pixi to coexist with three.js peacefully , I would not mind if the two are seperate for example. If I can layer them, problem solved at least at first instance. Then later on will see how I can make the mix between the two more fine grained.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.