microsoft / HoloJS

Provides a framework for creating holographic apps using JavaScript and WebGL.
MIT License
1.19k stars 114 forks source link

Draw lines #65

Closed bryanbocao closed 7 years ago

bryanbocao commented 7 years ago

I tried drawing lines but did not see the them:

    let lineGeometry = new THREE.Geometry();
    let lineMaterial = new THREE.LineBasicMaterial({color: 0x55555, linewidth: 10});

    lineGeometry.vertices.push(new THREE.Vector3(0, 0, 0));
    lineGeometry.vertices.push(new THREE.Vector3(0, 0, -0.5));
    lineGeometry.vertices.push(new THREE.Vector3(0, 0.2, -0.5));
    lineGeometry.vertices.push(new THREE.Vector3(0.2, 0.2, 0));
    lineGeometry.vertices.push(new THREE.Vector3(0.5, 0.5, 0));

    let test_line = new THREE.Line(lineGeometry, lineMaterial);

    scene.add(test_line);
    test_line.frustumCulled = false;
    camera.position.set(0, 0, 1);
Reda-S commented 7 years ago

@Almost-Done ,this issue could be closed as line drawing is functioning as expected in the last version.

Almost-Done commented 7 years ago

@reda-s, thank you for verifying this. It might have been fixed by the improved auto-stereo shader rewriting.