mirror of
https://github.com/troisjs/trois.git
synced 2024-11-24 04:12:02 +08:00
wip
This commit is contained in:
parent
42cdb9fb53
commit
abcc930246
@ -1,5 +1,4 @@
|
|||||||
import { defineComponent, h } from 'vue';
|
import { defineComponent, h } from 'vue';
|
||||||
import { VRButton } from 'three/examples/jsm/webxr/VRButton.js';
|
|
||||||
import useThree from './useThree';
|
import useThree from './useThree';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
@ -47,10 +46,7 @@ export default defineComponent({
|
|||||||
this.renderer = this.three.renderer;
|
this.renderer = this.three.renderer;
|
||||||
this.renderer.shadowMap.enabled = this.shadow;
|
this.renderer.shadowMap.enabled = this.shadow;
|
||||||
|
|
||||||
this.pointer = this.three.pointer;
|
|
||||||
|
|
||||||
if (this.xr) {
|
if (this.xr) {
|
||||||
this.renderer.domElement.parentNode.appendChild(VRButton.createButton(this.renderer));
|
|
||||||
this.renderer.xr.enabled = true;
|
this.renderer.xr.enabled = true;
|
||||||
if (this.three.composer) this.renderer.setAnimationLoop(this.animateXRC);
|
if (this.three.composer) this.renderer.setAnimationLoop(this.animateXRC);
|
||||||
else this.renderer.setAnimationLoop(this.animateXR);
|
else this.renderer.setAnimationLoop(this.animateXR);
|
||||||
|
Loading…
Reference in New Issue
Block a user