tapspace
Version:
A zoomable user interface lib for web apps
19 lines (18 loc) • 357 B
JavaScript
module.exports = function () {
// @Transform:getTranslation()
//
// Get the translation component of the transform without rotation
// and scaling.
//
// Return
// a Transform
//
const Transform = this.constructor
return new Transform(this.basis, {
a: 1,
b: 0,
x: this.helm.x,
y: this.helm.y,
z: this.helm.z
})
}