diff --git a/examples/canvas_lines.html b/examples/canvas_lines.html
index d4f5f773d0d82fd7dd8202198d7768b8743ea39b..fd1be84403a7ed4d3f5f59075a0a0d0d5c34ce3d 100644
--- a/examples/canvas_lines.html
+++ b/examples/canvas_lines.html
@@ -73,7 +73,7 @@
} );
- var geometry = new THREE.Geometry();
+ var points = [];
for ( var i = 0; i < 100; i ++ ) {
@@ -86,12 +86,14 @@
particle.scale.x = particle.scale.y = 10;
scene.add( particle );
- geometry.vertices.push( particle.position );
+ points.push( particle.position );
}
// lines
+ var geometry = new THREE.BufferGeometry().setFromPoints( points );
+
var line = new THREE.Line( geometry, new THREE.LineBasicMaterial( { color: 0xffffff, opacity: 0.5 } ) );
scene.add( line );