fixed camera filters

This commit is contained in:
robbis95 2024-03-30 18:54:38 +01:00
parent d992214c10
commit c588883267

View File

@ -69,9 +69,18 @@ export class RoomCameraWidgetManager implements IRoomCameraWidgetManager
filter.matrix = effect.colorMatrix; filter.matrix = effect.colorMatrix;
filter.alpha = selectedEffect.alpha; filter.alpha = selectedEffect.alpha;
if(!Array.isArray(sprite.filters)) sprite.filters = []; if(sprite.filters === undefined || sprite.filters === null)
{
sprite.filters.push(filter); sprite.filters = [filter];
}
else if(Array.isArray(sprite.filters))
{
sprite.filters = [...sprite.filters, filter];
}
else
{
sprite.filters = [sprite.filters, filter];
}
} }
else else
{ {