Support SVG animation

Support SVG animation
0.0 0

#1

Hi,
I found information that Cocos Creator 1.2 supports SVG vector format including static and animated graphics, but I have not found an example of using this feature.

How to use the svg in a Cocos Creator??
Thanks in advance for your reply :slight_smile:


#2

Anyone?? :worried:


#3

There’s no official support in cocos for svg.
Only community aid is present but for c++ here


#4

Graphics Drawing System
From Creator v0.7 to v1.1, the beloved cc.DrawNode API were always absent. In v1.2 let’s welcome cc.Graphics, a superior, fully upgraded version of graphic drawing API system. Besides covering all of cc.DrawNode’s functionality, cc.Graphics supports SVG vector format including static and animated graphics. You can get tens of thousands shared vector graphics from internet to spice up your game (be sure to check their license)! It’s also great for procedure graphic fans, let’s get started now!

cocos-creator-1-2-release-note

But here it is said that cc.Graphics supports SVG vector format including animated graphics… Is it not so?


#5

Maybe I should use some third-party library in Cocos Creator?


#6

Anyone… :worried:


#7

Sorry, my mistake. I seem to have forgotten that. :confused:
I think you can go ahead with cc.Graphic then…


#8

cc.Graphic includes only functions of drawing primitives and has no functions to work with SVG format. It is interesting that there is no working example. Really in the release note we were deceived? hm.


#9

http://cocos2d-x.org/docs/api-ref/creator/v1.5/classes/Graphics.html is showing code by code to manually code ourselves the drawing, as cookybreeed said are we really decieved?