跳到主要内容

transformStartPosition 变换粒子的初始位置

transformStartPosition

类型: MethodDeclaration

所属类: ParticleElement

定义位置: animation.ts

描述

变换粒子的初始位置

返回值

类型: void

源代码

位置: 第 2260 行

private transformStartPosition(): void {
const {matrix} = this.emitter
// 如果发射器中存在矩阵,变换位置
if (matrix !== null) {
const a = matrix[0]
const b = matrix[1]
const c = matrix[3]
const d = matrix[4]
const e = matrix[6]
const f = matrix[7]
const {x, y} = this
this.x = a * x + c * y + e
this.y = b * x + d * y + f
}
}

文档生成时间:2025/7/7 12:07:06