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

91 lines
1.6 KiB
JavaScript

import * as TROIS from './index.js';
export const TroisJSVuePlugin = {
install: (app) => {
const comps = [
'Camera',
'PerspectiveCamera',
'Renderer',
'Scene',
'BoxGeometry',
'CircleGeometry',
'ConeGeometry',
'CylinderGeometry',
'DodecahedronGeometry',
'IcosahedronGeometry',
'LatheGeometry',
'OctahedronGeometry',
'PolyhedronGeometry',
'RingGeometry',
'SphereGeometry',
'TetrahedronGeometry',
'TorusGeometry',
'TorusKnotGeometry',
'TubeGeometry',
'AmbientLight',
'DirectionalLight',
'PointLight',
'SpotLight',
'BasicMaterial',
'LambertMaterial',
'MatcapMaterial',
'PhongMaterial',
'PhysicalMaterial',
'ShaderMaterial',
'StandardMaterial',
'SubSurfaceMaterial',
'ToonMaterial',
'Texture',
'CubeTexture',
'Box',
'Circle',
'Cone',
'Cylinder',
'Dodecahedron',
'Icosahedron',
'Mesh',
'Lathe',
'Octahedron',
'Plane',
'Polyhedron',
'Ring',
'Sphere',
'Tetrahedron',
'Text',
'Torus',
'TorusKnot',
'Tube',
'Gem',
'Image',
'InstancedMesh',
'MirrorMesh',
'RefractionMesh',
'Sprite',
'BokehPass',
'EffectComposer',
'FilmPass',
'FXAAPass',
'HalftonePass',
'RenderPass',
'SAOPass',
'SMAAPass',
'TiltShiftPass',
'UnrealBloomPass',
'ZoomBlurPass',
'GLTFViewer',
];
comps.forEach(comp => {
app.component(comp, TROIS[comp]);
});
},
};