sveltejs / gl

A (very experimental) project to bring WebGL to Svelte
https://svelte.dev/repl/8d6d139a3d634c2fb1e1ff107c123dd5?version=3.16.4
MIT License
603 stars 26 forks source link

DOM overlays #6

Closed Rich-Harris closed 5 years ago

Rich-Harris commented 5 years ago

Need a way to bind a 3d coordinate to 2d client coords

Rich-Harris commented 5 years ago

This is basically done:

<Overlay location={[x,y,z]} direction={[0,0,1]} let:normal>
  this text will appear fixed to the proper location.
  normal[2] should *in theory* tell you whether it's pointing
  at the user (so you can hide/show it) but it seems to be a touch buggy
</Overlay>