videojs / videojs-vr

A plugin to add 360 and VR video support to video.js.
https://videojs-vr.netlify.com/
MIT License
528 stars 143 forks source link

feat: Allow three.js renderer options to be configurable #259

Open Smidgens opened 2 years ago

Smidgens commented 2 years ago

Description

When the videojs-vr plugin instantiates a three.js WebGL Renderer, it uses hardcoded values. This change will allow users to override these defaults. This would be beneficial for performance reasons, such as disabling antialiasing or tweaking power preference.

Specific Changes proposed

  1. In the defaults options object in plugin.js, there is now a property called threeRendererOptions containing values previously hardcoded.
  2. The renderer is now instantiated with options_.threeRendererOptions which is a merged result of the default values and those supplied by the user (if any), similar to how Omnitone is set up.