spite / THREE.MeshLine

Mesh replacement for THREE.Line
MIT License
2.14k stars 381 forks source link

Fails to render expected result with an OrthographicCamera #42

Closed karimbeyrouti closed 7 years ago

karimbeyrouti commented 7 years ago

Just substituted the camera in your demo with an Orthographic one - and while it fails to render anything, it looks super interesting with circles enabled in the options.

Below is the changed code to main.js - which renders a blank screen:


var frustumSize = 600;
var SCREEN_WIDTH = window.innerWidth;
var SCREEN_HEIGHT = window.innerHeight;
var aspect = SCREEN_WIDTH / SCREEN_HEIGHT;

//var camera = new THREE.PerspectiveCamera( 60, window.innerWidth / window.innerHeight, .1, 1000 );
var camera = new THREE.OrthographicCamera( frustumSize * aspect / - 2, frustumSize * aspect / 2, frustumSize / 2, frustumSize / - 2, 150, 1000 );
camera.position.set( 0, -10, -10 );
camera.lookAt(new THREE.Vector3(0,0,0));

and that is the result with circles enabled in dat.gui interface:

screen shot 2017-05-31 at 16 17 27

spite commented 7 years ago

Possibly related: https://github.com/spite/THREE.MeshLine/issues/26

karimbeyrouti commented 7 years ago

Thanks - looking to check if solution works in #26

karimbeyrouti commented 7 years ago

It is indeed the same issue - works with a lineWidth of 0.01. Thank you. Closed as this is a duplicate.