Projectrix v0.1.2 alpha
The Projectrix api is now even breezier; see updated usages for examples of the new types and functions.
- added PartialProjection and PartialProjectionResults types for convenience, in case you want to delete members from projections
export type PartialProjection = Partial<Projection>;
export type PartialProjectionResults = {
toSubject: PartialProjection;
toTargetOrigin: PartialProjection;
transformType: TransformType;
subject: HTMLElement;
target: HTMLElement;
};- added setInlineStyles and clearInlineStyles functions
/**
* sets the inline style on the target for each style in the given partial projection.
* converts any matrix3d or transformMat4 value to a transform style
*/
export function setInlineStyles(target: HTMLElement, partialProjection: PartialProjection): void;
/**
* clears the inline style on the target for each style in the given partial projection.
* if no partial projection is given, assumes target's inline styles were set to a full projection.
* if the projection contains matrix3d or transformMat4, then the transform style is cleared
*/
export function clearInlineStyles(target: HTMLElement, partialProjection?: PartialProjection): void;- The demos pages are finally mobile-ready: https://tg.projectrix.dev/demos