Skip to content

Commit

Permalink
Merge pull request #2 from WebXR-iOS/main
Browse files Browse the repository at this point in the history
update issues
  • Loading branch information
CrazyH2 authored Mar 21, 2024
2 parents 71cbfaf + f2861e1 commit 5e8ecdb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/screens/screenManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class ScreenManager {
};

renderScreen(screenGroup) {
this.root.scene.scene.background = new THREE.Color(0x000000);
this.root.scene.background = new THREE.Color(0x000000);

screenGroup.render(screenGroup.renderGroup);

Expand Down
8 changes: 4 additions & 4 deletions src/world/scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Scene {
var vrDisplay = this.top.vrDisplay;

// Create a three.js scene.
var scene = new THREE.Scene();
this.scene = new THREE.Scene();

// Create a three.js camera.
var camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 10000);
Expand All @@ -26,7 +26,7 @@ class Scene {
);
reticle.position.z = -0.5;
camera.add(reticle);
scene.add(camera);
this.scene.add(camera);

// Apply VR headset positional data to camera.
var controls = new THREE.DeviceOrientationControls(camera);
Expand All @@ -37,7 +37,7 @@ class Scene {

// Add a light and sky
var light = new THREE.DirectionalLight(0xffffff, 0.4);
scene.add( light );
this.scene.add( light );

// Kick off the render loop.
vrDisplay.requestAnimationFrame(animate);
Expand Down Expand Up @@ -69,7 +69,7 @@ class Scene {
controls.update();

// Render the scene.
effect.render(scene, camera);
effect.render(this.scene, camera);

// Keep looping.
vrDisplay.requestAnimationFrame(animate);
Expand Down

0 comments on commit 5e8ecdb

Please sign in to comment.