Sure you can. If you're brave enough you can use webRTC over UDP and create you own UDP stack to handle packet order/drops etc. This has an additional advantage of less overhead in each message and that in turn means possible performance improvements.

Hi,
I've long wanted to implement a neat looking invisibility effect for my game, tried using DisplacementFilter,
but stumbled upon an issue with scale property. While it works correctly to displace areas under the displacement sprite I created, it also displaces
entire container on which the filter is applied. I presume its from non existent knowledge about the subject and how those filters work, but I'm still hoping
for either a fix or a reasonable explanation if anyone can help me with this please.
Everything in my code follows DisplacementMap example on pixijs.com (one with the grass and magnifying glass).
What is different is my stage tree. I have 3 containers for each layer and inside those there are separate containers for chunks that hold the map data, since it comes from the server.
const playerSprite = new PIXI.Sprite(new PIXI.Texture(PIXI.utils.TextureCache['player.eyes']));
const displacementSprite = new PIXI.Sprite(
new PIXI.Texture(PIXI.utils.TextureCache['player.normal'])
);
let displacementFilter = new PIXI.filters.DisplacementFilter(displacementSprite);
playerSprite.position.set(16 / globalScale * fs, (8 - globalScale) / globalScale * fs);
playerSprite.scale.set(globalScale, globalScale)
this.scene.addChild(playerSprite);
this.scene.addChild(displacementSprite);
displacementFilter.scale.x = 20;
displacementFilter.scale.y = 20;
displacementFilter.enabled = true;
displacementSprite.position.set(16 / globalScale * fs, (8 - globalScale) / globalScale * fs);
displacementSprite.scale.set(globalScale, globalScale)
return {
scene: this.scene,
filter: displacementFilter
};
the return value from this block is added to the main stage container, and filters are applied to bottom 2 layers.
Should i perhaps look into filterArea?
Here is the undesired effect on the edges. You can also see the slanted top layer on the trees. so 2 layers are moved by the filters scale property.