Flint Particle System Forum - 3D Globe example Thu, 23 Jun 2011 13:21:20 +0100 http://flintparticles.org/forum/ Lussumo Vanilla 1.1.10 & Feed Publisher 3D Globe example http://flintparticles.org/forum/comments.php?DiscussionID=90&Focus=405#Comment_405 http://flintparticles.org/forum/comments.php?DiscussionID=90&Focus=405#Comment_405 Sat, 13 Sep 2008 12:24:45 +0100 sandersnake It's really awesome.

I spend some time now with the new v2 version and created a nice imploding / exploding Globe example.
Check the result over here.

]]>
3D Globe example http://flintparticles.org/forum/comments.php?DiscussionID=90&Focus=406#Comment_406 http://flintparticles.org/forum/comments.php?DiscussionID=90&Focus=406#Comment_406 Mon, 15 Sep 2008 09:29:38 +0100 VKT great work~. ]]> 3D Globe example http://flintparticles.org/forum/comments.php?DiscussionID=90&Focus=408#Comment_408 http://flintparticles.org/forum/comments.php?DiscussionID=90&Focus=408#Comment_408 Mon, 15 Sep 2008 13:45:43 +0100 Richard 3D Globe example http://flintparticles.org/forum/comments.php?DiscussionID=90&Focus=409#Comment_409 http://flintparticles.org/forum/comments.php?DiscussionID=90&Focus=409#Comment_409 Tue, 16 Sep 2008 07:25:23 +0100 sandersnake
Here's the source code (Flex):


package {
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.MouseEvent;
import flash.filters.BlurFilter;
import flash.geom.Rectangle;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.text.TextFormatAlign;

import org.flintparticles.common.actions.*;
import org.flintparticles.common.counters.*;
import org.flintparticles.common.displayObjects.*;
import org.flintparticles.common.initializers.*;
import org.flintparticles.threeD.actions.*;
import org.flintparticles.threeD.emitters.Emitter3D;
import org.flintparticles.threeD.geom.Vector3D;
import org.flintparticles.threeD.initializers.*;
import org.flintparticles.threeD.renderers.*;
import org.flintparticles.threeD.renderers.controllers.*;
import org.flintparticles.threeD.zones.*;

public class Globe extends Sprite {
private var w:Number = 400;
private var h:Number = 400;
private var text:TextField;

public function Globe(){
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;

text = new TextField();
var format:TextFormat = new TextFormat("Verdana", 36, 0xffffff,null,null,null,null,null,"center");
text.defaultTextFormat = format;
text.x = 0;
text.y = h/2 - 18;
text.width = w;
text.selectable = false;
text.text = "Click";
addChild(text);

stage.addEventListener(MouseEvent.CLICK, init);
}

private function init(e:MouseEvent):void {
stage.removeEventListener(MouseEvent.CLICK, init);
removeChild(text);

var emitter:Emitter3D = new Emitter3D();
emitter.counter = new Blast( 500 );

emitter.addInitializer( new ImageClass( Dot, 1 ) );
emitter.addInitializer( new Position( new SphereZone ( new Vector3D(0, 0, 0), w/2, w/2) ) );
emitter.addInitializer( new ColorInit( 0xffffffff, 0xffffffbe) );
emitter.addAction( new Move() );
emitter.addAction( new GravityWell(50, new Vector3D(0, 0, 0) ) );

var renderer:BitmapRenderer = new BitmapRenderer( new Rectangle( -w/2, -h/2, w, h ), false );
renderer.camera.dolly( -300 );
renderer.camera.lift( 100 );
renderer.camera.target = new Vector3D( 0, 0, 0 );
renderer.addFilter( new BlurFilter( 8, 8, 4 ) );
renderer.addEmitter( emitter );
renderer.x = w/2;
renderer.y = h/2;
addChild( renderer );

emitter.position = new Vector3D( 0, 0, 0, 1 );
emitter.start( );

var orbitter:OrbitCamera = new OrbitCamera( stage, renderer.camera );
orbitter.start();
}
}
}
]]>