Skip to content

Add instances() API for primitive instancing#8952

Open
aashu2006 wants to merge 3 commits into
processing:mainfrom
aashu2006:instances-api
Open

Add instances() API for primitive instancing#8952
aashu2006 wants to merge 3 commits into
processing:mainfrom
aashu2006:instances-api

Conversation

@aashu2006

Copy link
Copy Markdown
Contributor

Addresses #8911

Changes

  • Add a new instances(count) API for primitive instancing in WebGL.
  • Support instancing for primitives including sphere(), box(), plane(), ellipsoid(), cylinder(), cone(), and torus().
  • Support instances(count).model(geometry) while preserving existing model(geometry, count) behavior.
  • Forward instance counts through the existing rendering pipeline to _drawGeometry().
  • Add unit tests covering primitive instancing, model instancing, explicit count precedence, and cleanup of temporary instance state.

PR Checklist

  • npm run lint passes
  • Inline reference is included / updated
  • Unit tests are included / updated

@aashu2006 aashu2006 changed the title Instances api Add instances() API for primitive instancing Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant