Following example has about 7000 points dotted around the globe, it takes a noticeable performance hit after a couple thousand:
http://kurst.co.uk/samples/point_cloud_test
Example re-uses one Geometry, and ColorMaterial between all the points (CODE Below). Each ‘MarkerBase’ is in turn added to a ObjectContainer3D (app needs MouseOver/Out/Click handlers for the markers). Any help or pointers for optimizing whistle keeping functionality would be great.
Many thanks - Karim
package com.kurst.geoglobeapp.components.geoglobe.markers {
import away3d.containers.ObjectContainer3D;
import away3d.entities.Mesh;
public class MarkerBase extends ObjectContainer3D {
private static var mat : ColorMaterial;
private static var geom : SphereGeometry;
public var mesh : Mesh;
public var mouseTarget : Mesh;
public function MarkerBase( ) {
super();
if ( ! SimpleSphereMarker.mat )
SimpleSphereMarker.mat = new ColorMaterial( 0xFFFF00 );
if ( ! SimpleSphereMarker.geom )
SimpleSphereMarker.geom = new SphereGeometry( .25 , 3 , 3 )
mouseTarget = mesh = new Mesh( SimpleSphereMarker.geom , SimpleSphereMarker.mat );
addChild( markerSphere );
}
}
}