diff --git a/README.md b/README.md index 50fbee1..dcb6f6a 100644 --- a/README.md +++ b/README.md @@ -57,14 +57,29 @@ I will try to rewrite some of my [WebGL demos](https://codepen.io/collection/AG I first made a simple *Proof of Concept*, take a look at [Test1.vue](/src/components/Test1.vue) : ```html - - - - - - - - + + + ``` ## InstancedMesh diff --git a/src/plugin.js b/src/plugin.js new file mode 100644 index 0000000..53f3def --- /dev/null +++ b/src/plugin.js @@ -0,0 +1,42 @@ +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]); + }); + }, +};