Skip to content

Commit

Permalink
fix: update webgl buffers on render
Browse files Browse the repository at this point in the history
  • Loading branch information
Stukova committed Nov 14, 2024
1 parent ff62932 commit 67febbf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 7 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,13 @@ export class Graph {
*/
public render (simulationAlpha?: number): void {
this.graph.update()
this._hasPointPositionsChanged = true
this._hasPointColorsChanged = true
this._hasPointSizesChanged = true
this._hasLinksChanged = true
this._hasLinkColorsChanged = true
this._hasLinkWidthsChanged = true
this._hasLinkArrowsChanged = true
const { fitViewOnInit, fitViewDelay, fitViewPadding, fitViewDuration, fitViewByPointsInRect, initialZoomLevel } = this.config
if (!this.graph.pointsNumber && !this.graph.linksNumber) {
this.stopFrames()
Expand Down
2 changes: 0 additions & 2 deletions src/modules/Points/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,6 @@ export class Points extends CoreModule {
if (!this.sampledPointIndices) this.sampledPointIndices = reglInstance.buffer(0)
this.sampledPointIndices(createIndexesForBuffer(store.pointsTextureSize))

this.updateSize()
this.updateColor()
this.updateGreyoutStatus()
this.updateSampledPointsGrid()
}
Expand Down

0 comments on commit 67febbf

Please sign in to comment.