{"id":13744091,"url":"https://github.com/Reflejo/plum","last_synced_at":"2025-05-09T02:32:37.044Z","repository":{"id":3923719,"uuid":"5013672","full_name":"Reflejo/plum","owner":"Reflejo","description":"[unmaintained] Curve-based ActionScript 3 animation library","archived":false,"fork":false,"pushed_at":"2015-05-25T05:50:08.000Z","size":167,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-23T19:36:39.423Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"ActionScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Reflejo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-07-13T03:08:07.000Z","updated_at":"2017-02-06T09:13:32.000Z","dependencies_parsed_at":"2022-07-07T18:50:50.218Z","dependency_job_id":null,"html_url":"https://github.com/Reflejo/plum","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Reflejo%2Fplum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Reflejo%2Fplum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Reflejo%2Fplum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Reflejo%2Fplum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Reflejo","download_url":"https://codeload.github.com/Reflejo/plum/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":213768616,"owners_count":15635822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T05:01:02.947Z","updated_at":"2024-08-03T05:03:03.718Z","avatar_url":"https://github.com/Reflejo.png","language":"ActionScript","readme":"# Plum\n\nPlum is a library that helps you in the creation of curves and object animation through these ones. See [demo here](http://reflejo.github.com/plum/).\n\n## Basic syntax:\n\n```javascript\nvar animation:Animation = Plum.animate(\u003cdisplay object\u003e, \u003cpath\u003e, \u003coptions\u003e);\n```\n\n#### Parameters:\n\n * **display object**: The DisplayObject instance that you want to move through the bezier.\n * **path**: Any Parametric instance. This will be bezier itself (See \"Paths\" below)\n * **options**: Hash array with options. All options are optional and not present variables will take default values. These are the valid options:\n * **speed (uint)**: This is the speed that your displayobject will move. You MUST send your stage fps to make this precise (pixels per second) *(Default: 100)*\n * **fps (uint)**: Stage FPS, it is used to calculate speed. *(Default: 24)*\n * **start (uint)**: Start distance in px. (Could be negative) *(Default: 0)*\n * **paused (Boolean)**: Flag to start paused *(Default: false)*\n * **reversed (Boolean)**: Flag to start the animation backwards. *(Default: false)*\n * **orientToPath (Boolean)**: A common effect that designers/developers want is for a MovieClip/Sprite to orient itself in the direction of a Bezier path (alter its rotation). orientToBezier makes it easy.\n\n## Paths (aka \"Parametric\"):\n\nPaths are parametric ecuations. At this moment, the ones implemented are: CubicBezier \u0026 ComplexPath\n\n### CubicBezier:\t\n\n```javascript\nvar bezier:CubicBezier = new CubicBezier(\u003cpoint1\u003e, \u003ccontrol1\u003e, \u003ccontrol2\u003e, \u003cpoint2\u003e, \u003cparameterization\u003e);\n```\n\n#### Parameters:\n\n * **point1, control1, control2, point2 (Point)**: Anchors and control points that defines bezier ecuations.\n * **parameterization (Boolean)**: Parameterization method *(Default: Parametric.UNIFORM)* Options are:\n   * **Parametric.UNIFORM**: Spreads the global 't' values out uniformly based on the number of knots\n   * **Parametric.ARC_LENGTH**: The global t-distribution is based on the fraction of arclength of each line segment between knots to the total arc length.\n\n### ComplexPath:\n\nCraft comples paths with more than one Parametric.\n\n```javascript\nvar bezier:ComplexPath = new ComplexPath(\u003cpaths\u003e);\n```\n\n#### Parameters:\n\n * **paths (Array)**: Array of any Parametric instance.\n\n## Parametric methods:\n\n * **draw(graphics:Graphics, thickness:uint=1, color:uint=0xff0000, precision:Number=0.01, dotted:Boolean=false)**: Draw the path inside the given graphics.\n * **getPoint(t:Number):Point**: Get the point at given t (This will depend on parameterization).\n * **yAtX(x:Number):Array**: Get curve y located at given x (Could be more than one). Returns an Array of Objects {t: Number, y: Number}.\n * **arcLength**: Property that has the total curve length\n\n## Animation Object\n\n### Methods\n\n * **pause()**: Pause the animation at actual t.\n * **resume()**: Resume last t animation\n * **distance (Number)**: set/get the total distance of this object in the curve (It should be used to move objects)\n * **speed (uint)**: Set the speed of the display object, defined as px/s.\n * **reversed (Boolean)**: If true, Sets animation orientation to backawards (Could be changed at any time)\n\n# Demo\n\nSee [demo here](http://reflejo.github.com/plum/).\n \n## Author\n \nMartín Conte Mac Donell \u003cReflejo@gmail.com\u003e - [@fz](https://twitter.com/fz)\n","funding_links":[],"categories":["Frameworks"],"sub_categories":["Animation Framework"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FReflejo%2Fplum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FReflejo%2Fplum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FReflejo%2Fplum/lists"}