设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 97|回复: 0

[转载发布] Particle Emitter - easy making particle effects in MV!

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    7959

    主题

    864

    回帖

    3万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    29925
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    38778

    灌水之王

    发表于 4 天前 | 显示全部楼层 |阅读模式
    ParticleEmitter.js v0.1.2
    Tsukimi

    Last updated: 2018/07/29: add demo sample project


    Introduction
    PIXI has particles inside but hard to use in RMMV interface.
    This plugin provide a simple interface to make particle systems.

    Features
    - Simple Creating and setting parameters of PIXI.particles.Emitter.


    Screenshots

    https://www.youtube.com/embed/DRbnXTH8LU8


    Demo
    download my demo project from here!


    How to Use

    Preparation:

    https://www.youtube.com/embed/MABQ4IDZgws
    (below are the steps in the video)

    1. first,
    make your desire particle emitter in the under website, and download the config file(.json).
    https://pixijs.io/pixi-particles-editor/



    ** First scroll down and set Rederer to Canvas2D to see correct visual effects !!
    This site use wrong method in WebGL mode. It will auto turn to WebGL mode if your game uses WebGL.


    2. create a folder named "particles" inside data/ and put config file inside it





    3. create a folder named "particles" inside img/ and put particle image file inside it





    4. open plugin manager, turn plugin on and write names of config file (in data/particles/) into it.




    The preparation is done.
    With only one command(createPEmitter), you can make the emitter show up in the game!


    ■■■ Create/Adjust emitter by plugin command:
    Spoiler: plugin command
    *** You can brief all "PEmitter" to "PE" for short ***

     createPEmitter {id} {config} {eventId} {imageNames ...}
      create a particle emitter.
      id: id of this controller. choose a name you like!
      config: config name download from the website (.json no need)
      eventId: the event which this emitter chase
           -1:player、0:this event、1~:event#
           x:no event, on screen;screen:on screen (only on current map)
      imageNames: image name inside img/particles/.

       ex: createPEmitter star#1 starEmitter x star1 star2
       Create an emitter named star#1, config is starEmitter.json,
       position based on screen. Images are star1.png & star2.png.


     pausePEmitter {id}
      pause emitting.

     resumePEmitter {id}
      resume emitting.

     stopPEmitter {id}
      stop emitter and delete after all particle i dead.

     deletePEmitter {id}
      delete emitter and all particles immediately.


     setPEmitterPos {id} {x} {y}
      set emitter (relative) position to (x,y).
      Besides numbers, you can also set these to x & y:
    Spoiler  x: Don't change from current parameter value     ex:x
      v<Number>: value of Game Variable<Number>     ex:v15
      r<#1>~<#2>: Random value between #1 and #2.   ex:r30~45
             #1 and #2 can also be variables.
       ex: setPEmitterPos star#1 10 x
        set emitter star#1's x coordinate to 10. (y doesn't change)

     movePEmitterPos {id} {x} {y} {duration} (easingFunction)
      move emitter (relative) position to (x,y) by {duration} frame.
      input→x: don't move
      easingFunction: move easing functions at https://easings.net/
      will be 'linear' if not specified

       ex: movePEmitterPos star#1 -10 20 60 easeOutBounce
         move emitter star#1 to (-10,20) in 60 frames, with
         bouncing animation.


     setPEmitterZ {id} {z}
      set emitter Z layer.
      z layer:
       0 : lower tile
       1 : lower character
       3 : character
       4 : upper tile
       5 : upper character
       6 : shadow of airship
       7 : Balloon
       8 : animation
       9 : map destination (white rectangle)

       ex: setPEmitterZ star#1 5
        set emitter star#1 z-layer to upper character.


     setPEmitterAsLocal {id} {true/false}
      create particle to event relative position
      instead of to the map.
      (if true, event move right -> all particle move right)


     setPEmitterStaticToPlayer {id} {true/false}
      should emitter set to player(-1) remain exist
      after map transition.(true -> exist)
      *Only effect on emitter set to player.


    Advanced moving:
    Spoiler: advanced moving
    (Q:Queue、R:Routine)

     movePEmitterPosQ {id} {x} {y} {duration} (easingFunction)
      Add move command to move queue. Will start next move
      after last move is finish.

       ex: movePEmitterPosQ star#1 0 20 60 easeOutBounce
          movePEmitterPosQ star#1 20 x 30 easeInBounce

        Move to (0,20) in 60f then move to (20,20) in 30f.


     movePEmitterPosQR {id} {x} {y} {duration} (easingFunction)
      Add move command to routine move queue.
      will repeat moving command in routine move queue.

      ex: movePEmitterPosQR star#1 -20 20 30
         movePEmitterPosQR star#1 20 20 30
         movePEmitterPosQR star#1 20 -20 30
         movePEmitterPosQR star#1 -20 -20 30


        (-20,20)→(20,20)→(20,-20)→(-20,-20)→(-20,20)→…


     clearPEmitterPosQ {id}
      clear move queue.

     clearPEmitterPosQR {id}
      clear routine move queue.





    ■■■ Create/Adjust emitter by Map/Event tags(notes):
    Spoiler: tags
    Map:
    <PEmitter:id,config,imageNames,...>
     Same as createPEmitter.
     However, eventId will be set to screen.

      ex:<PEmitter:star#1,starEmitter,star1,star2>

    <SetPEmitterPos:id,x,y>
     Same as setPEmitterPos.

    <SetPEmitterZ:id,z>
     Same as setPEmitterZ.

    <MovePEmitterPosQR:id,x,y,duration,easingFunc>
     Same as movePEmitterPosQR.


    event:
    <PEmitter:id,config,imageNames,...>
     Same as createPEmitter.
     However, eventId will be set to this event.

      ex:<PEmitter:star#1,starEmitter,star1,star2>

    <SetPEmitterPos:id,x,y>
     Same as setPEmitterPos.

    <SetPEmitterZ:id,z>
     Same as setPEmitterZ.

    <SetPEmitterAsLocal:id>
     Same as setPEmitterPosAsLocal.

    <MovePEmitterPosQR:id,x,y,duration,easingFunc>
     Same as movePEmitterPosQR.


    Script Download
    You can download(press ctrl+s) the script from here, or from my Github.

    FAQ
    Q: Error "Cannot set property x of null" show up.
    A: please check all names of config-files you use is filled into the plugin parameter "configName".

    Q:
    A:

    Terms of use
    Free to use in non-commercial/commercial games. Credits no need. (but I will be happy if you would write in your game!)


    Credit and Thanks
    - Author: Tsukimi (in this forum: cji3bp62000)


    Author's Notes
    Library/source used:
    - PIXI-particles from:
    https://github.com/pixijs/pixi-particles
    - Easing function from:
    http://gsgd.co.uk/sandbox/jquery/easing/


    本贴来自国际rpgmaker官方论坛作者:Tsukimi-neko处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/particle-emitter-easy-making-particle-effects-in-mv.97729/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-1 05:44 , Processed in 0.122265 second(s), 55 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表