Skip to content

Commit

Permalink
migrate the demos, the graphics engine, and test apps to a new project
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Mar 10, 2024
1 parent cd040e5 commit 7c2368e
Show file tree
Hide file tree
Showing 119 changed files with 18 additions and 20,440 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

# Ignore Gradle's build output directories:
/apps/build/
/common/build/
/docs/build/

/node_modules/
Expand Down
56 changes: 9 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,19 @@
documentation and example applications
for [the Libbulletjme 3-D physics library][libbulletjme].

It contains 3 sub-projects:
It contains 2 sub-projects:

1. apps: demos, tutorial examples, and non-automated test software
2. common: the SPORT graphics engine
3. docs: documentation for Libbulletjme, including the tutorial
1. docs: documentation for Libbulletjme, including the tutorial
2. apps: applications referenced in the tutorial

The applications make use of [the SPORT graphics engine][sport],
which was formerly a sub-project and
is now a separate project at [GitHub].

Complete source code (in [Java]) is provided under
[a 3-clause BSD license][license].


<a name="toc"></a>

## Contents of this document

+ [About SPORT](#about)
+ [How to build and run SPORT from source](#build)


<a name="about"></a>

## About SPORT

SPORT is a Simple Physics-ORienTed graphics engine written in Java 1.8.
In addition to [Libbulletjme],
it uses [LWJGL], [Assimp], [GLFW], [JOML], and [OpenGL].
It has been tested on Windows, Linux, and macOS.

[Jump to the table of contents](#toc)


<a name="build"></a>

## How to build and run LbjExamples from source

### Initial build
Expand Down Expand Up @@ -70,20 +51,6 @@ To execute "HelloLibbulletjme":
+ using Bash or Fish or PowerShell or Zsh: `./gradlew HelloLibbulletjme`
+ using Windows Command Prompt: `.\gradlew HelloLibbulletjme`

### Demos

Seven demo applications are included:
+ ConveyorDemo
+ NewtonsCradle
+ Pachinko
+ SplitDemo
+ TestGearJoint
+ ThousandCubes
+ Windlass

Documentation for the demo apps is at
https://stephengold.github.io/Libbulletjme/lbj-en/English/demos.html

### Chooser

A Swing-based chooser application is included.
Expand All @@ -101,19 +68,14 @@ You can restore the project to a pristine state:

Note: these commands will delete any downloaded native libraries.

[Jump to the table of contents](#toc)


[adoptium]: https://adoptium.net/releases.html "Adoptium Project"
[assimp]: https://www.assimp.org/ "The Open Asset Importer Library"
[fish]: https://fishshell.com/ "Fish command-line shell"
[git]: https://git-scm.com "Git"
[glfw]: https://www.glfw.org "GLFW Library"
[github]: https://github.com "GitHub"
[gradle]: https://gradle.org "Gradle Project"
[java]: https://en.wikipedia.org/wiki/Java_(programming_language) "Java programming language"
[joml]: https://joml-ci.github.io/JOML "Java OpenGL Math Library"
[libbulletjme]: https://stephengold.github.io/Libbulletjme/lbj-en/English/overview.html "Libbulletjme Project"
[license]: https://github.com/stephengold/LbjExamples/blob/master/LICENSE "LbjExamples license"
[lwjgl]: https://www.lwjgl.org "Lightweight Java Game Library"
[opengl]: https://www.khronos.org/opengl "OpenGL API"
[project]: https://github.com/stephengold/LbjExamples "LbjExamples Project"
[sport]: https://github.com/stephengold/sport "SPORT Project"
78 changes: 1 addition & 77 deletions apps/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,36 +36,6 @@ tasks.register('AppChooser', JavaExec) {
mainClass = 'com.github.stephengold.lbjexamples.AppChooser'
}

// physics demos
tasks.register('ConveyorDemo', JavaExec) {
description 'Runs the ConveyorDemo app.'
mainClass = 'com.github.stephengold.lbjexamples.ConveyorDemo'
}
tasks.register('NewtonsCradle', JavaExec) {
description 'Runs the NewtonsCradle demo app.'
mainClass = 'com.github.stephengold.lbjexamples.NewtonsCradle'
}
tasks.register('Pachinko', JavaExec) {
description 'Runs the Pachinko demo app.'
mainClass = 'com.github.stephengold.lbjexamples.Pachinko'
}
tasks.register('SplitDemo', JavaExec) {
description 'Runs the SplitDemo app.'
mainClass = 'com.github.stephengold.lbjexamples.SplitDemo'
}
tasks.register('TestGearJoint', JavaExec) {
description 'Runs the TestGearJoint app.'
mainClass = 'com.github.stephengold.lbjexamples.TestGearJoint'
}
tasks.register('ThousandCubes', JavaExec) {
description 'Runs the ThousandCubes demo app.'
mainClass = 'com.github.stephengold.lbjexamples.ThousandCubes'
}
tasks.register('Windlass', JavaExec) {
description 'Runs the Windlass demo app.'
mainClass = 'com.github.stephengold.lbjexamples.Windlass'
}

// physics console apps (no graphics)
tasks.register('HelloLibbulletjme', JavaExec) {
mainClass = 'com.github.stephengold.lbjexamples.apps.console.HelloLibbulletjme'
Expand Down Expand Up @@ -208,52 +178,6 @@ tasks.register('HelloWind', JavaExec) {
mainClass = 'com.github.stephengold.lbjexamples.apps.HelloWind'
}

// graphics-only tests (no physics)
tasks.register('AssimpTest', JavaExec) {
description 'Runs the Assimp test app.'
mainClass = 'com.github.stephengold.sport.test.AssimpTest'
}
tasks.register('CheckerboardTest', JavaExec) {
description 'Runs the checkerboard test app.'
mainClass = 'com.github.stephengold.sport.test.CheckerboardTest'
}
tasks.register('ClipspaceTest', JavaExec) {
description 'Runs the clipspace test app.'
mainClass = 'com.github.stephengold.sport.test.ClipspaceTest'
}
tasks.register('DynamicMeshTest', JavaExec) {
description 'Runs the dynamic-mesh test app.'
mainClass = 'com.github.stephengold.sport.test.DynamicMeshTest'
}
tasks.register('IcosphereTest', JavaExec) {
description 'Runs the icosphere test app.'
mainClass = 'com.github.stephengold.sport.test.IcosphereTest'
}
tasks.register('MouseTest', JavaExec) {
description 'Runs the first mouse test app.'
mainClass = 'com.github.stephengold.sport.test.MouseTest'
}
tasks.register('MouseTest2', JavaExec) {
description 'Runs the 2nd mouse test app.'
mainClass = 'com.github.stephengold.sport.test.MouseTest2'
}
tasks.register('OctasphereTest', JavaExec) {
description 'Runs the octasphere test app.'
mainClass = 'com.github.stephengold.sport.test.OctasphereTest'
}
tasks.register('RainbowTest', JavaExec) {
description 'Runs the rainbow test app.'
mainClass = 'com.github.stephengold.sport.test.RainbowTest'
}
tasks.register('SpriteTest', JavaExec) {
description 'Runs the sprite test app.'
mainClass = 'com.github.stephengold.sport.test.SpriteTest'
}
tasks.register('TextureTest', JavaExec) {
description 'Runs the texture test app.'
mainClass = 'com.github.stephengold.sport.test.TextureTest'
}

import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
OperatingSystem os = DefaultNativePlatform.currentOperatingSystem
Boolean includeLinux = os.isLinux()
Expand Down Expand Up @@ -325,7 +249,7 @@ dependencies {
runtimeOnly "org.lwjgl:lwjgl-opengl:${lwjglVersion}:natives-windows-x86"
}

implementation project(':common')
implementation 'com.github.stephengold:sport:' + sportVersion
}

// Register tasks to download/clean the native physics library for each platform:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,6 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
import com.github.stephengold.lbjexamples.apps.HelloWalk;
import com.github.stephengold.lbjexamples.apps.HelloWind;
import com.github.stephengold.sport.BaseApplication;
import com.github.stephengold.sport.test.AssimpTest;
import com.github.stephengold.sport.test.CheckerboardTest;
import com.github.stephengold.sport.test.ClipspaceTest;
import com.github.stephengold.sport.test.DynamicMeshTest;
import com.github.stephengold.sport.test.IcosphereTest;
import com.github.stephengold.sport.test.MouseTest;
import com.github.stephengold.sport.test.MouseTest2;
import com.github.stephengold.sport.test.OctasphereTest;
import com.github.stephengold.sport.test.RainbowTest;
import com.github.stephengold.sport.test.SpriteTest;
import com.github.stephengold.sport.test.TextureTest;
import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.event.WindowEvent;
Expand All @@ -94,13 +83,7 @@ final class AppChooser extends JFrame {
*/
public static void main(String[] arguments) {
Logger.getLogger("").setLevel(Level.WARNING);
List<BaseApplication> apps = new ArrayList<>(49);

apps.add(new AssimpTest());
apps.add(new CheckerboardTest());
apps.add(new ClipspaceTest());
apps.add(new ConveyorDemo());
apps.add(new DynamicMeshTest());
List<BaseApplication> apps = new ArrayList<>(31);

apps.add(new HelloCcd());
apps.add(new HelloCharacter());
Expand Down Expand Up @@ -139,21 +122,6 @@ public static void main(String[] arguments) {
apps.add(new HelloWalk());

apps.add(new HelloWind());
apps.add(new IcosphereTest());
apps.add(new MouseTest());
apps.add(new MouseTest2());
apps.add(new NewtonsCradle());

apps.add(new OctasphereTest());
apps.add(new Pachinko());
apps.add(new RainbowTest());
apps.add(new SplitDemo());
apps.add(new SpriteTest());

apps.add(new TestGearJoint());
apps.add(new TextureTest());
apps.add(new ThousandCubes());
apps.add(new Windlass());

new AppChooser(apps);
}
Expand Down
Loading

0 comments on commit 7c2368e

Please sign in to comment.