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.alpha = selectedEffect.alpha;
if(!Array.isArray(sprite.filters)) sprite.filters = [];
sprite.filters.push(filter);
if(sprite.filters === undefined || sprite.filters === null)
{
sprite.filters = [filter];
}
else if(Array.isArray(sprite.filters))
{
sprite.filters = [...sprite.filters, filter];
}
else
{
sprite.filters = [sprite.filters, filter];
}
}
else
{