Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of https://github.com/Xorcerer/away3d-particles…

…-system into Xorcerer-master

Conflicts:
	example/Template.as
	example/explode/Main.as
	example/star/Main.as
  • Loading branch information...
commit 8d5087b7ec0a6c6a719994773b12a72cbaa9276c 2 parents c8f2418 + 0d9ad6a
@liaocheng authored
View
18 example/Template.as
@@ -1,4 +1,4 @@
-package
+package
{
import a3dparticle.animators.actions.color.ChangeColorByLifeGlobal;
import a3dparticle.animators.actions.position.OffsetPositionLocal;
@@ -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;
@@ -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);
@@ -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.
View
2  example/bubbles/Main.as
@@ -1,4 +1,4 @@
-package
+package bubbles
{
import a3dparticle.animators.actions.color.ChangeColorByLifeGlobal;
import a3dparticle.animators.actions.drift.DriftLocal;
View
6 example/bubbles/PlayUI.as
@@ -1,4 +1,4 @@
-package
+package bubbles
{
import a3dparticle.ParticlesContainer;
import flash.display.Sprite;
@@ -41,11 +41,11 @@ package
{
if (check.selected)
{
- target.timeScale = -1;
+ target.playbackSpeed = -1;
}
else
{
- target.timeScale = 1;
+ target.playbackSpeed = 1;
}
}
View
10 example/explode/Main.as
@@ -1,4 +1,4 @@
-package
+package explode
{
import a3dparticle.animators.actions.color.ChangeColorByLifeGlobal;
import a3dparticle.animators.actions.rotation.AutoRotateGlobal;
@@ -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;
@@ -30,7 +30,7 @@ package
* @author liaocheng
*/
[SWF(width="1024", height="768", frameRate="60")]
- public class Main extends Sprite
+ public class Main extends Sprite
{
protected var _view:View3D;
@@ -38,13 +38,13 @@ package
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);
View
2  example/fire/Fire.as
@@ -1,4 +1,4 @@
-package
+package fire
{
import a3dparticle.animators.actions.acceleration.AccelerateGlobal;
import a3dparticle.animators.actions.color.ChangeColorByLifeGlobal;
View
8 example/fire/Main.as
@@ -1,4 +1,4 @@
-package
+package fire
{
import a3dparticle.ParticlesContainer;
import away3d.containers.View3D;
@@ -18,7 +18,7 @@ package
public class Main extends Sprite
{
protected var _view:View3D;
-
+
private var particle:ParticlesContainer;
public function Main():void
@@ -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);
}
View
2  example/fire/Smoke.as
@@ -1,4 +1,4 @@
-package
+package fire
{
import a3dparticle.animators.actions.color.ChangeColorByLifeGlobal;
import a3dparticle.animators.actions.drift.DriftLocal;
View
2  example/fireworks/Main.as
@@ -1,4 +1,4 @@
-package
+package fireworks
{
import a3dparticle.animators.actions.brokenline.BrokenLineLocal;
import a3dparticle.animators.actions.position.OffsetPositionLocal;
View
2  example/fountain/Main.as
@@ -1,4 +1,4 @@
-package
+package fountain
{
import a3dparticle.animators.actions.acceleration.AccelerateGlobal;
import a3dparticle.animators.actions.color.ChangeColorByLifeGlobal;
View
2  example/snow/Main.as
@@ -1,4 +1,4 @@
-package
+package snow
{
import a3dparticle.animators.actions.drift.DriftLocal;
import a3dparticle.animators.actions.fog.FogByDistanceGlobal;
View
10 example/star/Main.as
@@ -1,4 +1,4 @@
-package
+package star
{
import a3dparticle.animators.actions.color.FlickerGlobal;
import a3dparticle.animators.actions.color.RandomColorLocal;
@@ -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;
@@ -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")]
@@ -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);
View
2  example/trail/Main.as
@@ -1,4 +1,4 @@
-package
+package trail
{
import a3dparticle.ParticlesContainer;
import away3d.containers.ObjectContainer3D;
Please sign in to comment.
Something went wrong with that request. Please try again.