public class FadeFilter
extends com.jme3.post.Filter
| Constructor and Description |
|---|
FadeFilter()
Creates a FadeFilter
|
FadeFilter(float duration)
Creates a FadeFilter with the given duration
|
| Modifier and Type | Method and Description |
|---|---|
void |
fadeIn()
fades the scene in (black to scene)
|
void |
fadeOut()
fades the scene out (scene to black)
|
float |
getDuration()
returns the duration of the effect
|
protected com.jme3.material.Material |
getMaterial() |
float |
getValue()
return the current value of the fading
can be used to check if fade is complete (eg value=1)
|
protected void |
initFilter(com.jme3.asset.AssetManager manager,
com.jme3.renderer.RenderManager renderManager,
com.jme3.renderer.ViewPort vp,
int w,
int h) |
void |
pause() |
protected void |
preFrame(float tpf) |
void |
read(com.jme3.export.JmeImporter im) |
void |
setDuration(float duration)
Sets the duration of the filter default is 1 second
|
void |
setValue(float value)
sets the fade value
can be used to force complete black or compete scene
|
void |
write(com.jme3.export.JmeExporter ex) |
cleanup, cleanUpFilter, getDefaultPassDepthFormat, getDefaultPassTextureFormat, getName, getPostRenderPasses, getRenderedTexture, getRenderFrameBuffer, init, isEnabled, isRequiresBilinear, isRequiresDepthTexture, isRequiresSceneTexture, postFilter, postFrame, postQueue, setDepthTexture, setEnabled, setName, setProcessor, setRenderedTexture, setRenderFrameBufferpublic FadeFilter()
public FadeFilter(float duration)
duration - the desired duration (in seconds, default=1)protected com.jme3.material.Material getMaterial()
getMaterial in class com.jme3.post.Filterprotected void initFilter(com.jme3.asset.AssetManager manager,
com.jme3.renderer.RenderManager renderManager,
com.jme3.renderer.ViewPort vp,
int w,
int h)
initFilter in class com.jme3.post.Filterprotected void preFrame(float tpf)
preFrame in class com.jme3.post.Filterpublic float getDuration()
public void setDuration(float duration)
duration - the desired duration (in seconds, default=1)public void fadeIn()
public void fadeOut()
public void pause()
public void write(com.jme3.export.JmeExporter ex)
throws java.io.IOException
write in interface com.jme3.export.Savablewrite in class com.jme3.post.Filterjava.io.IOExceptionpublic void read(com.jme3.export.JmeImporter im)
throws java.io.IOException
read in interface com.jme3.export.Savableread in class com.jme3.post.Filterjava.io.IOExceptionpublic float getValue()
public void setValue(float value)
value - the desired value (default=1)