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
Sketch looks like an ideal fast Canvas / WebGL solution but I'm just wondering how it might be possible to use SVG paths within Sketch?
What I mean by path is just a string as defined by SVG. My app uses SVG data paths to define its symbols. The symbol paths are then listed in a JSON file and deserialized into a JavaScript cache object. I would take care of this bit of code. This minimal pre-canvas usage of SVG is the only aspect of SVG my app is concerned with.
From here on the focus is on the canvas and I'm not sure if there is some facility in Sketch to take such a cached path and render it to the view? Here is how a path could be used:
path = new Path('M 100,100 h 50 v 50 h 50');
As another option the JSON file of symbol paths could also be converted into a structure that Sketch uses? As long as there is some way to then clone that structure and raster it to screen it would work. Also not sure if Sketch maintains any type of scenegraph of objects, which might make hit detection easier?
The text was updated successfully, but these errors were encountered:
I think this is out of scope for what Sketch is trying to do. Think of Sketch as a useful boilerplate for helping create what you described, but providing no concrete implementation - it takes the pain out of mouse/touch events and running and update loop, handling resizes and so on - your path example is quite specific though and would bloat the library unnecessarily.
It sounds like paper.js might be useful to you and certainly isn't incompatible with Sketch.
Also, the next release will allow for plugins so features like this could potentially be distributed as optional extras.
Sketch looks like an ideal fast Canvas / WebGL solution but I'm just wondering how it might be possible to use SVG paths within Sketch?
What I mean by path is just a string as defined by SVG. My app uses SVG data paths to define its symbols. The symbol paths are then listed in a JSON file and deserialized into a JavaScript cache object. I would take care of this bit of code. This minimal pre-canvas usage of SVG is the only aspect of SVG my app is concerned with.
From here on the focus is on the canvas and I'm not sure if there is some facility in Sketch to take such a cached path and render it to the view? Here is how a path could be used:
path = new Path('M 100,100 h 50 v 50 h 50');
As another option the JSON file of symbol paths could also be converted into a structure that Sketch uses? As long as there is some way to then clone that structure and raster it to screen it would work. Also not sure if Sketch maintains any type of scenegraph of objects, which might make hit detection easier?
The text was updated successfully, but these errors were encountered: