Skip to content

Commit

Permalink
Editor: Fixed Equirectangular Background in Safari.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Jun 20, 2020
1 parent 18439fe commit 3fe6cfb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions editor/js/libs/ui.three.js
Original file line number Diff line number Diff line change
Expand Up @@ -943,16 +943,14 @@ function renderToCanvas( texture ) {

if ( renderer === undefined ) {

renderer = new THREE.WebGLRenderer( { canvas: new OffscreenCanvas( 1, 1 ) } );
renderer = new THREE.WebGLRenderer();
renderer.outputEncoding = THREE.sRGBEncoding;

}

var image = texture.image;

renderer.setSize( image.width, image.height, false );
renderer.toneMapping = THREE.ReinhardToneMapping;
renderer.toneMappingExposure = 2;
renderer.outputEncoding = THREE.sRGBEncoding;

var scene = new THREE.Scene();
var camera = new THREE.OrthographicCamera( - 1, 1, 1, - 1, 0, 1 );
Expand Down

0 comments on commit 3fe6cfb

Please sign in to comment.