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

add an interval parameter for better performance #50

Merged
merged 1 commit into from
Nov 15, 2017

Conversation

vincentfretin
Copy link
Contributor

Add an interval parameter to specify a number of milliseconds to wait in between each intersection test, similar to what we have in A-Frame raycaster component. I set the default interval to 0 so there is no change in behavior.

With giant meshes like the ground generated with the environment component, when aiming with GearVR controller the fps drops from 60 to 30.
Specify interval: 100, I have 50 fps which is much better.

You can use aframe-fps-counter-component to see the fps in vr mode like this:

<a-entity id="cameraRig">
  <a-entity
    class="right-controller"
    gearvr-controls
    teleport-controls="cameraRig: #cameraRig; button: trigger; maxLength: 200; type: line; interval: 100; landingMaxAngle: 135; collisionEntities: .environmentGround, .environmentDressing"
  >
    <a-entity fps-counter="for90fps: false" position="0 0 -1" />
  </a-entity>
</a-entity>

@fernandojsg
Copy link
Owner

Cool, thanks!

@fernandojsg fernandojsg merged commit 2ab0e38 into fernandojsg:master Nov 15, 2017
@vincentfretin vincentfretin deleted the interval-parameter branch November 15, 2017 12:32
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.

None yet

2 participants