MCPcopy Create free account
hub / github.com/melonjs/melonJS / fromMat2d

Method fromMat2d

packages/melonjs/src/math/matrix3d.ts:135–155  ·  view source on GitHub ↗

* Copies over the upper-left 2x2 values from the given me.Matrix2d * @param m - the matrix object to copy from * @returns Reference to this object for method chaining

(m: Matrix2d)

Source from the content-addressed store, hash-verified

133 * @returns Reference to this object for method chaining
134 */
135 fromMat2d(m: Matrix2d) {
136 const b = m.val;
137 return this.setTransform(
138 b[0],
139 b[3],
140 b[6],
141 0,
142 b[1],
143 b[4],
144 b[7],
145 0,
146 b[2],
147 b[5],
148 b[8],
149 0,
150 0,
151 0,
152 0,
153 1,
154 );
155 }
156
157 /**
158 * multiply both matrix

Callers

nothing calls this directly

Calls 1

setTransformMethod · 0.95

Tested by

no test coverage detected