Skip to content

Commit

Permalink
TS: Clean up PointsMaterial.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mugen87 committed Mar 9, 2020
1 parent c3a6cf0 commit ebba4a5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 21 deletions.
15 changes: 15 additions & 0 deletions src/Three.Legacy.d.ts
Expand Up @@ -12,6 +12,21 @@ export namespace SceneUtils {
export function attach( child: Object3D, scene: Scene, parent: Object3D ): void;
}

/**
* @deprecated Use an Array instead.
*/
export class MultiMaterial extends Material {

constructor( materials?: Material[] );

readonly isMultiMaterial: true;

materials: Material[];

toJSON( meta: any ): any;

}

/**
* @deprecated Material.vertexColors is now a boolean.
*/
Expand Down
23 changes: 2 additions & 21 deletions src/materials/PointsMaterial.d.ts
Expand Up @@ -2,33 +2,13 @@ import { Material, MaterialParameters } from './Material';
import { Color } from './../math/Color';
import { Texture } from './../textures/Texture';

// MultiMaterial does not inherit the Material class in the original code. However, it should treat as Material class.
// See tests/canvas/canvas_materials.ts.
/**
* @deprecated Use an Array instead.
*/
export class MultiMaterial extends Material {

constructor( materials?: Material[] );

readonly isMultiMaterial: true;

materials: Material[];

toJSON( meta: any ): any;

}

/**
* @deprecated Use {@link MultiMaterial} instead.
*/

export interface PointsMaterialParameters extends MaterialParameters {
color?: Color | string | number;
map?: Texture | null;
alphaMap?: Texture | null;
size?: number;
sizeAttenuation?: boolean;
morphTargets?: boolean;
}

export class PointsMaterial extends Material {
Expand All @@ -40,6 +20,7 @@ export class PointsMaterial extends Material {
alphaMap: Texture | null;
size: number;
sizeAttenuation: boolean;
morphTargets: boolean;

setValues( parameters: PointsMaterialParameters ): void;

Expand Down

0 comments on commit ebba4a5

Please sign in to comment.