Skip to content

Commit

Permalink
Merge pull request mrdoob#15989 from Methuselah96/typescript-utils
Browse files Browse the repository at this point in the history
Add TypeScript definitions for some utils
  • Loading branch information
mrdoob authored Mar 15, 2019
2 parents f7bbe43 + f18dc58 commit 129a874
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
7 changes: 7 additions & 0 deletions examples/jsm/utils/BufferGeometryUtils.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { BufferAttribute, BufferGeometry } from '../../../src/Three';

export namespace BufferGeometryUtils {
export function mergeBufferGeometries(geometries: BufferGeometry[]): BufferGeometry;
export function computeTangents(geometry: BufferGeometry): null;
export function mergeBufferAttributes(attributes: BufferAttribute[]): BufferAttribute;
}
13 changes: 13 additions & 0 deletions examples/jsm/utils/GeometryUtils.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* @deprecated
*/
export namespace GeometryUtils {
/**
* @deprecated Use {@link Geometry#merge geometry.merge( geometry2, matrix, materialIndexOffset )} instead.
*/
export function merge(geometry1: any, geometry2: any, materialIndexOffset?: any): any;
/**
* @deprecated Use {@link Geometry#center geometry.center()} instead.
*/
export function center(geometry: any): any;
}
7 changes: 7 additions & 0 deletions examples/jsm/utils/SceneUtils.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { Geometry, Material, Object3D, Scene } from '../../../src/Three';

export namespace SceneUtils {
export function createMultiMaterialObject(geometry: Geometry, materials: Material[]): Object3D;
export function detach(child: Object3D, parent: Object3D, scene: Scene): void;
export function attach(child: Object3D, scene: Scene, parent: Object3D): void;
}

0 comments on commit 129a874

Please sign in to comment.