Packageorg.papervision3d.core.components.as3.flash9
Classpublic class PV3DColladaScene
InheritancePV3DColladaScene Inheritance PV3DScene3D Inheritance PV3DUIComponent Inheritance flash.display.MovieClip

PV3DColladaScene is the main class for the Flash CS3 COLLADA component.

It's main purpose is to provide the developer/designer with drag and drop functionality to render a COLLADA scene with a camera and Scene3D. Full access to a materials list and objects is given through the api:

The component includes a Custom Panel via Windows>other panels>PV3DPanel

To use the component, drag it from the components list on to the stage in the Flash IDE. First, set the local directory by clicking on the folder icon in the Panel. Then, select the DAE (COLLADA) file to use. At this point, you houldsee your 3D scene being rendered.

You might have to play with the scale if you're not seeing the scene or camera Z (move it out more).

If you textured your models with bitmaps in your 3D application, COLLADA retains those file paths and Papervision3D will attempt to dynamically load them for you IF you don't provide a materials list. So, there is a good chance you'll see your scene fully textured once you've provided the local directory and file paths.

If you provide a MaterialsList via the property inspector, there are 3 types supported:

See also

org.papervision3d.core.components.as3.collections.MaterialsListItem


Public Properties
 PropertyDefined by
 Inheritedcamera : CameraObject3D
The camera used by the component.
PV3DScene3D
 InheritedclipContent : Boolean = false
Whether or not you want the scene to have a mask applied to the area of the component.
PV3DUIComponent
  collada : DAE
The Papervision3D Collada object created for the component's use.
PV3DColladaScene
  colladaFile : String
PV3DColladaScene
  debug : Boolean = true
A boolean flag letting the component know whether or not to show trace output
PV3DColladaScene
  materialsList : MaterialsList
[read-only] The MaterialsList object that is used by the component if one is provided.
PV3DColladaScene
 Inheritedrenderer : BasicRenderEngine
PV3DScene3D
 InheritedresizeWithStage : Boolean
PV3DUIComponent
 Inheritedscene : Scene3D
PV3DScene3D
 InheritedsceneHeight : Number = 240
Height of your component on stage
PV3DUIComponent
  sceneRotation : Boolean = true
Boolean flag indicating whether or not to add mouse drag/rotation abilities to the collada container.
PV3DColladaScene
 InheritedsceneWidth : Number = 320
Width of your component on stage
PV3DUIComponent
 Inheritedviewport : Viewport3D
PV3DScene3D
Protected Properties
 PropertyDefined by
 Inheritedcanvas : Sprite = null
The sprite container where the scene will be drawn
PV3DScene3D
Public Methods
 MethodDefined by
  
PV3DColladaScene
 Inherited
pause():void
Used to pause the rendering of the scene
PV3DScene3D
 Inherited
resume():void
Used to resume the rendering of the scene
PV3DScene3D
 Inherited
setSize(w:Number, h:Number):void
Pass in width and height to change the size of the component on stage.
PV3DUIComponent
Protected Methods
 MethodDefined by
 Inherited
createScene():void
PV3DScene3D
Events
 EventSummaryDefined by
 Inherited Dispatched when the component has been initialized.PV3DUIComponent
   Dispatched when the collada file and materials have been completely parsed and loaded.PV3DColladaScene
 Inherited Dispatched when the Scene3D has been created along with the camera.PV3DScene3D
   Dispatched when the collada object cannot load the file specified either because of security or non-existance

provides a property called "message" which is the actual load error initially received.

PV3DColladaScene
   Dispatched while the collada file is loading.PV3DColladaScene
Public Constants
 ConstantDefined by
 InheritedINIT_COMPLETE : String = "initComplete"
[static]
PV3DUIComponent
  SCENE_COMPLETE : String = "sceneComplete"
[static]
PV3DColladaScene
 InheritedSCENE_INIT : String = "sceneInit"
[static]
PV3DScene3D
  SCENE_LOAD_ERROR : String = "sceneLoadError"
[static]
PV3DColladaScene
  SCENE_LOAD_PROGRESS : String = "sceneLoadProgress"
[static]
PV3DColladaScene
Property detail
colladaproperty
collada:DAE  [read-write]

The Papervision3D Collada object created for the component's use.

Implementation
    public function get collada():DAE
    public function set collada(value:DAE):void
colladaFileproperty 
colladaFile:String  [read-write]Implementation
    public function get colladaFile():String
    public function set colladaFile(value:String):void
debugproperty 
public var debug:Boolean = true

A boolean flag letting the component know whether or not to show trace output

materialsListproperty 
materialsList:MaterialsList  [read-only]

The MaterialsList object that is used by the component if one is provided. This is set at design-time and is read-only at runtime

Implementation
    public function get materialsList():MaterialsList
sceneRotationproperty 
public var sceneRotation:Boolean = true

Boolean flag indicating whether or not to add mouse drag/rotation abilities to the collada container. Clicking yes will allow you to use simple dragging to rotate the scene.

Constructor detail
PV3DColladaScene()constructor
public function PV3DColladaScene()
Event detail
sceneCompleteevent 
Event object type: flash.events.Event

Dispatched when the collada file and materials have been completely parsed and loaded.

sceneLoadErrorevent  
Event object type: flash.events.Event

Dispatched when the collada object cannot load the file specified either because of security or non-existance

provides a property called "message" which is the actual load error initially received.

sceneLoadProgressevent  
Event object type: flash.events.Event

Dispatched while the collada file is loading.

Event carries 2 properties:

Constant detail
SCENE_COMPLETEconstant
public static const SCENE_COMPLETE:String = "sceneComplete"

SCENE_LOAD_ERRORconstant 
public static const SCENE_LOAD_ERROR:String = "sceneLoadError"

SCENE_LOAD_PROGRESSconstant 
public static const SCENE_LOAD_PROGRESS:String = "sceneLoadProgress"