{"id":20285853,"url":"https://github.com/tpkn/animate-parallax","last_synced_at":"2026-05-12T09:35:50.806Z","repository":{"id":74204163,"uuid":"102508020","full_name":"tpkn/animate-parallax","owner":"tpkn","description":"Parallax for Adobe Animate","archived":false,"fork":false,"pushed_at":"2017-12-29T21:08:58.000Z","size":9277,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-14T08:12:54.769Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tpkn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-05T17:00:45.000Z","updated_at":"2023-08-02T06:45:04.000Z","dependencies_parsed_at":"2023-02-27T06:15:40.078Z","dependency_job_id":null,"html_url":"https://github.com/tpkn/animate-parallax","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/tpkn%2Fanimate-parallax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpkn%2Fanimate-parallax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpkn%2Fanimate-parallax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpkn%2Fanimate-parallax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tpkn","download_url":"https://codeload.github.com/tpkn/animate-parallax/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241780514,"owners_count":20019061,"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-11-14T14:29:13.680Z","updated_at":"2025-11-30T15:05:37.159Z","avatar_url":"https://github.com/tpkn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Animate Parallax\n\n\nSimple parallax for Adobe Animate\n\n![preview](https://github.com/tpkn/animate-parallax/raw/master/preview.gif)\n\n\n\n### Usage (code for Animate)\n```javascript\nvar config = {\n   canvas: document.getElementById('canvas'),\n   center: {x: 100, y: 100},\n   target: this.target,\n   mouse: {x_axis: true, reset_pos: true, easing: 0.018},\n   layers: [\n      {mc: this.layer0, width: 926, height: 330, offset: 50, scale: 1,   easing: 0.2}, \n      {mc: this.layer1, width: 926, height: 330, offset: 60, scale: 1.1, easing: 0.2}, \n      {mc: this.layer2, width: 926, height: 330, offset: 70, scale: 1.2, easing: 0.2}, \n      {mc: this.layer3, width: 926, height: 330, offset: 80, scale: 1.3, easing: 0.2}\n   ]\n}\n\nwindow.apx = new AnimateParallax(config);\n```\n\nEach layer could be scaled by both axis:\n```javascript\nlayers: [\n   {mc: this.layer0, scale_x: 1, scale_y: 0.5}\n]\n```\n\nBy default layers moves in the `opposite` to mouse (target) direction. To make them `follow` mouse, you could set one more property:\n```javascript\ndirection: {x: 'opposite', y: 'follow'}\n```\n\n\n### Config\n| Variable | Type | Description |\n|-------------|:-------------:|-------------|\n| canvas | DOM element | If not set, parallax will not react on mouse movement |\n| target | Object | If set, `mouseX` and `mouseY` would be replaced by `x/y-axis` from this object |\n| center | Object | Parallax center `{x,y}` point. If `false`, then using half of stage width and height |\n| direction | Object | `{x,y}`: `'opposite'` or `'follow'` |\n| autostart | Boolean | Autostart parallax action, `true` by default |\n| fps | Number | Refresh rate. By default = canvas fps |\n| mouse | Object | `x_axis`: `{Boolean}` - enable mouse x-axis\u003cbr /\u003e`y_axis`: `{Boolean}` - enable mouse y-axis\u003cbr /\u003e`reset_pos`: `{Boolean}` - when mouse leave the canvas object, reset parallax position to `center_x` and `center_y`\u003cbr /\u003e`easing`: `{Number}` - overrides layer easing |\n\n### Layer settings\n| Variable | Type | Description |\n|-------------|:-------------:|-------------|\n| mc | Object | Createjs object instance name |\n| width | Number | Layer width. If not set, `x-axis` would be ignored |\n| height | Number | Layer height. If not set, `y-axis` would be ignored |\n| offset | Number | Layer's max travel distance in both directions from parallax center |\n| scale | Number | Scale layer programmaticaly if you don't want to do that in Animate |\n| scale_x | Number | Overrides `scale` property |\n| scale_y | Number | Overrides `scale` property |\n| easing | Number | Smaller value = slower layer speed |\n\n### Public methods\n| Method | Type | Description |\n|-------------|:-------------:|-------------|\n| start | Function | - |\n| stop | Function | - |\n\n\n## Changelog \n#### 2017-12-27:\nAdded touch event support","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpkn%2Fanimate-parallax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftpkn%2Fanimate-parallax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpkn%2Fanimate-parallax/lists"}