Can we create sprite sheet from a svg sequence? - svg

Adobe animate can convert the animation into svg sequence, but, for some reason, it only can generate png spritesheet. Not only animate, but all the sprite sheet generators i found(like texture packer and other) can only generate png and other bitmap format sprite sheet. Is there a way i can merge this svgs into spritesheet?

Related

Calculate SVG viewBox to show full image?

I have a large SVG image (.svg file on my disk, not an element in a webpage) which has the viewBox parameter on the SVG element set to crop the image. Rather than cropping, I want to show the entire SVG image. How can I figure out what values I need to put in for height and width in order to show the full image without cropping or extra whitespace?

How to scale an SVG without losing contours in Easel.js?

I have an Easel.js-based canvas and a bunch of SVGs. When I put these SVGs on canvas as vector shapes and try to scale the whole canvas, some SVG contours become distorted / blurred.
Are there any ways to avoid such a behavior?
Problem:
SVG sample:
http://s000.tinyupload.com/index.php?file_id=88515840051764837348
EaselJS support in canvas is restricted to image-based rendering. Basically, it loads the SVG as a raster image. When you scale it, you aren't seeing it redraw the vector, but instead it scales like an image would. If you scale it above 100% it should be more obvious (it will get pixelly/blurry).
Not sure if you can work around this with an SVG source. You could bring paths into Adobe Animate, and export as raw EaselJS Graphics, which will scale more predictably.
Cheers,

How to play gif with Fabricjs?

I know fabricjs can play Video and sprite sheet, But I have a lot of gif files, can I play these gif directly with fabricjs? I am not able to find method in Fabricjs website.
According to specs about the Canvas 2DRenderingContext drawImage method,
Specifically, when a CanvasImageSource object represents an animated image in an
HTMLImageElement, the user agent must use the default image of the animation (the one
that the format defines is to be used when animation is not supported or is
disabled), or, if there is no such image, the first frame of the animation, when
rendering the image for CanvasRenderingContext2D APIs.
This means that only the first frame of our animated canvas will be drawn on the canvas.
This is because we don't have any control on animations inside an img tag.
And fabricjs is based on canvas API, thus regulated by the same rules.
The solution is you need to parse all the still-images from your animated gif and to export it as a sprite-sheet. You can then easily animate it in fabricjs thanks to the sprite class.

SVG text shift/text change animation

I'm new to SVG animation, I want to create this animation in SVG, and save it as an .svg file. How do I do it? I can create an static SVG file in illustrator but I want to animate it.

How to detect intersection with SVG shape in Fabric.js?

First of all see this example.
http://radykal.de/fabric/
I would like detect when the text is moving over the blue outline of the svg shape. The black shape is a SVG, which I am loading with loadSVGFromURL().
Currently I am using the isContainedWithinObject() method to detect if the text is contained within the svg shape, but its using the rectangular bounding box of the svg shape for detection.
Is it possible to detect it with the actual path of the svg image?
Thank you.

Resources