Two.js
41–50 of 92 posts
Re: Two.js
#42Re: Two.js
#43Re: Two.js
#44What 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
#45what is meant by "modern web browsers"?
I guess it would be something along the lines of this quote from http://farukat.es/journal/2011/02/528-modern-browser : "A modern browser is any browser that: successfully renders a site that you just built using web standards, testing only in your browser of choice along the way, with all the essentials functioning well; without you having written any browser-specific hacks, forks or workarounds; and shows great per…
Re: Two.js
#46Re: Two.js
#47I'm looking for a library that can create a calligraphic shape (path) from a stroke path.
Or do you need the precise bezier-curves for the stroke outline? For that you need to do some computation.
Re: Two.js
#48What 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 fas…
Re: Two.js
#49Earlier quoted context omitted.
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 fas…
I love SVG support because it means you can render something in vector art in the browser which is also downloadable as a file by the user. Drawing stuff in the browser which is then stuck there is cute but lacks an important layer of interoperability with the rest of the computing ecosystem. So here we appear to get the best of all worlds: render to whatever is fastest in the browser but get automatic "export as SVG…
Re: Two.js
#50Why Vector.isZero() is checking whether a vector length is smaller than 0.0001? Why this arbitrary number and not e.g. 0.00000001?
(0.3 - 0.1 - 0.1 - 0.1) === 0.0
> false
0.3 - 0.1 - 0.1 - 0.1
> -2.7755575615628914e-17
In order to get helpful results, we're gonna have to pick some semi-arbitrary epsilon. Still, my problem domain might require a different epsilon than they expect; even if they have a default, the API should allow me to specify my own choice of epsilon.They might also want to consider being more nuanced for the equals method than just taking the difference and comparing to zero. See http://floating-point-gui.de/errors/comparison/