mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-27 01:40:52 +01:00
fixed camera filters
This commit is contained in:
parent
d992214c10
commit
c588883267
@ -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
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user