Skip to content

Conversation

@kushalkolar
Copy link
Member

@almarklein wanted to get your thoughts on this before I add it to #953

It adds to your implementation by adding properties and graphic features

@kushalkolar kushalkolar requested a review from clewis7 as a code owner November 29, 2025 22:31
@kushalkolar kushalkolar marked this pull request as draft November 29, 2025 22:31
@kushalkolar kushalkolar marked this pull request as ready for review November 30, 2025 11:18
@kushalkolar
Copy link
Member Author

kushalkolar commented Nov 30, 2025

made some examples with animations too, including ones that change the data. Positions and indices are just recomputed. Not sure if there's a better way.

ripple-2025-11-30_06.24.34.mp4

got the earth to rotate on it's tilted axis 😄

earth-2025-11-30_06.25.07.mp4
ellipsoid-2025-11-30_07.10.03.mp4

@kushalkolar kushalkolar mentioned this pull request Dec 1, 2025
6 tasks
@kushalkolar
Copy link
Member Author

was easy to add PolygonGraphic as a subclass of MeshGraphic 😄

poly_anim-2025-12-01_00.35.27.mp4
image

Copy link
Member Author

@kushalkolar kushalkolar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done with the additions and also added PolygonGraphic, let me know what you think :D

Comment on lines +80 to +81
if data.shape == (3,):
pass
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a single triangle?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was also confused by this, I interpreted it from here in the polygon selector:

if len(value) >= 3:
indices = triangulate(value)
else:
indices = np.zeros((0, 3), np.int32)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but that shape is still (0, 3), not (3, ), right?

_features = {
"positions": VertexPositions,
"indices": BufferManager,
"mapcoords": (BufferManager, None),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was the mapcoords feature removed intentionally? I can see it being useful.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I don't properly understand features vs normal properties.

@kushalkolar kushalkolar merged commit a5c7285 into mesh Dec 2, 2025
@almarklein almarklein deleted the mesh-with-gfeatures branch December 3, 2025 10:01
kushalkolar added a commit that referenced this pull request Dec 4, 2025
* Add support for mesh and surface

* restore line example

* Implement image-surface example

* Fix 3D camera for mesh examples

* Just remove selector logic for now

* new examples in gallery

* mesh with graphic features (#954)

* mesh with gfeatures

* surface graphic works

* update, add PolygonGraphic, works

* black

* for docs and test screenshots

* black

* polygon data updating works

* update

* black

* more examples

* update add_graphic mixin

* code review changes

* fix

* better polygon example

* remove unused import

* update graphics mixin

* docs

* black

* don't need to set limit for docs gen

* add missing comma

* dont run terrain example

* new screenshots

* remove (i expect) unnecessary check

* lights as properties

* just use VertexPositions

* update PolyData

* I need to use precommit

* update api docs

---------

Co-authored-by: Kushal Kolar <kushalkolar@gmail.com>
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.

3 participants