From f9123f9e059956c29e5b95cd826aa931ead03837 Mon Sep 17 00:00:00 2001 From: Mr Speaker Date: Thu, 12 Jun 2014 22:00:18 -0400 Subject: [PATCH 1/2] Make background:'transparent' work like canvas renderer --- src/render/RenderPixi.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/render/RenderPixi.js b/src/render/RenderPixi.js index 59a9bbe9..2e546ff7 100644 --- a/src/render/RenderPixi.js +++ b/src/render/RenderPixi.js @@ -41,10 +41,11 @@ var RenderPixi = {}; } }; - var render = Common.extend(defaults, options); + var render = Common.extend(defaults, options), + transparent = !render.options.wireframes && render.options.background === 'transparent'; // init pixi - render.context = new PIXI.WebGLRenderer(render.options.width, render.options.height, render.canvas, false, true); + render.context = new PIXI.WebGLRenderer(render.options.width, render.options.height, render.canvas, transparent, true); render.canvas = render.context.view; render.stage = new PIXI.Stage(); From a12fbcb7102f249a1140697039b43eccf243ac8a Mon Sep 17 00:00:00 2001 From: liabru Date: Fri, 13 Jun 2014 10:09:44 +0100 Subject: [PATCH 2/2] publish to npm --- .npmignore | 7 +++++++ README.md | 6 +++++- package.json | 11 ++++++----- 3 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 .npmignore diff --git a/.npmignore b/.npmignore new file mode 100644 index 00000000..55b7f830 --- /dev/null +++ b/.npmignore @@ -0,0 +1,7 @@ +node_modules +npm-debug.log +doc +matter-doc-theme +build/matter-dev.js +build/matter-dev.min.js +demo/js/lib/matter-dev.js \ No newline at end of file diff --git a/README.md b/README.md index b59beae3..cdacf67a 100644 --- a/README.md +++ b/README.md @@ -87,10 +87,14 @@ Download [matter-0.8.0.js](https://github.com/liabru/matter-js/releases/download For the latest features try the [edge version (master)](https://raw.github.com/liabru/matter-js/master/build/matter.js), but it may not be fully stable. -#### Or install using [Bower](http://bower.io/) +#### Install using [Bower](http://bower.io/) bower install matter-js +#### Install using [NPM](https://www.npmjs.org/) + + npm install matter-js + ### Usage See [Demo.js](https://github.com/liabru/matter-js/blob/master/demo/js/Demo.js) and [DemoMobile.js](https://github.com/liabru/matter-js/blob/master/demo/js/DemoMobile.js) for many usage examples. diff --git a/package.json b/package.json index 44c7cd22..6c7addb7 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,14 @@ { - "name": "Matter", + "name": "matter-js", "version": "0.8.0", "license": "MIT", "homepage": "http://brm.io/matter-js/", "author": "Liam Brummitt (http://brm.io/)", "description": "a 2D rigid body physics engine for the web", "main": "build/matter-0.8.0.min.js", - "repository":{ - "type" : "git", - "url" : "https://github.com/liabru/matter-js.git" + "repository": { + "type": "git", + "url": "https://github.com/liabru/matter-js.git" }, "keywords": [ "javascript", @@ -32,5 +32,6 @@ "scripts": { "dev": "npm install && grunt dev", "test": "grunt test" - } + }, + "dependencies": {} }