Tag Archive for 'Google Sketchup'

Papervision Collada – Spongebob SquarePants

Spongebob SquarePants

View Collada Spongebob in Papervision

I had some time on my hands this weekend and decided to mess around with loading Collada models with Papervision. I snagged a few models from Google Sketchup and went to town. Also tried to work in some OOP instead of just having one huge papervision file. I really need to clean up the source but rest assured the full source will be posted soon.

Basic lesson is that you can load a Collada file with just actionscript (packaged as a zip or just the dae file)

//Load zipped dae file
protected function loadKMZ():void
kmz = new KMZ();
kmz.addEventListener(FileLoadEvent.LOAD_ERROR, onKmzError);
kmz.addEventListener(FileLoadEvent.LOAD_COMPLETE, onKmzLoaded);

//Scale if needed
kmz.scale = 20;

//load the dae file
protected function loadDAE():void
dae = new DAE();
dae.addEventListener(FileLoadEvent.LOAD_ERROR, onDaeError);
dae.addEventListener(FileLoadEvent.LOAD_COMPLETE, onDaeLoaded);

Follow papervision2 on Twitter

RSS Feed