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

65 lines
1.1 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',
'SphereGeometry',
'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',
'Box',
2020-09-28 21:00:10 +08:00
'Circle',
'Cone',
'Cylinder',
'Dodecahedron',
'Icosahedron',
'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-09-28 21:00:10 +08:00
'Image',
2020-09-19 17:24:03 +08:00
'InstancedMesh',
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]);
});
},
};