Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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 4.0.0 to 4.1.0

2

doc/api.md

@@ -236,3 +236,3 @@ **Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*

See [node-vec2d](https://github.com/superjoe30/node-vec2d)
See [node-vec2d](https://github.com/andrewrk/node-vec2d)

@@ -239,0 +239,0 @@ ## Animation

# History
## 4.1.0
* Smoother main loop
## 4.0.0

@@ -4,0 +8,0 @@

@@ -96,5 +96,7 @@ var Vec2d = require('vec2d').Vec2d;

var previousUpdate = (new Date()).getTime();
self.animationFrameId = requestAnimationFrame(mainLoop, self.canvas);
var previousDraw = (new Date()).getTime();
doUpdate();
function mainLoop(timestamp) {
function doUpdate() {
var timestamp = new Date().getTime();
var delta = (timestamp - previousUpdate) / 1000;

@@ -111,2 +113,8 @@ previousUpdate = timestamp;

self.btnJustReleased = {};
self.animationFrameId = requestAnimationFrame(doDraw, self.canvas);
}
function doDraw(timestamp) {
var delta = (timestamp - previousDraw) / 1000;
previousDraw = timestamp;
self.emit('draw', self.context);

@@ -116,3 +124,3 @@ var fps = 1 / delta;

self.fps = self.fps * fpsSmoothness + fps * fpsOneFrameWeight;
self.animationFrameId = requestAnimationFrame(mainLoop, self.canvas);
self.timeoutId = setTimeout(doUpdate, 0);
}

@@ -213,2 +221,3 @@ }

cancelAnimationFrame(self.animationFrameId);
clearTimeout(self.timeoutId);
}

@@ -215,0 +224,0 @@

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

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

@@ -11,3 +11,3 @@ "license": "MIT",

"type": "git",
"url": "git://github.com/superjoe30/chem.git"
"url": "git://github.com/andrewrk/chem.git"
},

@@ -14,0 +14,0 @@ "dependencies": {

@@ -15,3 +15,3 @@ ![chem](http://i.imgur.com/LZPbMwb.png)

your code which allows you to harness the power of code on [npm](https://npmjs.org/).
- Wiki Article: [Useful npm packages for games](https://github.com/superjoe30/chem/wiki/Useful-npm-packages-for-games)
- Wiki Article: [Useful npm packages for games](https://github.com/andrewrk/chem/wiki/Useful-npm-packages-for-games)
- Allows you to organize code modules using `require` and `module.exports` syntax.

@@ -57,3 +57,3 @@ * Everything from code to spritesheet is compiled automatically

See [chem-cli](http://github.com/superjoe30/chem-cli) for more information.
See [chem-cli](http://github.com/andrewrk/chem-cli) for more information.

@@ -187,9 +187,9 @@ ## Synopsis

Made in 7 days.
* [Meteor Attack](https://github.com/superjoe30/meteor-attack) -
* [Meteor Attack](https://github.com/andrewrk/meteor-attack) -
dodge meteors in space
* [Disinfecticide](https://github.com/superjoe30/disinfecticide) -
* [Disinfecticide](https://github.com/andrewrk/disinfecticide) -
use extreme measures to control a deadly disease outbreak.
* [holocaust](https://github.com/superjoe30/holocaust/) -
* [holocaust](https://github.com/andrewrk/holocaust/) -
rebuild society after a nuclear holocaust ravages the world
* [Dr. Chemical's Lab](https://github.com/superjoe30/dr-chemicals-lab/tree/master/javascript) -
* [Dr. Chemical's Lab](https://github.com/andrewrk/dr-chemicals-lab/tree/master/javascript) -
puzzle game that should have been an action game.

@@ -196,0 +196,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