ShockWaveEffect
Extends:
Indirect Implements:
A shock wave effect.
Based on a Gist by Jean-Philippe Sarda: https://gist.github.com/jpsarda/33cea67a9f2ecb0a0eda
Warning: This effect cannot be merged with convolution effects.
Constructor Summary
Public Constructor | ||
public |
constructor(camera: Camera, epicenter: Vector3, options: Object) Constructs a new shock wave effect. |
Member Summary
Public Members | ||
public |
camera: Camera The main camera. |
|
public |
epicenter: Vector3 The epicenter. |
|
public |
The speed of the shock wave animation. |
Method Summary
Public Methods | ||
public |
explode() Emits the shock wave. |
|
public |
Updates this effect. |
Inherited Summary
From class Effect | ||
public |
The effect attributes. |
|
public |
The blend mode of this effect. |
|
public |
Preprocessor macro definitions. |
|
public |
WebGL extensions that are required by this effect. |
|
public |
The fragment shader. |
|
public |
The name of this effect. |
|
public |
Shader uniforms. |
|
public |
The vertex shader. |
|
public |
dispose() Performs a shallow search for properties that define a dispose method and deletes them. |
|
public |
initialize(renderer: WebGLRenderer, alpha: Boolean) Performs initialization tasks. |
|
public |
setDepthTexture(depthTexture: Texture, depthPacking: Number) Sets the depth texture. |
|
public |
Updates the size of this effect. |
|
public |
Updates the effect by performing supporting operations. |
Public Constructors
public constructor(camera: Camera, epicenter: Vector3, options: Object) source
Constructs a new shock wave effect.
Override:
Effect#constructorParams:
Name | Type | Attribute | Description |
camera | Camera | The main camera. |
|
epicenter | Vector3 |
|
The world position of the shock wave epicenter. |
options | Object |
|
The options. |
options.speed | Number |
|
The animation speed. |
options.maxRadius | Number |
|
The extent of the shock wave. |
options.waveSize | Number |
|
The wave size. |
options.amplitude | Number |
|
The distortion amplitude. |
Public Members
Public Methods
public update(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget, delta: Number) source
Updates this effect.
Override:
Effect#updateParams:
Name | Type | Attribute | Description |
renderer | WebGLRenderer | The renderer. |
|
inputBuffer | WebGLRenderTarget | A frame buffer that contains the result of the previous pass. |
|
delta | Number |
|
The time between the last frame and the current one in seconds. |