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-19 17:24:03 +08:00
|
|
|
'Image',
|
2020-09-18 23:08:28 +08:00
|
|
|
'Plane',
|
|
|
|
'Sphere',
|
|
|
|
'Text',
|
|
|
|
|
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',
|
|
|
|
'RenderPass',
|
|
|
|
'UnrealBloomPass',
|
|
|
|
];
|
|
|
|
|
|
|
|
comps.forEach(comp => {
|
|
|
|
app.component(comp, TROIS[comp]);
|
|
|
|
});
|
|
|
|
},
|
|
|
|
};
|