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({
|
export default defineComponent({
|
||||||
// TODO: eventually extend Object3D
|
// TODO: eventually extend Object3D
|
||||||
// extends: 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() {
|
setup() {
|
||||||
// this works in sub component ??
|
// this works with typescript in sub component
|
||||||
|
// but setup is not called
|
||||||
const three = inject('three') as ThreeInterface
|
const three = inject('three') as ThreeInterface
|
||||||
return { three }
|
return { three }
|
||||||
},
|
},
|
||||||
|
@ -6,7 +6,6 @@ import Camera from './Camera'
|
|||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
extends: Camera,
|
extends: Camera,
|
||||||
name: 'OrthographicCamera',
|
name: 'OrthographicCamera',
|
||||||
inject: ['three'],
|
|
||||||
props: {
|
props: {
|
||||||
left: { type: Number, default: -1 },
|
left: { type: Number, default: -1 },
|
||||||
right: { type: Number, default: 1 },
|
right: { type: Number, default: 1 },
|
||||||
|
@ -6,7 +6,6 @@ import Camera from './Camera'
|
|||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
extends: Camera,
|
extends: Camera,
|
||||||
name: 'PerspectiveCamera',
|
name: 'PerspectiveCamera',
|
||||||
inject: ['three'],
|
|
||||||
props: {
|
props: {
|
||||||
aspect: { type: Number, default: 1 },
|
aspect: { type: Number, default: 1 },
|
||||||
far: { type: Number, default: 2000 },
|
far: { type: Number, default: 2000 },
|
||||||
|
Loading…
Reference in New Issue
Block a user