<commit_before>import {
	AnimationClip,
	Camera,
	Group,
	Loader,
	LoadingManager,
	Mesh,
	Object3D,
	Material,
	SkinnedMesh,
	Texture
} from '../../../src/Three';

import { DRACOLoader } from './DRACOLoader';
import { DDSLoader } from './DDSLoader';

export interface GLTF {
	animations: AnimationClip[];
	scene: Group;
	scenes: Group[];
	cameras: Camera[];
	asset: {
		copyright?: string;
		generator?: string;
		version?: string;
		minVersion?: string;
		extensions?: any;
		extras?: any;
	};
	parser: GLTFParser;
	userData: any;
}

export class GLTFLoader extends Loader {

	constructor( manager?: LoadingManager );
	dracoLoader: DRACOLoader | null;
	ddsLoader: DDSLoader | null;

	load( url: string, onLoad: ( gltf: GLTF ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void ) : void;
	setDRACOLoader( dracoLoader: DRACOLoader ): GLTFLoader;
	setDDSLoader( ddsLoader: DDSLoader ): GLTFLoader;

	register( callback: ( parser: GLTFParser ) => GLTFLoaderPlugin ): GLTFLoader;
	unregister( callback: ( parser: GLTFParser ) => GLTFLoaderPlugin ): GLTFLoader;

	parse( data: ArrayBuffer | string, path: string, onLoad: ( gltf: GLTF ) => void, onError?: ( event: ErrorEvent ) => void ) : void;

}

export interface GLTFReference {
	type: 'materials'|'nodes'|'textures';
	index: number;
}

export class GLTFParser {

	json: any;

	associations: Map<Object3D|Material|Texture, GLTFReference>;

	getDependency: ( type: string, index: number ) => Promise<any>;
	getDependencies: ( type: string ) => Promise<any[]>;

}

export interface GLTFLoaderPlugin {

	_markDefs?: () => void;
	loadMesh?: ( meshIndex: number ) => Promise<Group | Mesh | SkinnedMesh> | null;
	loadBufferView?: ( bufferViewIndex: number ) => Promise<ArrayBuffer> | null;
	loadMaterial?: ( materialIndex: number ) => Promise<Material> | null;
	loadTexture?: ( textureIndex: number ) => Promise<Texture> | null;
	getMaterialType?: ( materialIndex: number ) => typeof Material | null;
	extendMaterialParams?: ( materialIndex: number, materialParams: { [ key: string ]: any } ) => Promise<void> | null;
	createNodeAttachment?: ( nodeIndex: number ) => Promise<Object3D> | null;

}<commit_msg>types (GLTFLoader): change return type of GLTFLoaderPlugin.extendMaterialParams<commit_after>import {
	AnimationClip,
	Camera,
	Group,
	Loader,
	LoadingManager,
	Mesh,
	Object3D,
	Material,
	SkinnedMesh,
	Texture
} from '../../../src/Three';

import { DRACOLoader } from './DRACOLoader';
import { DDSLoader } from './DDSLoader';

export interface GLTF {
	animations: AnimationClip[];
	scene: Group;
	scenes: Group[];
	cameras: Camera[];
	asset: {
		copyright?: string;
		generator?: string;
		version?: string;
		minVersion?: string;
		extensions?: any;
		extras?: any;
	};
	parser: GLTFParser;
	userData: any;
}

export class GLTFLoader extends Loader {

	constructor( manager?: LoadingManager );
	dracoLoader: DRACOLoader | null;
	ddsLoader: DDSLoader | null;

	load( url: string, onLoad: ( gltf: GLTF ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void ) : void;
	setDRACOLoader( dracoLoader: DRACOLoader ): GLTFLoader;
	setDDSLoader( ddsLoader: DDSLoader ): GLTFLoader;

	register( callback: ( parser: GLTFParser ) => GLTFLoaderPlugin ): GLTFLoader;
	unregister( callback: ( parser: GLTFParser ) => GLTFLoaderPlugin ): GLTFLoader;

	parse( data: ArrayBuffer | string, path: string, onLoad: ( gltf: GLTF ) => void, onError?: ( event: ErrorEvent ) => void ) : void;

}

export interface GLTFReference {
	type: 'materials'|'nodes'|'textures';
	index: number;
}

export class GLTFParser {

	json: any;

	associations: Map<Object3D|Material|Texture, GLTFReference>;

	getDependency: ( type: string, index: number ) => Promise<any>;
	getDependencies: ( type: string ) => Promise<any[]>;

}

export interface GLTFLoaderPlugin {

	_markDefs?: () => void;
	loadMesh?: ( meshIndex: number ) => Promise<Group | Mesh | SkinnedMesh> | null;
	loadBufferView?: ( bufferViewIndex: number ) => Promise<ArrayBuffer> | null;
	loadMaterial?: ( materialIndex: number ) => Promise<Material> | null;
	loadTexture?: ( textureIndex: number ) => Promise<Texture> | null;
	getMaterialType?: ( materialIndex: number ) => typeof Material | null;
	extendMaterialParams?: ( materialIndex: number, materialParams: { [ key: string ]: any } ) => Promise<any> | null;
	createNodeAttachment?: ( nodeIndex: number ) => Promise<Object3D> | null;

}
{'fraction_non_alphanumeric': 0.143658810325477, 'fraction_numerical': 0.0013468013468013469, 'mean_word_length': 5.087431693989071, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 55, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7540523', 'n_tokens_mistral': 1504, 'n_tokens_neox': 1484, 'n_words': 378}