1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-24 04:12:02 +08:00
This commit is contained in:
Kevin Levron 2021-02-21 14:10:11 +01:00
parent 787b361b09
commit 6929700e97
5 changed files with 40 additions and 28 deletions

View File

@ -1,2 +1,7 @@
docs
screenshots
.eslintrc.js
.gitignore
index.html
rollup.config.js
vite.config.js

View File

@ -1,6 +1,6 @@
{
"name": "troisjs",
"version": "0.1.0",
"version": "0.1.1",
"scripts": {
"dev": "vite",
"build": "vite build",
@ -25,6 +25,7 @@
"eslint-plugin-standard": "^4.0.1",
"eslint-plugin-vue": "^6.2.2",
"rollup-plugin-vue": "^6.0.0-beta.10",
"rollup-plugin-terser": "^7.0.2",
"sass": "^1.26.10",
"vite": "^2.0.1"
},

View File

@ -1,4 +1,4 @@
import commonjs from '@rollup/plugin-commonjs';
// import commonjs from '@rollup/plugin-commonjs';
import vue from 'rollup-plugin-vue';
import buble from '@rollup/plugin-buble';
import { terser } from "rollup-plugin-terser";
@ -8,20 +8,25 @@ const input = 'src/export.js';
const external = [
'three',
'three/examples/jsm/controls/OrbitControls.js',
'three/examples/jsm/deprecated/Geometry.js',
'three/examples/jsm/loaders/GLTFLoader.js',
'three/examples/jsm/postprocessing/BokehPass.js',
'three/examples/jsm/postprocessing/EffectComposer.js',
'three/examples/jsm/postprocessing/FilmPass.js',
'three/examples/jsm/postprocessing/HalftonePass.js',
'three/examples/jsm/postprocessing/RenderPass.js',
'three/examples/jsm/postprocessing/Pass.js',
'three/examples/jsm/postprocessing/SAOPass.js',
'three/examples/jsm/postprocessing/SMAAPass.js',
'three/examples/jsm/postprocessing/ShaderPass.js',
'three/examples/jsm/postprocessing/UnrealBloomPass.js',
'three/examples/jsm/shaders/FXAAShader.js',
'gsap',
'vue',
];
const plugins = [
commonjs(),
// commonjs(),
vue(),
buble({
// transforms: { forOf: false },
@ -123,27 +128,27 @@ export default [
terser(),
],
},
{
input,
external,
output: {
format: 'cjs',
file: 'build/trois.js',
sourcemap: true,
},
plugins,
},
{
input,
external,
output: {
format: 'cjs',
file: 'build/trois.min.js',
sourcemap: true,
},
plugins: [
...plugins,
terser(),
],
},
// {
// input,
// external,
// output: {
// format: 'cjs',
// file: 'build/trois.js',
// sourcemap: true,
// },
// plugins,
// },
// {
// input,
// external,
// output: {
// format: 'cjs',
// file: 'build/trois.min.js',
// sourcemap: true,
// },
// plugins: [
// ...plugins,
// terser(),
// ],
// },
];

View File

@ -1,5 +1,4 @@
import {
BufferGeometry,
DoubleSide,
Face3,
InstancedBufferAttribute,

View File

@ -2,3 +2,5 @@ body {
margin: 0;
font-family: 'Montserrat', sans-serif;
}
body, html, #app, .app { height: 100%; }