mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-11-29 09:41:45 +00:00
Added definition for options type. Removed MTLLoader.materials - there is only MaterialCreator.materials, judging from the source code.
This commit is contained in:
Vendored
+38
-8
@@ -5,14 +5,44 @@ import { Material } from "./three-core";
|
||||
import {LoadingManager} from "./three-core";
|
||||
import {EventDispatcher} from "./three-core";
|
||||
import {BufferGeometry} from "./three-core";
|
||||
import {Side} from "./three-core";
|
||||
import {Texture} from "./three-core";
|
||||
import {Wrapping} from "./three-core";
|
||||
|
||||
export interface MaterialCreatorOptions {
|
||||
/**
|
||||
* side: Which side to apply the material
|
||||
* THREE.FrontSide (default), THREE.BackSide, THREE.DoubleSide
|
||||
*/
|
||||
side?: Side;
|
||||
/*
|
||||
* wrap: What type of wrapping to apply for textures
|
||||
* THREE.RepeatWrapping (default), THREE.ClampToEdgeWrapping, THREE.MirroredRepeatWrapping
|
||||
*/
|
||||
wrap?: Wrapping;
|
||||
/*
|
||||
* normalizeRGB: RGBs need to be normalized to 0-1 from 0-255
|
||||
* Default: false, assumed to be already normalized
|
||||
*/
|
||||
normalizeRGB?: boolean;
|
||||
/*
|
||||
* ignoreZeroRGBs: Ignore values of RGBs (Ka,Kd,Ks) that are all 0's
|
||||
* Default: false
|
||||
*/
|
||||
ignoreZeroRGBs?: boolean;
|
||||
/*
|
||||
* invertTrProperty: Use values 1 of Tr field for fully opaque. This option is useful for obj
|
||||
* exported from 3ds MAX, vcglib or meshlab.
|
||||
* Default: false
|
||||
*/
|
||||
invertTrProperty?: boolean;
|
||||
}
|
||||
|
||||
export class MTLLoader extends EventDispatcher {
|
||||
|
||||
constructor(manager?: LoadingManager);
|
||||
manager: LoadingManager;
|
||||
materialOptions: {};
|
||||
materials: Material[];
|
||||
materialOptions: MaterialCreatorOptions;
|
||||
path: string;
|
||||
texturePath: string;
|
||||
crossOrigin: boolean;
|
||||
@@ -23,26 +53,26 @@ export class MTLLoader extends EventDispatcher {
|
||||
setTexturePath(path: string) : void;
|
||||
setBaseUrl(path: string) : void;
|
||||
setCrossOrigin(value: boolean) : void;
|
||||
setMaterialOptions(value: any) : void;
|
||||
setMaterialOptions(value: MaterialCreatorOptions) : void;
|
||||
}
|
||||
|
||||
export class MaterialCreator {
|
||||
|
||||
constructor(baseUrl?: string, options?: any);
|
||||
constructor(baseUrl?: string, options?: MaterialCreatorOptions);
|
||||
|
||||
baseUrl : string;
|
||||
options : any;
|
||||
materialsInfo : any;
|
||||
materials : any;
|
||||
materialsArray : Material[];
|
||||
nameLookup : any;
|
||||
side : number;
|
||||
wrap : number;
|
||||
options : MaterialCreatorOptions;
|
||||
side : Side;
|
||||
wrap : Wrapping;
|
||||
|
||||
setCrossOrigin( value: boolean ) : void;
|
||||
setManager( value: any ) : void;
|
||||
setMaterials( materialsInfo: any ) : void;
|
||||
convert( materialsInfo: any ) : any;
|
||||
setManager( value: LoadingManager ) : void;
|
||||
preload() : void;
|
||||
getIndex( materialName: string ) : Material;
|
||||
getAsArray() : Material[];
|
||||
|
||||
Reference in New Issue
Block a user