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(); } } }
-
andrea
-
Brian Pember
-
Paul Mayne
Search
Recommended Books
Speaking at FITC Toronto
Recent Posts
- Moving to johnlindquist.com
- AsyncCommand with Robotlegs, Signals, Flight, MinimalComps
- Search Widget – Robotlegs, Signals, Flight, Minimal Comps, Yahoo Astra
- FDT Super Awesome March Deal
- haXe Tutorial
- AS3 Signals Tutorial
- Preferred Video Tutorial Resolution?
- TweenMax – Tweening a timeline (Advanced Tweening)
- Robotlegs + Flight + Union Platform
- Back in the saddle
- Eclipse Theme Designer Preview
- RobotLegs Hello World Video Tutorial
- 10 Things Every Senior Flash Developer Should Know
- Efflex – 3D Effects for Flex
- MorphController – Mighty Morphing Papervision3D
Recent Comments
- Xdragosy on Ribbons
- As on What is BasicView?
- Godie_dito on Dynamic Text on a Plane
- Angel Kaido on Following line
- bambii7 on faq
- Felipe on TweenMax – Tweening a timeline (Advanced Tweening)
- Ocatarinabelachichix on about
- Rajiv on faq
- Rajiv on 3ds max texture baking for Papervision3D
- Anupam Biswas on Maya Texture Baking
Categories
Archives
Preferred Video Tutorial Resolution
- 1024x768 (53%, 85 Votes)
- 1280x1024 (15%, 24 Votes)
- 1920x1080 (15%, 24 Votes)
- 800x600 (13%, 20 Votes)
- 480x320 (4%, 6 Votes)
- 640x480 (0%, 2 Votes)
Total Voters: 160


