Changes

Jump to: navigation, search

XB PointStream

277 bytes added, 18:55, 28 December 2010
Parser Interface
<pre>
/* This example only demonstrates syntax. It hasn't been tested.
*/
 
var parser;
function startCallback(parser){
alert( "Using parser version: " + parser.getVersion();// started
}
function parseCallback(parser){
  // Get the version string of the parser parser.version;  // Get the number of parsed points so far parser.getProgress()numParsedPoints // Get the total number of points in the point cloud. parser.getNumParsedPoints()numTotalPoints // Progress of downloading the point cloud between zero and one. parser.getFileSize()progress // File size of the resource in bytes. parser.getNumTotalPoints()fileSize;
}
function finishCallback(){
// finished
}
var // create a hypothetical parser and set the callbacksparser = new ASCParserXYZParser();parser.addEventListener("onstart"{ start: startCallback, startCallback);parser.addEventListener("onparse" parse: parseCallback, parseCallback);parser.addEventListener("onfinish", finishCallback end: loadedCallback});// load some resourceparser.load(somePath"pointcloud.xyz");
</pre>
1
edit

Navigation menu