Socket
Socket
Sign inDemoInstall

chem

Package Overview
Dependencies
Maintainers
2
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chem - npm Package Compare versions

Comparing version 0.4.2 to 0.4.3

2

lib/engine.js

@@ -146,2 +146,3 @@ var vec2d = require('vec2d');

self.emit('buttondown', buttonId);
return self.bubbleEvent(event);
});

@@ -154,2 +155,3 @@ addListener(this.canvas, 'mouseup', function(event){

self.emit('buttonup', buttonId);
return self.bubbleEvent(event);
});

@@ -156,0 +158,0 @@ // keyboard input

2

package.json

@@ -5,3 +5,3 @@ {

"author": "Andrew Kelley <superjoe30@gmail.com>",
"version": "0.4.2",
"version": "0.4.3",
"main": "index.js",

@@ -8,0 +8,0 @@ "license": "MIT",

@@ -1,19 +0,42 @@

chem - html5 game engine optimized for rapid development
========================================================
# chem
canvas-based game engine and toolchain optimized for rapid development.
## Features
* Automatically creates a spritesheet for your assets and then
loads the assets at runtime.
* Provides convenient API for drawing animated sprites in a canvas
- Supports anchor points and rotation
* Write code in JavaScript or other compile-to-javascript
languages such as Coffee-Script.
* Uses [browserify](https://github.com/substack/node-browserify) to compile
your code which allows you to harness the power of code on [npm](https://npmjs.org/).
- For example, [A* search](https://github.com/superjoe30/node-astar)
- Allows you to organize code modules using `require` and `module.exports` syntax.
* Everything from code to spritesheet is compiled automatically
when you save.
* Handles main loop and frame skipping.
* Convenient API for keyboard and mouse input.
## Usage
# install chem command line interface
# install dependencies in ubuntu
sudo apt-get install libcairo2-dev
sudo npm install -g chem-cli
# create a new project
chem init <your_project_name>
# start with a nearly-empty project,
# such as a freshly created project from github with only a .git/ and README.md.
cd my-project
# run a development server which will automatically recompile your code,
# generate your spritesheets, and serve your assets
chem dev
# init the project with chem-cli
npm install chem-cli
./node_modules/.bin/chem init
# the `dev` command will run a development server which will automatically recompile your code,
# generate your spritesheets, and serve your assets.
# after running `init` above, simply:
npm run dev
# see more commands
chem
./node_modules/.bin/chem

@@ -24,4 +47,2 @@ See [chem-cli](http://github.com/superjoe30/chem-cli) for more information.

[See the demo in action.](http://www.superjoesoftware.com/temp/chem-readme-demo/public/index.html)
### Layout

@@ -153,4 +174,11 @@

See also [Meteor Attack demo](http://www.superjoesoftware.com/temp/chem-meteor-demo/public/index.html)
## Demo Projects Using Chem
* [Meteor Attack](https://github.com/superjoe30/meteor-attack) - dodge meteors in space
* [holocaust](https://github.com/superjoe30/holocaust/) -
rebuild society after a nuclear holocaust ravages the world
* [Dr. Chemical's Lab](https://github.com/superjoe30/dr-chemicals-lab/tree/master/javascript) -
PyWeek #14 entry, ported to chem
* [vapor](https://github.com/thejoshwolfe/vapor) - vaporware game. Not cool yet.
## Documentation

@@ -170,3 +198,3 @@

[browserify](https://github.com/substack/browserify/) with this as the
input file. Often this is set to `src/main`.
input file. Often this is set to `src/main.js`.

@@ -187,2 +215,11 @@ * `spritesheet`

#### Use any "compile to JS" language
Supported languages:
* JavaScript (obviously)
* [Coffee-Script](http://coffeescript.org/)
* [LiveScript](http://livescript.net/)
* [Coco](https://github.com/satyr/coco)
#### Getting Started

@@ -613,2 +650,8 @@

### 0.4.3
* proper bubbling of events for mouse events. (fixes hiding the cursor
when mouse down if you have `canvas.style.cursor = 'none'`)
### 0.4.2

@@ -615,0 +658,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc