Skip to content
Snippets Groups Projects
Commit f1c43a6c authored by Xavier Gibert's avatar Xavier Gibert
Browse files

Model: plane started, Bugfix multiple transparency materials and hidding of text sprites

parent a37dcbbb
No related branches found
No related tags found
No related merge requests found
......@@ -133,7 +133,7 @@ This three.js demo is part of a collection at
// DEBUG OPTIONS
//-----------------------------------------------------------------------------------------------------------------------
var auto_rotate_sc = true;// If true, it ignores the simulator attitude and rotates the spacecraft.
var auto_rotate_sc = false;// If true, it ignores the simulator attitude and rotates the spacecraft.
//-----------------------------------------------------------------------------------------------------------------------
// PERFORMANCE VALUES (Set at initialization)
......
......@@ -66,6 +66,7 @@ function init()
transparent: true,
side: THREE.FrontSide,
metal: true,
depthWrite: false, depthTest: false, alphaTest: 0.1,
opacity: 0.4,
} );
var mat_sphere2 = new THREE.MeshBasicMaterial( {
......@@ -73,6 +74,7 @@ function init()
transparent: true,
side: THREE.FrontSide,
metal: true,
depthWrite: false, depthTest: false, alphaTest: 0.1,
opacity: 0.11,
} );
var mats_sphere = [mat_sphere, mat_sphere2];
......@@ -266,6 +268,12 @@ function init()
//-----------------------------------------------------------------------------------------------------------------------
// IMPLEMENT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
if(show_planes){
var material_op = new THREE.MeshNormalMaterial({color: 0x0000FF, transparent: true, depthWrite: false, depthTest: false, alphaTest: 0.1, opacity: 0.1, side: THREE.DoubleSide });
orbital_plane = new THREE.Mesh( new THREE.RingGeometry( sphere_radius/3, sphere_radius, 30, 10, 0, Math.PI * 2 ), material_op );
orbital_plane.position.set( 0, 0, 0 );
scene.add( orbital_plane );
}
//-----------------------------------------------------------------------------------------------------------------------
// SKY
......
......@@ -53,7 +53,7 @@ THREE.OrbitControls = function ( object, domElement, localElement ) {
this.rotateSpeed = 1.0;
// Set to true to disable this control
this.noPan = false;
this.noPan = true;
this.keyPanSpeed = 7.0; // pixels moved per arrow key push
// Set to true to automatically rotate around the target
......@@ -583,4 +583,4 @@ THREE.OrbitControls = function ( object, domElement, localElement ) {
};
THREE.OrbitControls.prototype = Object.create( THREE.EventDispatcher.prototype );
\ No newline at end of file
THREE.OrbitControls.prototype = Object.create( THREE.EventDispatcher.prototype );
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment