-
Notifications
You must be signed in to change notification settings - Fork 33
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
discussion: set renderer settings using javascript at instantiation? #872
Comments
With the current aframe code, logarithmicDepthBuffer can only be set initially in the html, see In my project I'm generating the a-scene from solidjs <a-scene
attr:renderer={`anisotropy:4;stencil:true;physicallyCorrectLights:true;colorManagement:true;logarithmicDepthBuffer:${
searchParams.logarithmicDepthBuffer === "true"
}`}
> so I can use ?logarithmicDepthBuffer=true in the url. The aframe code doesn't really allow to recreate the WebGLRenderer with a different config, and I don't think you can change logarithmicDepthBuffer after it's created. |
@vincentfretin thanks yes that's the point of my question here. It does seems like you are doing exactly what I'm suggesting via solidjs -- is that not possible with 3dstreet because of index.html structure hardcoding the values -- and the only way to do that is to inject the a-scene dynamically such that we can control the attribute values of renderer like you are doing with solidjs? Or is it possible to set the attribute value of renderer prior to the scene being instantiated? Here's a not good, crazy idea but just brainstorming another way:
|
Oh actually it should now be possible to wait before initializing aframe in aframe 1.6.0/master with |
@vincentfretin for discussion, curious to get your thoughts -- both logdepthbuffer and preservedrawbuffer are settings that we want to set in some cases, but maybe not in others.
For example logdepth doesn't work with gaussian splat scenes at the moment, and in theory preserveddrawbuffer may result in undesirable performance on lower power devices (not proven).
One approach is to be able to set these renderer settings when it is instantiated but instead of as attributes on the a-scene, instead to use javascript logic -- either from a querystring, hash, or a database lookup.
The text was updated successfully, but these errors were encountered: