{"id":17250074,"url":"https://github.com/stephengold/jmepower","last_synced_at":"2025-04-14T05:09:46.821Z","repository":{"id":40615625,"uuid":"329735819","full_name":"stephengold/JmePower","owner":"stephengold","description":"A JVM library to promote the jMonkeyEngine game engine","archived":false,"fork":false,"pushed_at":"2025-04-02T05:05:49.000Z","size":3219,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-14T05:09:34.698Z","etag":null,"topics":["bsd-license","java","jme3","jmonkeyengine","jmonkeyengine3","jvm-library","loading-animations","open-source","startup"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stephengold.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-14T21:13:03.000Z","updated_at":"2025-04-02T05:05:52.000Z","dependencies_parsed_at":"2023-02-16T23:45:35.682Z","dependency_job_id":"201e549a-65cd-4475-8f7a-25856f225e86","html_url":"https://github.com/stephengold/JmePower","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephengold%2FJmePower","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephengold%2FJmePower/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephengold%2FJmePower/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephengold%2FJmePower/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stephengold","download_url":"https://codeload.github.com/stephengold/JmePower/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248824681,"owners_count":21167345,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bsd-license","java","jme3","jmonkeyengine","jmonkeyengine3","jvm-library","loading-animations","open-source","startup"],"created_at":"2024-10-15T06:46:07.027Z","updated_at":"2025-04-14T05:09:46.800Z","avatar_url":"https://github.com/stephengold.png","language":"Java","readme":"# JmePower Project\n\nThe [JmePower Project][jmepower] is about promoting\n[the jMonkeyEngine (JME) game engine][jme].\n\nIt contains 3 subprojects:\n\n1. JmePowerLibrary: the JmePower startup library for jMonkeyEngine applications\n2. JmePowerAssets: generate assets included in the library\n3. JmePowerExamples: sample applications using the library\n\nComplete source code (in [Java]) is provided under\n[a 3-clause BSD license][license].\n\n## Licensing\n\nThe source code has [a BSD 3-Clause license][license].\n\n[The Jamie model][jaime] has a BSD 3-Clause license.\n\n\n## How to build JmePower from source\n\n1. Install a [Java Development Kit (JDK)][adoptium],\n   if you don't already have one.\n2. Point the `JAVA_HOME` environment variable to your JDK installation:\n   (In other words, set it to the path of a directory/folder\n   containing a \"bin\" that contains a Java executable.\n   That path might look something like\n   \"C:\\Program Files\\Eclipse Adoptium\\jdk-17.0.3.7-hotspot\"\n   or \"/usr/lib/jvm/java-17-openjdk-amd64/\" or\n   \"/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home\" .)\n  + using Bash or Zsh: `export JAVA_HOME=\"` *path to installation* `\"`\n  + using [Fish]: `set -g JAVA_HOME \"` *path to installation* `\"`\n  + using Windows Command Prompt: `set JAVA_HOME=\"` *path to installation* `\"`\n  + using PowerShell: `$env:JAVA_HOME = '` *path to installation* `'`\n3. Download and extract the JmePower source code from GitHub:\n  + using [Git]:\n    + `git clone https://github.com/stephengold/JmePower.git`\n    + `cd JmePower`\n    + `git checkout -b latest 1.1.1`\n  + using a web browser:\n    + browse to [the latest release][latest]\n    + follow the \"Source code (zip)\" link\n    + save the ZIP file\n    + extract the contents of the saved ZIP file\n    + `cd` to the extracted directory/folder\n4. Run the [Gradle] wrapper:\n  + using Bash or Fish or PowerShell or Zsh: `./gradlew build`\n  + using Windows Command Prompt: `.\\gradlew build`\n\nAfter a successful build,\nMaven artifacts will be found in `JmePowerLibrary/build/libs`.\n\nYou can install the artifacts to your local Maven repository:\n+ using Bash or Fish or PowerShell or Zsh: `./gradlew install`\n+ using Windows Command Prompt: `.\\gradlew install`\n\nYou can restore the project to a pristine state:\n+ using Bash or Fish or PowerShell or Zsh: `./gradlew clean`\n+ using Windows Command Prompt: `.\\gradlew clean`\n\n## How to add JmePower to an existing project\n\nAdding JmePower to an existing [jMonkeyEngine][jme] project should be\na simple 3-step process:\n\n1. Add the appropriate libraries to the classpaths.\n2. Add code to instantiate and attach an `AppState`.\n3. Add code to await completion.\n\n### Add to the classpaths\n\nThe JmePower library depends on the standard jme3-core library and\n[the Heart library][heart].\n\nFor projects built using Maven or Gradle, the build tools should automatically\nresolve the compile-time dependencies.\n\n#### Gradle-built projects\n\nAdd to the project’s \"build.gradle\" or \"build.gradle.kts\" file:\n\n    repositories {\n        mavenCentral()\n    }\n    dependencies {\n        implementation(\"com.github.stephengold:JmePower:1.1.1\")\n    }\n\n### Instantiate and attach an AppState\n\nInstantiate a `JmeLoadingState`.\n\nThe `AppState` constructor takes an array of objects\nto be preloaded into the application's asset cache.\nIf there are none, the array can be empty.\n\nDepending on the application's structure, the instance might be\nattached explicitly in `simpleInitApp()`:\n\n    JmeLoadingState loading = new JmeLoadingState(preloadArray);\n    stateManager.attach(loading);\n\nor it might be passed to the application's constructor:\n\n    private MyApplication() {\n        super(\n                // other appstates, if desired ...\n                new JmeLoadingState(preloadArray)\n        );\n    }\n\n### Await completion\n\nThe appstate takes indicates completion by disabling itself.\nA `SimpleApplication` might check for completion in `simpleUpdate()`:\n\n    @Override\n    public void simpleUpdate(float tpf) {\n        AppState loading = stateManager.getState(JmeLoadingState.class);\n        if (loading != null \u0026\u0026 !loading.isEnabled()) {\n            getStateManager().detach(loading);\n            // additional startup, if desired ...\n        }\n    }\n\n\n[adoptium]: https://adoptium.net/releases.html \"Adoptium Project\"\n[fish]: https://fishshell.com/ \"Fish command-line shell\"\n[git]: https://git-scm.com \"Git\"\n[gradle]: https://gradle.org \"Gradle Project\"\n[heart]: https://github.com/stephengold/Heart \"Heart Project\"\n[jaime]: https://github.com/stephengold/JmePower/tree/master/JmePowerLibrary/src/main/resources/Models/Jaime \"Jaime model\"\n[java]: https://en.wikipedia.org/wiki/Java_(programming_language) \"Java programming language\"\n[jme]: https://jmonkeyengine.org \"jMonkeyEngine Project\"\n[jmepower]: https://github.com/stephengold/JmePower \"JmePower Project\"\n[latest]: https://github.com/stephengold/JmePower/releases/latest \"latest release\"\n[license]: https://github.com/stephengold/JmePower/blob/master/license.txt \"JmePower license\"\n[openJDK]: https://openjdk.java.net \"OpenJDK Project\"\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephengold%2Fjmepower","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstephengold%2Fjmepower","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephengold%2Fjmepower/lists"}