Hacker Newsnew | past | comments | ask | show | jobs | submit | jonobr1's commentslogin

Yes, I often screen capture my work or use a Chrome Extension called Render Target to save my frames out for static use. My dribble account is mostly Two.js output: https://dribbble.com/shots/2058034-9-Squares-r6?list=users&o...

The project Anitype dynamically creates and stores gifs of Two.js scenes: http://anitype.com/entries


You can do quite a bit with "circles and squares". Two.js focuses on Path drawing and has robust SVG interpretation for complex vector shapes.

I've found the portability to be fantastic. For instance http://patatap.com runs svg on iOS and canvas on Android. Two.js makes it simple to run either on the fly.


You're not the only one! The dev Branch has this fixed so you can pass your own epsilon.


Hooray! Thanks for pointing it out :)


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


Why don't you draw directly your vertices in gl instead of create a tex ? And you could use optimisation of culling to be faster. (drawing object : front to back)


Because the eng team that implements WebGL on Chrome recommended this way. I have an implementation as you're describing as the first tag of Two.js. It actually was a 2D drawing API for Three.js initially..!


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


I really enjoyed this talk. Thanks.


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.


Oh and the commit from last Wednesday was three lines long


please stop trolling. I know you think you're on to something but you're really not.


How can someone who voices genuine concerns be a troll ? I was actually interested in this framework. Right now I'm torn between pixi.js and easel.js , this seemed like a viable alternative.

But before I start to invest time in a technology, I want to know if it's still alive.

This project is definitely not finished (text rendering), far from polished (slow webgl implementation, see this thread) and has not been improved in half a year.

Take a look at this: https://github.com/jonobr1/two.js/graphs/contributors

The whole thing was a one-man stunt and is obviously dead.

Oh, and saying "I work on the dev branch" when the dev branch is just as abandoned as the rest of the code is a blatant lie. https://github.com/jonobr1/two.js/commits/dev

Sorry, but stuff like this just makes me angry. The javascript world is full of throwaway projects that die after a few months/years. At the same time there are true gems with really elegant code. Easel, Pixi, SnapSvg, they are amazing. Advertisement for a project like this is unfair and spreads confusion.

If you need help, if you look for contributors, just say so. But don't pretend that your code is alive when it's actually cold legacy code.


Self-entitled much? If the library doesn't suit your needs, just move on. There's no need to throw a tantrum about how a framework isn't tailored to your exact specifications, and how people aren't working hard enough so you can "invest" your oh-so-precious time in their unpaid effort.


Submit a patch or go away if you have a problem. The world doesn't owe you free software.


You seem to have already concluded that a project that isn't seeing rapid, active development, is not suited for use.

There's a difference between "solid" and "moribund".


Sounds good, but I just looked at the dev branch. One small commit from 15 july 2015. then nothing till december '14 .

This project is absolutely dead


Perhaps you're confusing dead and stable?


Unfortunately, this is a library authored and maintain by one person, me. I'd love to get to text at some point, but until then you'll have to stick with DOM. Also, depending on your renderer you have full access to SVG, Canvas, and WebGL so you can write text with those APIs...

Some projects that use just animated 2D:

+ http://patatap.com/ + http://anitype.com/ + http://tether.plaid.co.uk/ (broken, sorry!) + http://vr.chromeexperiments.com

Interface stuff:

+ http://justareflektor.com/tech + https://dl.dropboxusercontent.com/u/1595444/experiments/anim...

These projects have had multi-million uniques throughout their existence. 3 other large scale projects coming out later this year that use Two.js..! And these are projects just made by me :P


Roughly, self updating html5 compliant browser.


Why self-updating? Is my version of Firefox non-"modern" simply because I install and update it through my operating system's package management system?


It is if you updated it recently.


Textures are in the works... Wanted to focus on drawing vector stuff first. As you noted there are many libraries that handle textures really well!


Awesome monsters!


Thanks :)


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: