import { ShapePrimitive } from '../shapes/ShapePrimitive'; import type { IDrawerProps, IPropArguments, IShapeLoopGenerator, IShapeLoopProps, IShapeLoopSettings } from '../types'; /** * * * @export * @interface ILoopMeta */ export interface ILoopMeta { start: number; end: number; inc: number; count: number; } /** * Create a shape from loop * * @category Shapes.Primitives * @public * @class ShapeLoop * @extends {ShapePrimitive} */ declare class ShapeLoop = IDrawerProps, Props extends IShapeLoopProps = IShapeLoopProps> extends ShapePrimitive { static readonly PId2: number; /** * chek if loop generate a static shape * * @protected * @type {boolean} */ protected bStaticLoop: boolean; /** * Loop generator * * @protected * @type {IShapeLoopGenerator} */ protected loop: IShapeLoopGenerator; /** * Generate static loop buffer whem IShapeLoopGenerator props * haven't dynamic properties * * @protected * @type {Float32Array} */ protected currentOrSingleLoopBuffer?: Float32Array; /** * list of prop has impact on shape loop generation * * @protected * @type {Array<'propArguments' | keyof IShapeLoopProps | string>} */ loopDependencies: Array<'propArguments' | keyof IShapeLoopProps | string>; /** * Creates an instance of ShapeLoop. * * @param {IShapeLoopSettings} [settings={}] * @param {boolean} [bPreventGeneration=false] */ constructor(settings?: IShapeLoopSettings, bPreventGeneration?: boolean); /** * Check if currentOrSingleLoopBuffer is static * * @returns {boolean} */ isStaticLoop(): boolean; /** * Check if shape is static * * @returns {boolean} */ isStatic(): boolean; /** * Check if shape has static indexed * The number of vertices is defined by number of loop iteration * * @returns {boolean} */ isStaticIndexed(): boolean; /** * Unset buffer * * @param {boolean} [bClearIndexed=false] * @param {boolean} [bPropagateToParents=false] */ clearBuffer(bClearIndexed?: boolean, bPropagateToParents?: boolean): void; /** * Set single or multiple props * * @param {(Props)} key * @param {*} [value] * @param {boolean} [bClearIndexed=false] */ setProp(key: keyof Props | Partial, value?: any): void; /** * Return length of buffer * * @param {PropArguments} [propArguments] * @returns {number} */ getBufferLength(propArguments?: PropArguments): number; /** * Return a buffer of children shape or loop generated buffer * * @protected * @param {number} generateId * @param {PropArguments} propArguments * @returns {Float32Array} */ protected generateBuffer(generateId: number, propArguments: PropArguments): Float32Array; /** * Generate loop buffer * * @protected * @param {PropArguments} propArguments * @returns {Float32Array} */ protected generateLoopBuffer(propArguments: PropArguments): Float32Array; /** * Return information about a client loop gnerator * * @public * @param {PropArguments} propArguments * @returns {ShapeLoopInformation} */ getLoop(propArguments: PropArguments): ILoopMeta; /** * Set shape from loop generator * * @param {(IShapeLoopGenerator)} [shape] */ setShape(loop: IShapeLoopGenerator): void; /** * Get static buffer * * @param sideLength * @returns */ static getBuffer(props?: Props): Float32Array; } export { ShapeLoop }; //# sourceMappingURL=ShapeLoop.d.ts.map