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

43 lines
720 B
JavaScript
Raw Normal View History

2020-09-18 23:08:28 +08:00
import * as TROIS from './index.js';
export default {
install: (app) => {
const comps = [
'Camera',
'PerspectiveCamera',
'Renderer',
'Scene',
'BoxGeometry',
'SphereGeometry',
'AmbientLight',
'PointLight',
'SpotLight',
'BasicMaterial',
'LambertMaterial',
'PhongMaterial',
'PhysicalMaterial',
'ShaderMaterial',
'StandardMaterial',
'SubSurfaceMaterial',
'Box',
'InstancedMesh',
'Plane',
'Sphere',
'Text',
'BokehPass',
'EffectComposer',
'RenderPass',
'UnrealBloomPass',
];
comps.forEach(comp => {
app.component(comp, TROIS[comp]);
});
},
};