|
@@ -6,23 +6,25 @@ var curveProperties = { |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
materials.prepare = function() { |
|
|
materials.prepare = function() { |
|
|
var sprite = new THREE.Texture(document.getElementById("ball")); |
|
|
|
|
|
sprite.needsUpdate = true; |
|
|
|
|
|
|
|
|
var ballSprite = new THREE.Texture(document.getElementById("ball")); |
|
|
|
|
|
var tipSprite = new THREE.Texture(document.getElementById("tip")); |
|
|
|
|
|
ballSprite.needsUpdate = true; |
|
|
|
|
|
tipSprite.needsUpdate = true; |
|
|
materials.edge = new THREE.LineBasicMaterial({ |
|
|
materials.edge = new THREE.LineBasicMaterial({ |
|
|
color: "gray", |
|
|
color: "gray", |
|
|
transparent: false, |
|
|
transparent: false, |
|
|
linewidth: 1 |
|
|
linewidth: 1 |
|
|
}); |
|
|
}); |
|
|
materials.point = new THREE.PointsMaterial({ |
|
|
|
|
|
size: 0.1, |
|
|
|
|
|
map: sprite, |
|
|
|
|
|
|
|
|
materials.tip = new THREE.PointsMaterial({ |
|
|
|
|
|
size: 0.4, |
|
|
|
|
|
map: tipSprite, |
|
|
alphaTest: 0.5, |
|
|
alphaTest: 0.5, |
|
|
transparent: true, |
|
|
transparent: true, |
|
|
vertexColors: THREE.VertexColors |
|
|
|
|
|
|
|
|
color: "red" |
|
|
}); |
|
|
}); |
|
|
materials.qubit = new THREE.PointsMaterial({ |
|
|
materials.qubit = new THREE.PointsMaterial({ |
|
|
size: 0.3, |
|
|
size: 0.3, |
|
|
map: sprite, |
|
|
|
|
|
|
|
|
map: ballSprite, |
|
|
alphaTest: 0.5, |
|
|
alphaTest: 0.5, |
|
|
transparent: true, |
|
|
transparent: true, |
|
|
vertexColors: THREE.VertexColors |
|
|
vertexColors: THREE.VertexColors |
|
|