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

Function reset

packages/melonjs/src/math/matrix3d.ts:29–37  ·  view source on GitHub ↗
(instance: Matrix3d, ...value: ConstructorArg)

Source from the content-addressed store, hash-verified

27type ConstructorArg = [Matrix3d] | SixteenNumbers | [undefined] | [];
28
29const reset = (instance: Matrix3d, ...value: ConstructorArg) => {
30 if (value[0] instanceof Matrix3d) {
31 instance.copy(value[0]);
32 } else if (typeof value[0] === "number") {
33 instance.setTransform(...value);
34 } else {
35 instance.identity();
36 }
37};
38
39/**
40 * a 4x4 Matrix3d Object

Callers 1

constructorMethod · 0.70

Calls 3

copyMethod · 0.45
setTransformMethod · 0.45
identityMethod · 0.45

Tested by

no test coverage detected