Skip to content

Is it possible to catch a signal when HeatmapMesh is fully rendered? (for animation purposes) #1832

Answered by loichuder
pedrobenetton asked this question in Q&A
Discussion options

You must be logged in to vote

Hello !

HeatmapMesh uses Three.js' Mesh underneath (via a VisMesh abstraction). All Three.js' Object3D have a onAfterRender callback property, which might do the trick: https://threejs.org/docs/?q=mes#api/en/core/Object3D.onAfterRender

In your case, you can try to pass visProps with an adequate onAfterRender property:

        <HeatmapMesh
          values={valuesArray}
          domain={domain}
          scaleType={scaleType}
          colorMap={colorMap}
          visProps={{onAfterRender: ...}}
        />

I never used this callback myself so be please do tell if it works for you or not.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@pedrobenetton
Comment options

Answer selected by pedrobenetton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants