-
-
Notifications
You must be signed in to change notification settings - Fork 36k
Improve HTMLMesh (transparent and html size changes) #23662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…dd example - handle transparency : do we lose ms if the texture is transparent for nothing ? (canvas is not) - dispose the canvasTexture when the canvas size changed. Do not understand why this is needed - shadow root : finally won't use it to avoid adding not so usefull code : LitElement can stop using shadowRoot (`createRenderRoot() {return this;}`) - add vanilly/lit/react html for htmlmesh with interactions - commit the screenshot jpg to not avoid that CI error `Make screenshot for example(s): webxr_vr_htmlmesh` - webxr_vr_htmlmesh.html won't probably be in dev, but that to have a green CI
ac71af5
to
4044931
Compare
…d in the html example not in the HTMLMesh.js (see `lit-updated` event). Because MutationObserver doesn't trigger when shadow changes, not even when it is attached the the dom, thus this is easier and cleaner to handle in Lit
Hi! Waiting for your feedbacks. Especially about the |
…mples` . Do we have to commit that?
Hmm, what are your questions exactly? |
@remmel I have something working for the canvas size changed, I emit a size-changed event and recreate the mesh in an aframe component, surely we could recreate only the geometry instead of recreating the whole mesh, geometry, material and texture but I didn't succeed to do that. You were close to detect canvas size change, but you needed setting canvas.width and canvas.height out of the condition. See AdaRoseCannon/aframe-htmlmesh#14 (aframe-htmlmesh repo contains a copy of master HTMLMesh.js) |
@remmel Do you mind splitting this into multiple PRs? The resize code is blocking the other improvements. |
…24030) * Add some more input types and support rounded rectangles * actually perform border check * remove unneeded code * s/roundRectPath/buildRectPath/ * range input handler * Clean up. * More clean up. Co-authored-by: mrdoob <[email protected]>
Transparency has already been added 3ac055ce6111b5a63cf81c081e3c5f5940fb4e6a |
Description
Small HtmlMesh improvement
Demo
The CI fail, because I make myself the screenshot (cannot run make screenshot locally)
const mouseEventInit = {bubbles: true};
fixes it, but after I get error from Google Translate chrome plugin :s) - I won't fix it