lbry-desktop/src/ui/component/viewers/threeViewer/internal/renderer.js
2019-03-04 23:48:04 -05:00

14 lines
494 B
JavaScript

import { WebGLRenderer } from 'three-full';
const ThreeRenderer = ({ antialias, shadowMap, gammaCorrection }) => {
const renderer = new WebGLRenderer({ antialias });
// Renderer configuration
renderer.setPixelRatio(window.devicePixelRatio);
renderer.gammaInput = gammaCorrection || false;
renderer.gammaOutput = gammaCorrection || false;
renderer.shadowMap.enabled = shadowMap || false;
renderer.shadowMap.autoUpdate = false;
return renderer;
};
export default ThreeRenderer;