Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
"object.values": "^1.0.3",
"randomstring": "^1.1.5",
"screenfull": "^3.0.2",
"three": "^0.84.0",
"three": "^0.111.0",
"webvr-polyfill": "^0.9.20",
"wordwrap": "^1.0.0",
"worker-loader": "^0.7.1",
Expand Down
4 changes: 2 additions & 2 deletions src/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ <h1>Konterball</h1>

<div class="choose-vr-mode-screen">
<div class="inner">
<div class="cardboard" id="cardboard"></div>
<div class="tilt">
<p>We're updating WebVR to WebXR. In the meantime, <span id="tilt"><span class="before"></span><span class="main">check out this experiment in 360</span></span>.
</p>
<p><span id="tilt"><span class="before"></span><span class="main">Try it without a headset</span></span> or <a href="https://webvr.info/" target="_blank"><span class="before"></span><span class="main">get set up in VR.</span></a></p>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/javascripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class PingPong {
this.loadModeChooserAnimation(),
this.loadingAnimation(),
]).then(() => {
this.setupVRButton();
this.introAnimation();
}).catch(e => {
console.warn(e);
Expand Down
8 changes: 4 additions & 4 deletions src/javascripts/three/OBJLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -663,11 +663,11 @@ OBJLoader.prototype = {

var buffergeometry = new BufferGeometry();

buffergeometry.addAttribute( 'position', new BufferAttribute( new Float32Array( geometry.vertices ), 3 ) );
buffergeometry.setAttribute( 'position', new BufferAttribute( new Float32Array( geometry.vertices ), 3 ) );

if ( geometry.normals.length > 0 ) {

buffergeometry.addAttribute( 'normal', new BufferAttribute( new Float32Array( geometry.normals ), 3 ) );
buffergeometry.setAttribute( 'normal', new BufferAttribute( new Float32Array( geometry.normals ), 3 ) );

} else {

Expand All @@ -677,7 +677,7 @@ OBJLoader.prototype = {

if ( geometry.uvs.length > 0 ) {

buffergeometry.addAttribute( 'uv', new BufferAttribute( new Float32Array( geometry.uvs ), 2 ) );
buffergeometry.setAttribute( 'uv', new BufferAttribute( new Float32Array( geometry.uvs ), 2 ) );

}

Expand Down Expand Up @@ -712,7 +712,7 @@ OBJLoader.prototype = {

}

material.shading = sourceMaterial.smooth ? SmoothShading : FlatShading;
material.flatShading = sourceMaterial.smooth ? SmoothShading : FlatShading;

createdMaterials.push(material);

Expand Down
5 changes: 3 additions & 2 deletions src/javascripts/three/VREffect.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
*/

import {Vector3, PerspectiveCamera} from 'three';
import {Vector2, Vector3, PerspectiveCamera} from 'three';

const VREffect = function ( renderer, onError ) {

Expand Down Expand Up @@ -59,7 +59,8 @@ const VREffect = function ( renderer, onError ) {

var scope = this;

var rendererSize = renderer.getSize();
var rendererSize = new Vector2();
renderer.getSize(rendererSize);
var rendererUpdateStyle = false;
var rendererPixelRatio = renderer.getPixelRatio();

Expand Down