5 November 2015
In this article we will learn to use Stage3D wireframe mode support in ActionScript application based on the Stage3D API. Wireframe is used to view the Stage3D rendered objects in wireframe mode instead of solid objects.
A wireframe is used to represent a solid object by a mesh of lines rather than solid shaded polygons.
Wireframe models are usually rendered faster and can be used to view both the front and back of an object at the same time.
It helps to provide a detailed view of the whole scene and make their operation (select, drag, scale, and so on) more convenient.
If wireframe mode is set, we can see each triangle in Stage3D rendering.
Context3DFillMode has two values:
By default the value of Context3DFillMode is SOLID.Wireframe mode can be used in ActionScript with the following code:
// include package flash.display3D.Context3DFillMode
//make a Context3D instance
//call method setFillMode()
Following are the images showing Stage3D render Solid mode view and Wireframe mode view:
To use wireframe mode in Action Script code, download Flash Builder project WireframeSample.zip (attached as sample file on the top of this page) and import it in Flash builder.
From here on as you use wireframe mode with Stage3D apps, things will only get deeper and more interesting.
To learn more about Stage3D, check out Texture features in Stage3.