mirror of
https://github.com/troisjs/trois.git
synced 2024-11-24 04:12:02 +08:00
wip
This commit is contained in:
parent
f81c9a6996
commit
971f37e29b
@ -9,9 +9,14 @@ interface ThreeInterface {
|
||||
export default defineComponent({
|
||||
// TODO: eventually extend Object3D
|
||||
// extends: Object3D,
|
||||
// inject: ['three'], // don't work with typescript, bug ?
|
||||
|
||||
// don't work with typescript, bug ?
|
||||
// but works in sub components (injection, not typescript)
|
||||
inject: ['three'],
|
||||
|
||||
setup() {
|
||||
// this works in sub component ??
|
||||
// this works with typescript in sub component
|
||||
// but setup is not called
|
||||
const three = inject('three') as ThreeInterface
|
||||
return { three }
|
||||
},
|
||||
|
@ -6,7 +6,6 @@ import Camera from './Camera'
|
||||
export default defineComponent({
|
||||
extends: Camera,
|
||||
name: 'OrthographicCamera',
|
||||
inject: ['three'],
|
||||
props: {
|
||||
left: { type: Number, default: -1 },
|
||||
right: { type: Number, default: 1 },
|
||||
|
@ -6,7 +6,6 @@ import Camera from './Camera'
|
||||
export default defineComponent({
|
||||
extends: Camera,
|
||||
name: 'PerspectiveCamera',
|
||||
inject: ['three'],
|
||||
props: {
|
||||
aspect: { type: Number, default: 1 },
|
||||
far: { type: Number, default: 2000 },
|
||||
|
Loading…
Reference in New Issue
Block a user