[Papervision3D] large KMZ asset decoding

Jon Bradley jbradley at postcentral.com
Thu Jul 10 05:25:41 PDT 2008


On Jul 9, 2008, at 9:32 PM, Roy Wiggins wrote:

> While you're at it, I've had timeouts when loading collada files.  
> Spreading it out over multiple frames would be really useful.


For the actual parsing of the Collada files, I don't know if it's  
fully implemented but it will asynchronously load the file and parse  
if it you tell it to.

yourDaeReaderInstance = new DaeReader(true);

You'll may need to do either do one of the following (I don't know  
when/where I got this info):

1. Modify org.ascollada.io.DaeReader to always use async (in the  
constructor).

2. Change the loadDocument method in DaeReader as follows:

		public function loadDocument( data:* ):DaeDocument
		{
			this.document = new DaeDocument( data, this.async );
			
			_numAnimations = this.document.numQueuedAnimations;
			_numGeometries = this.document.numQueuedGeometries;
			
			if( _numGeometries > 0 )
			{
				readGeometries();
			}
			else
			{
				dispatchEvent( new Event(Event.COMPLETE) );
			}
			
			return this.document;
		}

3. If you prefer to keep the async option as false by default, you'll  
need to modify the Collada parsers themselves (ie,  
org.papervision3d.objects.parsers.DAE) to make sure the DaeReader  
instance (parser) is created with async, in the load method.

	this.parser = new DaeReader(true);


There are a couple options with this.

cheers,

jon

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20080710/5debb982/attachment.html 


More information about the Papervision3D mailing list