Skip to content

matBase

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.

readonly [$internal]: true

packages/typegpu/src/data/wgslTypes.ts:522


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

packages/typegpu/src/data/wgslTypes.ts:523

[operatorMinus](lhs, rhs): matBase

matBase

matBase

matBase

matInfixNotation.[operatorMinus]

packages/typegpu/src/data/wgslTypes.ts:94


[operatorPlus](lhs, rhs): matBase

matBase

matBase

matBase

matInfixNotation.[operatorPlus]

packages/typegpu/src/data/wgslTypes.ts:93


[operatorStar](lhs, rhs): matBase

number | matBase

number | matBase

matBase

matInfixNotation.[operatorStar]

packages/typegpu/src/data/wgslTypes.ts:95

[operatorStar](lhs, rhs): vecBase

matBase

vecBase

vecBase

matInfixNotation.[operatorStar]

packages/typegpu/src/data/wgslTypes.ts:96

[operatorStar](lhs, rhs): vecBase

vecBase

matBase

vecBase

matInfixNotation.[operatorStar]

packages/typegpu/src/data/wgslTypes.ts:97


add(other): matBase

matBase

matBase

matInfixNotation.add

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


mul(other): matBase

number | matBase

matBase

matInfixNotation.mul

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

mul(other): vecBase

vecBase

vecBase

matInfixNotation.mul

packages/typegpu/src/data/wgslTypes.ts:91


sub(other): matBase

matBase

matBase

matInfixNotation.sub

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