Sfoglia il codice sorgente

Merge pull request #20044 from Mugen87/dev46

TS: Add WebGLCubeMaps.
Mr.doob 5 anni fa
parent
commit
a5d212c9ed

+ 3 - 2
src/renderers/webgl/WebGLBackground.d.ts

@@ -5,11 +5,12 @@ import { WebGLState } from './WebGLState';
 import { WebGLObjects } from './WebGLObjects';
 import { WebGLRenderList } from './WebGLRenderLists';
 import { Scene } from '../../scenes/Scene';
-import { Camera } from "../../cameras/Camera";
+import { Camera } from '../../cameras/Camera';
+import { WebGLCubeMaps } from './WebGLCubeMaps';
 
 export class WebGLBackground {
 
-	constructor( renderer: WebGLRenderer, state: WebGLState, objects: WebGLObjects, premultipliedAlpha: boolean );
+	constructor( renderer: WebGLRenderer, cubemaps: WebGLCubeMaps, state: WebGLState, objects: WebGLObjects, premultipliedAlpha: boolean );
 
 	getClearColor(): Color;
 	setClearColor( color: Color, alpha: number ): void;

+ 10 - 0
src/renderers/webgl/WebGLCubeMaps.d.ts

@@ -0,0 +1,10 @@
+import { WebGLRenderer } from '../WebGLRenderer';
+
+export class WebGLCubeMaps {
+
+	constructor( renderer: WebGLRenderer );
+
+	get( texture: any ): any;
+	dispose(): void;
+
+}

+ 6 - 5
src/renderers/webgl/WebGLMaterials.d.ts

@@ -1,11 +1,12 @@
-import { Material } from "../../materials/Material";
-import { Texture } from "../../textures/Texture";
-import { IFog } from "../../scenes/Fog";
-import { WebGLProperties } from "./WebGLProperties";
+import { Material } from '../../materials/Material';
+import { Texture } from '../../textures/Texture';
+import { IFog } from '../../scenes/Fog';
+import { WebGLProperties } from './WebGLProperties';
+import { WebGLCubeMaps } from './WebGLCubeMaps';
 
 export class WebGLMaterials {
 
-	constructor( properties: WebGLProperties );
+	constructor( properties: WebGLProperties, cubemaps: WebGLCubeMaps );
 
 	refreshMaterialUniforms( uniforms: object, material: Material, environment: Texture, pixelRatio: number, height: number ): void;
 	refreshFogUniforms( uniforms: object, fog: IFog ): void;

+ 2 - 1
src/renderers/webgl/WebGLPrograms.d.ts

@@ -1,13 +1,14 @@
 import { WebGLRenderer } from './../WebGLRenderer';
 import { WebGLProgram } from './WebGLProgram';
 import { WebGLCapabilities } from './WebGLCapabilities';
+import { WebGLCubeMaps } from './WebGLCubeMaps';
 import { WebGLExtensions } from './WebGLExtensions';
 import { Material } from './../../materials/Material';
 import { Scene } from './../../scenes/Scene';
 
 export class WebGLPrograms {
 
-	constructor( renderer: WebGLRenderer, extensions: WebGLExtensions, capabilities: WebGLCapabilities );
+	constructor( renderer: WebGLRenderer, cubemaps: WebGLCubeMaps, extensions: WebGLExtensions, capabilities: WebGLCapabilities );
 
 	programs: WebGLProgram[];