Hi all, New article and utility posted, full source and example are included:
*Away3DLite - Cube6 - Material generator* Create a cube6 material from single images, options are: 1. Specify each side of the cubes materials individually or even leave some out 2. Transparency 3. Fill colour (for when transparency is disabled) 4. Flip back face (good for those 180 deg turns / twists) 5. Custom rotation for each individual face in degrees http://www.allforthecode.co.uk/aftc/forum/user/modules/forum/article.php?index=4&subindex=0&aid=253 So you can just simply: // Create our cube 6 material and display it cube6Material = new Cube6Material( new frontImage(), new backImage(), new leftImage(), new rightImage(), new topImage(), new bottomImage(), true,0x003366 ); // Create a cube cube = new Cube6(); cube.width = (new frontImage() as Bitmap).width; cube.height = (new frontImage() as Bitmap).height; cube.depth = (new frontImage() as Bitmap).width; cube.material = new BitmapMaterial( cube6Material.getBitmapData() ); away3DLiteScene.scene.addChild(cube);
