2
0
Эх сурвалжийг харах

Added FileLocator example (#142)

Quazi Irfan 3 жил өмнө
parent
commit
800caae0d5

+ 11 - 0
docs/modules/tutorials/pages/beginner/hello_asset.adoc

@@ -217,6 +217,17 @@ Here is a HttpZipLocator that can download zipped models and load them:
 
 ----
 
+Here is a FileLocator that allows assetManager to open asset file form a particular directory,
+
+[source,java]
+----
+
+    assetManager.registerLocator("<Path to directory containing asset>", FileLocator.class);
+    Spatial model = assetManager.loadModel("ModelName.gltf");
+    rootNode.attachChild(model);
+
+----
+
 JME3 offers ClasspathLocator, ZipLocator, FileLocator, HttpZipLocator, and UrlLocator (see `com.jme3.asset.plugins`).