diff --git a/src/core/Raycaster.js b/src/core/Raycaster.js new file mode 100644 index 0000000..47e6952 --- /dev/null +++ b/src/core/Raycaster.js @@ -0,0 +1,21 @@ +import { watch } from 'vue'; +import { bindProp } from '../tools.js'; + +export default { + name: 'Raycaster', + inject: ['three'], + emits: ['created', 'ready'], + props: { + }, + // can't use setup because it will not be used in sub components + // setup() {}, + mounted() { + console.log('TODO: raycaster') + }, + methods: { + }, + render() { + return this.$slots.default ? this.$slots.default() : []; + }, + __hmrId: 'Raycaster', +}; diff --git a/src/core/index.js b/src/core/index.js index 4428c1e..93be142 100644 --- a/src/core/index.js +++ b/src/core/index.js @@ -5,3 +5,4 @@ export { default as Camera } from './PerspectiveCamera.js'; export { default as Group } from './Group.js'; export { default as Scene } from './Scene.js'; export { default as Object3D } from './Object3D.js'; +export { default as Raycaster } from './Raycaster.js'; \ No newline at end of file diff --git a/src/plugin.js b/src/plugin.js index 04e1bfa..f4f4e08 100644 --- a/src/plugin.js +++ b/src/plugin.js @@ -7,6 +7,7 @@ export const TroisJSVuePlugin = { 'Camera', 'OrthographicCamera', 'PerspectiveCamera', + 'Raycaster', 'Renderer', 'Scene', 'Group',