Skip to content
This repository has been archived by the owner on Jun 2, 2023. It is now read-only.

Commit

Permalink
Fix newer version of three js with cardboard effect
Browse files Browse the repository at this point in the history
  • Loading branch information
pchen66 committed Feb 21, 2017
1 parent 023dff2 commit b321e98
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"gulp-jsdoc3": "^1.0.0",
"gulp-strip-debug": "^1.1.0",
"gulp-uglify": "^1.5.2",
"three": "^0.78.0",
"three": "^0.84.0",
"tween.js": "^16.3.5",
"iphone-inline-video": "^1.9.3"
}
Expand Down
2 changes: 2 additions & 0 deletions src/lib/effects/CardboardEffect.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ THREE.CardboardEffect = function ( renderer ) {
var uvs = geometry.attributes.uv.array;

// duplicate
geometry.attributes.position.count *= 2;
geometry.attributes.uv.count *= 2;

var positions2 = new Float32Array( positions.length * 2 );
positions2.set( positions );
Expand Down

0 comments on commit b321e98

Please sign in to comment.