mrdoob/three.js — Issue #694: About efficiency append; collabolate with PHP
Author: YosukeSawai
Created: 2011-10-28 13:12:01+00:00
State: open

Hi,
I thought it would be helpful if you could share details of your experience.

I want to show 3d point cloud by database.
Then I tried to write php and javascript.
But javascript suddenly hang up.
I think it was too many points to render.
Please tell me if you have solution.

The data structure.
//x[space]y[space]z[newline]
37.569598 45.907832 -0.524064
37.206479 45.974322 -0.796372
16.914044 46.017242 -0.8598
it has 70000 lines(points).

I tried bellow.

div id="datasection" style="display:none"

/div

function start()
{
var text = document.getElementById('datasection').innerHTML;
text = text.replace(/^\s+|\s+$/g, "");
var line = text.split("\n");
//----//
init();
animate();

function init() {
//----//
scene = new THREE.Scene();

var PI2 = Math.PI * 2;

var material = new THREE.ParticleCanvasMaterial( {

color: 0xFFFFFF,

program: function ( context ) {
context.beginPath();
context.arc( 0, 0, 1, 0, PI2, true );
context.closePath();
context.fill();

}
} );

for(var i=0;i