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',
|
|
|
|
'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]);
|
|
|
|
});
|
|
|
|
},
|
|
|
|
};
|