First part is this PositionTransition3f change in sim-eth-es.
now this looks like,
# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- a/sim-eth-es/src/main/java/example/es/BodyPosition.java
+++ b/sim-eth-es/src/main/java/example/es/BodyPosition.java
@@ -40,7 +40,7 @@
import com.jme3.math.Vector3f;
import com.simsilica.es.EntityComponent;
import com.simsilica.es.EntityId;
-import com.simsilica.mathd.trans.PositionTransition;
+import com.simsilica.mathd.trans.PositionTransition3f;
import com.simsilica.mathd.trans.TransitionBuffer;
@@ -55,14 +55,14 @@
*/
public final class BodyPosition implements EntityComponent {
private transient int size;
- private transient TransitionBuffer<PositionTransition> position;
+ private transient TransitionBuffer<PositionTransition3f> position;
public BodyPosition() {
}
public BodyPosition( int history ) {
this.size = (byte)history;
- this.position = PositionTransition.createBuffer(history);
+ this.position = PositionTransition3f.createBuffer(history);
}
/**
@@ -77,16 +77,16 @@
}
}
- public TransitionBuffer<PositionTransition> getBuffer() {
+ public TransitionBuffer<PositionTransition3f> getBuffer() {
return position;
}
public void addFrame( long endTime, Vector3f pos, Quaternion quat, boolean visible ) {
- PositionTransition trans = new PositionTransition(endTime, pos, quat, visible);
+ PositionTransition3f trans = new PositionTransition3f(endTime, pos, quat, visible);
getBuffer().addTransition(trans);
}
- public PositionTransition getFrame( long time ) {
+ public PositionTransition3f getFrame( long time ) {
return getBuffer().getTransition(time);
}
This file,
now looks like this,
# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- a/sim-eth-es/src/main/java/example/es/BodyPositionCache.java
+++ b/sim-eth-es/src/main/java/example/es/BodyPositionCache.java
@@ -37,15 +37,13 @@
package example.es;
import com.simsilica.es.EntityId;
-import com.simsilica.mathd.trans.PositionTransition;
+import com.simsilica.mathd.trans.PositionTransition3f;
import com.simsilica.mathd.trans.TransitionBuffer;
import java.lang.ref.Reference;
import java.lang.ref.ReferenceQueue;
import java.lang.ref.WeakReference;
import java.util.HashMap;
-import java.util.HashSet;
import java.util.Map;
-import java.util.Set;
/**
* BodyPosition components hold a buffer that should be shared
@@ -65,7 +63,7 @@
* Keeps track of the weak references that are ready to remove
* from our map.
*/
- private ReferenceQueue<TransitionBuffer<PositionTransition>> refs = new ReferenceQueue<>();
+ private ReferenceQueue<TransitionBuffer<PositionTransition3f>> refs = new ReferenceQueue<>();
/**
* A map with weakly referenced values. We'll clean out the values
@@ -73,20 +71,20 @@
* is that garbage hanging around is less bad if no one is requesting
* it anyway.
*/
- private Map<EntityId, WeakReference<TransitionBuffer<PositionTransition>>> map = new HashMap<>();
+ private Map<EntityId, WeakReference<TransitionBuffer<PositionTransition3f>>> map = new HashMap<>();
- public static TransitionBuffer<PositionTransition> getBuffer( EntityId id, int size ) {
+ public static TransitionBuffer<PositionTransition3f> getBuffer( EntityId id, int size ) {
return instance.get(id, size);
}
- protected synchronized TransitionBuffer<PositionTransition> get( EntityId id, int size ) {
+ protected synchronized TransitionBuffer<PositionTransition3f> get( EntityId id, int size ) {
// See if we've already got one
- WeakReference<TransitionBuffer<PositionTransition>> result = map.get(id);
+ WeakReference<TransitionBuffer<PositionTransition3f>> result = map.get(id);
if( result == null || result.get() == null ) {
// Need to create a new one
- TransitionBuffer<PositionTransition> buffer = PositionTransition.createBuffer(size);
+ TransitionBuffer<PositionTransition3f> buffer = PositionTransition3f.createBuffer(size);
result = new WeakReference<>(buffer);
map.put(id, result);
}
This file has only two changes,
# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- a/sim-eth-es/src/main/java/example/view/HudLabelState.java
+++ b/sim-eth-es/src/main/java/example/view/HudLabelState.java
@@ -36,41 +36,29 @@
package example.view;
-import java.util.*;
-import java.util.concurrent.*;
import org.slf4j.*;
import com.jme3.app.Application;
import com.jme3.app.state.BaseAppState;
-import com.jme3.asset.AssetManager;
import com.jme3.math.*;
import com.jme3.renderer.Camera;
-import com.jme3.material.Material;
-import com.jme3.renderer.Camera;
import com.jme3.scene.*;
-import com.jme3.texture.Texture;
-import com.jme3.util.SafeArrayList;
import com.simsilica.lemur.*;
import com.simsilica.lemur.style.ElementId;
-import com.simsilica.ethereal.EtherealClient;
-import com.simsilica.ethereal.SharedObject;
-import com.simsilica.ethereal.SharedObjectListener;
import com.simsilica.ethereal.TimeSource;
import com.simsilica.es.*;
-import com.simsilica.mathd.trans.PositionTransition;
+import com.simsilica.mathd.trans.PositionTransition3f;
import com.simsilica.mathd.trans.TransitionBuffer;
import example.ConnectionState;
import example.GameSessionState;
import example.Main;
import example.es.BodyPosition;
-import example.net.GameSessionListener;
-import example.net.client.GameSessionClientService;
/**
* Displays a HUD label for any entity with a BodyPosition and a Name.
@@ -160,7 +148,7 @@
boolean visible;
boolean isPlayerEntity;
- TransitionBuffer<PositionTransition> buffer;
+ TransitionBuffer<PositionTransition3f> buffer;
public LabelHolder( Entity entity ) {
this.entity = entity;
@@ -216,7 +204,7 @@
// pull an interpolated value. To do this, we grab the
// span of time that contains the time we want. PositionTransition
// represents a starting and an ending pos+rot over a span of time.
- PositionTransition trans = buffer.getTransition(time);
+ PositionTransition3f trans = buffer.getTransition(time);
if( trans != null ) {
Vector3f pos = trans.getPosition(time, true);
setVisible(trans.getVisibility(time));
this file has two changes.
# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- a/sim-eth-es/src/main/java/example/view/ModelViewState.java
+++ b/sim-eth-es/src/main/java/example/view/ModelViewState.java
@@ -37,7 +37,6 @@
package example.view;
import java.util.*;
-import java.util.concurrent.*;
import org.slf4j.*;
@@ -45,25 +44,16 @@
import com.jme3.app.state.BaseAppState;
import com.jme3.asset.AssetManager;
import com.jme3.math.*;
-import com.jme3.renderer.Camera;
import com.jme3.material.Material;
-import com.jme3.renderer.Camera;
import com.jme3.scene.*;
import com.jme3.scene.shape.*;
import com.jme3.texture.Texture;
-import com.jme3.util.SafeArrayList;
import com.simsilica.lemur.*;
-import com.simsilica.lemur.style.ElementId;
-import com.simsilica.ethereal.EtherealClient;
-import com.simsilica.ethereal.SharedObject;
-import com.simsilica.ethereal.SharedObjectListener;
-import com.simsilica.ethereal.TimeSource;
-
import com.simsilica.es.*;
-import com.simsilica.mathd.trans.PositionTransition;
+import com.simsilica.mathd.trans.PositionTransition3f;
import com.simsilica.mathd.trans.TransitionBuffer;
import example.ConnectionState;
@@ -71,8 +61,6 @@
import example.Main;
import example.TimeState;
import example.es.*;
-import example.net.GameSessionListener;
-import example.net.client.GameSessionClientService;
/**
* Displays the models for the various physics objects.
@@ -256,7 +244,7 @@
boolean visible;
boolean localPlayerShip;
- TransitionBuffer<PositionTransition> buffer;
+ TransitionBuffer<PositionTransition3f> buffer;
public Mob( Entity entity ) {
this.entity = entity;
@@ -289,7 +277,7 @@
// pull an interpolated value. To do this, we grab the
// span of time that contains the time we want. PositionTransition
// represents a starting and an ending pos+rot over a span of time.
- PositionTransition trans = buffer.getTransition(time);
+ PositionTransition3f trans = buffer.getTransition(time);
if( trans != null ) {
spatial.setLocalTranslation(trans.getPosition(time, true));
spatial.setLocalRotation(trans.getRotation(time, true));
I haven’t committed so can reverse if want to leave them as is.
Do you have the ability to commit to this repo and that’s why you didn’t just do a PR?
I’m cool with these kinds of tweaks either way… I was just curious. For small things like this, if you have the ability to commit directly then it’s ok to just make them. They can always be reverted if it’s bad for some reason. Just let me know you’ve done it because I haven’t set up any notifications on these repos.
I’m ok with using the wild cards like you have them for these projects. They don’t work well for published maven artifacts but for these demos and stuff will probably save a lot of time.
Those warnings are JME stuff… it has some config file that tries to load them all “just in case”… but it’s dumb. I’m not sure what the right solution is, though.
No reason to suck in dependencies unnecessarily, though. So thanks for removing them.