Softpedia
 


SCRIPTS CATEGORIES:



NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Peardrop CMS 0.2.3
  • CommaFeed 0.0.1
  • Squash
  • Pick-a-Color 1.1.5
  • MVIS Security Center 1....
  • EasyZoom 1.0.3
  • jQueryGantt
  • IMDBPHP 2.1.8
  • Dynamic WordPress Form ...
  • PathFinding.js 0.4.1
  • Home > Scripts > Graphics and Multimedia > Graphics and Animations

    jsBezier 0.5

    download button


    Downloads: 248  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    Website:

    License / Price:

    Platforms:

    Databases:

    Language:

    Last Updated:

    Category:
    Simon Porritt | More scripts
    code.google.com
    MIT License 

    Windows / Linux / Mac OS / BSD / Solaris
    N/A
    JavaScript
    February 1st, 2013, 15:04 GMT [view history]
    C: \ Graphics and Multimedia \ Graphics and Animations

     Read user reviews (0)  Refer to a friend  Subscribe

    jsBezier description

    A collection JavaScript helper functions to deal with Bezier curves

    Used mainly in jsPlub, they where built to be utilized with Bezier curves of arbitrary degree.

    Here are some key features of "jsBezier":

    Function List:
    · distanceFromCurve(point, curve) -- Calculates the distance that the given point lies from the given Bezier. Note that it is computed relative to the center of the Bezier, so if you have stroked the curve with a wide pen you may wish to take that into account! The distance returned is relative to the values of the curve and the point - it will most likely be pixels.
    · gradientAtPoint(curve, location) -- Calculates the gradient to the curve at the given location, as a decimal between 0 and 1 inclusive.
    · nearestPointOnCurve(point, curve) -- Calculates the nearest point to the given point on the given curve. The return value of this is a JS object literal, containing both the point's coordinates and also the location of the point (see above), for example: { point:{x:551,y:150}, location:0.263365 }.
    · pointOnCurve(curve, location) -- Calculates the coordinates of the point on the given Bezier curve at the given location.
    · pointAlongCurveFrom(curve, location, distance) -- Calculates the coordinates of the point on the given curve that is distance units from location. distance should be in the same coordinate space as that used to construct the Bezier curve. For an HTML Canvas usage, for example, distance would be a measure of pixels.
    · perpendicularToCurveAt(curve, location, length, distance) -- Calculates the perpendicular to the given curve at the given location. length is the length of the line you wish for (it will be centered on the point at location). distance is optional, and allows you to specify a point along the path from the given location as the center of the perpendicular returned. The return value of this is an array of two points: [ {x:...,y:...}, {x:...,y:...} ].

    Requirements:

    · JavaScript enabled on client side

    What's New in This Release: [ read full changelog ]

    · First release version of jsBezier.



    TAGS:

    Bezier curve | curve degree | curve point | Bezier | curve | draw

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM