Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: MeshHelper's default arguments #1237

Merged
merged 1 commit into from
Dec 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions dist/cjs/foundation/geometry/shapes/Axis.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import { Size } from '../../../types/CommonTypes';
import { IShape } from '../shapes/IShape';
export interface AxisDescriptor extends IAnyPrimitiveDescriptor {
/** the length of axis */
length: Size;
length?: Size;
}
/**
* the Axis class
*/
export declare class Axis extends IShape {
/**
* Generates a axis object
* @param desc a descriptor object of a Axis
* @param _desc a descriptor object of a Axis
*/
generate(desc: AxisDescriptor): void;
generate(_desc: AxisDescriptor): void;
}
6 changes: 3 additions & 3 deletions dist/cjs/foundation/geometry/shapes/Cube.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { IAnyPrimitiveDescriptor, Primitive } from '../Primitive';
import { IShape } from './IShape';
export interface CubeDescriptor extends IAnyPrimitiveDescriptor {
/** three width (width, height, depth) in (x, y, z) */
widthVector: IVector3;
widthVector?: IVector3;
/** color */
color?: IColorRgba;
}
Expand All @@ -14,7 +14,7 @@ export interface CubeDescriptor extends IAnyPrimitiveDescriptor {
export declare class Cube extends Primitive implements IShape {
/**
* Generates a cube object
* @param desc a descriptor object of a Cube
* @param _desc a descriptor object of a Cube
*/
generate(desc: CubeDescriptor): void;
generate(_desc: CubeDescriptor): void;
}
14 changes: 7 additions & 7 deletions dist/cjs/foundation/geometry/shapes/Grid.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ import { Size } from '../../../types/CommonTypes';
import { IShape } from './IShape';
export interface GridDescriptor extends IAnyPrimitiveDescriptor {
/** the desc.length of axis */
length: Size;
length?: Size;
/** the division of grid */
division: Size;
division?: Size;
/** the XZ axis */
isXZ: boolean;
isXZ?: boolean;
/** the XY axis */
isXY: boolean;
isXY?: boolean;
/** the YZ axis */
isYZ: boolean;
isYZ?: boolean;
}
/**
* the Grid class
*/
export declare class Grid extends IShape {
/**
* Generates a grid object
* @param desc a descriptor object of a Grid
* @param _desc a descriptor object of a Grid
*/
generate(desc: GridDescriptor): void;
generate(_desc: GridDescriptor): void;
}
10 changes: 5 additions & 5 deletions dist/cjs/foundation/geometry/shapes/Line.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ import { IVector3 } from '../../math/IVector';
import { IShape } from './IShape';
export interface LineDescriptor extends IAnyPrimitiveDescriptor {
/** the start position */
startPos: IVector3;
startPos?: IVector3;
/** the end position */
endPos: IVector3;
endPos?: IVector3;
/** whether it has the terminal mark */
hasTerminalMark: boolean;
hasTerminalMark?: boolean;
}
/**
* the Line class
*/
export declare class Line extends IShape {
/**
* Generates a line object
* @param desc a descriptor object of a Line
* @param _desc a descriptor object of a Line
*/
generate({ startPos, endPos, hasTerminalMark, material }: LineDescriptor): void;
generate(_desc: LineDescriptor): void;
}
14 changes: 7 additions & 7 deletions dist/cjs/foundation/geometry/shapes/Plane.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import { Size } from '../../../types/CommonTypes';
import { IShape } from './IShape';
export interface PlaneDescriptor extends IAnyPrimitiveDescriptor {
/** the length of U(X)-axis direction */
width: Size;
width?: Size;
/** the length of V(Y)-axis direction */
height: Size;
height?: Size;
/** number of spans in U(X)-axis direction */
uSpan: Size;
uSpan?: Size;
/** number of spans in V(Y)-axis direction */
vSpan: Size;
vSpan?: Size;
/** draw uSpan times vSpan number of textures */
isUVRepeat: boolean;
isUVRepeat?: boolean;
/** draw textures by flipping on the V(Y)-axis */
flipTextureCoordinateY?: boolean;
}
Expand All @@ -22,7 +22,7 @@ export interface PlaneDescriptor extends IAnyPrimitiveDescriptor {
export declare class Plane extends IShape {
/**
* Generates a plane object
* @param desc a descriptor object of a Plane
* @param _desc a descriptor object of a Plane
*/
generate(desc: PlaneDescriptor): void;
generate(_desc: PlaneDescriptor): void;
}
8 changes: 4 additions & 4 deletions dist/cjs/foundation/geometry/shapes/Sphere.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ import { IShape } from './IShape';
*/
export interface SphereDescriptor extends IAnyPrimitiveDescriptor {
/** radius */
radius: number;
radius?: number;
/** the number of segments for width direction */
widthSegments: Count;
widthSegments?: Count;
/** the number of segments for height direction */
heightSegments: Count;
heightSegments?: Count;
}
/**
* Sphere class
*/
export declare class Sphere extends IShape {
constructor();
generate({ radius, widthSegments, heightSegments, material }: SphereDescriptor): void;
generate(_desc: SphereDescriptor): void;
}
14 changes: 7 additions & 7 deletions dist/cjs/foundation/helpers/MeshHelper.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ import { SphereDescriptor } from '../geometry/shapes/Sphere';
import { JointDescriptor } from '../geometry/shapes/Joint';
declare function createShape(primitive: IShape): import("./EntityHelper").IMeshEntity;
export declare const MeshHelper: Readonly<{
createPlane: (_desc?: PlaneDescriptor & {
direction: 'xz' | 'xy' | 'yz';
createPlane: (desc?: PlaneDescriptor & {
direction?: 'xz' | 'xy' | 'yz';
}) => import("./EntityHelper").IMeshEntity;
createLine: (_desc?: LineDescriptor) => import("./EntityHelper").IMeshEntity;
createGrid: (_desc?: GridDescriptor) => import("./EntityHelper").IMeshEntity;
createCube: (_desc?: CubeDescriptor) => import("./EntityHelper").IMeshEntity;
createSphere: (_desc?: SphereDescriptor) => import("./EntityHelper").IMeshEntity;
createLine: (desc?: LineDescriptor) => import("./EntityHelper").IMeshEntity;
createGrid: (desc?: GridDescriptor) => import("./EntityHelper").IMeshEntity;
createCube: (desc?: CubeDescriptor) => import("./EntityHelper").IMeshEntity;
createSphere: (desc?: SphereDescriptor) => import("./EntityHelper").IMeshEntity;
createJoint: (desc?: JointDescriptor) => import("./EntityHelper").IMeshEntity;
createAxis: (_desc?: AxisDescriptor) => import("./EntityHelper").IMeshEntity;
createAxis: (desc?: AxisDescriptor) => import("./EntityHelper").IMeshEntity;
createShape: typeof createShape;
}>;
export {};
Loading