Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Trident causes error at android/ios project #705

Open
Daley opened this issue Aug 15, 2014 · 0 comments
Open

[bug] Trident causes error at android/ios project #705

Daley opened this issue Aug 15, 2014 · 0 comments

Comments

@Daley
Copy link

Daley commented Aug 15, 2014

error:Temporary register component read without being written to for source operand 2 at token 9 of vertex program.
code:
[
package
{
import away3d.cameras.Camera3D;
import away3d.containers.Scene3D;
import away3d.containers.View3D;
import away3d.debug.Trident;
import away3d.entities.Mesh;
import away3d.lights.PointLight;
import away3d.materials.TextureMaterial;
import away3d.primitives.CubeGeometry;
import away3d.textures.BitmapTexture;

import flash.display.BitmapData;
import flash.display.Sprite;
import flash.events.Event;
import flash.geom.Point;

public class TestTrident extends Sprite
{
    private var view:View3D;
    public function TestTrident()
    {
        addEventListener(Event.ADDED_TO_STAGE,init);
    }

    private function init(e:Event=null):void{
        stage.addEventListener(Event.ENTER_FRAME, onEnterFrame);

        initAway3D();
    }

    private function initAway3D():void{
        view= new View3D();
        addChild(view);

        var mylight:PointLight = new PointLight();
        view.scene.addChild(mylight);

        var bd:BitmapData=new BitmapData(128,128,true,0xffff0000);
        var texture:BitmapTexture = new BitmapTexture(bd);
        var material:TextureMaterial = new TextureMaterial(texture, true, false, true);
        var cube:CubeGeometry=new CubeGeometry();
        var mesh:Mesh=new Mesh(cube,material);
        view.scene.addChild(mesh);

        view.camera.y=-300;
        //comment two lines will be good
        var tt:Trident=new Trident(10,true);
        view.scene.addChild(tt);
    }

    private function onEnterFrame(e:Event):void{
        view.render();
    }

}

}

]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant