choppy animations in Firefox with mask

Hi guys, I have run into a performance issue with my personal website. I have this background animation that runs infinitely. On top of it there is a mask, making the edges fade out. This all works perfectly in chromium based browsers, but on firefox it lags a lot when using the mask. Disabling or removing the mask stops the lag and makes the animaton run smoothly. Is there anything I can do about this besides straight up disabling the mask if the user is using Firefox? I can provide code if necessary
5 Replies
capt_uhu
capt_uhu2mo ago
A couple of things come to mind but definitely going to need to see the live site or a codepen to know what's going on with this for sure
🌟🦋Amelia💜🌸
can i get astro running on codepen?
capt_uhu
capt_uhu2mo ago
not super familiar with astro but it does look like there's an option to "Add Packages" in codpens JS window settings? This might be what you're looking for.
🌟🦋Amelia💜🌸
i actually managed to replicate it with a bit of gpt help without astro, but the layout isnt fully matching, the issue is there tho does this link work for you @jsnkuhn https://codepen.io/MyPenUser/pen/gOJgERr ? just a note, i do run a 4K display which exagerates the effect, it also seems to be less bad on codepen? so u may have to expand the window for it lag for you as soon as i disable mask or rotation the animation is much more fluent if i add another container and rotate that instead of the rows then its less laggy but then the page lags on scroll instead of the animation
capt_uhu
capt_uhu2mo ago
I'm not getting any lag issues on FF myself and can't seem to make it lag. But that sure is a lot of generated DOM elements so it wouldn't surprise me to see it lag. It's good that it's animated on a transform so it is going to the GPU but I think you're really running into the limits here of what CSS is going to be able to handle. I'm guessing you'd probably be better off with a <canvas> for this. But if it's just an issue with adding the mask maybe it's from the compositing of 3 different gradients? You could do the left and right side transparency in one linear gradient then you'd only be compositing 2 images. You might be able to get away with one radial-gradient that looks similar enough to what your trying to accomplish with something like radial-gradient(at bottom, red, #0000). Then you wouldn't need the composite at all.
Want results from more Discord servers?
Add your server
More Posts
Chrome vs. Firefox 😳For this site: https://amarlong.github.io/Deichman/frontpage.html I have the picture set at 70dvh, Help me position the object.I need to place the object next to the <aside> but I can't get it to work. I'm working with the DjanTrying to inject styles in shadow-dom but element.shadowRoot is always nullSOLVED: Shadow Dom created by the browser cannot be altered. I am trying to style the timeline of anDark Mode with VueHello guys, is it good idea that i use class binding in dark mode feature with vuejs? Any SuggestioWhy aren't these grid elements moving next to each other?I'm using the following scheme in a 3-column grid layout: ```css img:nth-of-type(2n-1) { how do i select the contentnewBook.children[0] contains ```<div class="bookTitle"> <h3>Title:</h3> <span>Think How to prevent Flickering caused by backdrop-filter:blur() when transforming/moving on ChromeBrowserFor some reason there is no flickering on codepen. Here is my codepen: https://codepen.io/noobcoder1space travel frontend challenge not able to implement universal selectorI am following the scrimba kevin powell course for space travel website challenge I am in initial stHow to synchronize session IDs between Socket.io and API requests using Vite and Express?I'm working on a project where I need to synchronize session IDs between my Socket.io connections an“collapsing margins in action” sectionIn the “collapsing margins in action” of CSS Demystified, Kevin adds a padding top & a padding bott