How can I load a custom shape ( such as http://www.html5canvastutorials.com/kineticjs/html5-canvas-kineticjs-shape-tutorial/) with a Json file through Kinetic JS.
I managed to load normal shapes but for this one there’s no documentation.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Don’t use
Kinetic.Shapefor that, use aKinetic.Path. AKinetic.Pathgets adatamember that allows to specify the shape of a polygon using the SVG PathData format. The documentation on kineticjs.com unfortunately is very thin — the W3 site contains lots of examples worth checking out.Of course, this is not as flexible as code; however, it looks promising: This is exactly the same figure as in the custom shape tutorial, using only one
Kinetic.Path.