From d3f0c2002a7389b6d99075aeb1c7ea6d9124a541 Mon Sep 17 00:00:00 2001 From: Stephen Gold Date: Wed, 13 Dec 2017 18:26:25 -0800 Subject: [PATCH] in examples, replace deprecated methods and classes --- .../src/main/java/jme3test/TestChooser.java | 12 +++--- .../jme3test/animation/SubtitleTrack.java | 7 ++-- .../jme3test/animation/TestCinematic.java | 11 +++--- .../main/java/jme3test/audio/TestAmbient.java | 7 +++- .../jme3test/audio/TestMusicStreaming.java | 4 +- .../main/java/jme3test/audio/TestReverb.java | 4 +- .../src/main/java/jme3test/audio/TestWav.java | 4 +- .../java/jme3test/bullet/BombControl.java | 5 ++- .../jme3test/bullet/TestHoveringTank.java | 23 +++++------ .../java/jme3test/bullet/TestWalkingChar.java | 9 +++-- .../java/jme3test/effect/TestEverything.java | 39 +++++++++---------- .../jme3test/effect/TestExplosionEffect.java | 25 +++++++----- .../jme3test/effect/TestMovingParticle.java | 5 ++- .../effect/TestParticleExportingCloning.java | 2 +- .../java/jme3test/helloworld/HelloAudio.java | 7 +++- .../light/TestDirectionalLightShadow.java | 4 +- .../light/TestEnvironmentMapping.java | 3 +- .../jme3test/model/anim/TestCustomAnim.java | 2 +- .../main/java/jme3test/post/TestBloom.java | 5 ++- .../post/TestBloomAlphaThreshold.java | 15 +++++-- .../java/jme3test/post/TestCrossHatch.java | 5 ++- .../java/jme3test/post/TestDepthOfField.java | 4 +- .../src/main/java/jme3test/post/TestFog.java | 4 +- .../jme3test/post/TestLightScattering.java | 5 ++- .../jme3test/post/TestMultiViewsFilters.java | 4 +- .../jme3test/post/TestMultiplesFilters.java | 4 +- .../java/jme3test/post/TestPostFilters.java | 5 ++- .../jme3test/post/TestRenderToCubemap.java | 6 ++- .../java/jme3test/scene/TestSceneLoading.java | 4 +- .../jme3test/water/TestMultiPostWater.java | 4 +- .../java/jme3test/water/TestPostWater.java | 8 +++- .../jme3test/water/TestPostWaterLake.java | 4 +- .../java/jme3test/water/TestSceneWater.java | 4 +- .../java/jme3test/water/TestSimpleWater.java | 4 +- 34 files changed, 165 insertions(+), 93 deletions(-) diff --git a/jme3-examples/src/main/java/jme3test/TestChooser.java b/jme3-examples/src/main/java/jme3test/TestChooser.java index 5c2c572a1..c47196035 100644 --- a/jme3-examples/src/main/java/jme3test/TestChooser.java +++ b/jme3-examples/src/main/java/jme3test/TestChooser.java @@ -76,7 +76,7 @@ public class TestChooser extends JDialog { /** * Only accessed from EDT */ - private Object[] selectedClass = null; + private java.util.List selectedClass = null; private boolean showSetting = true; /** @@ -246,7 +246,7 @@ public class TestChooser extends JDialog { }; } - private void startApp(final Object[] appClass){ + private void startApp(final java.util.List appClass){ if (appClass == null){ JOptionPane.showMessageDialog(rootPane, "Please select a test from the list", @@ -257,8 +257,8 @@ public class TestChooser extends JDialog { new Thread(new Runnable(){ public void run(){ - for (int i = 0; i < appClass.length; i++) { - Class clazz = (Class)appClass[i]; + for (int i = 0; i < appClass.size(); i++) { + Class clazz = (Class)appClass.get(i); try { if (LegacyApplication.class.isAssignableFrom(clazz)) { Object app = clazz.newInstance(); @@ -333,7 +333,7 @@ public class TestChooser extends JDialog { list.getSelectionModel().addListSelectionListener( new ListSelectionListener() { public void valueChanged(ListSelectionEvent e) { - selectedClass = list.getSelectedValues(); + selectedClass = list.getSelectedValuesList(); } }); list.addMouseListener(new MouseAdapter() { @@ -485,7 +485,7 @@ public class TestChooser extends JDialog { }); jtf.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - selectedClass = classes.getSelectedValues(); + selectedClass = classes.getSelectedValuesList(); startApp(selectedClass); } }); diff --git a/jme3-examples/src/main/java/jme3test/animation/SubtitleTrack.java b/jme3-examples/src/main/java/jme3test/animation/SubtitleTrack.java index 177050118..d1d415128 100644 --- a/jme3-examples/src/main/java/jme3test/animation/SubtitleTrack.java +++ b/jme3-examples/src/main/java/jme3test/animation/SubtitleTrack.java @@ -31,7 +31,7 @@ */ package jme3test.animation; -import com.jme3.cinematic.events.GuiTrack; +import com.jme3.cinematic.events.GuiEvent; import de.lessvoid.nifty.Nifty; import de.lessvoid.nifty.elements.render.TextRenderer; @@ -39,7 +39,7 @@ import de.lessvoid.nifty.elements.render.TextRenderer; * * @author Nehon */ -public class SubtitleTrack extends GuiTrack{ +public class SubtitleTrack extends GuiEvent{ private String text=""; public SubtitleTrack(Nifty nifty, String screen,float initialDuration, String text) { @@ -50,7 +50,8 @@ public class SubtitleTrack extends GuiTrack{ @Override public void onPlay() { super.onPlay(); - nifty.getScreen(screen).findElementByName("text").getRenderer(TextRenderer.class).setText(text); + nifty.getScreen(screen).findElementById("text") + .getRenderer(TextRenderer.class).setText(text); } diff --git a/jme3-examples/src/main/java/jme3test/animation/TestCinematic.java b/jme3-examples/src/main/java/jme3test/animation/TestCinematic.java index a066426e4..93ad16f7f 100644 --- a/jme3-examples/src/main/java/jme3test/animation/TestCinematic.java +++ b/jme3-examples/src/main/java/jme3test/animation/TestCinematic.java @@ -57,7 +57,7 @@ import com.jme3.scene.CameraNode; import com.jme3.scene.Geometry; import com.jme3.scene.Spatial; import com.jme3.scene.shape.Box; -import com.jme3.shadow.PssmShadowRenderer; +import com.jme3.shadow.DirectionalLightShadowRenderer; import de.lessvoid.nifty.Nifty; public class TestCinematic extends SimpleApplication { @@ -237,10 +237,11 @@ public class TestCinematic extends SimpleApplication { fpp.addFilter(fade); if (renderer.getCaps().contains(Caps.GLSL100)) { - PssmShadowRenderer pssm = new PssmShadowRenderer(assetManager, 512, 1); - pssm.setDirection(new Vector3f(0, -1, -1).normalizeLocal()); - pssm.setShadowIntensity(0.4f); - viewPort.addProcessor(pssm); + DirectionalLightShadowRenderer dlsr + = new DirectionalLightShadowRenderer(assetManager, 512, 1); + dlsr.setLight(light); + dlsr.setShadowIntensity(0.4f); + viewPort.addProcessor(dlsr); viewPort.addProcessor(fpp); } } diff --git a/jme3-examples/src/main/java/jme3test/audio/TestAmbient.java b/jme3-examples/src/main/java/jme3test/audio/TestAmbient.java index 2703d53da..6d300525e 100644 --- a/jme3-examples/src/main/java/jme3test/audio/TestAmbient.java +++ b/jme3-examples/src/main/java/jme3test/audio/TestAmbient.java @@ -29,6 +29,7 @@ package jme3test.audio; import com.jme3.app.SimpleApplication; +import com.jme3.audio.AudioData.DataType; import com.jme3.audio.AudioNode; import com.jme3.audio.Environment; import com.jme3.material.Material; @@ -55,13 +56,15 @@ public class TestAmbient extends SimpleApplication { Environment env = new Environment(eax); audioRenderer.setEnvironment(env); - waves = new AudioNode(assetManager, "Sound/Environment/Ocean Waves.ogg", false); + waves = new AudioNode(assetManager, "Sound/Environment/Ocean Waves.ogg", + DataType.Buffer); waves.setPositional(true); waves.setLocalTranslation(new Vector3f(0, 0,0)); waves.setMaxDistance(100); waves.setRefDistance(5); - nature = new AudioNode(assetManager, "Sound/Environment/Nature.ogg", true); + nature = new AudioNode(assetManager, "Sound/Environment/Nature.ogg", + DataType.Stream); nature.setPositional(false); nature.setVolume(3); diff --git a/jme3-examples/src/main/java/jme3test/audio/TestMusicStreaming.java b/jme3-examples/src/main/java/jme3test/audio/TestMusicStreaming.java index 6d7ceb913..35332b11d 100644 --- a/jme3-examples/src/main/java/jme3test/audio/TestMusicStreaming.java +++ b/jme3-examples/src/main/java/jme3test/audio/TestMusicStreaming.java @@ -34,6 +34,7 @@ package jme3test.audio; import com.jme3.app.SimpleApplication; import com.jme3.asset.plugins.UrlLocator; +import com.jme3.audio.AudioData; import com.jme3.audio.AudioNode; public class TestMusicStreaming extends SimpleApplication { @@ -46,7 +47,8 @@ public class TestMusicStreaming extends SimpleApplication { @Override public void simpleInitApp(){ assetManager.registerLocator("http://www.vorbis.com/music/", UrlLocator.class); - AudioNode audioSource = new AudioNode(assetManager, "Lumme-Badloop.ogg", true); + AudioNode audioSource = new AudioNode(assetManager, "Lumme-Badloop.ogg", + AudioData.DataType.Stream); audioSource.setPositional(false); audioSource.setReverbEnabled(false); audioSource.play(); diff --git a/jme3-examples/src/main/java/jme3test/audio/TestReverb.java b/jme3-examples/src/main/java/jme3test/audio/TestReverb.java index 262f2984d..8fd5d1b7f 100644 --- a/jme3-examples/src/main/java/jme3test/audio/TestReverb.java +++ b/jme3-examples/src/main/java/jme3test/audio/TestReverb.java @@ -29,6 +29,7 @@ package jme3test.audio; import com.jme3.app.SimpleApplication; +import com.jme3.audio.AudioData; import com.jme3.audio.AudioNode; import com.jme3.audio.Environment; import com.jme3.math.FastMath; @@ -47,7 +48,8 @@ public class TestReverb extends SimpleApplication { @Override public void simpleInitApp() { - audioSource = new AudioNode(assetManager, "Sound/Effects/Bang.wav"); + audioSource = new AudioNode(assetManager, "Sound/Effects/Bang.wav", + AudioData.DataType.Buffer); float[] eax = new float[]{15, 38.0f, 0.300f, -1000, -3300, 0, 1.49f, 0.54f, 1.00f, -2560, 0.162f, 0.00f, 0.00f, 0.00f, diff --git a/jme3-examples/src/main/java/jme3test/audio/TestWav.java b/jme3-examples/src/main/java/jme3test/audio/TestWav.java index 2c145ec75..09fcfe714 100644 --- a/jme3-examples/src/main/java/jme3test/audio/TestWav.java +++ b/jme3-examples/src/main/java/jme3test/audio/TestWav.java @@ -30,6 +30,7 @@ package jme3test.audio; import com.jme3.app.SimpleApplication; +import com.jme3.audio.AudioData; import com.jme3.audio.AudioNode; public class TestWav extends SimpleApplication { @@ -54,7 +55,8 @@ public class TestWav extends SimpleApplication { @Override public void simpleInitApp() { - audioSource = new AudioNode(assetManager, "Sound/Effects/Gun.wav", false); + audioSource = new AudioNode(assetManager, "Sound/Effects/Gun.wav", + AudioData.DataType.Buffer); audioSource.setLooping(false); } } diff --git a/jme3-examples/src/main/java/jme3test/bullet/BombControl.java b/jme3-examples/src/main/java/jme3test/bullet/BombControl.java index c02e5a441..4d9af6a45 100644 --- a/jme3-examples/src/main/java/jme3test/bullet/BombControl.java +++ b/jme3-examples/src/main/java/jme3test/bullet/BombControl.java @@ -102,8 +102,9 @@ public class BombControl extends RigidBodyControl implements PhysicsCollisionLis effect.setGravity(0, -5f, 0); effect.setLowLife(.4f); effect.setHighLife(.5f); - effect.setInitialVelocity(new Vector3f(0, 7, 0)); - effect.setVelocityVariation(1f); + effect.getParticleInfluencer() + .setInitialVelocity(new Vector3f(0, 7, 0)); + effect.getParticleInfluencer().setVelocityVariation(1f); effect.setImagesX(2); effect.setImagesY(2); Material mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md"); diff --git a/jme3-examples/src/main/java/jme3test/bullet/TestHoveringTank.java b/jme3-examples/src/main/java/jme3test/bullet/TestHoveringTank.java index d1def4203..a241072a2 100644 --- a/jme3-examples/src/main/java/jme3test/bullet/TestHoveringTank.java +++ b/jme3-examples/src/main/java/jme3test/bullet/TestHoveringTank.java @@ -54,9 +54,8 @@ import com.jme3.renderer.Camera; import com.jme3.renderer.queue.RenderQueue.ShadowMode; import com.jme3.scene.Geometry; import com.jme3.scene.Spatial; -import com.jme3.shadow.PssmShadowRenderer; -import com.jme3.shadow.PssmShadowRenderer.CompareMode; -import com.jme3.shadow.PssmShadowRenderer.FilterMode; +import com.jme3.shadow.DirectionalLightShadowRenderer; +import com.jme3.shadow.EdgeFilteringMode; import com.jme3.system.AppSettings; import com.jme3.terrain.geomipmap.TerrainLodControl; import com.jme3.terrain.geomipmap.TerrainQuad; @@ -65,6 +64,7 @@ import com.jme3.terrain.heightmap.ImageBasedHeightMap; import com.jme3.texture.Texture; import com.jme3.texture.Texture.WrapMode; import com.jme3.util.SkyFactory; +import com.jme3.util.SkyFactory.EnvMapType; import java.util.ArrayList; import java.util.List; @@ -113,21 +113,22 @@ public class TestHoveringTank extends SimpleApplication implements AnalogListene stateManager.attach(bulletAppState); // bulletAppState.getPhysicsSpace().enableDebug(assetManager); bulletAppState.getPhysicsSpace().setAccuracy(1f/30f); - rootNode.attachChild(SkyFactory.createSky(assetManager, "Textures/Sky/Bright/BrightSky.dds", false)); + rootNode.attachChild(SkyFactory.createSky(assetManager, + "Textures/Sky/Bright/BrightSky.dds", EnvMapType.CubeMap)); - PssmShadowRenderer pssmr = new PssmShadowRenderer(assetManager, 2048, 3); - pssmr.setDirection(new Vector3f(-0.5f, -0.3f, -0.3f).normalizeLocal()); - pssmr.setLambda(0.55f); - pssmr.setShadowIntensity(0.6f); - pssmr.setCompareMode(CompareMode.Hardware); - pssmr.setFilterMode(FilterMode.Bilinear); - viewPort.addProcessor(pssmr); + DirectionalLightShadowRenderer dlsr + = new DirectionalLightShadowRenderer(assetManager, 2048, 3); + dlsr.setLambda(0.55f); + dlsr.setShadowIntensity(0.6f); + dlsr.setEdgeFilteringMode(EdgeFilteringMode.Bilinear); + viewPort.addProcessor(dlsr); setupKeys(); createTerrain(); buildPlayer(); DirectionalLight dl = new DirectionalLight(); + dlsr.setLight(dl); dl.setColor(new ColorRGBA(1.0f, 0.94f, 0.8f, 1f).multLocal(1.3f)); dl.setDirection(new Vector3f(-0.5f, -0.3f, -0.3f).normalizeLocal()); rootNode.addLight(dl); diff --git a/jme3-examples/src/main/java/jme3test/bullet/TestWalkingChar.java b/jme3-examples/src/main/java/jme3test/bullet/TestWalkingChar.java index c7e937c0b..d5b42d01b 100644 --- a/jme3-examples/src/main/java/jme3test/bullet/TestWalkingChar.java +++ b/jme3-examples/src/main/java/jme3test/bullet/TestWalkingChar.java @@ -217,8 +217,9 @@ public class TestWalkingChar extends SimpleApplication implements ActionListener effect.setGravity(0, -5, 0); effect.setLowLife(.4f); effect.setHighLife(.5f); - effect.setInitialVelocity(new Vector3f(0, 7, 0)); - effect.setVelocityVariation(1f); + effect.getParticleInfluencer() + .setInitialVelocity(new Vector3f(0, 7, 0)); + effect.getParticleInfluencer().setVelocityVariation(1f); effect.setImagesX(2); effect.setImagesY(2); Material mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md"); @@ -237,7 +238,9 @@ public class TestWalkingChar extends SimpleApplication implements ActionListener } private void createSky() { - rootNode.attachChild(SkyFactory.createSky(assetManager, "Textures/Sky/Bright/BrightSky.dds", false)); + rootNode.attachChild(SkyFactory.createSky(assetManager, + "Textures/Sky/Bright/BrightSky.dds", + SkyFactory.EnvMapType.CubeMap)); } private void createTerrain() { diff --git a/jme3-examples/src/main/java/jme3test/effect/TestEverything.java b/jme3-examples/src/main/java/jme3test/effect/TestEverything.java index be05958c3..62f06a422 100644 --- a/jme3-examples/src/main/java/jme3test/effect/TestEverything.java +++ b/jme3-examples/src/main/java/jme3test/effect/TestEverything.java @@ -36,7 +36,8 @@ import com.jme3.app.SimpleApplication; import com.jme3.light.DirectionalLight; import com.jme3.material.Material; import com.jme3.math.*; -import com.jme3.post.HDRRenderer; +import com.jme3.post.FilterPostProcessor; +import com.jme3.post.filters.ToneMapFilter; import com.jme3.renderer.Caps; import com.jme3.renderer.queue.RenderQueue.ShadowMode; import com.jme3.scene.Geometry; @@ -44,7 +45,7 @@ import com.jme3.scene.Node; import com.jme3.scene.Spatial; import com.jme3.scene.Spatial.CullHint; import com.jme3.scene.shape.Box; -import com.jme3.shadow.BasicShadowRenderer; +import com.jme3.shadow.DirectionalLightShadowRenderer; import com.jme3.texture.Texture; import com.jme3.texture.Texture.WrapMode; import com.jme3.util.SkyFactory; @@ -52,8 +53,8 @@ import com.jme3.util.TangentBinormalGenerator; public class TestEverything extends SimpleApplication { - private BasicShadowRenderer bsr; - private HDRRenderer hdrRender; + private DirectionalLightShadowRenderer dlsr; + private ToneMapFilter toneMapFilter; private Vector3f lightDir = new Vector3f(-1, -1, .5f).normalizeLocal(); public static void main(String[] args){ @@ -63,26 +64,20 @@ public class TestEverything extends SimpleApplication { public void setupHdr(){ if (renderer.getCaps().contains(Caps.GLSL100)){ - hdrRender = new HDRRenderer(assetManager, renderer); - hdrRender.setMaxIterations(40); - hdrRender.setSamples(settings.getSamples()); - - hdrRender.setWhiteLevel(3); - hdrRender.setExposure(0.72f); - hdrRender.setThrottle(1); + toneMapFilter = new ToneMapFilter(); + toneMapFilter.setWhitePoint(new Vector3f(3f, 3f, 3f)); + FilterPostProcessor fpp = new FilterPostProcessor(assetManager); + fpp.addFilter(toneMapFilter); + viewPort.addProcessor(fpp); // setPauseOnLostFocus(false); - // new HDRConfig(hdrRender).setVisible(true); - - viewPort.addProcessor(hdrRender); } } public void setupBasicShadow(){ if (renderer.getCaps().contains(Caps.GLSL100)){ - bsr = new BasicShadowRenderer(assetManager, 1024); - bsr.setDirection(lightDir); - viewPort.addProcessor(bsr); + dlsr = new DirectionalLightShadowRenderer(assetManager, 1024, 1); + viewPort.addProcessor(dlsr); } } @@ -93,16 +88,20 @@ public class TestEverything extends SimpleApplication { }else{ envMap = assetManager.loadTexture("Textures/Sky/St Peters/StPeters.jpg"); } - rootNode.attachChild(SkyFactory.createSky(assetManager, envMap, new Vector3f(-1,-1,-1), true)); + rootNode.attachChild(SkyFactory.createSky(assetManager, envMap, + new Vector3f(-1,-1,-1), SkyFactory.EnvMapType.SphereMap)); } public void setupLighting(){ boolean hdr = false; - if (hdrRender != null){ - hdr = hdrRender.isEnabled(); + if (toneMapFilter != null){ + hdr = toneMapFilter.isEnabled(); } DirectionalLight dl = new DirectionalLight(); + if (dlsr != null) { + dlsr.setLight(dl); + } dl.setDirection(lightDir); if (hdr){ dl.setColor(new ColorRGBA(3, 3, 3, 1)); diff --git a/jme3-examples/src/main/java/jme3test/effect/TestExplosionEffect.java b/jme3-examples/src/main/java/jme3test/effect/TestExplosionEffect.java index 5d2d781a6..ff5100ffe 100644 --- a/jme3-examples/src/main/java/jme3test/effect/TestExplosionEffect.java +++ b/jme3-examples/src/main/java/jme3test/effect/TestExplosionEffect.java @@ -98,8 +98,9 @@ public class TestExplosionEffect extends SimpleApplication { flash.setGravity(0, 0, 0); flash.setLowLife(.2f); flash.setHighLife(.2f); - flash.setInitialVelocity(new Vector3f(0, 5f, 0)); - flash.setVelocityVariation(1); + flash.getParticleInfluencer() + .setInitialVelocity(new Vector3f(0, 5f, 0)); + flash.getParticleInfluencer().setVelocityVariation(1); flash.setImagesX(2); flash.setImagesY(2); Material mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md"); @@ -120,8 +121,9 @@ public class TestExplosionEffect extends SimpleApplication { roundspark.setGravity(0, -.5f, 0); roundspark.setLowLife(1.8f); roundspark.setHighLife(2f); - roundspark.setInitialVelocity(new Vector3f(0, 3, 0)); - roundspark.setVelocityVariation(.5f); + roundspark.getParticleInfluencer() + .setInitialVelocity(new Vector3f(0, 3, 0)); + roundspark.getParticleInfluencer().setVelocityVariation(.5f); roundspark.setImagesX(1); roundspark.setImagesY(1); Material mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md"); @@ -165,8 +167,9 @@ public class TestExplosionEffect extends SimpleApplication { smoketrail.setGravity(0, 1, 0); smoketrail.setLowLife(.4f); smoketrail.setHighLife(.5f); - smoketrail.setInitialVelocity(new Vector3f(0, 12, 0)); - smoketrail.setVelocityVariation(1); + smoketrail.getParticleInfluencer() + .setInitialVelocity(new Vector3f(0, 12, 0)); + smoketrail.getParticleInfluencer().setVelocityVariation(1); smoketrail.setImagesX(1); smoketrail.setImagesY(3); Material mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md"); @@ -190,8 +193,9 @@ public class TestExplosionEffect extends SimpleApplication { debris.setGravity(0, 12f, 0); debris.setLowLife(1.4f); debris.setHighLife(1.5f); - debris.setInitialVelocity(new Vector3f(0, 15, 0)); - debris.setVelocityVariation(.60f); + debris.getParticleInfluencer() + .setInitialVelocity(new Vector3f(0, 15, 0)); + debris.getParticleInfluencer().setVelocityVariation(.60f); debris.setImagesX(3); debris.setImagesY(3); Material mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md"); @@ -214,8 +218,9 @@ public class TestExplosionEffect extends SimpleApplication { shockwave.setGravity(0, 0, 0); shockwave.setLowLife(0.5f); shockwave.setHighLife(0.5f); - shockwave.setInitialVelocity(new Vector3f(0, 0, 0)); - shockwave.setVelocityVariation(0f); + shockwave.getParticleInfluencer() + .setInitialVelocity(new Vector3f(0, 0, 0)); + shockwave.getParticleInfluencer().setVelocityVariation(0f); shockwave.setImagesX(1); shockwave.setImagesY(1); Material mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md"); diff --git a/jme3-examples/src/main/java/jme3test/effect/TestMovingParticle.java b/jme3-examples/src/main/java/jme3test/effect/TestMovingParticle.java index d603e229a..b38eed97a 100644 --- a/jme3-examples/src/main/java/jme3test/effect/TestMovingParticle.java +++ b/jme3-examples/src/main/java/jme3test/effect/TestMovingParticle.java @@ -60,10 +60,11 @@ public class TestMovingParticle extends SimpleApplication { public void simpleInitApp() { emit = new ParticleEmitter("Emitter", Type.Triangle, 300); emit.setGravity(0, 0, 0); - emit.setVelocityVariation(1); + emit.getParticleInfluencer().setVelocityVariation(1); emit.setLowLife(1); emit.setHighLife(1); - emit.setInitialVelocity(new Vector3f(0, .5f, 0)); + emit.getParticleInfluencer() + .setInitialVelocity(new Vector3f(0, .5f, 0)); emit.setImagesX(15); Material mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md"); mat.setTexture("Texture", assetManager.loadTexture("Effects/Smoke/Smoke.png")); diff --git a/jme3-examples/src/main/java/jme3test/effect/TestParticleExportingCloning.java b/jme3-examples/src/main/java/jme3test/effect/TestParticleExportingCloning.java index d245de23f..d38fdbdf9 100644 --- a/jme3-examples/src/main/java/jme3test/effect/TestParticleExportingCloning.java +++ b/jme3-examples/src/main/java/jme3test/effect/TestParticleExportingCloning.java @@ -57,7 +57,7 @@ public class TestParticleExportingCloning extends SimpleApplication { emit.setGravity(0, 0, 0); emit.setLowLife(5); emit.setHighLife(10); - emit.setInitialVelocity(new Vector3f(0, 0, 0)); + emit.getParticleInfluencer().setInitialVelocity(new Vector3f(0, 0, 0)); emit.setImagesX(15); Material mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md"); mat.setTexture("Texture", assetManager.loadTexture("Effects/Smoke/Smoke.png")); diff --git a/jme3-examples/src/main/java/jme3test/helloworld/HelloAudio.java b/jme3-examples/src/main/java/jme3test/helloworld/HelloAudio.java index b9943879c..bc13e01e8 100644 --- a/jme3-examples/src/main/java/jme3test/helloworld/HelloAudio.java +++ b/jme3-examples/src/main/java/jme3test/helloworld/HelloAudio.java @@ -1,6 +1,7 @@ package jme3test.helloworld; import com.jme3.app.SimpleApplication; +import com.jme3.audio.AudioData.DataType; import com.jme3.audio.AudioNode; import com.jme3.input.MouseInput; import com.jme3.input.controls.ActionListener; @@ -42,14 +43,16 @@ public class HelloAudio extends SimpleApplication { /** We create two audio nodes. */ private void initAudio() { /* gun shot sound is to be triggered by a mouse click. */ - audio_gun = new AudioNode(assetManager, "Sound/Effects/Gun.wav", false); + audio_gun = new AudioNode(assetManager, + "Sound/Effects/Gun.wav", DataType.Buffer); audio_gun.setPositional(false); audio_gun.setLooping(false); audio_gun.setVolume(2); rootNode.attachChild(audio_gun); /* nature sound - keeps playing in a loop. */ - audio_nature = new AudioNode(assetManager, "Sound/Environment/Ocean Waves.ogg", true); + audio_nature = new AudioNode(assetManager, + "Sound/Environment/Ocean Waves.ogg", DataType.Stream); audio_nature.setLooping(true); // activate continuous playing audio_nature.setPositional(true); audio_nature.setVolume(3); diff --git a/jme3-examples/src/main/java/jme3test/light/TestDirectionalLightShadow.java b/jme3-examples/src/main/java/jme3test/light/TestDirectionalLightShadow.java index 6e3ad412b..79aacc616 100644 --- a/jme3-examples/src/main/java/jme3test/light/TestDirectionalLightShadow.java +++ b/jme3-examples/src/main/java/jme3test/light/TestDirectionalLightShadow.java @@ -59,6 +59,7 @@ import com.jme3.shadow.EdgeFilteringMode; import com.jme3.texture.Texture; import com.jme3.texture.Texture.WrapMode; import com.jme3.util.SkyFactory; +import com.jme3.util.SkyFactory.EnvMapType; import com.jme3.util.TangentBinormalGenerator; public class TestDirectionalLightShadow extends SimpleApplication implements ActionListener, AnalogListener { @@ -155,7 +156,8 @@ public class TestDirectionalLightShadow extends SimpleApplication implements Act al.setColor(ColorRGBA.White.mult(0.02f)); rootNode.addLight(al); - Spatial sky = SkyFactory.createSky(assetManager, "Scenes/Beach/FullskiesSunset0068.dds", false); + Spatial sky = SkyFactory.createSky(assetManager, + "Scenes/Beach/FullskiesSunset0068.dds", EnvMapType.CubeMap); sky.setLocalScale(350); rootNode.attachChild(sky); diff --git a/jme3-examples/src/main/java/jme3test/light/TestEnvironmentMapping.java b/jme3-examples/src/main/java/jme3test/light/TestEnvironmentMapping.java index ff674f664..4785b33c1 100644 --- a/jme3-examples/src/main/java/jme3test/light/TestEnvironmentMapping.java +++ b/jme3-examples/src/main/java/jme3test/light/TestEnvironmentMapping.java @@ -48,7 +48,8 @@ public class TestEnvironmentMapping extends SimpleApplication { chaseCam.setLookAtOffset(new Vector3f(0,0.5f,-1.0f)); buggy.addControl(chaseCam); rootNode.attachChild(buggy); - rootNode.attachChild(SkyFactory.createSky(assetManager, tex, false)); + rootNode.attachChild(SkyFactory.createSky(assetManager, tex, + SkyFactory.EnvMapType.CubeMap)); FilterPostProcessor fpp = new FilterPostProcessor(assetManager); BloomFilter bf = new BloomFilter(BloomFilter.GlowMode.Objects); diff --git a/jme3-examples/src/main/java/jme3test/model/anim/TestCustomAnim.java b/jme3-examples/src/main/java/jme3test/model/anim/TestCustomAnim.java index b5eeb5365..93403587a 100644 --- a/jme3-examples/src/main/java/jme3test/model/anim/TestCustomAnim.java +++ b/jme3-examples/src/main/java/jme3test/model/anim/TestCustomAnim.java @@ -93,7 +93,7 @@ public class TestCustomAnim extends SimpleApplication { box.setBuffer(indicesBuf); // Create bind pose buffers - box.generateBindPose(true); + box.generateBindPose(); // Create skeleton bone = new Bone("root"); diff --git a/jme3-examples/src/main/java/jme3test/post/TestBloom.java b/jme3-examples/src/main/java/jme3test/post/TestBloom.java index 1a394bf36..9572568ea 100644 --- a/jme3-examples/src/main/java/jme3test/post/TestBloom.java +++ b/jme3-examples/src/main/java/jme3test/post/TestBloom.java @@ -49,6 +49,7 @@ import com.jme3.scene.Spatial; import com.jme3.scene.debug.WireFrustum; import com.jme3.scene.shape.Box; import com.jme3.util.SkyFactory; +import com.jme3.util.SkyFactory.EnvMapType; public class TestBloom extends SimpleApplication { @@ -114,7 +115,9 @@ public class TestBloom extends SimpleApplication { rootNode.addLight(light); // load sky - Spatial sky = SkyFactory.createSky(assetManager, "Textures/Sky/Bright/FullskiesBlueClear03.dds", false); + Spatial sky = SkyFactory.createSky(assetManager, + "Textures/Sky/Bright/FullskiesBlueClear03.dds", + EnvMapType.CubeMap); sky.setCullHint(Spatial.CullHint.Never); rootNode.attachChild(sky); diff --git a/jme3-examples/src/main/java/jme3test/post/TestBloomAlphaThreshold.java b/jme3-examples/src/main/java/jme3test/post/TestBloomAlphaThreshold.java index 0514aced5..b9f136726 100644 --- a/jme3-examples/src/main/java/jme3test/post/TestBloomAlphaThreshold.java +++ b/jme3-examples/src/main/java/jme3test/post/TestBloomAlphaThreshold.java @@ -51,6 +51,7 @@ import com.jme3.scene.Spatial; import com.jme3.scene.debug.WireFrustum; import com.jme3.scene.shape.Box; import com.jme3.util.SkyFactory; +import com.jme3.util.SkyFactory.EnvMapType; public class TestBloomAlphaThreshold extends SimpleApplication { @@ -101,7 +102,10 @@ public class TestBloomAlphaThreshold extends SimpleApplication teapot.setLocalScale(10.0f); rootNode.attachChild(teapot); - Geometry soil = new Geometry("soil", new Box(new Vector3f(0, -13, 550), 800, 10, 700)); + Vector3f boxMin1 = new Vector3f(-800f, -23f, -150f); + Vector3f boxMax1 = new Vector3f(800f, 3f, 1250f); + Box boxMesh1 = new Box(boxMin1, boxMax1); + Geometry soil = new Geometry("soil", boxMesh1); soil.setMaterial(matSoil); soil.setShadowMode(ShadowMode.CastAndReceive); rootNode.attachChild(soil); @@ -110,7 +114,10 @@ public class TestBloomAlphaThreshold extends SimpleApplication matBox.setTexture("ColorMap", assetManager.loadTexture("Textures/ColoredTex/Monkey.png")); matBox.setFloat("AlphaDiscardThreshold", 0.5f); - Geometry box = new Geometry("box", new Box(new Vector3f(-3.5f, 10, -2), 2, 2, 2)); + Vector3f boxMin2 = new Vector3f(-5.5f, 8f, -4f); + Vector3f boxMax2 = new Vector3f(-1.5f, 12f, 0f); + Box boxMesh2 = new Box(boxMin2, boxMax2); + Geometry box = new Geometry("box", boxMesh2); box.setMaterial(matBox); box.setQueueBucket(RenderQueue.Bucket.Translucent); // box.setShadowMode(ShadowMode.CastAndReceive); @@ -122,7 +129,9 @@ public class TestBloomAlphaThreshold extends SimpleApplication rootNode.addLight(light); // load sky - Spatial sky = SkyFactory.createSky(assetManager, "Textures/Sky/Bright/FullskiesBlueClear03.dds", false); + Spatial sky = SkyFactory.createSky(assetManager, + "Textures/Sky/Bright/FullskiesBlueClear03.dds", + EnvMapType.CubeMap); sky.setCullHint(Spatial.CullHint.Never); rootNode.attachChild(sky); diff --git a/jme3-examples/src/main/java/jme3test/post/TestCrossHatch.java b/jme3-examples/src/main/java/jme3test/post/TestCrossHatch.java index ff3ef081c..5cc3669ae 100644 --- a/jme3-examples/src/main/java/jme3test/post/TestCrossHatch.java +++ b/jme3-examples/src/main/java/jme3test/post/TestCrossHatch.java @@ -49,6 +49,7 @@ import com.jme3.scene.Spatial; import com.jme3.scene.debug.WireFrustum; import com.jme3.scene.shape.Box; import com.jme3.util.SkyFactory; +import com.jme3.util.SkyFactory.EnvMapType; public class TestCrossHatch extends SimpleApplication { @@ -114,7 +115,9 @@ public class TestCrossHatch extends SimpleApplication { rootNode.addLight(light); // load sky - Spatial sky = SkyFactory.createSky(assetManager, "Textures/Sky/Bright/FullskiesBlueClear03.dds", false); + Spatial sky = SkyFactory.createSky(assetManager, + "Textures/Sky/Bright/FullskiesBlueClear03.dds", + EnvMapType.CubeMap); sky.setCullHint(Spatial.CullHint.Never); rootNode.attachChild(sky); diff --git a/jme3-examples/src/main/java/jme3test/post/TestDepthOfField.java b/jme3-examples/src/main/java/jme3test/post/TestDepthOfField.java index 9966adc61..263d45ff3 100644 --- a/jme3-examples/src/main/java/jme3test/post/TestDepthOfField.java +++ b/jme3-examples/src/main/java/jme3test/post/TestDepthOfField.java @@ -21,6 +21,7 @@ import com.jme3.terrain.heightmap.ImageBasedHeightMap; import com.jme3.texture.Texture; import com.jme3.texture.Texture.WrapMode; import com.jme3.util.SkyFactory; +import com.jme3.util.SkyFactory.EnvMapType; import java.util.ArrayList; import java.util.List; @@ -65,7 +66,8 @@ public class TestDepthOfField extends SimpleApplication { cam.setRotation(new Quaternion().fromAngles(new float[]{FastMath.PI * 0.06f, FastMath.PI * 0.65f, 0})); - Spatial sky = SkyFactory.createSky(assetManager, "Scenes/Beach/FullskiesSunset0068.dds", false); + Spatial sky = SkyFactory.createSky(assetManager, + "Scenes/Beach/FullskiesSunset0068.dds", EnvMapType.CubeMap); sky.setLocalScale(350); mainScene.attachChild(sky); diff --git a/jme3-examples/src/main/java/jme3test/post/TestFog.java b/jme3-examples/src/main/java/jme3test/post/TestFog.java index 5cecc4bde..544932ab6 100644 --- a/jme3-examples/src/main/java/jme3test/post/TestFog.java +++ b/jme3-examples/src/main/java/jme3test/post/TestFog.java @@ -77,7 +77,9 @@ public class TestFog extends SimpleApplication { cam.setRotation(new Quaternion(0.023536969f, 0.9361278f, -0.016098259f, -0.35050195f)); // load sky - mainScene.attachChild(SkyFactory.createSky(assetManager, "Textures/Sky/Bright/BrightSky.dds", false)); + mainScene.attachChild(SkyFactory.createSky(assetManager, + "Textures/Sky/Bright/BrightSky.dds", + SkyFactory.EnvMapType.CubeMap)); createTerrain(mainScene); diff --git a/jme3-examples/src/main/java/jme3test/post/TestLightScattering.java b/jme3-examples/src/main/java/jme3test/post/TestLightScattering.java index 2f12f3892..c2940cab6 100644 --- a/jme3-examples/src/main/java/jme3test/post/TestLightScattering.java +++ b/jme3-examples/src/main/java/jme3test/post/TestLightScattering.java @@ -44,7 +44,6 @@ import com.jme3.renderer.queue.RenderQueue.ShadowMode; import com.jme3.scene.Geometry; import com.jme3.scene.Node; import com.jme3.scene.Spatial; -import com.jme3.shadow.PssmShadowRenderer; import com.jme3.util.SkyFactory; import com.jme3.util.TangentBinormalGenerator; @@ -76,7 +75,9 @@ public class TestLightScattering extends SimpleApplication { rootNode.attachChild(scene); // load sky - rootNode.attachChild(SkyFactory.createSky(assetManager, "Textures/Sky/Bright/FullskiesBlueClear03.dds", false)); + rootNode.attachChild(SkyFactory.createSky(assetManager, + "Textures/Sky/Bright/FullskiesBlueClear03.dds", + SkyFactory.EnvMapType.CubeMap)); DirectionalLight sun = new DirectionalLight(); Vector3f lightDir = new Vector3f(-0.12f, -0.3729129f, 0.74847335f); diff --git a/jme3-examples/src/main/java/jme3test/post/TestMultiViewsFilters.java b/jme3-examples/src/main/java/jme3test/post/TestMultiViewsFilters.java index 477dd96c7..adbc036c7 100644 --- a/jme3-examples/src/main/java/jme3test/post/TestMultiViewsFilters.java +++ b/jme3-examples/src/main/java/jme3test/post/TestMultiViewsFilters.java @@ -126,7 +126,9 @@ public class TestMultiViewsFilters extends SimpleApplication { - rootNode.attachChild(SkyFactory.createSky(assetManager, "Textures/Sky/Bright/BrightSky.dds", false)); + rootNode.attachChild(SkyFactory.createSky(assetManager, + "Textures/Sky/Bright/BrightSky.dds", + SkyFactory.EnvMapType.CubeMap)); final FilterPostProcessor fpp = new FilterPostProcessor(assetManager); final FilterPostProcessor fpp2 = new FilterPostProcessor(assetManager); diff --git a/jme3-examples/src/main/java/jme3test/post/TestMultiplesFilters.java b/jme3-examples/src/main/java/jme3test/post/TestMultiplesFilters.java index 010651379..46efd639a 100644 --- a/jme3-examples/src/main/java/jme3test/post/TestMultiplesFilters.java +++ b/jme3-examples/src/main/java/jme3test/post/TestMultiplesFilters.java @@ -72,7 +72,9 @@ public class TestMultiplesFilters extends SimpleApplication { cam.setRotation(new Quaternion(0.0016069f, 0.9810479f, -0.008143323f, 0.19358753f)); // load sky - rootNode.attachChild(SkyFactory.createSky(assetManager, "Textures/Sky/Bright/BrightSky.dds", false)); + rootNode.attachChild(SkyFactory.createSky(assetManager, + "Textures/Sky/Bright/BrightSky.dds", + SkyFactory.EnvMapType.CubeMap)); // create the geometry and attach it // load the level from zip or http zip diff --git a/jme3-examples/src/main/java/jme3test/post/TestPostFilters.java b/jme3-examples/src/main/java/jme3test/post/TestPostFilters.java index c5fc0b9d8..c2ee5b04b 100644 --- a/jme3-examples/src/main/java/jme3test/post/TestPostFilters.java +++ b/jme3-examples/src/main/java/jme3test/post/TestPostFilters.java @@ -50,6 +50,7 @@ import com.jme3.system.AppSettings; import com.jme3.texture.Texture; import com.jme3.texture.Texture.WrapMode; import com.jme3.util.SkyFactory; +import com.jme3.util.SkyFactory.EnvMapType; import com.jme3.util.TangentBinormalGenerator; public class TestPostFilters extends SimpleApplication implements ActionListener { @@ -88,7 +89,9 @@ public class TestPostFilters extends SimpleApplication implements ActionListener } else { envMap = assetManager.loadTexture("Textures/Sky/St Peters/StPeters.jpg"); } - rootNode.attachChild(SkyFactory.createSky(assetManager, envMap, new Vector3f(-1, -1, -1), true)); + Spatial sky = SkyFactory.createSky(assetManager, envMap, + new Vector3f(-1f, -1f, -1f), EnvMapType.SphereMap); + rootNode.attachChild(sky); } public void setupLighting() { diff --git a/jme3-examples/src/main/java/jme3test/post/TestRenderToCubemap.java b/jme3-examples/src/main/java/jme3test/post/TestRenderToCubemap.java index e5aa79d55..b3473b7ec 100644 --- a/jme3-examples/src/main/java/jme3test/post/TestRenderToCubemap.java +++ b/jme3-examples/src/main/java/jme3test/post/TestRenderToCubemap.java @@ -41,12 +41,14 @@ import com.jme3.math.Vector3f; import com.jme3.renderer.Camera; import com.jme3.renderer.ViewPort; import com.jme3.scene.Geometry; +import com.jme3.scene.Spatial; import com.jme3.scene.shape.Box; import com.jme3.texture.FrameBuffer; import com.jme3.texture.Image.Format; import com.jme3.texture.Texture; import com.jme3.texture.TextureCubeMap; import com.jme3.util.SkyFactory; +import com.jme3.util.SkyFactory.EnvMapType; /** * Renders a rotating box to a cubemap texture, then applies the cubemap @@ -114,7 +116,9 @@ public class TestRenderToCubemap extends SimpleApplication { cam.lookAt(Vector3f.ZERO, Vector3f.UNIT_Y); Texture offTex = setupOffscreenView(); - rootNode.attachChild(SkyFactory.createSky(assetManager, offTex, false)); + Spatial sky = SkyFactory.createSky(assetManager, offTex, + EnvMapType.CubeMap); + rootNode.attachChild(sky); } @Override diff --git a/jme3-examples/src/main/java/jme3test/scene/TestSceneLoading.java b/jme3-examples/src/main/java/jme3test/scene/TestSceneLoading.java index cadc42e54..2567d94fa 100644 --- a/jme3-examples/src/main/java/jme3test/scene/TestSceneLoading.java +++ b/jme3-examples/src/main/java/jme3test/scene/TestSceneLoading.java @@ -66,7 +66,9 @@ public class TestSceneLoading extends SimpleApplication { this.flyCam.setMoveSpeed(10); // load sky - rootNode.attachChild(SkyFactory.createSky(assetManager, "Textures/Sky/Bright/BrightSky.dds", false)); + rootNode.attachChild(SkyFactory.createSky(assetManager, + "Textures/Sky/Bright/BrightSky.dds", + SkyFactory.EnvMapType.CubeMap)); File file = new File("wildhouse.zip"); if (!file.exists()) { diff --git a/jme3-examples/src/main/java/jme3test/water/TestMultiPostWater.java b/jme3-examples/src/main/java/jme3test/water/TestMultiPostWater.java index 2821b818c..2611d9696 100644 --- a/jme3-examples/src/main/java/jme3test/water/TestMultiPostWater.java +++ b/jme3-examples/src/main/java/jme3test/water/TestMultiPostWater.java @@ -20,6 +20,7 @@ import com.jme3.texture.Texture; import com.jme3.texture.Texture.WrapMode; import com.jme3.texture.Texture2D; import com.jme3.util.SkyFactory; +import com.jme3.util.SkyFactory.EnvMapType; import com.jme3.water.WaterFilter; import java.util.ArrayList; import java.util.List; @@ -73,7 +74,8 @@ public class TestMultiPostWater extends SimpleApplication { cam.setRotation(new Quaternion().fromAngles(new float[]{FastMath.PI * 0.06f, FastMath.PI * 0.65f, 0})); - Spatial sky = SkyFactory.createSky(assetManager, "Scenes/Beach/FullskiesSunset0068.dds", false); + Spatial sky = SkyFactory.createSky(assetManager, + "Scenes/Beach/FullskiesSunset0068.dds", EnvMapType.CubeMap); sky.setLocalScale(350); mainScene.attachChild(sky); diff --git a/jme3-examples/src/main/java/jme3test/water/TestPostWater.java b/jme3-examples/src/main/java/jme3test/water/TestPostWater.java index e1d3a08dd..21e11d153 100644 --- a/jme3-examples/src/main/java/jme3test/water/TestPostWater.java +++ b/jme3-examples/src/main/java/jme3test/water/TestPostWater.java @@ -1,6 +1,7 @@ package jme3test.water; import com.jme3.app.SimpleApplication; +import com.jme3.audio.AudioData.DataType; import com.jme3.audio.AudioNode; import com.jme3.audio.LowPassFilter; import com.jme3.effect.ParticleEmitter; @@ -35,6 +36,7 @@ import com.jme3.texture.Texture; import com.jme3.texture.Texture.WrapMode; import com.jme3.texture.Texture2D; import com.jme3.util.SkyFactory; +import com.jme3.util.SkyFactory.EnvMapType; import com.jme3.water.WaterFilter; import java.util.ArrayList; import java.util.List; @@ -93,7 +95,8 @@ public class TestPostWater extends SimpleApplication { - Spatial sky = SkyFactory.createSky(assetManager, "Scenes/Beach/FullskiesSunset0068.dds", false); + Spatial sky = SkyFactory.createSky(assetManager, + "Scenes/Beach/FullskiesSunset0068.dds", EnvMapType.CubeMap); sky.setLocalScale(350); mainScene.attachChild(sky); @@ -149,7 +152,8 @@ public class TestPostWater extends SimpleApplication { uw = cam.getLocation().y < waterHeight; - waves = new AudioNode(assetManager, "Sound/Environment/Ocean Waves.ogg", false); + waves = new AudioNode(assetManager, "Sound/Environment/Ocean Waves.ogg", + DataType.Buffer); waves.setLooping(true); waves.setReverbEnabled(true); if (uw) { diff --git a/jme3-examples/src/main/java/jme3test/water/TestPostWaterLake.java b/jme3-examples/src/main/java/jme3test/water/TestPostWaterLake.java index e178c12ac..16441025c 100644 --- a/jme3-examples/src/main/java/jme3test/water/TestPostWaterLake.java +++ b/jme3-examples/src/main/java/jme3test/water/TestPostWaterLake.java @@ -62,7 +62,9 @@ public class TestPostWaterLake extends SimpleApplication { // cam.setRotation(new Quaternion(0.03f, 0.9f, 0f, 0.4f)); // load sky - rootNode.attachChild(SkyFactory.createSky(assetManager, "Textures/Sky/Bright/BrightSky.dds", false)); + rootNode.attachChild(SkyFactory.createSky(assetManager, + "Textures/Sky/Bright/BrightSky.dds", + SkyFactory.EnvMapType.CubeMap)); File file = new File("wildhouse.zip"); diff --git a/jme3-examples/src/main/java/jme3test/water/TestSceneWater.java b/jme3-examples/src/main/java/jme3test/water/TestSceneWater.java index 41e71c2d3..4e0d8d6fc 100644 --- a/jme3-examples/src/main/java/jme3test/water/TestSceneWater.java +++ b/jme3-examples/src/main/java/jme3test/water/TestSceneWater.java @@ -66,7 +66,9 @@ public class TestSceneWater extends SimpleApplication { cam.setRotation(new Quaternion(0.03f, 0.9f, 0f, 0.4f)); // load sky - mainScene.attachChild(SkyFactory.createSky(assetManager, "Textures/Sky/Bright/BrightSky.dds", false)); + mainScene.attachChild(SkyFactory.createSky(assetManager, + "Textures/Sky/Bright/BrightSky.dds", + SkyFactory.EnvMapType.CubeMap)); File file = new File("wildhouse.zip"); diff --git a/jme3-examples/src/main/java/jme3test/water/TestSimpleWater.java b/jme3-examples/src/main/java/jme3test/water/TestSimpleWater.java index 4a8855df6..c8ba06fed 100644 --- a/jme3-examples/src/main/java/jme3test/water/TestSimpleWater.java +++ b/jme3-examples/src/main/java/jme3test/water/TestSimpleWater.java @@ -103,7 +103,9 @@ public class TestSimpleWater extends SimpleApplication implements ActionListener sceneNode.attachChild(geom); // load sky - sceneNode.attachChild(SkyFactory.createSky(assetManager, "Textures/Sky/Bright/BrightSky.dds", false)); + sceneNode.attachChild(SkyFactory.createSky(assetManager, + "Textures/Sky/Bright/BrightSky.dds", + SkyFactory.EnvMapType.CubeMap)); rootNode.attachChild(sceneNode); //add lightPos Geometry