1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-24 04:12:02 +08:00

Setup for raycaster

This commit is contained in:
Sander Moolin 2021-03-22 09:30:56 -04:00
parent e66c347e69
commit 6bf383d6a6
3 changed files with 23 additions and 0 deletions

21
src/core/Raycaster.js Normal file
View File

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

View File

@ -5,3 +5,4 @@ export { default as Camera } from './PerspectiveCamera.js';
export { default as Group } from './Group.js'; export { default as Group } from './Group.js';
export { default as Scene } from './Scene.js'; export { default as Scene } from './Scene.js';
export { default as Object3D } from './Object3D.js'; export { default as Object3D } from './Object3D.js';
export { default as Raycaster } from './Raycaster.js';

View File

@ -7,6 +7,7 @@ export const TroisJSVuePlugin = {
'Camera', 'Camera',
'OrthographicCamera', 'OrthographicCamera',
'PerspectiveCamera', 'PerspectiveCamera',
'Raycaster',
'Renderer', 'Renderer',
'Scene', 'Scene',
'Group', 'Group',