Now that we know how to draw a cube in 3D, it's time to convert that cube into a bar and draw a 3D bar chart. To keep things simple, we'll start with just one set of data.
Start by creating a new Main
class inside a new package. We'll start from a setup similar to the previous recipe. For now, we've left out the mesh definition and the camera setup, as these will differ:
package com.graphing.graph { import away3d.containers.View3D; import away3d.lights.DirectionalLight; import away3d.materials.lightpickers.StaticLightPicker; import com.graphing.Graph3D; import flash.display.Sprite; import flash.events.Event; public class Main extends Sprite { private var _view:View3D; private var _data:Array = [[0,20],[50,70],[100,0],[150,150],[200,300],[250,200],[300,400],[350,20],[400,60],[450,250],[500,90],[550,400],[600,500],[650,450],[700,320]]; public function Main():void { _view = new...