Skip to content

Commit

Permalink
Update aframe-mirror-component.js
Browse files Browse the repository at this point in the history
Add to solve bug for release of aFrame 1.1. : THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.
https://threejs.org/docs/#api/en/cameras/CubeCamera
  • Loading branch information
netproject0 committed Jan 19, 2021
1 parent b0ac026 commit 5f6c59c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dist/aframe-mirror-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@
*/
init: function(){
this.counter = this.data.interval;

this.cam = new THREE.CubeCamera( 0.5, this.data.distance, this.data.resolution);
const cubeRenderTarget = new THREE.WebGLCubeRenderTarget( this.data.resolution, { format: THREE.RGBFormat, generateMipmaps: true, minFilter: THREE.LinearMipmapLinearFilter } );
this.cam = new THREE.CubeCamera( 0.5, this.data.distance, cubeRenderTarget);
this.el.object3D.add( this.cam );
this.mirrorMaterial = new THREE.MeshBasicMaterial( { color: this.data.color, refractionRatio: this.data.refraction, envMap: this.cam.renderTarget.texture } );
this.done = false;
Expand Down Expand Up @@ -147,4 +147,4 @@


/***/ })
/******/ ]);
/******/ ]);

0 comments on commit 5f6c59c

Please sign in to comment.