{"id":15061050,"url":"https://github.com/samme/phaser-plugin-game-scale","last_synced_at":"2025-08-20T04:32:12.519Z","repository":{"id":32737630,"uuid":"140500792","full_name":"samme/phaser-plugin-game-scale","owner":"samme","description":"Scale or resize the game canvas. Phaser v3.15 only","archived":false,"fork":false,"pushed_at":"2024-07-10T23:12:34.000Z","size":337,"stargazers_count":37,"open_issues_count":2,"forks_count":3,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-12-17T05:56:55.804Z","etag":null,"topics":["phaser","phaser-plugin","phaser3","phaser3-plugin"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/phaser-plugin-game-scale","language":"JavaScript","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/samme.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,"governance":null}},"created_at":"2018-07-11T00:23:01.000Z","updated_at":"2024-12-08T16:18:13.000Z","dependencies_parsed_at":"2023-11-08T23:25:02.394Z","dependency_job_id":"e8ccdb36-3188-46a2-9988-8b1a8a22bf64","html_url":"https://github.com/samme/phaser-plugin-game-scale","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samme%2Fphaser-plugin-game-scale","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samme%2Fphaser-plugin-game-scale/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samme%2Fphaser-plugin-game-scale/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samme%2Fphaser-plugin-game-scale/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samme","download_url":"https://codeload.github.com/samme/phaser-plugin-game-scale/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230394228,"owners_count":18218707,"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":["phaser","phaser-plugin","phaser3","phaser3-plugin"],"created_at":"2024-09-24T23:08:36.017Z","updated_at":"2024-12-19T07:06:22.992Z","avatar_url":"https://github.com/samme.png","language":"JavaScript","readme":"Phaser 3 Game Scale Plugin\n==========================\n\nScale or resize the game canvas. [Demo][1]\n\nThis is for Phaser v3.15 (or earlier) only. Since Phaser 3.16 use the [Scale Manager][2] instead.\n\n[1]: https://codepen.io/samme/full/oQePbP/\n[2]: https://photonstorm.github.io/phaser3-docs/Phaser.Scale.ScaleManager.html\n\nModes\n-----\n\n- `fit` — scale the canvas up or down to fit the container, and within min/max lengths (if set).\n- `resize` — change the game dimensions to fit the container, and within min/max lengths (if set).\n- `resize-and-fit` — resize within min/max lengths, then scale the canvas to fit any remaining space within the container.\n- `none` — set the canvas scale to 100%.\n\nThe default mode is `fit`.\n\nUse\n---\n\n```javascript\nnew Phaser.Game({\n  // ...\n  plugins: {\n    global: [{\n      key: 'GameScalePlugin',\n      plugin: Phaser.Plugins.GameScalePlugin,\n      mapping: 'gameScale',\n      data: {/* See 'Configuration' */}\n    }]\n  }\n  // ...\n});\n```\n\nIf you're using ES6 modules, you can use the default export instead:\n\n```javascript\nimport GameScalePlugin from 'phaser-plugin-game-scale';\n\nnew Phaser.Game({\n  // ...\n  plugins: {\n    global: [{\n      key: 'GameScalePlugin',\n      plugin: GameScalePlugin,\n      mapping: 'gameScale',\n      data: {/* See 'Configuration' */}\n    }]\n  }\n  // ...\n});\n```\n\nSet the scale mode:\n\n```javascript\n// Within a scene:\nthis.gameScale.setMode('resize');\n```\n\nListen to a scene's `resize` event to react to game size changes.\n\nSee the [examples](./examples/) for details.\n\nConfiguration\n-------------\n\nThese are the default settings:\n\n```javascript\n{\n  debounce: false,\n  debounceDelay: 50,   // Debounce interval, in ms\n  maxHeight: Infinity,\n  maxWidth: Infinity,\n  minHeight: 0,\n  minWidth: 0,\n  mode: 'fit',\n  resizeCameras: true, // Resize each scene camera when resizing the game\n  snap: null,          // Snap interval, in px\n}\n```\n\n```javascript\n// Within a scene:\nthis.gameScale.configure({/* … */});\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamme%2Fphaser-plugin-game-scale","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamme%2Fphaser-plugin-game-scale","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamme%2Fphaser-plugin-game-scale/lists"}