Преглед изворни кода

Merge pull request #6 from jMonkeyEngine/master

update from orgin
Yan пре 7 година
родитељ
комит
33e402650b

+ 1 - 1
src/docs/asciidoc/bsd_license.adoc

@@ -11,7 +11,7 @@ ifdef::env-github,env-browser[:outfilesuffix: .adoc]
 [source]
 ----
 
-Copyright (c) 2003-2017 jMonkeyEngine
+Copyright (c) 2009-2012 jMonkeyEngine
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without

+ 1 - 1
src/docs/asciidoc/jme3.adoc

@@ -108,7 +108,7 @@ Now that you understood the basics, let's put it all together. The following int
 
 === Game Tutorials
 
-*  link:https://gamedevelopment.tutsplus.com/series/cross-platform-vector-shooter-jmonkeyengine--gamedev-13757[Neon Vector Shooter tutorial on Tuts+]
+*  link:++https://gamedevelopment.tutsplus.com/tutorials/make-a-neon-vector-shooter-in-jmonkeyengine-the-basics--gamedev-11616++[Neon Vector Shooter tutorial on Tuts+]
 
 === Video Use Case Tutorials
 

+ 2 - 2
src/docs/asciidoc/jme3/eclipse_jme3_android_jnindk.adoc

@@ -23,7 +23,7 @@ Please note that projects that use Android UI elements or are created using Ecli
 
 == Setting up JME3
 
-I will assume you already have downloaded (and built, if necessary) the JME3 binaries. If not, either download the link:http://hub.jmonkeyengine.org/downloads/[latest SDK release], link:http://updates.jmonkeyengine.org/stable/3.0/engine[engine build] (recommended for new users), or take a quick detour over to <<jme3/build_from_sources#,this guide>> to build from source (recommended for advanced users).
+I will assume you already have downloaded (and built, if necessary) the JME3 binaries. If not, either download the link:https://github.com/jMonkeyEngine/sdk/releases[latest SDK release], link:https://github.com/jMonkeyEngine/jmonkeyengine/releases[engine build] (recommended for new users), or take a quick detour over to <<jme3/build_from_sources#,this guide>> to build from source (recommended for advanced users).
 
 
 [NOTE]
@@ -335,7 +335,7 @@ What you call your artifact is VERY important to how Java loads your library. Fo
 
 If you plan on building for Android, you must include an Android makefile in your project. In order for the build process to be as seamless as possible, this guide sets it up unlike most tutorials instruct.
 
-To do this, simply create a new file in your native project called `Android.mk` and link:http://www.kandroid.org/ndk/docs/ANDROID-MK.html[set it up accordingly].
+To do this, simply create a new file in your native project called `Android.mk` and link:http://android.mk/[set it up accordingly].
 
 
 [IMPORTANT]

+ 1 - 0
src/docs/asciidoc/jme3/intermediate/simpleapplication.adoc

@@ -18,6 +18,7 @@ SimpleApplication gives you access to standard game features, such as a scene gr
 For each game, you (directly or indirectly) extend SimpleApplication exactly once as the central class. If you need access to any SimpleApplication features from another game class, make the other class extend <<jme3/advanced/application_states#,AbstractAppState>> (don't extend SimpleApplication once more).
 ====
 
+NOTE: The SimpleApplication class is undergoing changes. To understand how these changes may affect your projects and how to best prepare for them, see  <<jme3/beginner/hello_simpleapplication#the-future-of-simpleapplication#,The Future of SimpleApplication>> topic in the "`Hello SimpleApplication`" tutorial for beginners.
 
 The following code sample shows the typical base structure of a jME3 game:
 

+ 117 - 34
src/docs/asciidoc/jme3/simpleapplication_from_the_commandline.adoc

@@ -1,4 +1,4 @@
-= Starting a JME3 application from the Commandline
+= Starting a JME3 application from the command-line
 :author:
 :revnumber:
 :revdate: 2016/03/17 20:48
@@ -9,7 +9,116 @@
 ifdef::env-github,env-browser[:outfilesuffix: .adoc]
 
 
-Although we recommend the jMonkeyEngine <<sdk#,SDK>> for developing JME3 games, you can use any IDE (integrated development environment) such as <<jme3/setting_up_netbeans_and_jme3#,NetBeans>> or <<jme3/setting_up_jme3_in_eclipse#,Eclipse>>, and even work freely from the commandline. Here is a generic IDE-independent "`getting started`" tutorial.
+Although we recommend the jMonkeyEngine <<sdk#,SDK>> for developing JME3 games, you can use any IDE (integrated development environment) such as <<jme3/setting_up_netbeans_and_jme3#,NetBeans>> or <<jme3/setting_up_jme3_in_eclipse#,Eclipse>>, and even work freely from the command-line. Here is a generic IDE-independent "`getting started`" tutorial.
+
+
+== Installing the JME3 Framework
+
+There are many ways to install the JME framework from the command-line, but for this tutorial we will narrow it down to two, the easy way and the hard way.
+
+== Installing with Git (easy way)
+
+You can build JME3 from the sources. (Recommended for JME3 developers.) This example expects link:https://help.github.com/articles/set-up-git/[Git] to be installed on your system.
+
+[source]
+----
+mkdir jme3
+cd jme3
+
+// if you have a rsa key configured
+git clone [email protected]:jMonkeyEngine/jmonkeyengine.git
+// or
+// if you don't, but you'll be asked for credential after the next command
+git clone https://github.com/jMonkeyEngine/jmonkeyengine.git
+//can take a while
+
+// build the engine and install it in your local maven repo.
+./gradlew install
+
+----
+
+TIP: What is an link:https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/[RSA key]?
+
+The install command will install the built jars into your local maven repositories org.jmonkeyengine folder, which on Linux is ~/.m2, and on Windows might be in AppData, or in your home directory.
+
+To use the engine in a game project, you can use link:https://hub.jmonkeyengine.org/t/bootmonkey-bootstrap-your-jme-project/37141[BootMonkey] or clone a template project from GitHub.
+
+To use the template, first create a folder for your project:
+
+[source]
+----
+cd ..
+mkdir HelloJME3
+cd HelloJME3
+----
+
+Next, clone one of these templates:
+
+*  link:https://github.com/Simsilica/Examples/tree/master/simple-jme[Simsilica/Examples]
+*  link:https://github.com/Nehon/base-jme[Nehon/base-jme]
+
+After cloning, open the `build.gradle` file and uncomment the `mavenLocal()` repository, change the version variable, and uncomment any dependencies you will need:
+
+[source]
+----
+repositories {
+    //This is where jme3 dependencies are stored.
+    jcenter()
+
+    //Uncomment this if you install local dependencies.
+    mavenLocal()
+
+    //Uncomment this if you use external dependencies
+    //mavenCentral()
+
+    //Uncomment this if you use jme3-niftygui
+    //maven{url 'http://nifty-gui.sourceforge.net/nifty-maven-repo'}
+
+}
+
+ext.jmeVersion = "[3.2,)"
+
+...
+
+dependencies {
+
+    compile "org.jmonkeyengine:jme3-core:$jmeVersion"
+    compile "org.jmonkeyengine:jme3-desktop:$jmeVersion"
+    compile "org.jmonkeyengine:jme3-lwjgl:$jmeVersion"
+
+    //Those are jme3 additional library uncomment the ones you need
+    //compile "org.jmonkeyengine:jme3-android-native:$jmeVersion"
+    //compile "org.jmonkeyengine:jme3-android:$jmeVersion"
+    //compile "org.jmonkeyengine:jme3-bullet-native-android:$jmeVersion"
+    //compile "org.jmonkeyengine:jme3-blender:$jmeVersion"
+    //compile "org.jmonkeyengine:jme3-bullet-native:$jmeVersion"
+    //compile "org.jmonkeyengine:jme3-bullet:$jmeVersion"
+    //compile "org.jmonkeyengine:jme3-effects:$jmeVersion"
+    //compile "org.jmonkeyengine:jme3-jogg:$jmeVersion"
+    //compile "org.jmonkeyengine:jme3-jogl:$jmeVersion"
+    //compile "org.jmonkeyengine:jme3-lwjgl3:$jmeVersion"
+    //compile "org.jmonkeyengine:jme3-networking:$jmeVersion"
+    //compile "org.jmonkeyengine:jme3-plugins:$jmeVersion"
+    //compile "org.jmonkeyengine:jme3-terrain:$jmeVersion"
+
+    //You need to uncomment nifty repository in the repositories section if you use this dependency
+    //compile "org.jmonkeyengine:jme3-niftygui:$jmeVersion"
+
+    runtime project(':assets')
+}
+...
+
+----
+
+For a detailed description of the separate jar files see <<jme3/jme3_source_structure#structure_of_jmonkeyengine3_jars,this list>>.
+
+That's it, you're done. After the clone, you will have a project that contains a source package with a default blue cube JME3 app and a subproject that has the proper asset directory structure for your assets.
+
+Build and run your project and you should see a blue cube.
+
+
+== Manual Download (hard way)
+
 
 This example shows how to set up and run a simple application (HelloJME3) that depends on the jMonkeyEngine3 libraries.
 
@@ -29,9 +138,6 @@ HelloJME3/src
 ...
 ----
 
-
-== Installing the JME3 Framework
-
 To install the development version of jme3, download the latest  link:https://github.com/jMonkeyEngine/jmonkeyengine/releases[stable release], unzip the folder into a directory named `jme3`. The filenames here are just an example, but they will always be something like `jME3.x-stable`.
 
 [source]
@@ -40,33 +146,21 @@ To install the development version of jme3, download the latest  link:https://gi
 mkdir jme3
 cd jme3
 unzip jME3.2-stable.zip
-
-----
-
-Alternatively, you can build JME3 from the sources. (Recommended for JME3 developers.)
-
-[source]
-----
-svn checkout https://jmonkeyengine.googlecode.com/svn/branches/3.0final/engine jme3
-cd jme3
-ant run
 cd ..
 ----
 
-If you see a Test Chooser application open now, the build was successful.
 
-TIP: Use just ant instead of ant run to build the libraries without running the demos.
 
 == Sample Project Directory Structure
 
-First we set up the directory and source package structure for your game project. Note that the game project directory `HelloJME3` is on the same level as your `jme3` checkout. In this example, we create a Java package that we call `hello` in the source directory.
+First we set up the directory and source package structure for your game project. Note that the game project directory `HelloJME3` is on the same level as your `jme3` folder. In this example, we create a Java package that we call `mygame` in the source directory.
 
 [source]
 ----
 
 mkdir HelloJME3
 mkdir HelloJME3/src
-mkdir HelloJME3/src/hello
+mkdir HelloJME3/src/mygame
 
 ----
 
@@ -84,26 +178,15 @@ cp jme3/lib/*.* HelloJME3/lib
 
 ----
 
-If you have built JME3 from the sources, then the copy paths are different:
-
-[source]
-----
-
-mkdir HelloJME3/build
-mkdir HelloJME3/lib
-cp jme3/dist/*.* HelloJME3/lib
-
-----
-
 
 === Sample Code
 
-To test your setup, create the file `HelloJME3/src/hello/HelloJME3.java` with any text editor, paste the following sample code, and save.
+To test your setup, create the file `HelloJME3/src/mygame/HelloJME3.java` with any text editor, paste the following sample code, and save.
 
 [source,java]
 ----
 
-package hello;
+package mygame;
 
 import com.jme3.app.SimpleApplication;
 import com.jme3.material.Material;
@@ -141,7 +224,7 @@ We build the sample application into the build directory…
 ----
 
 cd HelloJME3
-javac -d build -cp "lib/eventbus-1.4.jar:lib/j-ogg-oggd.jar:lib/j-ogg-vorbisd.jar:lib/jME3-lwjgl-natives.jar:lib/jbullet.jar:lib/jinput.jar:lib/lwjgl.jar:lib/stack-alloc.jar:lib/vecmath.jar:lib/xmlpull-xpp3-1.1.4c.jar:lib/jME3-blender.jar:lib/jME3-core.jar:lib/jME3-desktop.jar:lib/jME3-jogg.jar:lib/jME3-plugins.jar:lib/jME3-terrain.jar:lib/jME3-testdata.jar:lib/jME3-niftygui.jar:lib/nifty-default-controls.jar:lib/nifty-examples.jar:lib/nifty-style-black.jar:lib/nifty.jar:." src/hello/HelloJME3.java
+javac -d build -cp "lib/eventbus.jar:lib/j-ogg-all.jar:lib/jme3-lwjgl.jar:lib/jme3-bullet.jar:lib/jinput.jar:lib/lwjgl.jar:lib/stack-alloc.jar:lib/vecmath.jar:lib/xpp3.jar:lib/jme3-blender.jar:lib/jme3-core.jar:lib/jme3-desktop.jar:lib/jme3-jogg.jar:lib/jme3-plugins.jar:lib/jme3-terrain.jar:lib/jme3-testdata.jar:lib/jme3-niftygui.jar:lib/nifty-default-controls.jar:lib/nifty-examples.jar:lib/nifty-style-black.jar:lib/nifty.jar:." src/mygame/HelloJME3.java
 
 ----
 
@@ -151,7 +234,7 @@ javac -d build -cp "lib/eventbus-1.4.jar:lib/j-ogg-oggd.jar:lib/j-ogg-vorbisd.ja
 ----
 
 cd build
-java -cp "../lib/eventbus-1.4.jar:../lib/j-ogg-oggd.jar:../lib/j-ogg-vorbisd.jar:../lib/jME3-lwjgl-natives.jar:../lib/jbullet.jar:../lib/jinput.jar:../lib/lwjgl.jar:../lib/stack-alloc.jar:../lib/vecmath.jar:../lib/xmlpull-xpp3-1.1.4c.jar:../lib/jME3-blender.jar:../lib/jME3-core.jar:../lib/jME3-desktop.jar:../lib/jME3-jogg.jar:../lib/jME3-plugins.jar:../lib/jME3-terrain.jar:../lib/jME3-testdata.jar:../lib/jME3-niftygui.jar:../lib/nifty-default-controls.jar:../lib/nifty-examples.jar:../lib/nifty-style-black.jar:../lib/nifty.jar:." hello/HelloJME3
+java -cp "../lib/eventbus.jar:../lib/j-ogg-all.jar:../lib/jme3-lwjgl.jar:../lib/jme3-bullet.jar:../lib/jinput.jar:../lib/lwjgl.jar:../lib/stack-alloc.jar:../lib/vecmath.jar:../lib/xpp3.jar:../lib/jme3-blender.jar:../lib/jme3-core.jar:../lib/jme3-desktop.jar:../lib/jme3-jogg.jar:../lib/jme3-plugins.jar:../lib/jme3-terrain.jar:../lib/jme3-testdata.jar:../lib/jme3-niftygui.jar:../lib/nifty-default-controls.jar:../lib/nifty-examples.jar:../lib/nifty-style-black.jar:../lib/nifty.jar:." mygame/HelloJME3
 ----
 
 NOTE: If you use Windows, the classpath separator is kbd:[\ ]  instead of kbd:[/].

+ 25 - 20
src/docs/asciidoc/sdk/material_editing.adoc

@@ -1,44 +1,45 @@
 = jMonkeyEngine SDK: Material Editor
-:author: 
-:revnumber: 
+:author:
+:revnumber:
 :revdate: 2016/03/17 20:48
 :keywords: documentation, sdk, material, file, texture
 :relfileprefix: ../
 :imagesdir: ..
+:experimental:
 ifdef::env-github,env-browser[:outfilesuffix: .adoc]
 
 
-If you are looking for background information, read about <<jme3/advanced/material_definitions#,Material Definitions>> and <<jme3/advanced/j3m_material_files#,j3M Material Files>>. 
-You can <<jme3/advanced/j3m_material_files#,write .j3m files in a text editor>>, or <<sdk/material_editing#,use the jMonkeyEngine SDK to generate>> them for you as described in this article.
+If you are looking for background information, read about <<jme3/advanced/material_definitions#,Material Definitions>> and <<jme3/advanced/j3m_material_files#,j3M Material Files>>.
+You can <<jme3/advanced/j3m_material_files#,write .j3m files in a text editor>>, or use the jMonkeyEngine SDK to generate them for you as described in this article.
 
 
 == Materials
 
-The jMonkeyEngine uses a special Material format, which comes in .j3m files. You use .j3m files to store sets of material properties that you use repeatedly. This enables you write one short line of code that simply loads the presets from a custom .j3m file. Without a .j3m file you need to write several lines of material property setters every time when you want to use a non-default material. 
+The jMonkeyEngine uses a special Material format, which comes in .j3m files. You use .j3m files to store sets of material properties that you use repeatedly. This enables you write one short line of code that simply loads the presets from a custom .j3m file. Without a .j3m file you need to write several lines of material property setters every time when you want to use a non-default material.
 
 
 == Creating .j3m Materials
 
-
+[float.right]
 image::sdk/material-editor.png[material-editor.png,width="275",height="245",align="right"]
 
 
-To create new .j3m files in the jMonkeyEngine SDK,
+To create new .j3m files in the jMonkeyEngine SDK:
 
-.  Right-click the `assets/Materials` directory and choose New… &gt; Other.
-.  In the New File Wizard, choose Material &gt; Empty Material File, and click Next.
+.  btn:[RMB] select the `assets/Materials` directory and choose `menu:New[Other]`.
+.  In the New File Wizard, choose `menu:Material[Empty Material File]`, and click btn:[Next].
 .  Give the file a name, for example `mat_wall` for a wall material.
 .  A new file `mat_wall.j3m` is created in the Materials directory and opens in the Material Editor.
 
-You can edit the source of the material, or use the user-friendly visual editor to set the properties of the material. Set the properties to the same values as you would otherwise specify with setters on a Material object in Java code: 
+You can edit the source of the material, or use the user-friendly visual editor to set the properties of the material. Set the properties to the same values as you would otherwise specify with setters on a Material object in Java code:
 
 [source,java]
 ----
 Material mat_wall = new Material(
     assetManager, "Common/MatDefs/Light/Lighting.j3md");
-mat_wall.setTexture("DiffuseMap", 
+mat_wall.setTexture("DiffuseMap",
     assetManager.loadTexture("Textures/wall_diffuse.png"));
-mat_wall.setTexture("NormalMap", 
+mat_wall.setTexture("NormalMap",
     assetManager.loadTexture("Textures/wall_normals.png"));
 mat_wall.setFloat("Shininess", 5f);
 ----
@@ -56,12 +57,12 @@ Material my brick wall : Common/MatDefs/Light/Lighting.j3md {
 }
 ----
 
-You can modify the source code of the j3m file in the “source tab of the Material Editor.
+You can modify the source code of the j3m file in the "`source`" tab of the Material Editor.
 
 
 == Using .j3m Materials
 
-
+[float.right]
 image::sdk/applymaterial.jpg[applymaterial.jpg,width="180",height="300",align="right"]
 
 
@@ -69,21 +70,25 @@ When the material is ready and saved into your projects assets directory, you ca
 
 In the jMonkeyEngine SDK
 
-.  Right-click the j3o file and select “Edit in SceneComposer
-.  Open the SceneExplorer window
+.  btn:[RMB] select the j3o file and choose `Edit in SceneComposer`.
+.  You can open the SceneExplorer window by selecting `menu:Window[SceneExplorer]` from the menu bar, if it's not already open.
 .  In the SceneExplorer, click the geometry to which you want to assign the material.
-.  Open the Properties window
-.  Assign the .j3m material to the .j3o in the Properties&gt;Geometry&gt;Material section
+.  Open the Properties window.
+.  Assign the .j3m material to the .j3o in the `menu:Properties[Geometry>Material]` section.
++
+TIP: If the .j3o file already has a material assigned to it from exporting/importing, you can generate the material by selecting "`create j3m file`" instead. This will place a .j3m under `assets/Materials/Generated` and assign it to your .j3o.
+
 .  Save the j3o and load it into you game.
 
 Or in your Java code
 
-*  Use a loader and a setter to assign the material to a Geometry
+*  Use a loader and a setter to assign the material to a Geometry.
 
 [source,java]
 ----
 mywall.setMaterial(assetManager.loadMaterial( "Materials/mat_wall.j3m"));
 ----
+
 '''
 
 *See also:*
@@ -91,6 +96,6 @@ mywall.setMaterial(assetManager.loadMaterial( "Materials/mat_wall.j3m"));
 *  <<jme3/advanced/material_specification#,Developer specification of the jME3 material system (.j3md,.j3m)>>
 *  <<jme3/beginner/hello_material#,Hello Material>>
 *  <<jme3/advanced/materials_overview#,Materials Overview>>
-*  <<jme3/advanced/material_definitions#,Material Definitions>> 
+*  <<jme3/advanced/material_definitions#,Material Definitions>>
 *  <<jme3/advanced/j3m_material_files#,j3M Material Files>>
 *  <<sdk/neotexture#,Neotexture>> (Procedural textures)

+ 2 - 2
src/docs/asciidoc/sdk/neotexture.adoc

@@ -16,7 +16,7 @@ Textures usually make up most of the size of a game distribution. This is why Ne
 == Creating and Editing a NeoTexture file
 
 
-image::wp-uploads/2010/10/neotexture-300x189.jpg[neotexture-300x189.jpg,width="",height="",align="right"]
+//image::wp-uploads/2010/10/neotexture-300x189.jpg[neotexture-300x189.jpg,width="",height="",align="right"]
 
 
 .  Right-click the `assets/Textures` directory and choose New… &gt; Other.
@@ -44,7 +44,7 @@ To use NeoTexture tgr files directly in your application, you have to add the Ne
 == Loading tgr files as material
 
 
-image::wp-uploads/2010/10/neotexture-2-300x149.jpg[neotexture-2-300x149.jpg,width="",height="",align="right"]
+//image::wp-uploads/2010/10/neotexture-2-300x149.jpg[neotexture-2-300x149.jpg,width="",height="",align="right"]
 
 
 We want to use the procedural texture as a material based on `Lighting.j3md` (the default). We know that Lighting.j3md supports DiffuseMap, NormalMap, SpecularMap, and ParallaxMap.

+ 1 - 2
src/docs/asciidoc/wiki/atom_editor.adoc

@@ -10,9 +10,8 @@ ifdef::env-github,env-browser[:outfilesuffix: .adoc]
 
 Contributing to the Wiki is now easier than it ever has been. Using the Atom editor will give you an easy to use interface that is cross-platform, has code completion, syntax highlighting, instant AsciiDoctor page previewing, with an integrated GitHub client. The only thing it doesn't do is write the page for you.
 
-== Atom Editor Setup
+== Prerequisites
 
-.Prerequisites
 .  Have a link:https://github.com/[GitHub account].
 .  Are a Wiki project member.