项目作者: MonkYU

项目描述 :
基于文本的粒子动画 - Text diffusion animation consist of particles in iOS project
高级语言: Objective-C
项目地址: git://github.com/MonkYU/ParticlesText.git
创建时间: 2018-09-14T12:02:05Z
项目社区:https://github.com/MonkYU/ParticlesText

开源协议:MIT License

下载


ParticlesText

基于文本的粒子动画 - Text diffusion animation consist of particles in iOS project

Overview

  • ParticlesText是一个基于指定文本,生成粒子聚合和扩散动画的视图
  • 基于Metal
  • 支持粒子密度,X轴,Y轴方向扩散程度,动画时长,粒子颜色等设置

基本使用 - How To Use

  1. self.particlesMTKView = [[ParticlesMTKView alloc] initWithBuilder:^(ParticlesBuilder *builder) {
  2. builder.frame = CGRectMake(0, 160, CGRectGetWidth(self.view.bounds), 300);
  3. builder.text = @"天青色等烟雨 而我在等你";
  4. builder.font = [UIFont systemFontOfSize:60];
  5. builder.density = 10;
  6. builder.dispersionX = 2;
  7. builder.dispersionY = 2;
  8. builder.duration = 2.0;
  9. builder.hexColor = @"#1de0f9";
  10. builder.particleFinishType = ParticleFinishTypeShake;
  11. }];

English-Version

What is ParticlesText

  • ParticlesText is a view that generates particle aggregation and diffusion animation based on specified text.
  • Based on Metal
  • Support particle density, X-axis, Y-axis diffusion degree, animation duration, particle color, etc.

效果图

结束时静止

结束时静止

结束时震动

结束时晃动

结束时扩散消失

结束时扩散消失