mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 15:52:40 +08:00
3ed9edfbc6
* phy framework * phy mat * framework/index.ts * a node can have more than one collider * rename physical to physics * fix * fix * support mix ts js * fix * fix problems in issue * fix * remove RigidBodyType, add DataFlow * useGravity, freezeRotation, isKinematic * raycasts * fit buildin-world raycast options * add contact material * lint * add rigid-body-component.ts * some improvements * improvements * fix bug
68 lines
1.4 KiB
JavaScript
68 lines
1.4 KiB
JavaScript
import * as fsJetpack from 'fs-jetpack';
|
|
import babel from 'rollup-plugin-babel';
|
|
import resolve from 'rollup-plugin-node-resolve';
|
|
import json from 'rollup-plugin-json';
|
|
import commonjs from 'rollup-plugin-commonjs';
|
|
|
|
const dest = './bin';
|
|
const file = 'cocos-3d.dev';
|
|
const moduleName = 'cocos3d';
|
|
|
|
fsJetpack.dir(dest);
|
|
|
|
export default {
|
|
input: './index.js',
|
|
|
|
output: [{
|
|
file: `${dest}/${file}.js`,
|
|
format: 'iife',
|
|
name: moduleName,
|
|
sourcemap: true
|
|
}],
|
|
|
|
plugins: [
|
|
resolve({
|
|
jsnext: true,
|
|
|
|
main: true,
|
|
|
|
extensions: ['.js', '.ts', '.json'],
|
|
}),
|
|
|
|
json({
|
|
preferConst: true,
|
|
}),
|
|
|
|
babel({
|
|
highlightCode: true,
|
|
|
|
extensions: ['.js', '.ts'],
|
|
|
|
presets: [
|
|
'@babel/preset-env',
|
|
'@babel/preset-typescript'
|
|
],
|
|
|
|
plugins: [
|
|
//'./rollup/babel-plugin-mix-ts-js',
|
|
['@babel/plugin-proposal-decorators', {
|
|
legacy: true
|
|
}],
|
|
['@babel/plugin-proposal-class-properties', {
|
|
loose: true
|
|
}],
|
|
],
|
|
|
|
ignore: [
|
|
'node_modules/**'
|
|
]
|
|
}),
|
|
|
|
commonjs({
|
|
namedExports: {
|
|
'cannon': ['CANNON']
|
|
}
|
|
}),
|
|
]
|
|
};
|