@daign/2d-graphics
Version:
Two dimensional graphics library that implements the daign-2d-pipeline.
25 lines (24 loc) • 978 B
TypeScript
import { Vector2 } from '@daign/math';
import { ControlObject } from '../control-elements';
import { IControlModifier } from './iControlModifier';
/**
* Round following modifier.
* Round the points that follow the point of the original change request.
*/
export declare class RoundFollowingModifier implements IControlModifier {
enabled: boolean;
private precision;
/**
* Constructor.
* @param precision - The number of decimal places to round to. Optional.
*/
constructor(precision?: number);
/**
* Modify the position change that has been requested for a control object.
* @param updatedPoints - The array of updated points.
* @param pointIndex - The index of the point that initiated the change.
* @param controlObject - The corresponding control object.
* @returns The modified array of points.
*/
modifyPoints(updatedPoints: Vector2[], pointIndex: number, _controlObject: ControlObject): Vector2[];
}