mardi 26 mai 2015

Away3d doesn't work at **ALL**

I started Away3d very recently. So if something silly is in my code, Please don't vote down or make fun of me!

Anything goes correctly but when SWF opens,I see nothing except a blank white display without anything.

There is no compiler or runtime errors.

Main timeline:

import Basic_SkyBox;

var b:Basic_SkyBox=new Basic_SkyBox(new bmp(),this);

Library: Library

Class:

package
{
import away3d.cameras.lenses.*;
import away3d.containers.*;
import away3d.entities.*;
import away3d.materials.*;
import away3d.materials.methods.*;
import away3d.primitives.*;
import away3d.textures.*;
import away3d.utils.*;

import flash.display.*;
import flash.events.*;
import flash.geom.Vector3D;



public class Basic_SkyBox extends Sprite
{




    private var _view:View3D;


    private var _skyBox:SkyBox; 
    private var _torus:Mesh;


    public function Basic_SkyBox(e:BitmapData,t:Object)
    {


        _view = new View3D();
        t.addChild(_view);


        _view.camera.z = -600;
        _view.camera.y = 0;
        _view.camera.lookAt(new Vector3D());
        _view.camera.lens = new PerspectiveLens(90);


        var cubeTexture:BitmapCubeTexture = new BitmapCubeTexture(e,e,e,e,e,e);

        var material:ColorMaterial = new ColorMaterial();
        material.addMethod(new EnvMapMethod(cubeTexture, 1));

        _torus = new Mesh(new TorusGeometry(150, 60, 40, 20), material);
        _view.scene.addChild(_torus);

        _skyBox = new SkyBox(cubeTexture);
        _view.scene.addChild(_skyBox);




    }



}}

♥♥♥.

Aucun commentaire:

Enregistrer un commentaire