Hello everyone, I have a situation where I need to enable Control+F and find the text which is inside a mesh and is shown in canvas. Any suggestions please?
Do not find yourself in a situation where you need to Ctrl+F to search within text which rendered in canvas, because canvas is just pixels, it ain’t searchable
i have some examples that allow for text select/ctrl-f et al. like mj said you would normally render css3d, or both css3d and sdf text. the upside with doing both is that gl text reacts to lights, fog, environments, postpro etc, this is what design agencies normally do because they are required to observe a11y. if you don’t need that don’t bother with webgl text.
You can create hidden element or popup with the same text that renders in the canvas. And show it when ctrl+f pressed.
if (e.code == 'KeyF' && e.ctrlKey) showHiddenText()