Sketch-plugin | ImageOptim plugin for the Sketch app | Plugin library

 by   ImageOptim JavaScript Version: Current License: MIT

kandi X-RAY | Sketch-plugin Summary

kandi X-RAY | Sketch-plugin Summary

Sketch-plugin is a JavaScript library typically used in Plugin applications. Sketch-plugin has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

A Plugin for Sketch that compresses exported images using ImageOptim.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              Sketch-plugin has a low active ecosystem.
              It has 128 star(s) with 11 fork(s). There are 3 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 4 open issues and 0 have been closed. There are 2 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of Sketch-plugin is current.

            kandi-Quality Quality

              Sketch-plugin has 0 bugs and 0 code smells.

            kandi-Security Security

              Sketch-plugin has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              Sketch-plugin code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              Sketch-plugin is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              Sketch-plugin releases are not available. You will need to build from source code and install.
              Installation instructions are available. Examples and code snippets are not available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Sketch-plugin
            Get all kandi verified functions for this library.

            Sketch-plugin Key Features

            No Key Features are available at this moment for Sketch-plugin.

            Sketch-plugin Examples and Code Snippets

            No Code Snippets are available at this moment for Sketch-plugin.

            Community Discussions

            QUESTION

            Finding a pattern or formula to convert Sketch shape path points(json format) to svg path
            Asked 2018-Dec-02 at 15:26

            I am trying to find a pattern to convert Sketch shape points(json format) to svg path, as we know sketch files are just zip files, unzipping you will get json files. here are sample json codes

            ...

            ANSWER

            Answered 2018-Dec-02 at 15:26

            I don't have the full solution but a few good hints:

            Coordinates

            All layers seem to use a local coordinate system with x and y values between 0 and 1. So you need the layers size and position to calculate the coordinates used in SVG:

            xsvg = frame.x + xlayer * frame.width
            ysvg = frame.y + ylayer * frame.height

            Commands

            The mapping of commands is trickier as the Sketch system uses a model different from SVG. The main difference is: SVG uses commands to represent path segments (except for the starting M) while Sketch uses a list of points that are either sharp or soft corners. In order to derive the command, you need to look at two consecutive points. Let's call them p1 and p2:

            p1.hasCurveFrom = false and p2.hasCurveTo = false:

            That represents a straight line, thus the L command. The coordinate is taken from p2.point.

            p1.hasCurveFrom = true and p2.hasCurveTo = true:

            That represents a cubic spline, thus the C command. The three coordinates are taken from:

            1. p1.curveFrom
            2. p2.curveTo
            3. p2.point

            Further hints

            The path starts with an M command to p.point of the first point.

            The attribute "isClosed": true obviously indicates a closed path. Therefore, the commands end with Z to close the path.

            There are probably many more subtleties that I don't know.

            If you want to implement a full Sketch to SVG converter, you will also need to implement the different shape classes and not just triangle, oval and shapePath and you will need to take care of all the other attributes like isFlippedHorizontal, isFlippedVertical, rotation, cornerRadius, resizingType etc.

            Source https://stackoverflow.com/questions/53480454

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install Sketch-plugin

            Download and open ImageOptim.app.
            Download and open this plugin.
            Double click ImageOptim.sketchplugin to install the plugin.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/ImageOptim/Sketch-plugin.git

          • CLI

            gh repo clone ImageOptim/Sketch-plugin

          • sshUrl

            git@github.com:ImageOptim/Sketch-plugin.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link