You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The internal renderer is for prototyping purposes. Consider animating a SVG DOM node or a canvas, which supports arbitrary textures. This could look like a combination of a couple Stack Overflow answers:
The general set up will be the top link, running MJS with a custom DOM front-end, then extending it to bring in SVGs as shown in the second link. But instead of hiding the SVGs as shown in the second link, you'll keep them visible in the DOM and rotate and move the elements based on MJS' body positions. This could be a bit tricky since I think you'll need to translate MJS' center of mass x/y point for the body to rotate around, which might require some fussing since absolute positioning works from the top-left corner. I'll add a proof of concept when I have time.
Hi,
I have a question on svg bodies.
As i use a banana svg,i put a sprite on it , result will like this(There will be many banana.png on one image):
then,i got a suggest from #153
and i do this ,i can get a "right result" like this(Use different colors to mark different parts):
but,i find a tough problem,this spirte texture can not follow bodies move(bodies move , spirte texture no move)
code:
so what should i do
The text was updated successfully, but these errors were encountered: