Răsfoiți Sursa

Update hello_asset.adoc

Fixed broken list continuation.
mitm001 9 ani în urmă
părinte
comite
7349cb4fcd
1 a modificat fișierele cu 14 adăugiri și 8 ștergeri
  1. 14 8
      src/docs/asciidoc/jme3/beginner/hello_asset.adoc

+ 14 - 8
src/docs/asciidoc/jme3/beginner/hello_asset.adoc

@@ -216,7 +216,7 @@ Here is a HttpZipLocator that can download zipped models and load them:
 [source,java]
 ----
 
-    assetManager.registerLocator( "https://storage.googleapis.com/"
+    assetManager.registerLocator("https://storage.googleapis.com/"
             + "google-code-archive-downloads/v2/code.google.com/" 
             + "jmonkeyengine/wildhouse.zip", HttpZipLocator.class);
     Spatial scene = assetManager.loadModel("main.scene");
@@ -278,6 +278,7 @@ Open your JME3 Project in the jMonkeyEngine SDK.
 .  Right-click a .Blend, .OBJ, or .mesh.xml file in the Projects window, and choose “convert to JME3 binary. 
 .  The .j3o file appears next to the .mesh.xml file and has the same name. 
 .  Update all your `loadModel()` lines accordingly. For example: 
++
 [source,java]
 ----
 Spatial ninja = assetManager.loadModel("Models/Ninja/Ninja.j3o");
@@ -350,6 +351,7 @@ As an exercise, let's try different ways of loading a scene. You will learn how
 .  link:https://github.com/jMonkeyEngine/wiki/raw/master/src/docs/resources/Scenes/Town/town.zip[Download the town.zip] sample scene. 
 .  (Optional:) Unzip the town.zip to see the structure of the contained Ogre dotScene: You'll get a directory named `town`. It contains XML and texture files, and file called main.scene. (This is just for your information, you do not need to do anything with it.)
 .  Place the town.zip file in the top level directory of your JME3 project, like so: 
++
 [source]
 ----
 jMonkeyProjects/MyGameProject/assets/
@@ -359,12 +361,13 @@ jMonkeyProjects/MyGameProject/town.zip
 ...
 
 ----
-
++
 
 Use the following method to load models from a zip file:
 
 .  Verify `town.zip` is in the project directory.
 .  Register a zip file locator to the project directory: Add the following code under `simpleInitApp() {`
++
 [source,java]
 ----
     assetManager.registerLocator("town.zip", ZipLocator.class);
@@ -373,20 +376,22 @@ Use the following method to load models from a zip file:
     gameLevel.setLocalScale(2);
     rootNode.attachChild(gameLevel);
 ----
-
++
 The loadModel() method now searches this zip directly for the files to load. +
 (This means, do not write `loadModel(town.zip/main.scene)` or similar!)
 
 .  Clean, build and run the project. +
 You should now see the Ninja+wall+teapot standing in a town. 
 
-*Tip:* If you register new locators, make sure you do not get any file name conflicts: Don't name all scenes `main.scene` but give each scene a unique name.
+[TIP]
+If you register new locators, make sure you do not get any file name conflicts: Don't name all scenes `main.scene` but give each scene a unique name.
 
 Earlier in this tutorial, you loaded scenes and models from the asset directory. This is the most common way you will be loading scenes and models. Here is the typical procedure:
 
 .  Remove the code that you added for the previous exercise.
 .  Move the unzipped `town/` directory into the `assets/Scenes/` directory of your project.
 .  Add the following code under `simpleInitApp() {` 
++
 [source,java]
 ----
     Spatial gameLevel = assetManager.loadModel("Scenes/town/main.scene");
@@ -394,8 +399,8 @@ Earlier in this tutorial, you loaded scenes and models from the asset directory.
     gameLevel.setLocalScale(2);
     rootNode.attachChild(gameLevel);
 ----
-
- Note that the path is relative to the `assets/…` directory.
++
+Note that the path is relative to the `assets/…` directory.
 
 .  Clean, build and run the project. +
 Again, you should see the Ninja+wall+teapot standing in a town. 
@@ -407,6 +412,7 @@ Here is a third method you must know, loading a scene/model from a .j3o file:
 .  In the projects window, browse to the `assets/Scenes/town` directory. 
 .  Right-click the `main.scene` and convert the scene to binary: The jMonkeyPlatform generates a main.j3o file.
 .  Add the following code under `simpleInitApp() {`
++
 [source,java]
 ----
     Spatial gameLevel = assetManager.loadModel("Scenes/town/main.j3o");
@@ -414,8 +420,8 @@ Here is a third method you must know, loading a scene/model from a .j3o file:
     gameLevel.setLocalScale(2);
     rootNode.attachChild(gameLevel);
 ----
-
- Again, note that the path is relative to the `assets/…` directory.
++
+Again, note that the path is relative to the `assets/…` directory.
 
 .  Clean, Build and run the project. +
 Again, you should see the Ninja+wall+teapot standing in a town.