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 docs
screenshots screenshots
.eslintrc.js
.gitignore
index.html
rollup.config.js
vite.config.js

View File

@ -1,6 +1,6 @@
{ {
"name": "troisjs", "name": "troisjs",
"version": "0.1.0", "version": "0.1.1",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "vite build", "build": "vite build",
@ -25,6 +25,7 @@
"eslint-plugin-standard": "^4.0.1", "eslint-plugin-standard": "^4.0.1",
"eslint-plugin-vue": "^6.2.2", "eslint-plugin-vue": "^6.2.2",
"rollup-plugin-vue": "^6.0.0-beta.10", "rollup-plugin-vue": "^6.0.0-beta.10",
"rollup-plugin-terser": "^7.0.2",
"sass": "^1.26.10", "sass": "^1.26.10",
"vite": "^2.0.1" "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 vue from 'rollup-plugin-vue';
import buble from '@rollup/plugin-buble'; import buble from '@rollup/plugin-buble';
import { terser } from "rollup-plugin-terser"; import { terser } from "rollup-plugin-terser";
@ -8,20 +8,25 @@ const input = 'src/export.js';
const external = [ const external = [
'three', 'three',
'three/examples/jsm/controls/OrbitControls.js', 'three/examples/jsm/controls/OrbitControls.js',
'three/examples/jsm/deprecated/Geometry.js',
'three/examples/jsm/loaders/GLTFLoader.js', 'three/examples/jsm/loaders/GLTFLoader.js',
'three/examples/jsm/postprocessing/BokehPass.js', 'three/examples/jsm/postprocessing/BokehPass.js',
'three/examples/jsm/postprocessing/EffectComposer.js', 'three/examples/jsm/postprocessing/EffectComposer.js',
'three/examples/jsm/postprocessing/FilmPass.js', 'three/examples/jsm/postprocessing/FilmPass.js',
'three/examples/jsm/postprocessing/HalftonePass.js', 'three/examples/jsm/postprocessing/HalftonePass.js',
'three/examples/jsm/postprocessing/RenderPass.js', 'three/examples/jsm/postprocessing/RenderPass.js',
'three/examples/jsm/postprocessing/Pass.js',
'three/examples/jsm/postprocessing/SAOPass.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/postprocessing/UnrealBloomPass.js',
'three/examples/jsm/shaders/FXAAShader.js',
'gsap', 'gsap',
'vue', 'vue',
]; ];
const plugins = [ const plugins = [
commonjs(), // commonjs(),
vue(), vue(),
buble({ buble({
// transforms: { forOf: false }, // transforms: { forOf: false },
@ -123,27 +128,27 @@ export default [
terser(), terser(),
], ],
}, },
{ // {
input, // input,
external, // external,
output: { // output: {
format: 'cjs', // format: 'cjs',
file: 'build/trois.js', // file: 'build/trois.js',
sourcemap: true, // sourcemap: true,
}, // },
plugins, // plugins,
}, // },
{ // {
input, // input,
external, // external,
output: { // output: {
format: 'cjs', // format: 'cjs',
file: 'build/trois.min.js', // file: 'build/trois.min.js',
sourcemap: true, // sourcemap: true,
}, // },
plugins: [ // plugins: [
...plugins, // ...plugins,
terser(), // terser(),
], // ],
}, // },
]; ];

View File

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

View File

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