PMREMGenerator constructor
PMREMGenerator(
- dynamic renderer
Implementation
PMREMGenerator(renderer) {
// Golden Ratio
phi = (1 + Math.sqrt(5)) / 2;
invPhi = 1 / phi;
// Vertices of a dodecahedron (except the opposites, which represent the
// same axis), used as axis directions evenly spread on a sphere.
_axisDirections = [
/*@__PURE__*/ Vector3(1, 1, 1),
/*@__PURE__*/ Vector3(-1, 1, 1),
/*@__PURE__*/ Vector3(1, 1, -1),
/*@__PURE__*/ Vector3(-1, 1, -1),
/*@__PURE__*/ Vector3(0, phi, invPhi),
/*@__PURE__*/ Vector3(0, phi, -invPhi),
/*@__PURE__*/ Vector3(invPhi, 0, phi),
/*@__PURE__*/ Vector3(-invPhi, 0, phi),
/*@__PURE__*/ Vector3(phi, invPhi, 0),
/*@__PURE__*/ Vector3(-phi, invPhi, 0)
];
_renderer = renderer;
_pingPongRenderTarget = null;
_lodMax = 0;
_cubeSize = 0;
_lodPlanes = [];
_sizeLods = [];
_sigmas = [];
_blurMaterial = null;
_equirectMaterial = null;
_cubemapMaterial = null;
_compileMaterial(_blurMaterial);
}