Looking around the inside of a Sphere
package { import flash.events.Event; import flash.ui.Mouse; import org.papervision3d.core.proto.MaterialObject3D; import org.papervision3d.core.utils.Mouse3D; import org.papervision3d.materials.ColorMaterial; import org.papervision3d.materials.WireframeMaterial; import org.papervision3d.materials.special.CompositeMaterial; import org.papervision3d.objects.DisplayObject3D; import org.papervision3d.objects.primitives.Plane; import org.papervision3d.objects.primitives.Sphere; import org.papervision3d.view.BasicView; import org.papervision3d.view.layer.ViewportLayer; import org.papervision3d.view.layer.util.ViewportLayerSortMode; [SWF(width="640", height="480", backgroundColor="#000000", frameRate="60")] public class LookingAroundTheInsideOfASphere extends BasicView { private var lookAtMe:DisplayObject3D; private var sphere:Sphere; private var mouse3D:Mouse3D; private var plane:Plane; public function LookingAroundTheInsideOfASphere() { viewport.interactive = true; mouse3D = viewport.interactiveSceneManager.mouse3D; Mouse3D.enabled = true; lookAtMe = new DisplayObject3D(); var wireframeMaterial:WireframeMaterial = new WireframeMaterial(0x444444); var colorMaterial:ColorMaterial = new ColorMaterial(0xdddddd); var sphereMaterial:CompositeMaterial = new CompositeMaterial(); sphereMaterial.addMaterial(wireframeMaterial); sphereMaterial.addMaterial(colorMaterial); sphereMaterial.interactive = true; sphereMaterial.doubleSided = true; sphere = new Sphere(sphereMaterial, 500, 24, 18); var planeMaterial:MaterialObject3D = new ColorMaterial(0xcc0000); planeMaterial.doubleSided = true; plane = new Plane(planeMaterial, 50, 50); var viewportLayer:ViewportLayer = new ViewportLayer(viewport, plane); viewportLayer.layerIndex = 1; viewport.containerSprite.sortMode = ViewportLayerSortMode.INDEX_SORT; viewport.containerSprite.addLayer(viewportLayer); scene.addChild(plane); camera.z = -300; camera.target = lookAtMe; scene.addChild(sphere); startRendering(); Mouse.hide(); } override protected function onRenderTick(event:Event=null):void { lookAtMe.x += (mouse3D.x - lookAtMe.x) * .03; lookAtMe.y += (mouse3D.y - lookAtMe.y) * .03; plane.copyTransform(mouse3D); super.onRenderTick(event); } } }
-
loan rates
-
reverse phone lookup
-
Domain registration
-
website designing company
-
Mortgage loan rates
-
web hosting
-
hosting service
-
viagra blog
-
web hosting
-
Domain registration
-
ceridian login
-
Generic Viagra
-
How to register a website
-
Buy domain name
-
Data Recovery Software
-
Ni_jobs
-
Web Hosting Chennai
-
Joomla Component Development
-
seo bangalore
-
Joomla Development
-
Best hosting company
-
reseller web hosting reviews
-
website design company
-
Tony
-
AT
-
Mozzy
-
vinnie vivace
-
sacen
-
sacen
-
malte
-
John Lindquist
-
malte
-
John Lindquist
-
malte
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
- software akuntansi terbaik on Back in the saddle
- loan rates on Augmented Reality – Recursive Webcam
- loan rates on Looking around the inside of a Sphere
- reverse phone lookup on Looking around the inside of a Sphere
- Oidhreachta on The Spotlight Effect (Dimming the unselected)
- Hosting company on archive
- aanbae on Back in the saddle
- Domain registration on Looking around the inside of a Sphere
- website designing company on Looking around the inside of a Sphere
- Honda Motor on Augmented Reality – Recursive Webcam
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


