particle from particle editor

Software: Away3D 4.x

Avatar
TrueSign, Member
Posted: 21 August 2012 08:05 PM   Total Posts: 57

Hi,
I have created some particle effects in liaocheng’s effectEditorAIR and saved it as xml files. I can’t find anywhere how to use it:

var xmlLoader:URLLoader = new URLLoader();
xmlLoader.load(new URLRequest("../shapes/mine.xml"));
var 
_effectXML:XML = new XML(xmlLoader.data);
  
var 
factory:EffectGroupFactoryS = new EffectGroupFactoryS();
factory.importCode(_effectXML);
var 
effect:EffectGroup factory.createNeedStuff() as EffectGroup;
_view.scene.addChild(effect);
effect.start(); 

I can’t find anywhere EffectGroupFactoryS & EffectGroup Classes ? Is that example is out of date maybe? Could someone tell me how to implement my own particles created in particle editor by liaocheng ?

Thanks

   

Avatar
Alexander Seifert, Moderator
Posted: 21 August 2012 10:05 PM   Total Posts: 129   [ # 1 ]

Hi TrueSign,

the classes in question are found inside the particle editor project. Take a look at: github.com/liaocheng/particle_effect_editor/tree/master/src/particleEditor.

The thing with Liaocheng’s particles is that in order to use an exported XML effect definition with Away3D, you need to include source code of both projects, the particle editor itself as well as its Away3D integration (github.com/liaocheng/away3d-particles-system).

This requires to include the necessary AIR swc-files (don’t forget framework.swc needed for base64-decoding of any bitmap files you may have in your XML) and therefore causes some overhead in terms of includes. Actually, to begin with, it requires to upgrade your project from a possible AS3-only project to an AIR app. In case you don’t want to have that, you need to remove all classes from the particle editor project that reference AIR classes (mostly inputs, UI and all the mxml stuff). Doing so makes it hard to keep up with any updates Liaocheng may push. I really need to talk to him about splitting up the editor or at least clean the *S.as files from any AIR dependencies.

May I ask, what IDE do you use and what kind of project are you working on? I actually forked Liaocheng’s particle editor on github and created a branch with all AIR dependencies stripped that are unnecessary at runtime. I don’t know how much time I’ll be able to spend on that, but my intention was to achieve a clean separation and, most importantly, have Liaocheng on board in doing so wink

Hope I was able to help!
Cheers!
Alex

 Signature 
signature_image

http://www.deltastrike.org

   

Avatar
Cheng Liao, Administrator
Posted: 22 August 2012 06:17 AM   Total Posts: 116   [ # 2 ]

Yes. You need to include the framework.swc and the source code if you just want to import the xml code . You don’t need to setup a AIR project to compile you code , the code doesn’t mandatory reference any AIR class . These is a Flash Player version editor :
http://liaocheng.github.com/particles_editor/index.html
It use the same source code but is not a AIR project .
@Alexander:
Does your IED will check all the classes in the source code even if you doesn’t not reference them ? I use Flashdevelop and it will only check the classes referenced .

   

Avatar
Alexander Seifert, Moderator
Posted: 22 August 2012 08:10 AM   Total Posts: 129   [ # 3 ]

(shake)
Wow, what happened? Liaocheng, you are right, no AIR needed!

I must have confused a few things when I set up your particles with Away3D and Delta Strike the first time a few months ago. Back than I was absolutely convinced that I needed to strip half of the classes out of the source folder to avoid including AIR swc’s. Now that I review everything I have to conclude that it is not required, just as you say. My apologies! =) Cool thing! =)

However, some minor code changes were necessary to satisfy my IDE. I use FDT, which throws me errors, e.g. in UVSeqPicByTimeParam line 98+99, as it doesn’t recognize variable “cycle:ComboBoxInput” as a private member, but thinks method “.getValue” is called on the local variable “cycle:Number”, which doesn’t have such method. To satisfy FDT I had to rename the local variable, i.e. “cycleValue”.

But that’s details =)
Thanks and cheers!
Alex

 Signature 
signature_image

http://www.deltastrike.org

   

Avatar
TrueSign, Member
Posted: 22 August 2012 08:38 AM   Total Posts: 57   [ # 4 ]

Thanks Alexander and liaocheng.

I’m using this branch now: https://github.com/away3d/away3d-core-fp11/tree/particlesfeature for particle system. I can see that in particle editor are my missing classes. Thanks for that. I will test it soon.

I’m working on a 3d small game project but don’t have too much time lately to finish it: http://www.truesign.ie/sheeping/

   

Avatar
Alexander Seifert, Moderator
Posted: 22 August 2012 07:40 PM   Total Posts: 129   [ # 5 ]

Hahaha nice raspberry Love it =) Reminds me of “Extreme Sheep LED Art” on youtube =)

 Signature 
signature_image

http://www.deltastrike.org

   

Avatar
TrueSign, Member
Posted: 22 August 2012 07:56 PM   Total Posts: 57   [ # 6 ]

Thanks.
I live in Ireland, and my office is on a countryside. I have like 30 sheep neighbours just next to my window. And they’re making that annoying noises all the time. It was just a matter of time for me to start pushing them off from cliffs… smile

   

Avatar
TrueSign, Member
Posted: 25 August 2012 07:02 PM   Total Posts: 57   [ # 7 ]

I can’t figure it out how to do it.
code:
var factory:EffectGroupFactoryS = new EffectGroupFactoryS();
throws 6 errors of override another method & Access of possibly undefined properties. Do you have a sample code hot to import and run than particle xml files? Cheers

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X