Home > Featured, jiglibflash, papervision3d > JigLibFlash: New classes, Drag and Drop 3D, faster performance

JigLibFlash: New classes, Drag and Drop 3D, faster performance

Finally got some time to dive into the new classes in JigLibFlash. If you’ve grabbed the latest rev, 92 or later, you will see some changes to streamline things a bit. Have a look here for the run down covered in a few posts. It is now easier to pick your flavor of 3D engine by declaring the appropriate physics class (see plugin folder for away3D, sandy3D and papervision3D). Also API docs are available now which is killer nice too.

Drag and Drop 3D Objects in JigLibFlash

Drag and Drop 3D Objects in JigLibFlash

Anyway, I put together this little demo, which I aim to revise and do more with in coming days. I added the new mouseConstraint class to this one to show how it looks in action. Click and drag on the little blue cubes to turf them around the room.

Code bits that are noteworthy:

Declaring new class:

physics = new Papervision3DPhysics(scene, 8);

Creating objects, for example ground:

ground = physics.createGround(yourMaterial, 500, 0);

Adding listener for Mouse interactions:

boxes[i].skin.mesh.addEventListener(InteractiveScene3DEvent.OBJECT_PRESS, handleMousePress);

Check out the latest examples in the latest rev for examples on how to handle these events. More to come…

Categories: Featured, jiglibflash, papervision3d Tags:
  1. September 22nd, 2009 at 13:32 | #1

    is the source for this file anywhere?
    sorry but i’m an ultimate noob at ppv3d/jiglib right now,
    and I cant figure out how to create a wall to go along with my ground,
    so i’d love to see your example in action if possible

  2. September 22nd, 2009 at 13:42 | #2

    @matt, have a peek at my other post here as well: http://www.synergyseeker.com/jiglibflash/creating-a-room-in-jiglibflash/
    That has some info on creating a room and ground. There is also a simple way now like this:
    ground = physics.createGround(shadeMateria, 500,0);
    ground.friction = 0.2;
    ground.restitution = 0.8;

    I’ll try to get some source up as well so you can see, lots of people seem interested in this dragging example. To see the example in action, just click on the image.
    Thanks for stopping by!

  1. No trackbacks yet.