Skip to content

Commit

Permalink
fix(VtkRenderer): add remote fps control as prop
Browse files Browse the repository at this point in the history
  • Loading branch information
jourdain committed Feb 21, 2018
1 parent cc10a7a commit cfe196e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/React/Renderers/VtkRenderer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ export default class VtkRenderer extends React.Component {
);
}

if (this.binaryImageStream.setMaxFrameRate) {
this.binaryImageStream.setMaxFrameRate(nextProps.maxFPS);
}

if (this.imageRenderer.setDrawFPS) {
this.imageRenderer.setDrawFPS(nextProps.showFPS);
}
Expand Down Expand Up @@ -161,6 +165,7 @@ VtkRenderer.propTypes = {
interactiveRatio: PropTypes.number,

throttleTime: PropTypes.number,
maxFPS: PropTypes.number,
};

VtkRenderer.defaultProps = {
Expand All @@ -178,4 +183,5 @@ VtkRenderer.defaultProps = {
interactiveRatio: 0.5,

throttleTime: 16.6,
maxFPS: 30,
};

0 comments on commit cfe196e

Please sign in to comment.