Template:Team:UC Davis/MutantWidget
From 2011.igem.org
(Difference between revisions)
Line 366: | Line 366: | ||
// } | // } | ||
); | ); | ||
+ | pointMaterial = new THREE.ParticleCanvasMaterial( { color: 0xffffff, program: function() | ||
+ | { | ||
+ | context.beginPath(); | ||
+ | context.arc( 0, 0, 1, 0, Math.PI * 2, true ); | ||
+ | context.fill(); | ||
+ | } } ); | ||
+ | |||
axisMat = new THREE.LineBasicMaterial( | axisMat = new THREE.LineBasicMaterial( | ||
{ | { | ||
Line 385: | Line 392: | ||
$(document).ready(function() { | $(document).ready(function() { | ||
data_3d = []; | data_3d = []; | ||
+ | particles = new THREE.Geometry(); | ||
//Parse datas! | //Parse datas! | ||
$('.zdata_3d').each( | $('.zdata_3d').each( | ||
Line 407: | Line 415: | ||
{ | { | ||
thisdataz[i] = parseFloat(thisdataz[i]); | thisdataz[i] = parseFloat(thisdataz[i]); | ||
- | + | var particle = new THREE.Vertex( | |
+ | new THREE.Vector3(thisdatax[i%thisdatax.length], thisdatay[Math.floor(i/thisdatay.length)], thisdataz[i]) | ||
+ | ); | ||
} | } | ||
Line 437: | Line 447: | ||
thisdataz[kx+1+(ky+1)*thisdatax.length], thisx, thisy) | thisdataz[kx+1+(ky+1)*thisdatax.length], thisx, thisy) | ||
data_3d[index].vertices[j*numxpoints+i].position.z = thisz/axisdimensions[5]*100; | data_3d[index].vertices[j*numxpoints+i].position.z = thisz/axisdimensions[5]*100; | ||
+ | var particle = new THREE.Vertex( | ||
+ | ); | ||
} | } | ||
} | } |
Revision as of 07:24, 25 September 2011