diff --git a/NEW_RELEASE_NOTES.md b/NEW_RELEASE_NOTES.md index 4a1a9c7fa7e..6582a859a95 100644 --- a/NEW_RELEASE_NOTES.md +++ b/NEW_RELEASE_NOTES.md @@ -7,3 +7,5 @@ for next branch cut* header. appropriate header in [RELEASE_NOTES.md](./RELEASE_NOTES.md). ## Release notes for next branch cut + +- web: Added missing setMat3Parameter()/setMat4Parameter() to MaterialInstance diff --git a/web/filament-js/filament.d.ts b/web/filament-js/filament.d.ts index bd6a4d8d9a4..d0bfaa0372a 100644 --- a/web/filament-js/filament.d.ts +++ b/web/filament-js/filament.d.ts @@ -170,6 +170,8 @@ export class MaterialInstance { public setFloat2Parameter(name: string, value: float2): void; public setFloat3Parameter(name: string, value: float3): void; public setFloat4Parameter(name: string, value: float4): void; + public setMat3Parameter(name: string, value: mat4): void; + public setMat4Parameter(name: string, value: mat3): void; public setTextureParameter(name: string, value: Texture, sampler: TextureSampler): void; public setColor3Parameter(name: string, ctype: RgbType, value: float3): void; public setColor4Parameter(name: string, ctype: RgbaType, value: float4): void; diff --git a/web/filament-js/jsbindings.cpp b/web/filament-js/jsbindings.cpp index 823d512a6b8..11634105458 100644 --- a/web/filament-js/jsbindings.cpp +++ b/web/filament-js/jsbindings.cpp @@ -1290,6 +1290,12 @@ class_("MaterialInstance") .function("setFloat4Parameter", EMBIND_LAMBDA(void, (MaterialInstance* self, std::string name, filament::math::float4 value), { self->setParameter(name.c_str(), value); }), allow_raw_pointers()) + .function("setMat3Parameter", EMBIND_LAMBDA(void, + (MaterialInstance* self, std::string name, filament::math::mat3f value), { + self->setParameter(name.c_str(), value); }), allow_raw_pointers()) + .function("setMat4Parameter", EMBIND_LAMBDA(void, + (MaterialInstance* self, std::string name, filament::math::mat4f value), { + self->setParameter(name.c_str(), value); }), allow_raw_pointers()) .function("setTextureParameter", EMBIND_LAMBDA(void, (MaterialInstance* self, std::string name, Texture* value, TextureSampler sampler), { self->setParameter(name.c_str(), value, sampler); }), allow_raw_pointers())