@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
32 lines (31 loc) • 1.22 kB
TypeScript
import { Mesh, IcosahedronGeometry, ShaderMaterial, Texture, IUniform, BufferGeometry, Material } from 'three';
import { IUniformN, IUniformTexture } from '../../../../engine/nodes/utils/code/gl/Uniforms';
/**
* Ground projected env map adapted from @react-three/drei.
* https://github.com/pmndrs/drei/blob/master/src/core/Environment.tsx
* and
* https://github.com/mrdoob/three.js/blob/master/examples/webgl_materials_envmaps_groundprojected.html
*/
type ShaderMaterialUniform = {
[uniform: string]: IUniform;
};
interface GroundProjectedSkyboxMaterialUniforms extends ShaderMaterialUniform {
map: IUniformTexture;
height: IUniformN;
radius: IUniformN;
}
interface GroundProjectedSkyboxMaterial extends ShaderMaterial {
uniforms: GroundProjectedSkyboxMaterialUniforms;
}
export declare class GroundProjectedSkybox extends Mesh {
material: GroundProjectedSkyboxMaterial;
geometry: IcosahedronGeometry;
constructor(geometry?: BufferGeometry, material?: Material);
setTexture(texture: Texture): void;
set radius(radius: number);
get radius(): number;
set height(height: number);
get height(): number;
copy(source: this, recursive: boolean): this;
}
export {};