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

Example: Label appering on the given distance from object to camera #415

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

NataliaDSmirnova
Copy link

@NataliaDSmirnova NataliaDSmirnova commented Dec 3, 2023

The example shows a way to add custom labels. It presents how distance from camera to threebox object can be calculated using threejs math.

Note: distance is in world units (not meters).

Additional elements:

  • threejs stats measuring performance
  • threejs GUI control changing distance threshold
  • element showing the current distance from the camera to the red cube

Main functions:

  • createLabel()
  • updateLabel()

The example is a result of a conversation here: #409

image

@NataliaDSmirnova
Copy link
Author

@jscastro76, could you add any comments? I'd be grateful 😊

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.

1 participant