Skip to content

matBase

Defined in: packages/typegpu/src/data/wgslTypes.ts:475

A type which every matrix is assignable to. In most cases the union m2x2f | m3x3f | m4x4f is preferred, but when an implementation uses overloaded operators and is generic on the type, this makes the type checking much more laid back.

  • matInfixNotation<matBase>

readonly [$internal]: true

Defined in: packages/typegpu/src/data/wgslTypes.ts:476


readonly kind: "mat4x4f" | "mat2x2f" | "mat3x3f"

Defined in: packages/typegpu/src/data/wgslTypes.ts:477

[operatorMinus](lhs, rhs): matBase

Defined in: packages/typegpu/src/data/wgslTypes.ts:87

matBase

matBase

matBase

matInfixNotation.[operatorMinus]


[operatorPlus](lhs, rhs): matBase

Defined in: packages/typegpu/src/data/wgslTypes.ts:86

matBase

matBase

matBase

matInfixNotation.[operatorPlus]


[operatorStar](lhs, rhs): matBase

Defined in: packages/typegpu/src/data/wgslTypes.ts:88

number | matBase

number | matBase

matBase

matInfixNotation.[operatorStar]

[operatorStar](lhs, rhs): vecBase

Defined in: packages/typegpu/src/data/wgslTypes.ts:89

matBase

vecBase

vecBase

matInfixNotation.[operatorStar]

[operatorStar](lhs, rhs): vecBase

Defined in: packages/typegpu/src/data/wgslTypes.ts:90

vecBase

matBase

vecBase

matInfixNotation.[operatorStar]


add(other): matBase

Defined in: packages/typegpu/src/data/wgslTypes.ts:81

matBase

matBase

matInfixNotation.add


mul(other): matBase

Defined in: packages/typegpu/src/data/wgslTypes.ts:83

number | matBase

matBase

matInfixNotation.mul

mul(other): vecBase

Defined in: packages/typegpu/src/data/wgslTypes.ts:84

vecBase

vecBase

matInfixNotation.mul


sub(other): matBase

Defined in: packages/typegpu/src/data/wgslTypes.ts:82

matBase

matBase

matInfixNotation.sub