TranslateOnAxis translates the specified distance on the specified local axis.
(axis *math32.Vector3, dist float32)
| 520 | |
| 521 | // TranslateOnAxis translates the specified distance on the specified local axis. |
| 522 | func (n *Node) TranslateOnAxis(axis *math32.Vector3, dist float32) { |
| 523 | |
| 524 | v := math32.NewVec3().Copy(axis) |
| 525 | v.ApplyQuaternion(&n.quaternion) |
| 526 | v.MultiplyScalar(dist) |
| 527 | n.position.Add(v) |
| 528 | n.matNeedsUpdate = true |
| 529 | } |
| 530 | |
| 531 | // TranslateX translates the specified distance on the local X axis. |
| 532 | func (n *Node) TranslateX(dist float32) { |
no test coverage detected