1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-24 12:22:03 +08:00
trois/src/plugin.js

83 lines
1.5 KiB
JavaScript
Raw Normal View History

2020-09-18 23:08:28 +08:00
import * as TROIS from './index.js';
2020-09-19 03:52:39 +08:00
export const TroisJSVuePlugin = {
2020-09-18 23:08:28 +08:00
install: (app) => {
const comps = [
'Camera',
'PerspectiveCamera',
'Renderer',
'Scene',
'BoxGeometry',
2020-09-28 21:36:22 +08:00
'CircleGeometry',
'ConeGeometry',
'CylinderGeometry',
'DodecahedronGeometry',
'IcosahedronGeometry',
'LatheGeometry',
'OctahedronGeometry',
'PolyhedronGeometry',
'RingGeometry',
2020-09-18 23:08:28 +08:00
'SphereGeometry',
2020-09-28 21:36:22 +08:00
'TetrahedronGeometry',
'TorusGeometry',
'TorusKnotGeometry',
'TubeGeometry',
2020-09-18 23:08:28 +08:00
'AmbientLight',
2020-09-19 17:24:03 +08:00
'DirectionalLight',
2020-09-18 23:08:28 +08:00
'PointLight',
'SpotLight',
'BasicMaterial',
'LambertMaterial',
'PhongMaterial',
'PhysicalMaterial',
'ShaderMaterial',
'StandardMaterial',
'SubSurfaceMaterial',
2020-10-04 04:32:27 +08:00
'ToonMaterial',
2020-09-18 23:08:28 +08:00
'Box',
2020-09-28 21:00:10 +08:00
'Circle',
'Cone',
'Cylinder',
'Dodecahedron',
'Icosahedron',
2020-10-03 17:07:49 +08:00
'Mesh',
2020-09-28 21:00:10 +08:00
'Lathe',
'Octahedron',
2020-09-18 23:08:28 +08:00
'Plane',
2020-09-28 21:00:10 +08:00
'Polyhedron',
'Ring',
2020-09-18 23:08:28 +08:00
'Sphere',
2020-09-28 21:00:10 +08:00
'Tetrahedron',
2020-09-18 23:08:28 +08:00
'Text',
2020-09-28 21:00:10 +08:00
'Torus',
'TorusKnot',
'Tube',
2020-09-18 23:08:28 +08:00
2020-10-03 21:09:45 +08:00
'Gem',
2020-09-28 21:00:10 +08:00
'Image',
2020-09-19 17:24:03 +08:00
'InstancedMesh',
2020-10-03 20:41:08 +08:00
'MirrorMesh',
2020-10-04 03:26:12 +08:00
'RefractionMesh',
2020-09-19 18:16:16 +08:00
'Sprite',
2020-09-19 17:24:03 +08:00
2020-09-18 23:08:28 +08:00
'BokehPass',
'EffectComposer',
2020-09-20 02:29:53 +08:00
'FilmPass',
2020-09-21 15:15:15 +08:00
'HalftonePass',
2020-09-18 23:08:28 +08:00
'RenderPass',
2020-09-21 15:15:15 +08:00
'SAOPass',
2020-09-18 23:08:28 +08:00
'UnrealBloomPass',
2020-09-19 18:42:06 +08:00
'GLTFViewer',
2020-09-18 23:08:28 +08:00
];
comps.forEach(comp => {
app.component(comp, TROIS[comp]);
});
},
};