1 decade ago
by paulh
Has anyone done any speed tests on different ios devices to see which is fastest ?
Also does ejecta support collision for canvas drawn entities, if not, does cocoon allow that with impact?
1 decade ago
by amadeus
Anecdotally, I'd say Ejecta is probably a bit faster. Plus, with support for typed arrays coming soon, I think the speed increases could be even bigger.
Collision detection on any canvas app has to be done via the JS, so in Ejecta's case, with typed array support being added, you could potentially iterated much quicker.
1 decade ago
by paulh
when i mean canvas collision i mean an entity created via canvas line draws ...
1 decade ago
by dominic
Ejecta doesn&039;t currently support the Canvas' #isPointInPath()
method, if that's what you're referring too. Otherwise collision detection usually has little to do with drawing.
Since both, Ejecta and CocoonJS use the JavaScriptCore engine, and I believe Ejecta uses a newer one, Ejecta should be faster.
1 decade ago
by paulh
no im talking about say two circles drawn using
beginPath();
arc(75, 75, 10, 0, Math.PI*2, true);
closePath();
fill();
or similar which is created as an enitty and colides with similar entitites?
1 decade ago
by amadeus
Not sure what exactly you are referring to, however all entity collision is handled by impact internally and works both in Ejecta and CocoonJS.
However, canvas is inherently stateless. It only remembers the pixels you drew to it, nothing else about them.
Once you've drawn a circle to a canvas element, it has already forgotten that you drew a circle, all it remembers is a series of pixels that represent a circle. You have to keep a reference to that circle in your JS and then test against that.
1 decade ago
by paulh
Thanks amadeus, yes thats what i meant .. how do you go about referencing drawings then?
(or should i ask in help)
For example i draw a line from top left to bottom right of the screen, how would entities collide against it, or it be defined as an entity?
Page 1 of 1
« first
« previous
next ›
last »