scale3dSelf()
scale3dSelf(scale)
scale3dSelf(scale, originX)
scale3dSelf(scale, originX, originY)
scale3dSelf(scale, originX, originY, originZ)
Parameters
scale
A multiplier; the scale value. If no scale is supplied, this defaults to 1
. If scale is not 1, the is2D
property of the current matrix is set to false
.
originX
Optional
An x-coordinate for the origin of the transformation. If no origin is supplied, this defaults to 0
.
originY
Optional
A y-coordinate for the origin of the transformation. If no origin is supplied, this defaults to 0
.
originZ
Optional
A z-coordinate for the origin of the transformation. If no origin is supplied, this defaults to 0
.
Returns itself; a DOMMatrix
.
const matrix = new DOMMatrix();
console.log(matrix.scale3dSelf(2).toString());
/* matrix3d(
2, 0, 0, 0,
0, 2, 0, 0,
0, 0, 2, 0,
0, 0, 0, 1) */
console.log(matrix.scale3dSelf(3.1, 25, 25, 1.25).toString());
/* matrix3d(
6.2, 0, 0, 0,
0, 6.2, 0, 0,
0, 0, 6.2, 0,
-105, -105, -5.25, 1) */
console.log(matrix.toString());
/* matrix3d(
6.2, 0, 0, 0,
0, 6.2, 0, 0,
0, 0, 6.2, 0,
-105, -105, -5.25, 1) (same as above) */
Specifications Browser compatibility
Loadingâ¦
See alsoDOMMatrixReadOnly.scale3d()
DOMMatrix.scaleSelf()
transform
property and the scale3d()
and matrix3d()
functionstransform
attributeCanvasRenderingContext2D
interface transform()
methodRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4