Live data from Hacker News

Two.js

jonobr1.github.io

31–40 of 92 posts

Re: Two.js

#31
post #4

Earlier quoted context omitted.

It seems to me, that people in the Javascript world, like to constantly create new alternatives (or very similar) to existing frameworks or projects. It's not 100% a bad thing though.

Part of the problem is that companies started using github profiles as resumes.

Where's the problem?

Re: Two.js

#32
post #26

What I am struggling with, is the use case of a library like this. Is this oriented towards gaming or substitude something like d3.js or is it has a simplier api, for the developer than other libraries. Or is it a library to showcase the cool stuff that can be done with new technologies. I think the main difference and the selling point is that it is "renderer agnostic" but I don't understand the benefits of that.

[deleted]

Re: Two.js

#33
post #26

What I am struggling with, is the use case of a library like this. Is this oriented towards gaming or substitude something like d3.js or is it has a simplier api, for the developer than other libraries. Or is it a library to showcase the cool stuff that can be done with new technologies. I think the main difference and the selling point is that it is "renderer agnostic" but I don't understand the benefits of that.

Renderer-agnostic is nice, actually, when you need to support lots of different browsers.

Some mobile browsers can't do WebGL as fast as they do Canvas, for instance. Other browsers will have a huge speed advantage with WebGL.

I'm not sure if any are faster with SVG, or the relative performance between SVG and canvas. But being able to do some test renders quickly in all three modes should allow you to select the fastest for a particular browser.

Game developers are better off with a game-oriented library, IMO. Even if you used something like Two.JS to do your rendering, there are a lot of things still useful in a game library to justify using it -- and most games will need more than geometric figures.

Re: Two.js

#34
post #26

What I am struggling with, is the use case of a library like this. Is this oriented towards gaming or substitude something like d3.js or is it has a simplier api, for the developer than other libraries. Or is it a library to showcase the cool stuff that can be done with new technologies. I think the main difference and the selling point is that it is "renderer agnostic" but I don't understand the benefits of that.

it's for motion graphics. https://www.youtube.com/watch?v=2jTwX8jz-44

Re: Two.js

#35

Earlier quoted context omitted.

Part of the problem is that companies started using github profiles as resumes.

Where's the problem?

People keep reimplementing the same thing to the same "80%" completion level so they look good to employers, but the software is abandoned quickly once it has served its purpose as a personal branding tool.

Re: Two.js

#37

Is that project still alive ? Last two commits are from march this year and then there's nothing all the way back to july '14

Maybe the autor thinks it is complete. EDIT: Oh wait, is the author in this thread? He can answer that.

It is! I work on the dev branch and other branches when I'm making new changes. EDIT: I mostly use the library though (I use it everyday) rather than constantly develop new features.

Re: Two.js

#38
post #4

How this is different from fabricjs or snapsvg?

It seems to me, that people in the Javascript world, like to constantly create new alternatives (or very similar) to existing frameworks or projects. It's not 100% a bad thing though.

Some of my thinking behind rolling my own renderer: https://youtu.be/cOfEMWV_5Rc

Re: Two.js

#39

Interestingly WebGL is way slower than SVG and Canvas in this case (Chrome, rMBP): https://jonobr1.github.io/two.js/examples/particle-sandbox.h...

Yes! This is because when a shape is first created the WebGL Renderer draws the shape as a texture in Canvas2d and then uploads that texture to GL. The operations "Vertices" and "Scale" force each shape to be redrawn so there are a lot of textures being uploaded and deleted every frame this scenario. If you keep things to translation / rotation you can make the WebGL renderer push wayyyy more shapes than the other 2 renderers.

I'm currently developing a way to "cache" textures that don't change much so if you had a Two.Group that doesn't change much you can turn that into 1 texture. This will greatly increase performance as well. Thanks for checking it out!

#themoreyouknow

Post reply on HN