Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I found some good information actually at <a href="http://papervision2.com/loading-complex-models/" rel="nofollow noreferrer">this site</a>. I used the code there to import models into my AR stuff. It outlines a very simple method for importing collada models. I just took the sample FlarToolkit example (the simpleCube example) and added the code in that article and that was enough to get me going.</p> <p>Here's the code:</p> <pre><code>package { import org.papervision3d.lights.PointLight3D; import org.papervision3d.materials.WireframeMaterial; import org.papervision3d.materials.shadematerials.FlatShadeMaterial; import org.papervision3d.materials.utils.MaterialsList; import org.papervision3d.materials.*; import org.papervision3d.materials.utils.*; import org.papervision3d.materials.shadematerials.*; import org.papervision3d.objects.primitives.Cube; import org.papervision3d.objects.primitives.Cylinder; import org.papervision3d.objects.DisplayObject3D; import org.papervision3d.objects.parsers.Collada; import flash.events.*; public class SimpleCube extends PV3DARApp { public var FAlogo:DisplayObject3D; public var light :PointLight3D; public function SimpleCube() { this.init('Data/camera_para.dat', 'Data/flarlogo.pat'); } protected override function onInit():void { super.onInit(); this.addEventListener( Event.ENTER_FRAME, EROnEnterFrame ); // let there be light this.light = new PointLight3D; this.light.x = 0; this.light.y = 1000; this.light.z = -1000; // cow model FAlogo = new Collada("http://papervision2.com/wp-content/downloads/dae/cow.dae"); FAlogo.rotationZ = -90; FAlogo.rotationY = -90; FAlogo.x = -100; FAlogo.z = 100; FAlogo.scale = 0.1; // re-orient the logo model before adding it to the scene this._baseNode.addChild(this.FAlogo); } private function EROnEnterFrame( event :Event ):void { // spins the cow yay! FAlogo.yaw(3); } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload