jscad / OpenJSCAD.org

JSCAD is an open source set of modular, browser and command line tools for creating parametric 2D and 3D designs with JavaScript code. It provides a quick, precise and reproducible method for generating 3D models, and is especially useful for 3D printing applications.
https://openjscad.xyz/
MIT License
2.61k stars 511 forks source link

Improve regl-renderer to better reuse same geometry with different location or color #806

Open hrgdavor opened 3 years ago

hrgdavor commented 3 years ago

Expected Behavior

Fast change of colors on colorcube example at jscad

Actual Behavior

slower than expected

Steps to Reproduce the Problem

  1. load https://openjscad.xyz/?uri=https://openjscad.xyz/examples/core/colors/colorCube.js
  2. change parameters
  3. wait for update on screen

Specifications

The colorcube example will also likely benefit from #805

hrgdavor commented 3 years ago

The concept that can provide this is instancing and is only available in wegl2.

To implement at some point in regl-rendere maybe

It may have too many obstacles in regl to implement, so it would have to be considered carefully before committing to do it.