Enabling VR mode #42
-
|
First: Amazing work! Thanks. I'm discovering NGT and I'm trying to enabled the vr mode in the purpose of using NGT in the Quest Browser. I did set ngt canvas and it failed (of course...). HELP! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
|
@Gregory-Bach Thank you. I know nothing about VR unfortunately. Is there a way for me to get started on even with vanilla THREE.js example? |
Beta Was this translation helpful? Give feedback.
-
|
I tried the following: <ngt-canvas
vr
[shadows]="true"
[camera]="{ position: [-5, 5, 5], fov: 75 }"
[scene]="{ background: 'black' | color }"
(created)="onCreated($event)"
>
<ngt-ambient-light [intensity]="0.8"></ngt-ambient-light>
<ngt-point-light [intensity]="1" [position]="[0, 6, 0]"></ngt-point-light>
<ngt-soba-box>
<ngt-mesh-basic-material
[parameters]="{ wireframe: true }"
></ngt-mesh-basic-material>
</ngt-soba-box>
<ngt-soba-orbit-controls></ngt-soba-orbit-controls>
<ngt-stats></ngt-stats>
</ngt-canvas>onCreated($event: NgtCreatedState) {
document.body.appendChild(VRButton.createButton($event.renderer));
} |
Beta Was this translation helpful? Give feedback.
-
|
It works! |
Beta Was this translation helpful? Give feedback.

I tried the following:
This is the result. Give that a try?