Tweening vertices
package { import gs.TweenMax; import gs.easing.Quad; import org.papervision3d.core.geom.renderables.Vertex3D; import org.papervision3d.lights.PointLight3D; import org.papervision3d.materials.shadematerials.PhongMaterial; import org.papervision3d.objects.primitives.Sphere; import org.papervision3d.view.BasicView; [SWF(width="640", height="480", backgroundColor="#000000", frameRate="60")] public class TweenVertices extends BasicView { private var sphere:Sphere; public function TweenVertices(viewportWidth:Number=640, viewportHeight:Number=480, scaleToStage:Boolean=true, interactive:Boolean=false, cameraType:String="Target") { var light:PointLight3D = new PointLight3D(); light.x = -100; light.y = 100; var material:PhongMaterial = new PhongMaterial(light, 0x0000cc, 0x000000, 10); sphere = new Sphere(material, 500, 20, 20); for each(var vertex:Vertex3D in sphere.geometry.vertices) { var x:Number = vertex.x + Math.random() * 100 - 50; var y:Number = vertex.y + Math.random() * 100 - 50; var z:Number = vertex.z + Math.random() * 100 - 50; TweenMax.to(vertex, Math.random() * 2 + 2, {x:x, y:y, z:z, ease:Quad.easeOut, yoyo:true}); } scene.addChild(sphere); startRendering(); } } }
3 Comments to Tweening vertices
Is it just me or does the static image above also look like it’s animating? I swear it’s shrinking.
January 29, 2009
Yes. it does look like it’s shrinking.
I really like this effect (animated, and non-animated)
March 13, 2009
hello ..nice effect! ..i need some help understading why i cant tween the vertices of a dae object ..it dosent even recognize me the public propriety vertices of daefile.geometry.vertices..do u know why?
any help?
thank u in advance
Leave a comment
Search
Recent Posts
- MorphController - Mighty Morphing Papervision3D
- End dump
- Test if a plane is within the view of the camera (aka testing if culled)
- Materials Reference
- Perlin Blob
- Dynamic Text on a Plane
- Maya Texture Baking
- Creating a Custom VectorVision Font
- Workshop video and example dump
- 3D Math Book Recommendation
- Heading to New York. brb ;)
- Launching Flex4.org
- Flex 4 Layouts and Groups
- Flex 4 States
- How to click on stuff in Papervision3D - Viewport, ViewportLayers, InteractiveScene3DEvent, Mouse3D, and MovieMaterial Buttons
Recent Comments
- alexxcz on MorphController - Mighty Morphing Papervision3D
- andre venancio on 3D Math Book Recommendation
- DS on Dynamic Text on a Plane
- John Lindquist on Maya Texture Baking
- Itai on Maya Texture Baking
- Javier on End dump
- samBrown on End dump
- tf on archive
- Pan on requests
- Martin Lindelöf on requests


December 5, 2008