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:
parent
e66c347e69
commit
6bf383d6a6
21
src/core/Raycaster.js
Normal file
21
src/core/Raycaster.js
Normal 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',
|
||||||
|
};
|
@ -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';
|
@ -7,6 +7,7 @@ export const TroisJSVuePlugin = {
|
|||||||
'Camera',
|
'Camera',
|
||||||
'OrthographicCamera',
|
'OrthographicCamera',
|
||||||
'PerspectiveCamera',
|
'PerspectiveCamera',
|
||||||
|
'Raycaster',
|
||||||
'Renderer',
|
'Renderer',
|
||||||
'Scene',
|
'Scene',
|
||||||
'Group',
|
'Group',
|
||||||
|
Loading…
Reference in New Issue
Block a user