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 2.0.1 to 2.1.0

7

doc/api.md

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

- [draw(context)](#drawcontext)
- [clear()](#clear)
- [Engine](#engine)

@@ -245,2 +246,8 @@ - [methods](#methods)

#### clear()
Deletes all sprites in the batch.
See also Sprite::delete()
## Engine

@@ -247,0 +254,0 @@

4

doc/history.md
# History
## 2.1.0
* add Batch::clear()
## 2.0.1

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

@@ -34,1 +34,14 @@ module.exports = Batch;

};
Batch.prototype.clear = function(context) {
for (var i = 0; i < this.layers.length; ++i) {
var layer = this.layers[i];
if (!layer) continue;
for (var spriteIndex = 0; spriteIndex < layer.length; spriteIndex += 1) {
var sprite = layer[spriteIndex];
sprite.batch = null;
sprite['delete']();
}
}
this.layers = [];
};

2

lib/label.js

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

Label.prototype.delete = function() {
Label.prototype['delete'] = function() {
if (this.batch) this.batch.remove(this);
this.batch = null;
};

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

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

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

@@ -1,2 +0,2 @@

# chem
![chem](http://i.imgur.com/LZPbMwb.png)

@@ -3,0 +3,0 @@ canvas-based game engine and toolchain optimized for rapid development.

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