vatro / svelthree

Create three.js content using Svelte components.
https://svelthree.dev
MIT License
482 stars 15 forks source link

`WebGLRenderer` review `on:before_render` and `on:after_render` with `mode="auto"` #139

Closed vatro closed 1 year ago

vatro commented 2 years ago

to check / fix / polish:

I assume a problem with this line:

https://github.com/vatro/svelthree/blob/433dea2623a3620281b5f5b9fef62377c0dc235b/src/components/WebGLRenderer.svelte#L590

this hack will work with on:before_render:

  // overriding initially set value (via shorthand attribute / markup) once programmatically from inside `animate()`!
  if (e.detail.frame === 0) {
      obj3d.rot = [0,0,0]
  }
  obj3d.rot[1] = rot_y
vatro commented 1 year ago

this is a svelte-acmod issue. We're now default Svelte first.