|
From: <tre...@us...> - 2007-08-31 23:08:58
|
Revision: 314
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=314&view=rev
Author: trevorolio
Date: 2007-08-31 16:08:57 -0700 (Fri, 31 Aug 2007)
Log Message:
-----------
Tweaked the loading.obj to suck less.
Modified Paths:
--------------
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/SpaceSimulator.java
Modified: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/SpaceSimulator.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/SpaceSimulator.java 2007-08-31 23:08:53 UTC (rev 313)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/SpaceSimulator.java 2007-08-31 23:08:57 UTC (rev 314)
@@ -1030,7 +1030,7 @@
if (lodIndex != 0) {
return null;
}
- return SpaceSimulator.class.getClassLoader().getResourceAsStream("com/ogoglio/viewer/applet/resources/loading.obj");
+ return UIConstants.getResource("templates/loading.obj");
}
public InputStream getSkinMapStream() throws IOException {
@@ -1038,6 +1038,9 @@
}
public InputStream getSubGeometryStream(String name) throws IOException {
+ if("loading.mtl".equals(name)){
+ return UIConstants.getResource("templates/loading.mtl");
+ }
return null;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-09-17 23:35:34
|
Revision: 412
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=412&view=rev
Author: trevorolio
Date: 2007-09-17 16:35:38 -0700 (Mon, 17 Sep 2007)
Log Message:
-----------
Refactored the way user animations are referenced so as to reduce duplicate code and allow for easy addition.
Now avatars can /wave /clap /point and /laugh in addition to the usual standing and walking animations.
Modified Paths:
--------------
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/SpaceSimulator.java
Modified: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/SpaceSimulator.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/SpaceSimulator.java 2007-09-17 23:35:33 UTC (rev 411)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/SpaceSimulator.java 2007-09-17 23:35:38 UTC (rev 412)
@@ -164,14 +164,7 @@
}
public InputStream getUserAnimationStream(String username, long animationID) throws IOException {
- if (animationID == 1) {
- return UIConstants.getResource("avatar/avatar.bvh");
- } else if (animationID == 2) {
- return UIConstants.getResource("avatar/avatar-walk.bvh");
- } else if (animationID == 3) {
- return UIConstants.getResource("avatar/avatar-wave.bvh");
- }
- return null;
+ return UIConstants.getUserAnimation((int) animationID);
}
public InputStream getUserSkinMapStream(String username) throws IOException {
@@ -371,20 +364,24 @@
String chatMessage = event.getStringProperty(SpaceEvent.TSE_MESSAGE);
- // this is a hack to play pre-baked animations in demos
+ // this is a hack to play pre-baked animations
// TODO create a user animation record and a method to dl and play them
- if ("/wave".equals(chatMessage)) {
- SpaceEvent waveEvent = new SpaceEvent(SpaceEvent.PLAY_ANIMATION_EVENT);
- waveEvent.setProperty(SpaceEvent.USERNAME, user.getUsername());
- waveEvent.setProperty(SpaceEvent.ANIMATION_ID, new Long(3));
- listener.generatedSpaceEvent(waveEvent, SpaceSimulator.this);
- continue;
- } else if ("/point".equals(chatMessage)) {
- SpaceEvent waveEvent = new SpaceEvent(SpaceEvent.PLAY_ANIMATION_EVENT);
- waveEvent.setProperty(SpaceEvent.USERNAME, user.getUsername());
- waveEvent.setProperty(SpaceEvent.ANIMATION_ID, new Long(4));
- listener.generatedSpaceEvent(waveEvent, SpaceSimulator.this);
- continue;
+ if(chatMessage.startsWith("/") && chatMessage.length() > 1){
+ String command = chatMessage.substring(1);
+ boolean sentAnimation = false;
+ for (int i = 0; i < UIConstants.USER_ANIMATION_COMMANDS.length; i++) {
+ if(UIConstants.USER_ANIMATION_COMMANDS[i].equals(command)){
+ SpaceEvent playAnimationEvent = new SpaceEvent(SpaceEvent.PLAY_ANIMATION_EVENT);
+ playAnimationEvent.setProperty(SpaceEvent.USERNAME, user.getUsername());
+ playAnimationEvent.setProperty(SpaceEvent.ANIMATION_ID, new Long(i));
+ listener.generatedSpaceEvent(playAnimationEvent, SpaceSimulator.this);
+ sentAnimation = true;
+ break;
+ }
+ }
+ if(sentAnimation){
+ continue;
+ }
}
chatMessage = markdownChatMessage(chatMessage);
@@ -981,7 +978,7 @@
public ScriptHTTPResponse callThingHTTPService(long thingID, String method, Map parameterMap) {
Thing thing = space.getThing(thingID);
- if(thing == null){
+ if (thing == null) {
ScriptHTTPResponse response = new ScriptHTTPResponse();
response.jsConstructor(404, null, null);
return response;
@@ -1037,7 +1034,7 @@
}
public InputStream getSubGeometryStream(String name) throws IOException {
- if("loading.mtl".equals(name)){
+ if ("loading.mtl".equals(name)) {
return UIConstants.getResource("templates/loading.mtl");
}
return null;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-11-03 23:35:30
|
Revision: 556
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=556&view=rev
Author: trevorolio
Date: 2007-11-03 16:35:35 -0700 (Sat, 03 Nov 2007)
Log Message:
-----------
Broke the load testing classes into a separate test package, added a way to load many spaces in addition to many users.
Modified Paths:
--------------
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/SpaceSimulator.java
Modified: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/SpaceSimulator.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/SpaceSimulator.java 2007-11-03 23:35:32 UTC (rev 555)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/SpaceSimulator.java 2007-11-03 23:35:35 UTC (rev 556)
@@ -168,13 +168,15 @@
}
}
- public synchronized void cleanup() {
+ public void cleanup() {
try {
- if (cleaned) {
- return;
+ synchronized (this) {
+ if (cleaned) {
+ return;
+ }
+ cleaned = true;
}
Log.info("Stopping" + (deleted ? " deleted" : "") + " space " + space.getSpaceID() + ": " + space.getDisplayName());
- cleaned = true;
renderer.stopRenderer();
scriptEngine.cleanup();
simThread.queue.close();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-11-10 23:19:14
|
Revision: 569
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=569&view=rev
Author: trevorolio
Date: 2007-11-10 15:19:18 -0800 (Sat, 10 Nov 2007)
Log Message:
-----------
Removed a couple of server-side texture loads which slipped through the cracks, including all pages! That was a triple whammy because the space simulator fetched and rendered the page contents as well as used memory for the resulting texture. This week I'm very thankful for my profiler, which now indicates that the server is loading no textures into memory.
Modified Paths:
--------------
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/SpaceSimulator.java
Modified: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/SpaceSimulator.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/SpaceSimulator.java 2007-11-10 23:19:14 UTC (rev 568)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/SpaceSimulator.java 2007-11-10 23:19:18 UTC (rev 569)
@@ -93,7 +93,6 @@
space = new Space(new SimulatorSpaceContext(), spaceDocument.getSpaceID(), spaceDocument.getDisplayName(), spaceDocument.getOwnerUsername(), spaceDocument.getDisplaySea(), spaceDocument.getSeaLevel());
- //TODO evaluate whether we should stop using Java3D on the sim side to calculate collision and motion (gut feeling: hell yes!)
renderer = new J3DRenderer(space, null, new InSimInputListener(), templateDataProvider, new InSimBodyDataProvider(), true);
renderer.startRenderer();
renderer.setSimCamera(); //Sigh, you have to add a view before it will schedule the behavior
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|