{"id":15177122,"url":"https://github.com/phasereditor2d/phasereditor2d-scripts-camera","last_synced_at":"2026-02-06T08:35:36.773Z","repository":{"id":210325494,"uuid":"726175564","full_name":"PhaserEditor2D/phasereditor2d-scripts-camera","owner":"PhaserEditor2D","description":"Camera scripts for Phaser Editor 2D","archived":false,"fork":false,"pushed_at":"2024-01-11T00:51:41.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-04T08:02:02.743Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/PhaserEditor2D.png","metadata":{"files":{"readme":"README.MD","changelog":"CHANGELOG.MD","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":"2023-12-01T17:39:22.000Z","updated_at":"2023-12-09T12:33:25.000Z","dependencies_parsed_at":"2024-10-20T20:20:10.346Z","dependency_job_id":null,"html_url":"https://github.com/PhaserEditor2D/phasereditor2d-scripts-camera","commit_stats":{"total_commits":26,"total_committers":1,"mean_commits":26.0,"dds":0.0,"last_synced_commit":"de40a3a316266cbe71d86f49bbdca7e3041e07b4"},"previous_names":["phasereditor2d/phasereditor2d-scripts-camera"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/PhaserEditor2D/phasereditor2d-scripts-camera","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhaserEditor2D%2Fphasereditor2d-scripts-camera","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhaserEditor2D%2Fphasereditor2d-scripts-camera/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhaserEditor2D%2Fphasereditor2d-scripts-camera/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhaserEditor2D%2Fphasereditor2d-scripts-camera/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PhaserEditor2D","download_url":"https://codeload.github.com/PhaserEditor2D/phasereditor2d-scripts-camera/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhaserEditor2D%2Fphasereditor2d-scripts-camera/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267827503,"owners_count":24150350,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-09-27T14:02:08.345Z","updated_at":"2026-02-06T08:35:36.306Z","avatar_url":"https://github.com/PhaserEditor2D.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Phaser Editor 2D Camera Scripts (library)\n\nThis project contains a few Phaser Editor 2D scripts for handling the camera.\n\nThese script nodes are very basic and may fit on any Phaser Editor 2D project.\n\nThe scripts are coded in TypeScript with ES modules.\n\n## Installing (NPM)\n\nThis package depends on the following packages:\n\n- `@phasereditor2d/scripts-core`\n- `@phasereditor2d/scripts-simple-animations`\n\nTo install this in your game you have to install dependencies too:\n\n```\nnpm install @phasereditor2d/scripts-core\nnpm install @phasereditor2d/scripts-simple-animations\nnpm install @phasereditor2d/scripts-camera\n```\n\nAlso, you should add this package to the `phasereditor2d.config.json` file in your project, in the `scripts` section:\n\n```json\n{\n    \"scripts\": [\n        \"@phasereditor2d/scripts-core\",\n        \"@phasereditor2d/scripts-simple-animations\",\n        \"@phasereditor2d/scripts-camera\",\n    ]\n}\n```\n## Installing (vanilla JavaScript)\n\n* Get the files in the [browser](./browser/) folder and copy them into your JavaScript project. It includes Phaser Editor 2D files, JavaScript files, and TypeScript type definitions.\n* Add a `script` tag to the `index.html` file to load the `lib/phasereditor2d_scripts_camera.js` file.\n\n## Summary\n\nThis library provides a couple of actions for handle the camera. As a reminder, an action is executed by an event script or another action.\n\nThe actions:\n\n* **Zoom Camera Action** - Executes the zoom camera effect.\n* **Shake Camera Action** - Executes the shake camera effect.\n* **Flash Camera Action** - Executes the flash camera effect.\n* **Fade Camera Action** - Executes the fade camera effect.\n* **Camera Start Follow Action** - The camera starts following the game object.\n* **Camera Stop Follow Action** - Stops the camera follow.\n\n## Zoom Camera Action\n\n*Class: `ZoomCameraAction`*\n\nThis action runs the [Zoom effect](https://newdocs.phaser.io/docs/3.70.0/focus/Phaser.Cameras.Scene2D.Camera-zoomTo) of the camera.\n\nYou can change how much the camera zooms with the **Zoom** property.\n\nYou can configure the duration and ease of the effect by adding the [Duration Config](https://github.com/PhaserEditor2D/phasereditor2d-scripts-simple-animations#duration-config) and [Ease Config](https://github.com/PhaserEditor2D/phasereditor2d-scripts-simple-animations#ease-config) components of the `@phasereditor2d/scripts-simple-animations` library.\n\n## Shake Camera Action\n\n*Class: `ShakeCameraAction`*\n\nThis action runs the [Shake effect](https://newdocs.phaser.io/docs/3.70.0/focus/Phaser.Cameras.Scene2D.Camera-shake) of the camera.\n\nYou can tweak the effect by setting the **Intensity**, **Force**.\n\nYou can configure the duration of the effect by adding the [Duration Config](https://github.com/PhaserEditor2D/phasereditor2d-scripts-simple-animations#duration-config) component of the `@phasereditor2d/scripts-simple-animations` library.\n\n## Flash Camera Action\n\n*Class: `FlashCameraActionScript`*\n\nThis action runs the [Flash effect](https://newdocs.phaser.io/docs/3.70.0/focus/Phaser.Cameras.Scene2D.Camera-flash) of the camera.\n\nYou can tweak the effect by setting the **Color** property. \n\nYou can configure the duration of the effect by adding the [Duration Config](https://github.com/PhaserEditor2D/phasereditor2d-scripts-simple-animations#duration-config) component of the `@phasereditor2d/scripts-simple-animations` library.\n\n## Fade Camera Action\n\n*Class: `FadeCameraActionScript`*\n\nThis action runs the [Fade effect](https://newdocs.phaser.io/docs/3.70.0/focus/Phaser.Cameras.Scene2D.Camera-fade) of the camera.\n\nYou can tweak the effect by setting the **Color** and **Fade Direction** properties. \n\nYou can configure the duration of the effect by adding the [Duration Config](https://github.com/PhaserEditor2D/phasereditor2d-scripts-simple-animations#duration-config) component of the `@phasereditor2d/scripts-simple-animations` library.\n\n## Camera Start Follow Action\n\n*Class: `CameraStartFollowActionScript`*\n\nWith this action the camera [starts following](https://newdocs.phaser.io/docs/3.70.0/focus/Phaser.Cameras.Scene2D.Camera-startFollow) the script's game object.\n\nYou can configure the moving effect with the **Round Pixels**, **Lerp X**, **Lerp Y**, **Offset X**, **Offset Y** parameters.\n\n## Camera Stop Follow Action\n\n*Class: `CameraStopFollowActionScript`*\n\nThis action stops the camera following of the script's game object.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphasereditor2d%2Fphasereditor2d-scripts-camera","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphasereditor2d%2Fphasereditor2d-scripts-camera","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphasereditor2d%2Fphasereditor2d-scripts-camera/lists"}