mirror of
https://github.com/liabru/matter-js.git
synced 2024-12-23 13:19:01 -05:00
add matter-wrap as dev dependency
This commit is contained in:
parent
7b00354409
commit
ef7c4c60b8
6 changed files with 34 additions and 7 deletions
|
@ -1,9 +1,13 @@
|
|||
var Example = Example || {};
|
||||
|
||||
Example.avalanche = function() {
|
||||
Matter.use(
|
||||
'matter-wrap'
|
||||
);
|
||||
if (typeof require !== 'undefined') {
|
||||
// either require the plugin directly (Node.js, Webpack etc.)
|
||||
Matter.use(require('matter-wrap'));
|
||||
} else {
|
||||
// or by name from plugin registry (Browser global)
|
||||
Matter.use('matter-wrap');
|
||||
}
|
||||
|
||||
var Engine = Matter.Engine,
|
||||
Render = Matter.Render,
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
var Example = Example || {};
|
||||
|
||||
Example.ballPool = function() {
|
||||
Matter.use(
|
||||
'matter-wrap'
|
||||
);
|
||||
if (typeof require !== 'undefined') {
|
||||
// either require the plugin directly (Node.js, Webpack etc.)
|
||||
Matter.use(require('matter-wrap'));
|
||||
} else {
|
||||
// or by name from plugin registry (Browser global)
|
||||
Matter.use('matter-wrap');
|
||||
}
|
||||
|
||||
var Engine = Matter.Engine,
|
||||
Render = Matter.Render,
|
||||
|
|
6
package-lock.json
generated
6
package-lock.json
generated
|
@ -7612,6 +7612,12 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"matter-wrap": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/matter-wrap/-/matter-wrap-0.2.0.tgz",
|
||||
"integrity": "sha512-Gp3tETlN6uZftc1Jnv1sogQd8uB2Xh4c5bQ18qKR6KOMfUlsS8vztrC1vDrZS8eg4MuwE1AgZEcwxI41BSW6oQ==",
|
||||
"dev": true
|
||||
},
|
||||
"pathseg": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/pathseg/-/pathseg-1.2.0.tgz",
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
"jest-worker": "^24.9.0",
|
||||
"json-stringify-pretty-compact": "^2.0.0",
|
||||
"matter-tools": "^0.12.3",
|
||||
"matter-wrap": "^0.2.0",
|
||||
"pathseg": "^1.2.0",
|
||||
"poly-decomp": "^0.3.0",
|
||||
"puppeteer-core": "^5.5.0",
|
||||
|
@ -39,7 +40,7 @@
|
|||
"build-alpha": "webpack --mode=production --env.ALPHA & webpack --mode=production --env.MINIMIZE --env.ALPHA",
|
||||
"build-examples": "webpack --config webpack.examples.config.js --mode=production & webpack --config webpack.examples.config.js --mode=production --env.MINIMIZE",
|
||||
"build-examples-alpha": "webpack --config webpack.examples.config.js --mode=production --env.ALPHA & webpack --config webpack.examples.config.js --mode=production --env.MINIMIZE --env.ALPHA",
|
||||
"build-demo": "mkdir -p demo/lib && cp node_modules/matter-tools/build/matter-tools.demo.js demo/lib & cp node_modules/matter-tools/build/matter-tools.gui.js demo/lib & cp node_modules/matter-tools/build/matter-tools.inspector.js demo/lib & cp node_modules/pathseg/pathseg.js demo/lib & cp node_modules/poly-decomp/build/decomp.js demo/lib",
|
||||
"build-demo": "mkdir -p demo/lib && cp node_modules/matter-tools/build/matter-tools.demo.js demo/lib & cp node_modules/matter-tools/build/matter-tools.gui.js demo/lib & cp node_modules/matter-tools/build/matter-tools.inspector.js demo/lib & cp node_modules/pathseg/pathseg.js demo/lib & cp node_modules/poly-decomp/build/decomp.js demo/lib & cp node_modules/matter-wrap/build/matter-wrap.js demo/lib",
|
||||
"lint": "eslint 'src/**/*.js' 'demo/js/Demo.js' 'demo/js/Compare.js' 'examples/*.js' 'webpack.*.js'",
|
||||
"doc": "yuidoc --config yuidoc.json --project-version $npm_package_version",
|
||||
"test": "npm run test-node",
|
||||
|
|
|
@ -32,6 +32,12 @@ License ${pkg.license}${!minimize ? '\n\n' + license : ''}`;
|
|||
commonjs2: 'poly-decomp',
|
||||
amd: 'poly-decomp',
|
||||
root: 'decomp'
|
||||
},
|
||||
'matter-wrap': {
|
||||
commonjs: 'matter-wrap',
|
||||
commonjs2: 'matter-wrap',
|
||||
amd: 'matter-wrap',
|
||||
root: 'MatterWrap'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -48,6 +48,12 @@ License ${pkg.license}${!minimize ? '\n\n' + license : ''}`;
|
|||
commonjs2: 'matter-js',
|
||||
amd: 'matter-js',
|
||||
root: 'Matter'
|
||||
},
|
||||
'matter-wrap': {
|
||||
commonjs: 'matter-wrap',
|
||||
commonjs2: 'matter-wrap',
|
||||
amd: 'matter-wrap',
|
||||
root: 'MatterWrap'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue