Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
x3dom uses a non-standard Environment node for these settings which means that x_ite generates a warning in the console about not recognizing such a node. Would you still want to go ahead ?
Also, I noticed there is a lot of code duplication for setting up the scene for each chart (making a x3d, scene and background element for each chart). I can insert an Environment node for each chart separately but it may start make sense to centralize and share utility functions between charts. I would not know how to do that best given the code structure.
I have just pulled the changes over from your gammaCorrection branch and merged them in.
As you point out there is a lot of code duplication where each of the src/chart/* files each has an identical createBase() function which created the x3d base, background (and now environment) tags. This createBase() does indeed need moving to a DRYer base module type place.
ah, I have already merged in your changes, I'll have a look at how this manifests itself for x_ite and make may have to implement something which detects whether it is running on x3dom or x_ite.
Another way to switch to no gamma correction by default would be to patch up x3dom after loading.
Here is one way to do that:
x_ite does not show warnings this way:
But it could be considered hackish.