{"id":15164293,"url":"https://github.com/phaserjs/editor-scripts-camera","last_synced_at":"2026-02-02T15:07:01.453Z","repository":{"id":232360833,"uuid":"783942333","full_name":"phaserjs/editor-scripts-camera","owner":"phaserjs","description":"Phaser Editor scripts for camera.","archived":false,"fork":false,"pushed_at":"2024-09-26T15:27:27.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-24T01:05:55.019Z","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/phaserjs.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}},"created_at":"2024-04-08T22:02:37.000Z","updated_at":"2024-09-26T15:27:32.000Z","dependencies_parsed_at":"2024-04-09T10:57:56.086Z","dependency_job_id":null,"html_url":"https://github.com/phaserjs/editor-scripts-camera","commit_stats":null,"previous_names":["phaserjs/editor-scripts-camera"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phaserjs%2Feditor-scripts-camera","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phaserjs%2Feditor-scripts-camera/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phaserjs%2Feditor-scripts-camera/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phaserjs%2Feditor-scripts-camera/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phaserjs","download_url":"https://codeload.github.com/phaserjs/editor-scripts-camera/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phaserjs%2Feditor-scripts-camera/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":257567221,"owners_count":22565910,"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-09-27T03:03:53.074Z","updated_at":"2026-02-02T15:07:01.405Z","avatar_url":"https://github.com/phaserjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Phaser Editor Camera Scripts (library)\n\n**Warning: This project is deprecated. It is now part of the [@phaserjs/editor-scripts-quick](https://www.npmjs.com/package/@phaserjs/editor-scripts-quick) library.**\n\nThis project contains a few Phaser Editor scripts for handling the camera.\n\nThese script nodes are very basic and may fit on any Phaser Editor 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- `@phaserjs/editor-scripts-core`\n- `@phaserjs/editor-scripts-simple-animations`\n\nTo install this in your game you have to install dependencies too:\n\n```\nnpm install @phaserjs/editor-scripts-core\nnpm install @phaserjs/editor-scripts-simple-animations\nnpm install @phaserjs/editor-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        \"@phaserjs/editor-scripts-core\",\n        \"@phaserjs/editor-scripts-simple-animations\",\n        \"@phaserjs/editor-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 files, JavaScript files, and TypeScript type definitions.\n* Add a `script` tag to the `index.html` file to load the `lib/phaserjs_editor_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 `@phaserjs/editor-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 `@phaserjs/editor-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 `@phaserjs/editor-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 `@phaserjs/editor-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%2Fphaserjs%2Feditor-scripts-camera","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphaserjs%2Feditor-scripts-camera","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphaserjs%2Feditor-scripts-camera/lists"}