Interface TransformAPI
get isActive(): boolean;
rotateX: number;
rotateY: number;
rotateZ: number;
scale: number;
translateX: number;
translateY: number;
translateZ: number;
getCSS(data?: object): string;
getCSSOrtho(data?: object): string;
getData(position: TJSPositionData, output?: TransformData, validationData?: object): TransformData;
getMat4(data?: object, output?: Mat4): Mat4;
getMat4Ortho(data?: object, output?: Mat4): Mat4;
hasTransform(data: object): boolean;
reset(data: object): void;
}
Index
Accessors
isActive
- get isActive(): boolean
Returns boolean
Whether there are active transforms in local data.
rotateX
- get rotateX(): number
Returns number
Any local
rotateX
data.- set rotateX(value): void
Parameters
- value: number
A value to set.
Returns void
- value: number
rotateY
- get rotateY(): number
Returns number
Any local
rotateY
data.- set rotateY(value): void
Sets the local
rotateY
data if the value is a finite number otherwise removes the local data.Parameters
- value: number
A value to set.
Returns void
- value: number
rotateZ
- get rotateZ(): number
Returns number
Any local
rotateZ
data.- set rotateZ(value): void
Sets the local
rotateZ
data if the value is a finite number otherwise removes the local data.Parameters
- value: number
A value to set.
Returns void
- value: number
scale
- get scale(): number
Returns number
Any local
scale
data.- set scale(value): void
Sets the local
scale
data if the value is a finite number otherwise removes the local data.Parameters
- value: number
A value to set.
Returns void
- value: number
translateX
- get translateX(): number
Returns number
Any local
translateX
data.- set translateX(value): void
Sets the local
translateX
data if the value is a finite number otherwise removes the local data.Parameters
- value: number
A value to set.
Returns void
- value: number
translateY
- get translateY(): number
Returns number
Any local
translateY
data.- set translateY(value): void
Sets the local
translateY
data if the value is a finite number otherwise removes the local data.Parameters
- value: number
A value to set.
Returns void
- value: number
translateZ
- get translateZ(): number
Returns number
Any local
translateZ
data.- set translateZ(value): void
Sets the local
translateZ
data if the value is a finite number otherwise removes the local data.Parameters
- value: number
A value to set.
Returns void
- value: number
Methods
getCSS
getCSSOrtho
getData
- get
Data (position, output?, validationData?): TransformData Collects all data including a bounding rect, transform matrix, and points array of the given TJSPositionData instance with the applied local transform data.
Parameters
- position: TJSPositionData
The position data to process.
Optional
output: TransformDataOptional TransformAPI.Data output instance.
Optional
validationData: objectOptional validation data for adjustment parameters.
Returns TransformData
The output TransformAPI.Data instance.
- position: TJSPositionData
getMat4
- get
Mat4 (data?, output?): Mat4 Creates a transform matrix based on local data applied in order it was added.
If no data object is provided then the source is the local transform data. If another data object is supplied then the stored local transform order is applied then all remaining transform keys are applied. This allows the construction of a transform matrix in advance of setting local data and is useful in collision detection.
Parameters
Optional
data: objectTJSPositionData instance or local transform data.
Optional
output: Mat4The output mat4 instance.
Returns Mat4
Transform matrix.
getMat4Ortho
- get
Mat4 (data?, output?): Mat4Ortho Provides an orthographic enhancement to convert left / top positional data to a translate operation.
This transform matrix takes into account that the remaining operations are , but adds any left / top attributes from passed in data to translate X / Y.
If no data object is provided then the source is the local transform data. If another data object is supplied then the stored local transform order is applied then all remaining transform keys are applied. This allows the construction of a transform matrix in advance of setting local data and is useful in collision detection.
Parameters
Optional
data: objectTJSPositionData instance or local transform data.
Optional
output: Mat4The output mat4 instance.
Returns Mat4
Transform matrix.
Sets the local
rotateX
data if the value is a finite number otherwise removes the local data.