Package | org.papervision3d.core.components.as3.flash9 |
Class | public class PV3DColladaScene |
Inheritance | PV3DColladaScene PV3DScene3D PV3DUIComponent flash.display.MovieClip |
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
Property | Defined by | ||
---|---|---|---|
camera : CameraObject3D
The camera used by the component.
| PV3DScene3D | ||
clipContent : 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 | ||
renderer : BasicRenderEngine | PV3DScene3D | ||
resizeWithStage : Boolean | PV3DUIComponent | ||
scene : Scene3D | PV3DScene3D | ||
sceneHeight : 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 | ||
sceneWidth : Number = 320
Width of your component on stage
| PV3DUIComponent | ||
viewport : Viewport3D | PV3DScene3D |
Method | Defined by | ||
---|---|---|---|
PV3DColladaScene | |||
pause():void
Used to pause the rendering of the scene
| PV3DScene3D | ||
resume():void
Used to resume the rendering of the scene
| PV3DScene3D | ||
setSize(w:Number, h:Number):void
Pass in width and height to change the size of the component on stage.
| PV3DUIComponent |
Event | Summary | Defined by | ||
---|---|---|---|---|
Dispatched when the component has been initialized. | PV3DUIComponent | |||
Dispatched when the collada file and materials have been completely parsed and loaded. | PV3DColladaScene | |||
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 |
Constant | Defined by | ||
---|---|---|---|
INIT_COMPLETE : String = "initComplete" [static]
| PV3DUIComponent | ||
SCENE_COMPLETE : String = "sceneComplete" [static]
| PV3DColladaScene | ||
SCENE_INIT : String = "sceneInit" [static]
| PV3DScene3D | ||
SCENE_LOAD_ERROR : String = "sceneLoadError" [static]
| PV3DColladaScene | ||
SCENE_LOAD_PROGRESS : String = "sceneLoadProgress" [static]
| PV3DColladaScene |
collada | property |
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
colladaFile | property |
colladaFile:String
[read-write]Implementation
public function get colladaFile():String
public function set colladaFile(value:String):void
debug | property |
public var debug:Boolean = true
A boolean flag letting the component know whether or not to show trace output
materialsList | property |
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
sceneRotation | property |
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.
PV3DColladaScene | () | constructor |
public function PV3DColladaScene()
sceneComplete | event |
flash.events.Event
Dispatched when the collada file and materials have been completely parsed and loaded.
sceneLoadError | event |
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.
sceneLoadProgress | event |
flash.events.Event
Dispatched while the collada file is loading.
Event carries 2 properties:
SCENE_COMPLETE | constant |
public static const SCENE_COMPLETE:String = "sceneComplete"
SCENE_LOAD_ERROR | constant |
public static const SCENE_LOAD_ERROR:String = "sceneLoadError"
SCENE_LOAD_PROGRESS | constant |
public static const SCENE_LOAD_PROGRESS:String = "sceneLoadProgress"