translate 平移
translate
类型: MethodDeclaration
所属类: Matrix
定义位置: webgl.ts
描述
平移
参数 x: 水平偏移距离
参数 y: 垂直偏移距离
返回值:当前矩阵
参数
| 参数名 | 类型 | 描述 | 默认值 | 
|---|---|---|---|
| x | number | - | - | 
| y | number | - | - | 
返回值
类型: this
当前矩阵
源代码
位置: 第 2750 行
public translate(x: number, y: number): this {
    this[6] += this[0] * x + this[3] * y
    this[7] += this[1] * x + this[4] * y
    return this
  }
文档生成时间:2025/7/21 20:53:39