0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2025-03-10 00:06:42 -04:00

Merge branch 'master' into topic/addBounds

This commit is contained in:
Mr Speaker 2014-06-13 12:55:32 -04:00
commit a461fc744f
4 changed files with 21 additions and 8 deletions

7
.npmignore Normal file
View file

@ -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

View file

@ -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. 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 bower install matter-js
#### Install using [NPM](https://www.npmjs.org/)
npm install matter-js
### Usage ### 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. 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.

View file

@ -1,14 +1,14 @@
{ {
"name": "Matter", "name": "matter-js",
"version": "0.8.0", "version": "0.8.0",
"license": "MIT", "license": "MIT",
"homepage": "http://brm.io/matter-js/", "homepage": "http://brm.io/matter-js/",
"author": "Liam Brummitt <liam@brm.io> (http://brm.io/)", "author": "Liam Brummitt <liam@brm.io> (http://brm.io/)",
"description": "a 2D rigid body physics engine for the web", "description": "a 2D rigid body physics engine for the web",
"main": "build/matter-0.8.0.min.js", "main": "build/matter-0.8.0.min.js",
"repository":{ "repository": {
"type" : "git", "type": "git",
"url" : "https://github.com/liabru/matter-js.git" "url": "https://github.com/liabru/matter-js.git"
}, },
"keywords": [ "keywords": [
"javascript", "javascript",
@ -32,5 +32,6 @@
"scripts": { "scripts": {
"dev": "npm install && grunt dev", "dev": "npm install && grunt dev",
"test": "grunt test" "test": "grunt test"
} },
"dependencies": {}
} }

View file

@ -42,10 +42,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 // 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.canvas = render.context.view;
render.container = new PIXI.DisplayObjectContainer(); render.container = new PIXI.DisplayObjectContainer();
render.stage = new PIXI.Stage(); render.stage = new PIXI.Stage();