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dxctZdCBtuUOLnZn2Mc.8WzR6.XqkbfqmSp+iyWVsn+u13Lo6TOpJ62f.+5LwBfD1LE9iE2imvXV5udymwGln5F+vDaKD2ynKW4LZ8Xbm0fQLm9O.LF+4b9RiSFLf4nR.3CM57S22ucycL8uVNUwECOip74Hg67oi6AqzNLX1EP9c.Rv1AotQsqhswHPOlvMrARHhEZhs0iEZNWn1Xpiu78NQ6igevnGG1CfIQ3GTaWiyv1DyU2.aL2k+dGmrC0JFZceMr180v52WCsuuF139Z392WCad2FhedwCmB0BFk1nocV2SBegit9IBJv.CYqZ+N3oNwm
So far my only issue with CSS has been the shadow causing lag in hise especially when there's a lot of components.
this one is pretty detailed so maybe i'm doing too much too
In the snippet the lag will be present the more you zoom in (for me at least) and I suspect it's what causing clipping issue inside my DAW though I could be wrong I need to test that part further.
-
@Gab shadows are a heavyweight operation (they CSS is already using the optimized melatonin shadow routines) and depending on the blur size there‘s not much you can do except for changing your design.
-
@Gab if the shadows are static it might be better to use an image.
-
@Christoph-Hart Good to know I'll try to avoid them as much as possible then, do you plan on expanding more with the CSS side or that's mostly the final form?
@d-healey Yes that's a good alternative too!
-
@Gab you can use a Webview and get the best performance that way.
-
@aaronventure I should learn about that part of hise for sure! is there major limitations that I should be aware of?
-
I'll try to avoid them as much as possible then, do you plan on expanding more with the CSS side or that's mostly the final form?
They are reasonably fast for smaller UI elements, but it looks like it has to blur your entire background image which is too much.
do you plan on expanding more with the CSS side or that's mostly the final form?
The renderer itself is almost done (minus some bugs & glitches of course), so the bulk of the remaining work will be improving the integration & development workflow. Regarding performance there is some overhead where CSS has to parse the stylesheets dynamically (mostly when using transitions / animations), but it's leaner than the script LAF system which has to run the LAF functions directly in the UI thread.
-
@Christoph-Hart For sure, and it doesn't help that my current project has lots of components with shadows so it's an issue to be expected & Can't wait to see new CSS integrations hopefully soon!
-
@Gab multiple components are not an issue - it‘s the big area of your entire plugin that you can‘t run a shadow on without expecting the framerate to drop.