Distort
Represents a PostEffect specifically designed for the Distort.
| Type | Name | Interface Description |
|---|---|---|
| Variables | amplitude: Vector2f | • Function: Gets or sets the distortion amplitude (X,Y). Defines the strength of the wave-like distortion along each axis. X component controls horizontal distortion strength, Y component controls vertical distortion strength. Range: [-99999, 99999]. Default value is (-0.1, 0.0) set in Editor. |
| Variables | barrelPower: number | • Function: Gets or sets the barrel distortion power. Controls the strength of the radial distortion. A value of 0 means no distortion, positive values create barrel distortion, negative values create pincushion distortion. Range: [-1, 1]. |
| Variables | frequency: Vector2f | • Function: Gets or sets the distortion frequency (X,Y). Controls how frequently the distortion waves repeat across the screen. X component controls horizontal wave frequency, Y component controls vertical wave frequency. Range: [-99999, 99999]. Default value is (9.0, 0.0) set in Editor. |
| Variables | offset: Vector2f | • Function: Gets or sets the distortion offset (X,Y). Shifts the phase of the distortion pattern. X component shifts horizontal wave phase, Y component shifts vertical wave phase. Range: [-99999, 99999]. Default value is (0.0, 0.0). |
| Variables | rotation: number | • Function: Gets or sets the distortion rotation angle. Rotates the distortion effect around the screen center. Range: [-360, 360]. |
| Variables | speed: Vector2f | • Function: Gets or sets the distortion speed (X,Y). Determines the animation speed of the distortion waves. X component controls horizontal wave animation speed, Y component controls vertical wave animation speed. Range: [-99999, 99999]. Default value is (0.8, 0.0) set in Editor. |
| Variables | zoom: number | • Function: Gets or sets the zoom factor for the distortion effect. Higher values zoom the image in or out. A value of 1.0 represents no zoom. Range: [-1, 1]. |
| Functions | constructor() |
Examples
constructor()
let obj = new APJS.Distort();
Use Case
@component()
export class NewBehaviourScript extends APJS.BasicScriptComponent {
onStart() {
// TODO: instantiate / use Distort here
}
onUpdate(deltaTime: number) {
}
}