Catalog npm
Back to packageRELEASE DETAILS

0.1.3

npm

40phaser

Codecademy's new 404 page. WIP

404codecademylearn to codephaser
Published10 Jul 2019
Direct dependencies10
Transitive dependenciesNot calculated

README

Current package documentation

40Phaser

Code Style: Prettier Circle CI NPM version Powered by Phaser

Codecademy's fancy schmancy 404 page.

Usage

Install the 40phaser package on npm:

npm i 40phaser

Because this package requires image assets, you'll need to use a bundler like webpack or rollup to compile the script you use on your site. An example of this setup using rollup is included in this repo and used for local development.

In a webpage that already has Phaser available under window.Phaser, import and call the launch40Phaser function to start the game:

import { launch40Phaser } from "40phaser";

window.onload = () => {
    launch40Phaser();
};

Alternately, if Phaser isn't available globally, you may pass it to the game as phaser:

import { launch40Phaser } from "40phaser";
import phaser from "phaser";

window.onload = () => {
    launch40Phaser({ phaser });
};

Events

An on object may be provided to the launch40Phaser object with functions under end, game, and start -- corresponding to those three Phaser scenes in the game.

launch40Phaser({
    on: {
        game: action => console.log('[game]', action),   
    },
});

on.end

  • on.end("build-your-own"): User navigates to the the Learn Phaser course
  • on.end("game"): User restarts the game

on.game

  • on.game("death"): User dies by falling through the floor
  • on.game("jump"): User requests to jump
  • on.game("pause"): User unpauses
  • on.game("unpause"): User pauses

on.start

  • on.start("build-your-own"): User navigates to the Learn Phaser course
  • on.start("contribute"): User navigates to the GitHub repository
  • on.start("game"): User starts the game

Development

See Development.md! ✨

Contribution Guidelines

We'd love to have you contribute! Check the issue tracker for issues labeled Accepting PRs to find bug fixes and feature requests the community can work on. If this is your first time working with this code, the Good First issue label indicates good introductory issues.

Please note that this project is released with a Contributor Covenant. By participating in this project you agree to abide by its terms. See CODE_OF_CONDUCT.md.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 10

Native requirements
10 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
husky
Environment
{
  "local_name": "husky",
  "alias": false,
  "peer_metadata": null
}
^2.4.1development
eslint
Environment
{
  "local_name": "eslint",
  "alias": false,
  "peer_metadata": null
}
^5.16.0development
prettier
Environment
{
  "local_name": "prettier",
  "alias": false,
  "peer_metadata": null
}
^1.18.2development
http-server
Environment
{
  "local_name": "http-server",
  "alias": false,
  "peer_metadata": null
}
^0.11.1development
lint-staged
Environment
{
  "local_name": "lint-staged",
  "alias": false,
  "peer_metadata": null
}
^8.2.0development
eslint-config-airbnb
Environment
{
  "local_name": "eslint-config-airbnb",
  "alias": false,
  "peer_metadata": null
}
^17.1.0development
eslint-plugin-import
Environment
{
  "local_name": "eslint-plugin-import",
  "alias": false,
  "peer_metadata": null
}
^2.17.3development
eslint-config-prettier
Environment
{
  "local_name": "eslint-config-prettier",
  "alias": false,
  "peer_metadata": null
}
^5.0.0development
eslint-plugin-jsx-a11y
Environment
{
  "local_name": "eslint-plugin-jsx-a11y",
  "alias": false,
  "peer_metadata": null
}
^6.2.1development
eslint-config-airbnb-base
Environment
{
  "local_name": "eslint-config-airbnb-base",
  "alias": false,
  "peer_metadata": null
}
^13.1.0development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "ad5bd9c27ecfcbff460133d109b899e9450dc772",
  "tarball": "https://registry.npmjs.org/40phaser/-/40phaser-0.1.3.tgz",
  "fileCount": 25,
  "integrity": "sha512-eyeFHzQ3L0rYuYlrvk8OczW6RrX8Fjt1LdWwu264D054Y8s7YAimRmeLW0gd4u4d3Y8tHQoPHTHIViLHMFy7tg==",
  "signatures": [
    {
      "sig": "MEUCIQCcvwocL9uDGphC8mxp9o3P8kX2XKkbFI1kP2NuivYuHgIgEJ31/bbx8PrewPCFtIoU9y7IWMVAK0Ta6y1osjav7To=",
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
    }
  ],
  "unpackedSize": 66152,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJiF5CRA9TVsSAnZWagAAf4QP/1KfOZ5G901cglYpgrCd\nLTp8S1uIWC6l0OjVd86+7XCJMhhVxBBh6WtgdevcnpkQpHXFHYIRj+LWuPeG\n2yCCExlamWsMStrKbtrU27/894Q+Kl3+6u8jfiraE9dijzJGrHRW+9iKarha\nBTHNGud2mHJMVi5gV0TzYxuw96jVKyfQZWCNv1FpKYFVp1bnlzWvT/izU7Nm\n13fnC+I104/xguwWHHpmyKgsG34LxTSYBBC9bQIYR93PY3Itc3un5cce9wM8\nmgVq11eCQQdqoEtt//0Ty5nQLAryvfZVrnd96zlCY5blyKJqi9mkR6zgNNlX\njb+gQY3wlRNVODavOxaE1Fniz/nuPkks1OaOKKYMS/aNXu5C1MOKzna1C+rq\nAF6TAm26BDp9wVJcQNKSc/syfABp1iDBFaxbPS4W/KDzInOPEeT2hivtFiEH\nHQ8XQuKFPDR2r3V/en4+uhtMozTMGDaKbmRjep7+A9Qah494/1F/PaZ1XBK+\nvGkerQ/XS4GaKWcJcEipYwKhX602yp2p6Y0PNHJoQsCJlb3wZb81ZS7BWN5q\nVuUc5MgFFLCX+MRHsM90VDjO+sZ146wdemDabPtnfFJlndz/XyBO9i6SzoER\ngsJ5a3iR+o6rifykX0IR1z3C6EnxWcYYxllC+DbY45YuIbIb3pPdrgp9RZv9\nfyXQ\r\n=IggS\r\n-----END PGP SIGNATURE-----\r\n"
}

Repository

PENDING
codecademy/40phaser

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:58 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:ceec0bb0a66784b16a7cb5a120c27cf79b810b400a7cec017d3161ca38943b50

Other collected versions

1.1.126 May1.1.016 Feb1.0.025 Nov0.3.022 Jul0.2.18 Apr0.2.06 JanView all collected versions →