Skip to content

matBase

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

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:518


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

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

[operatorMinus](lhs, rhs): matBase

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

matBase

matBase

matBase

matInfixNotation.[operatorMinus]


[operatorPlus](lhs, rhs): matBase

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

matBase

matBase

matBase

matInfixNotation.[operatorPlus]


[operatorStar](lhs, rhs): matBase

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

number | matBase

number | matBase

matBase

matInfixNotation.[operatorStar]

[operatorStar](lhs, rhs): vecBase

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

matBase

vecBase

vecBase

matInfixNotation.[operatorStar]

[operatorStar](lhs, rhs): vecBase

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

vecBase

matBase

vecBase

matInfixNotation.[operatorStar]


add(other): matBase

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

matBase

matBase

matInfixNotation.add


mul(other): matBase

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

number | matBase

matBase

matInfixNotation.mul

mul(other): vecBase

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

vecBase

vecBase

matInfixNotation.mul


sub(other): matBase

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

matBase

matBase

matInfixNotation.sub