创建一个HoverController 然后赋予view.camera 初始化tiltAngle的值为90度 这样这个是相机的初识就是平行的。摄像机到中心点距离为300
var _camerController:HoverController = new HoverController(view.camera,null,90,0,300);
一下是创建一个半径为1000 并给其赋予这个全景的位图贴图。
var sphere:SphereGeometry = new SphereGeometry(1000);
var bitmapTexture:BitmapTexture = new BitmapTexture(bitmapData);
var textureMaterial:TextureMaterial = new TextureMaterial(bitmapTexture);
Away3d的模型默认的都是单面渲染的,所以我们如果从球里看球的里边的面是看不到的。所以我将这个位图贴图双面渲染打开
textureMaterial.bothSides = ***e;
var mesh:Mesh = new Mesh(sphere,textureMaterial);
view.scene.addChild(mesh);
import away3d.controllers.HoverController;
var _startX:Number;
var _startY:Number;
var _mouseX:Number;
var _mouseY:Number;
var view:View3D=new View3D();
addChild(view);
view.camera.lens.far=2000;
var _camerController:HoverController = new HoverController(view.camera,null,90,0,300);
var loaderoader=new Loader();
var bitmapData:quanjing=new quanjing();
var sphere:SphereGeometry = new SphereGeometry(1000);
var bitmapTexture:BitmapTexture = new BitmapTexture(bitmapData);
var textureMaterial:TextureMaterial = new TextureMaterial(bitmapTexture);
textureMaterial.bothSides = ***e;
var mesh:Mesh = new Mesh(sphere,textureMaterial);
view.scene.addChild(mesh);
stage.addEventListener(MouseEvent.MOUSE_DOWN,mouseDownFunction);
function mouseDownFunction(evt:MouseEvent):void