question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature request: `Object3D.inFrustum`

See original GitHub issue
Description of the problem

The idea is to cache camera frustum checks on objects (a) to avoid recalculation and (b) to offer a simple interface.

As pointed out in https://stackoverflow.com/a/29424745, when .frustumCulled is enabled, .inFrustum could be populated as part of the frustum culling.

I would be happy to put up a PR if there is interest in the feature.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

14reactions
Mugen87commented, Aug 18, 2019

Well, yeah this could be a problem. Against this backdrop, inFrustum is indeed better. Especially since we already have Object3D.frustumCulled. So I think we can expect that users at a certain level of experience are familiar with the term “frustum”^^.

3reactions
Mugen87commented, Aug 20, 2019

I don’t think a feature of the library needs to cover all eventualities. The project often introduced enhancements (e.g. like Material.onBeforeCompile()) which provide benefits for a lot of basic use cases. Like I said before, topics are often made too complicated. I see no reason why we should not start with something simple which can later be replaced with something more sophisticated.

An aside but when do you consider it correct to introduce a new member function for a callback instead of an EventDispatcher callback like dispatchEvent({ type: ‘becameVisible’ })?

This is a personal preference.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Object3D#frustumCulled – three.js docs
Object3D. This is the base class for most objects in three.js and provides a set of properties and methods for manipulating objects in...
Read more >
three Matrix4 JavaScript Examples - ProgramCreek.com
returns the 2d corners of the bounding polygon * * offset is Vector3 (used for getting corners of object at a new position)...
Read more >
Transferable Semi-Supervised 3D Object Detection From RGB ...
To read the full-text of this research, you can request a copy directly from the authors. Request full-text PDF ...
Read more >
3D object detection for autonomous driving: Methods, models ...
In this method, 3D CNNs are used to extract the object features. ... In the second step, they used point cloud in frustum...
Read more >
UNPKG - @google/model-viewer
lib/features/scene-graph/three-dom-element.js",". ... option\n * or uses a strict identity check to determine whether or not to request\n * an update.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found