Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added useGameVar hook #4

Merged
merged 1 commit into from
Jul 31, 2021
Merged

feat: added useGameVar hook #4

merged 1 commit into from
Jul 31, 2021

Conversation

2hwk
Copy link
Member

@2hwk 2hwk commented Jul 31, 2021

Added useGameVar() hook for GameVars i.e. CAMERA POSITION IN PLANE

src/hooks/simVars.tsx Outdated Show resolved Hide resolved
@Benjozork Benjozork merged commit e8664cb into flybywiresim:main Jul 31, 2021
Benjozork pushed a commit that referenced this pull request Jul 31, 2021
* // only refresh the useGameVar every 200ms (unless this useGameVar is lower elsewhere)
* const time = useGameVar('CAMERA POS IN PLANE', 'xyz', 200);
*
* @returns {[*, (function(*): void)]}
Copy link
Member

Choose a reason for hiding this comment

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

thought: Return signature documentation seems incorrect? Same on the existing useGlobalVar.

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