Korijn van Golen

Results 301 comments of Korijn van Golen

> I guess the reset view code is somewhat related to #148. I'll try and define a better API for Controllers on that issue and take resetting into account. FYI...

@kushalkolar Are you still interested in completing this work?

You could reconstruct a `TRIANGLES` style index with some vectorized numpy code and reuse the `generate_vertex_normals` function as-is.

* Adding a unit test would definitely help understanding your scenario. * Is `-1` your primitive restart index value? I think this should work: ```python zipped = np.array([indices[:-2], indices[1:-1], indices[2:]])...

The numpy version should be faster, particularly for very large indices.

You'd have to split the array into subarrays first, then call the index restructuring procedure for each of the subarrays, and then concatenate them.

something like this: https://stackoverflow.com/a/38278327/552379

You can ignore the area of the triangles to get that result. Maybe add a kwarg `weighted=True` to the `generate_vertex_normals` function?

GLFW for example uses `loop.run_forever()` instead of `loop.run_until_complete(...)`: https://github.com/pygfx/wgpu-py/blob/e1987d044eaab480f03b08c2ed97e7f2faae8446/wgpu/gui/glfw.py#L514-L518