ZContent_ParticleFX:Adafruit NeoPixel矩阵的点光源效果

  • e4_501889
    了解作者
  • 17KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-05-30 11:18
    上传日期
ZContent_ParticleFX Adafruit NeoPixel矩阵的点光源效果 这个Arduino库使用Adafruit NeoPixel矩阵为光点创建动画特效。 这些“粒子”可以单独使用或链接在一起以创建复杂的动画,例如烟火,仙子(即“叮叮铃”),萤火虫和火。 将效果链接在一起时,它们可以使用wait选项串联或并联运行。 例如,使用“移动”效果拍摄一个简单的动画,以将粒子从A点移动到B点。并行添加“暗淡”效果,该效果创建粒子从A点移动到B点而亮度降低的动画。粒子在到达点B之前是不可见的。再加上“暂停”效果可以延迟变暗的开始,直到该点可能位于点A和“点B”之间的一半为止。“暂停”和“暗淡”效果将串联运行,而移动效果将与“暂停”和“暗淡”效果并行运行。 这类似于流星在天空中出现的方式。 班级 这些是ParticleFX库的主要类: 粒子-这是受效果控制的“光点” part
ZContent_ParticleFX-main.zip
  • ZContent_ParticleFX-main
  • particle.h
    2.3KB
  • particlefx.cpp
    10.7KB
  • particle.cpp
    2.8KB
  • examples
  • fireflies_example
  • fireflies_example.ino
    1.6KB
  • pongpath.h
    4.2KB
  • middlerpath.h
    1.4KB
  • ziggypath.h
    3.2KB
  • fire_example
  • fire_example.ino
    3.7KB
  • particlefx.h
    6.8KB
  • README.md
    3.3KB
  • particlegfx.cpp
    6.2KB
  • particlegfx.h
    1.9KB
内容介绍
# ZContent_ParticleFX Point of light effects with an Adafruit NeoPixel matrix This Arduino library uses an Adafruit NeoPixel matrix to create animated special effects for points of light. These "particles" can be used singlely or chained together to create complex animations like fireworks, fairies (i.e. "Tinker Bell"), fireflies, and fire. When effects are chained together, they can run in series or in parallel using the wait option. For example, take a simple animation using the Move effect to move a particle from point A to point B. Add to this The Dim effect in parallel, which creates the animation of a particle moving from point A to point B while the brightness decreases so the particle is invisible by the time it reaches point B. Add to this the Pause effect to delay the start of the dim until the point is perhaps half way between point A and Point B. The Pause and Dim effects would run in series while the Move effect would run in parallel with the Pause and Dim effects. This is similar to the way a shooting star appears in the sky. ## Classes These are main classes to the ParticleFX library: particle - This is the "point of light" that is controlled by the effects particleEffect - The main class where all effects are derived from (see Effects section below) particleEffectList - This class contains the list of effects that are applied to the particle particlegfx - This class draws the particles onto the pixel matrix ## Effects Here is a list of the effects that are available in the libray: effectDim(particle *particle, bool wait, uint16_t brightness, int16_t speed) effectPause(particle *particle, bool wait, uint16_t speed) effectsetColor(particle *particle, bool wait, uint8_t red, uint8_t green, uint8_t blue) effectMove(particle *particle, bool wait, int16_t movetox, int16_t movetoy, uint16_t speed = 1, bool moveback = false) effectFloat(particle *particle, bool wait, uint16_t speed = 1, uint16_t amplitude = 4) effectMotionBlur(particle *particle, bool wait, particlegfx *particlegfx, Adafruit_NeoMatrix *matrix, uint16_t framecount, float dimvalue = .7) effectTwinkle(particle *particle, bool wait, uint16_t speed = 10, float dimvalue = .5 ) ## Library Requirements In addition to this library, the following GitHub libraries are needed in order to use this library. Adafruit_GFX - https://github.com/adafruit/Adafruit-GFX-Library Adafruit_NeoMatrix - https://github.com/adafruit/Adafruit_NeoMatrix Adafruit_NeoPixel - https://github.com/adafruit/Adafruit_NeoPixel ## Hardware Requirements This library was tested using the Adafruit NeoPixel NeoMatrix 8x8 board. Other matrix boards may work but they have not been tested. The M0 and NRF52480 based Feathers from Adafruit have been tested using this library. Other Feathers may work but have not been tested. ## Examples Examples are written based on an 8x8 matrix, however it is programmed as a 64x64 matrix and then reduced to the lower resolution to create a smooth, anti-aliasing type effect with the animations. Examples can be found in the examples folder and a are a great way to see how to use the library. This project and documentation is under development and more examples are expected to be added in the future. Animation videos and project status can also be found on the author's twitter account @cogliano.
评论
    相关推荐