TuSDKMediaParticleEffect Class Reference

Inherits from TuSDKMediaEffectCore : NSObject
Declared in TuSDKMediaParticleEffect.h

Overview

粒子特效

Other Methods

– initWithEffectsCode:atTimeRange:

构建粒子特效实例

- (instancetype)initWithEffectsCode:(NSString *)effectsCode atTimeRange:(TuSDKTimeRange *)timeRange

Parameters

effectsCode

粒子特效code

timeRange

生效时间

Return Value

TuSDKMediaParticleEffectData

Declared In

TuSDKMediaParticleEffect.h

– initWithEffectsCode:

构建粒子特效实例

- (instancetype)initWithEffectsCode:(NSString *)effectsCode

Parameters

effectsCode

粒子特效code

Return Value

TuSDKMediaParticleEffectData

Declared In

TuSDKMediaParticleEffect.h

  effectsCode

特效code

@property (nonatomic, copy, readonly) NSString *effectsCode

Declared In

TuSDKMediaParticleEffect.h

  particleSize

特效的大小 0 ~ 1 0:原始默认大小 1:最大放大倍数后的大小

@property (nonatomic, assign) CGFloat particleSize

Declared In

TuSDKMediaParticleEffect.h

  particleColor

特效的颜色

@property (nonatomic, strong) UIColor *particleColor

Declared In

TuSDKMediaParticleEffect.h

  recordPathDic

轨迹记录数组

@property (nonatomic, strong) NSMutableDictionary<NSValue*NSValue*> *recordPathDic

Declared In

TuSDKMediaParticleEffect.h

ParticleEmitPosition Methods

– updateParticleEmitPosition:withCurrentTime:

更新当前正在添加的粒子特效的发射器位置

- (void)updateParticleEmitPosition:(CGPoint)point withCurrentTime:(CMTime)time

Parameters

point

粒子发射器位置 左上角为(0,0) 右下角为(1,1)

Availability

v3.0

Declared In

TuSDKMediaParticleEffect.h

– updateParticleEmitPosition:

更新粒子特效的发射器位置

- (void)updateParticleEmitPosition:(CGPoint)point

Parameters

point

粒子发射器位置 左上角为(0,0) 右下角为(1,1)

Availability

v3.0

Declared In

TuSDKMediaParticleEffect.h

– hasPointWithTime:

判断某一时刻是否有对应的轨迹点

- (BOOL)hasPointWithTime:(CMTime)time

Parameters

time

时间

Return Value

YES:该时刻有对应的轨迹点

Availability

v3.0

Declared In

TuSDKMediaParticleEffect.h

– getPointWithTime:

获得某一时刻对应的轨迹点 无对应点时返回 (0,0)

- (CGPoint)getPointWithTime:(CMTime)time

Parameters

time

时间

Return Value

触发的坐标点

Declared In

TuSDKMediaParticleEffect.h

– getPointWithRoughTime:

获得某一时刻对应的粗略轨迹点 无对应点时返回 (0,0)

- (CGPoint)getPointWithRoughTime:(CMTime)time

Parameters

time

当前时间

Return Value

触发的坐标点

Availability

v3.0

Declared In

TuSDKMediaParticleEffect.h