Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…-system into Xorcerer-master

Conflicts:
	example/Template.as
	example/explode/Main.as
	example/star/Main.as
  • Loading branch information
liaocheng committed Aug 24, 2012
2 parents c8f2418 + 0d9ad6a commit 8d5087b
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 33 deletions.
18 changes: 9 additions & 9 deletions example/Template.as
@@ -1,4 +1,4 @@
package
package
{
import a3dparticle.animators.actions.color.ChangeColorByLifeGlobal;
import a3dparticle.animators.actions.position.OffsetPositionLocal;
Expand All @@ -10,7 +10,7 @@ package
import a3dparticle.ParticlesContainer;
import away3d.containers.View3D;
import away3d.debug.AwayStats;
import away3d.primitives.Sphere;
import away3d.primitives.SphereGeometry;
import away3d.debug.WireframeAxesGrid;
import flash.display.Sprite;
import flash.display.StageAlign;
Expand All @@ -24,19 +24,19 @@ package
* @author liaocheng.Email:liaocheng210@126.com
*/
[SWF(width="1024", height="768", frameRate="60")]
public class Template extends Sprite
public class Template extends Sprite
{
protected var _view:View3D;

private var particle:ParticlesContainer;

public function Template():void
public function Template():void
{
if (stage) init();
else addEventListener(Event.ADDED_TO_STAGE, init);
}

private function init(e:Event = null):void
private function init(e:Event = null):void
{
removeEventListener(Event.ADDED_TO_STAGE, init);

Expand Down Expand Up @@ -65,10 +65,10 @@ package
//the geometry can be got from the primitives of away3d or models which is createed by tools like max or maya .
//the material can be ParticleColorMaterial which set color directly or ParticleBitmapMaterial which set color using texture.
var material:ParticleColorMaterial = new ParticleColorMaterial();
var sphereLarge:Sphere = new Sphere(null, 10, 6, 6);
var sphereSmall:Sphere = new Sphere(null, 5, 4, 4);
var sample1:ParticleSample = new ParticleSample(sphereLarge.geometry.subGeometries[0], material);
var sample2:ParticleSample = new ParticleSample(sphereSmall.geometry.subGeometries[0], material);
var sphereLarge:SphereGeometry = new SphereGeometry(10, 6, 6);
var sphereSmall:SphereGeometry = new SphereGeometry(5, 4, 4);
var sample1:ParticleSample = new ParticleSample(sphereLarge.subGeometries[0], material);
var sample2:ParticleSample = new ParticleSample(sphereSmall.subGeometries[0], material);

//step 2: we create a generater which group the samples.
//The generater will provide a samples list for container.
Expand Down
2 changes: 1 addition & 1 deletion example/bubbles/Main.as
@@ -1,4 +1,4 @@
package
package bubbles
{
import a3dparticle.animators.actions.color.ChangeColorByLifeGlobal;
import a3dparticle.animators.actions.drift.DriftLocal;
Expand Down
6 changes: 3 additions & 3 deletions example/bubbles/PlayUI.as
@@ -1,4 +1,4 @@
package
package bubbles
{
import a3dparticle.ParticlesContainer;
import flash.display.Sprite;
Expand Down Expand Up @@ -41,11 +41,11 @@ package
{
if (check.selected)
{
target.timeScale = -1;
target.playbackSpeed = -1;
}
else
{
target.timeScale = 1;
target.playbackSpeed = 1;
}
}

Expand Down
10 changes: 5 additions & 5 deletions example/explode/Main.as
@@ -1,4 +1,4 @@
package
package explode
{
import a3dparticle.animators.actions.color.ChangeColorByLifeGlobal;
import a3dparticle.animators.actions.rotation.AutoRotateGlobal;
Expand All @@ -15,7 +15,7 @@ package
import away3d.primitives.CylinderGeometry;
import away3d.primitives.SphereGeometry;
import away3d.debug.WireframeAxesGrid;
import away3d.tools.MeshHelper;
import away3d.tools.helpers.MeshHelper;
import flash.display.BlendMode;
import flash.display.Sprite;
import flash.display.StageAlign;
Expand All @@ -30,21 +30,21 @@ package
* @author liaocheng
*/
[SWF(width="1024", height="768", frameRate="60")]
public class Main extends Sprite
public class Main extends Sprite
{
protected var _view:View3D;

private var particle:ParticlesContainer;
private var sample1:ParticleSample;
private var sample2:ParticleSample;

public function Main():void
public function Main():void
{
if (stage) setTimeout(init, 0);
else addEventListener(Event.ADDED_TO_STAGE, init);
}

private function init(e:Event = null):void
private function init(e:Event = null):void
{
removeEventListener(Event.ADDED_TO_STAGE, init);

Expand Down
2 changes: 1 addition & 1 deletion example/fire/Fire.as
@@ -1,4 +1,4 @@
package
package fire
{
import a3dparticle.animators.actions.acceleration.AccelerateGlobal;
import a3dparticle.animators.actions.color.ChangeColorByLifeGlobal;
Expand Down
8 changes: 4 additions & 4 deletions example/fire/Main.as
@@ -1,4 +1,4 @@
package
package fire
{
import a3dparticle.ParticlesContainer;
import away3d.containers.View3D;
Expand All @@ -18,7 +18,7 @@ package
public class Main extends Sprite
{
protected var _view:View3D;

private var particle:ParticlesContainer;

public function Main():void
Expand Down Expand Up @@ -51,8 +51,8 @@ package

private function initScene():void
{
var fire:Fire = new Fire();
_view.scene.addChild(fire);
var fire_:Fire = new Fire();
_view.scene.addChild(fire_);
var smoke:Smoke = new Smoke();
_view.scene.addChild(smoke);
}
Expand Down
2 changes: 1 addition & 1 deletion example/fire/Smoke.as
@@ -1,4 +1,4 @@
package
package fire
{
import a3dparticle.animators.actions.color.ChangeColorByLifeGlobal;
import a3dparticle.animators.actions.drift.DriftLocal;
Expand Down
2 changes: 1 addition & 1 deletion example/fireworks/Main.as
@@ -1,4 +1,4 @@
package
package fireworks
{
import a3dparticle.animators.actions.brokenline.BrokenLineLocal;
import a3dparticle.animators.actions.position.OffsetPositionLocal;
Expand Down
2 changes: 1 addition & 1 deletion example/fountain/Main.as
@@ -1,4 +1,4 @@
package
package fountain
{
import a3dparticle.animators.actions.acceleration.AccelerateGlobal;
import a3dparticle.animators.actions.color.ChangeColorByLifeGlobal;
Expand Down
2 changes: 1 addition & 1 deletion example/snow/Main.as
@@ -1,4 +1,4 @@
package
package snow
{
import a3dparticle.animators.actions.drift.DriftLocal;
import a3dparticle.animators.actions.fog.FogByDistanceGlobal;
Expand Down
10 changes: 5 additions & 5 deletions example/star/Main.as
@@ -1,4 +1,4 @@
package
package star
{
import a3dparticle.animators.actions.color.FlickerGlobal;
import a3dparticle.animators.actions.color.RandomColorLocal;
Expand All @@ -20,7 +20,7 @@ package
import away3d.loaders.AssetLoader;
import away3d.loaders.parsers.Max3DSParser;
import away3d.debug.WireframeAxesGrid;
import away3d.tools.helpers.MeshHelper
import away3d.tools.helpers.MeshHelper;
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
Expand All @@ -33,7 +33,7 @@ package
* @author liaocheng
*/
[SWF(width="1024", height="768", frameRate="60")]
public class Main extends Sprite
public class Main extends Sprite
{

[Embed(source = "model/star.3ds", mimeType = "application/octet-stream")]
Expand All @@ -47,13 +47,13 @@ package

private var mesh:Mesh;

public function Main():void
public function Main():void
{
if (stage) setTimeout(init, 0);
else addEventListener(Event.ADDED_TO_STAGE, init);
}

private function init(e:Event = null):void
private function init(e:Event = null):void
{
removeEventListener(Event.ADDED_TO_STAGE, init);

Expand Down
2 changes: 1 addition & 1 deletion example/trail/Main.as
@@ -1,4 +1,4 @@
package
package trail
{
import a3dparticle.ParticlesContainer;
import away3d.containers.ObjectContainer3D;
Expand Down

0 comments on commit 8d5087b

Please sign in to comment.