/** * ... * @author Default * @version 0.1 */ package src { import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.display.StageQuality; import flash.text.TextField; import org.papervision3d.view.BasicView; import org.papervision3d.objects.primitives.Plane; import org.papervision3d.materials.BitmapAssetMaterial; public class myTiledTexture extends BasicScene{ public function myTiledTexture() { stage.quality = StageQuality.HIGH; stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; var view:BasicView = new BasicView(0, 0, true); addChild(view); view.camera.zoom = 6; //create tiled material var tiledMat:BitmapAssetMaterial = new BitmapAssetMaterial("AlgaeMetalPlate"); tiledMat.tiled = true; tiledMat.maxU = 2; tiledMat.maxV = 2; //create untiled material var untiledMat:BitmapAssetMaterial = new BitmapAssetMaterial("AlgaeMetalPlate"); //create planes var plane1:Plane = new Plane(untiledMat, 500, 500, 1, 1); var plane2:Plane = new Plane(tiledMat, 500, 500, 1, 1); //position planes plane1.x -= 300; plane2.x += 300; //add planes to scene and render view.scene.addChild(plane1); view.scene.addChild(plane2); view.singleRender(); } } }