(For the release build:) Use the jMonkeyPlatform to convert models to .j3o format. You don't need this step as long you still develop and test the aplication within the jMonkeyPlatform.
+
(For the release build:) Use the jMonkeyEngine SDK to convert models to .j3o format. You don't need this step as long you still develop and test the aplication within the jMonkeyEngine SDK.
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/animation.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/animation.html
index 9be022861..1928b05cb 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/animation.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/animation.html
@@ -373,4 +373,4 @@ You have access to the following objects
}
-
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/application_states.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/application_states.html
index 1543daaac..5b6d37559 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/application_states.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/application_states.html
@@ -235,4 +235,4 @@ Don't mess with the AppState from other places, because from other methods
-
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/asset_manager.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/asset_manager.html
index de7fee7e6..8652682ed 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/asset_manager.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/asset_manager.html
@@ -36,7 +36,7 @@ Additionally, You can configure the Asset Manager and add any path to its root.
-By default, jME3 searches for models in a directory named assets. In Java projects created with the jMonkeyPlatform, an assets folder is created by default. Using any other IDE or the command line, you have to create this assets directory as an extra step (see the Codeless Project tip below).
+By default, jME3 searches for models in a directory named assets. In Java projects created with the jMonkeyEngine SDK, an assets folder is created by default. Using any other IDE or the command line, you have to create this assets directory as an extra step (see the Codeless Project tip below).
-If you use the default build script created by the jMonkeyPlatform then the original OgreXML files are not included in the executable. A stand-alone executable works with .j3o files only. The default build script makes sure to include .j3o files in the executable.
+If you use the default build script created by the jMonkeyEngine SDK then the original OgreXML files are not included in the executable. A stand-alone executable works with .j3o files only. The default build script makes sure to include .j3o files in the executable.
@@ -168,10 +168,10 @@ If you use the default build script created by the jMonkeyPlatform then
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/audio.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/audio.html
index 2e6e17a35..b95dbe6e2 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/audio.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/audio.html
@@ -188,4 +188,4 @@ You can find more info about OpenAL and its advanced features here:
+
+
+TIP :: To set the line width of wireframe display, use mesh.setLineWidth(lineWidth). Default line width is 1.
+
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/effects_overview.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/effects_overview.html
index 53beb3fdd..6ae74dccc 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/effects_overview.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/effects_overview.html
@@ -4,180 +4,233 @@
-jME3 supports various post-rendering and particle effects. This list contains screenshots and sample code that demonstrates how to add the effect to a scene.
+jME3 supports two types of effects, post-rendering filters and particle emitters. This list contains screenshots and links to sample code that demonstrates how to add the effect to a scene.
+
+For example, post-processor filter effects are typically activated after the following pattern:
+
+
public class MyGame extends SimpleApplication {
+ private FilterPostProcessor fpp;
+ private SomeFilter sf;
+
+ public void simpleInitApp() {
+ ...
+ fpp = new FilterPostProcessor(assetManager);
+ sf = new SomeFilter();
+ fpp.addFilter(sf);
+ viewPort.addProcessor(fpp);
+ ...
+ }
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/endless_terraingrid.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/endless_terraingrid.html
index b1d13c03f..40d1d2163 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/endless_terraingrid.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/endless_terraingrid.html
@@ -111,4 +111,4 @@ Further information about terrain and TerrainQuad can be found in the wiki at:
-
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/headless_server.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/headless_server.html
index ba6e7a596..a1efcce6c 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/headless_server.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/headless_server.html
@@ -91,4 +91,4 @@ Okay, so you can now start your game in a headless 'server mode', wher
-
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/hinges_and_joints.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/hinges_and_joints.html
index cff6c257e..e0db1cc0d 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/hinges_and_joints.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/hinges_and_joints.html
@@ -226,4 +226,4 @@ When you disable the motor, the chained nodes are exposed to gravity again:
-
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/input_handling.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/input_handling.html
index 03cb3e20a..de2802731 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/input_handling.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/input_handling.html
@@ -128,7 +128,7 @@ JoyButtonTrigger(0, JoyInput.AXIS_POV_Y) ?
-In your IDE, use code completion to quickly look up Trigger literals. In the jMonkeyPlatform for example, press ctrl-space or ctrl-/ after KeyInput.| to choose from the list of all keys.
+In your IDE, use code completion to quickly look up Trigger literals. In the jMonkeyEngine SDK for example, press ctrl-space or ctrl-/ after KeyInput.| to choose from the list of all keys.
@@ -350,4 +350,4 @@ The abstraction of separating triggers and mappings has the advantage that you c
-
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/j3m_material_files.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/j3m_material_files.html
index 57c99cc0b..9ec9bb6ce 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/j3m_material_files.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/j3m_material_files.html
@@ -57,7 +57,7 @@ How to this file is structured:
-Tip: In the jMonkeyPlatform, use File>New File>Material>Empty Material File to create .j3m files.
+Tip: In the jMonkeyEngine SDK, use File>New File>Material>Empty Material File to create .j3m files.
@@ -69,10 +69,10 @@ How to this file is structured:
This is how you use the prepared .j3m Material on a Spatial. Since you have saved the .j3m file to your project's Assets directory, the .j3m path is relative to MyGame/src/assets/….
-Tip: In the jMonkeyPlatform, open Windows>Palette and drag the JME Material: Set J3M snippet into your code.
+Tip: In the jMonkeyEngine SDK, open Windows>Palette and drag the JME Material: Set J3M snippet into your code.
@@ -175,7 +175,7 @@ All data types (except Color) are specified in com.jme3.shader.VarType.
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/jme3_shaders.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/jme3_shaders.html
index 0b2eadc31..1f9ce498b 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/jme3_shaders.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/jme3_shaders.html
@@ -200,6 +200,44 @@ The complete list of global uniforms that can be used in JME3 can be found
+
+
+
+
+
g_LightDirection (vec4) : the direction of the light
+
+
use for SpotLight : x,y,z contain the world direction vector of the light, the w component contains the spotlight angle cosine
+
+
+
+
g_LightColor (vec4) : the color of the light
+
+
g_LightPosition : the position of the light
+
+
use for SpotLight : x,y,z contain the world position of the light, the w component contains 1/lightRange
+
+
use for PointLight : x,y,z contain the world position of the light, the w component contains 1/lightRadius
+
+
use for DirectionalLight : strangely enough it's used for the direction of the light…this might change though. The fourth component contains -1 and it's used in the lighting shader to know if it's a directionalLight or not.
+
+
+
+
g_AmbientLightColor the color of the ambient light.
+
+
+
+
+these uniforms are passed to the shader without having to declare them in the j3md file, but you have to specify in the technique definition " LightMode MultiPass" see lighting.j3md for more information.
+
+
+
@@ -227,36 +265,114 @@ Note that in the shader the attributes names will be prefixed by a “in”.
At some point when making your own shader you'll need to pass your own uniforms
-Any uniform has to be declared in the material definition file in the "MaterialParameters" section.
+Any uniform has to be declared in the material definition file (.j3md) in the "MaterialParameters" section.
MaterialParameters {
Vector4 Color
+ Texture2D ColorMap
}
+You can also pass some define to your vertex/fragment programs to know if an uniform as been declared.
+
+You simply add it in the Defines section of your Technique in the definition file.
-This material parameter will be sent from the engine to the shader as follow
-
material.setColor("Color", new ColorRGBA(1.0f, 0.0f, 0.0f, 1.0f);//red color
+
Defines {
+ COLORMAP: ColorMap
+ }
+Those material parameters will be sent from the engine to the shader as follow
Note that there is a setXXXX method for any type of uniform you want to pass.
-To use this uniform in the shader, you need to declare it in the .frag or in the .vert files (depending on where you need it) as follow :
-
uniform vec4 m_Color;
+
material.setColor("Color", new ColorRGBA(1.0f, 0.0f, 0.0f, 1.0f); //red color
+ material.setTexture("ColorMap", myTexture);
-
+To use this uniform in the shader, you need to declare it in the .frag or in the .vert files (depending on where you need it).
+You can make use of the defines here and later in the code:
Note the "m_" prefix that specifies that the uniform is a material parameter.
-This uniform will be populated at runtime with the value you sent.
+
+Color Keying is useful in games involving many players. It consists of adding some
+
+player-specific color on models textures.
+
+The easiest way of doing this is to use a keyMap which will contain the amount of
+
+color to add in its alpha channel.
+
+Here I will use this color map:
+
+to bend color on this texture:
+
+
+
+We need to pass 2 new parameters to the Lighting.j3md definition, MaterialParameters section :
+
+
+This way, a transparent pixel in the KeyMap texture doesn't modify the color.
+
+A black pixel replaces it for the m_KeyColor and values in between are blended.
+
+
+
+A result preview can be seen here:
@@ -328,7 +444,7 @@ Those attributes are deprecated since GLSL 1.3 (opengl 3), hence JME3 global uni
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/light_and_shadow.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/light_and_shadow.html
index f46958dcb..0a39ea8eb 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/light_and_shadow.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/light_and_shadow.html
@@ -230,4 +230,4 @@ soil.setShadowMode(ShadowMode.Receive);
...
-
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/loading_screen.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/loading_screen.html
index 5136cfab2..1a519b4b3 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/loading_screen.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/loading_screen.html
@@ -569,4 +569,4 @@ TO DO
-
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/localization.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/localization.html
index 1bea834ae..f1ef4c946 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/localization.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/localization.html
@@ -36,7 +36,7 @@ There are tools that assist you with localizing Java Swing GUIs. jME3 applicatio
-Tip: The jMonkeyPlatform supports opening and editing Bundle.properties files. Also note the Tools > Localization menu.
+Tip: The jMonkeyEngine SDK supports opening and editing Bundle.properties files. Also note the Tools > Localization menu.
@@ -101,7 +101,7 @@ score.display=Spielstand:
-Tip: In the jMonkeyPlatform, you set this VM Option in the Project properties under Run. Here you can also save individual run configuraions for each language you want to test.
+Tip: In the jMonkeyEngine SDK, you set this VM Option in the Project properties under Run. Here you can also save individual run configuraions for each language you want to test.
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/logging.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/logging.html
index 71fbcb5ea..05f906200 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/logging.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/logging.html
@@ -95,4 +95,4 @@ To reactivate full logging, e.g. for debugging and testing:
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/making_the_camera_follow_a_character.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/making_the_camera_follow_a_character.html
index 77d2a1a7d..59d56fce0 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/making_the_camera_follow_a_character.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/making_the_camera_follow_a_character.html
@@ -173,4 +173,4 @@ What is the difference of the two code samples above?
-
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/material_definitions.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/material_definitions.html
index 0f7951077..b892c9dcb 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/material_definitions.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/material_definitions.html
@@ -105,9 +105,9 @@ geom.setMaterial(mat);
rootNode.attachChild(geom);
-Tip: You can find these and other common code snippets in the jMonkeyPlatform Code Palette. Drag and drop them into your source code.
+Tip: You can find these and other common code snippets in the jMonkeyEngine SDK Code Palette. Drag and drop them into your source code.
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/materials_overview.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/materials_overview.html
index c57bd8d00..ec0bf2f81 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/materials_overview.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/materials_overview.html
@@ -3,38 +3,51 @@
-This table shows you which material definitions jME supplies by default, and how to make the most of your designer's 3D models by using material parameters.
-If you are looking for information about how to use these materials in code, look at Material Definitions and j3M Material Files.
+
+Geometries have Materials (.j3m), Materials are based on material definitions (.j3md). You can write .j3m files in a text editor, or use the jMonkeyEngine SDK to generate them for you.
-Tip: Looks complicated? Remember two things: The most commonly used material is Lighting.j3md (which supports Phong illumination). The jMonkeyPlatform can create Material files, and it offers a visual editor where you can select and set properties, and preview the outcome. The Palatte contains code snippets that demo how to load materials.
+This table shows you the material definitions that jMonkeyEngine supplies by default. You want to make the most of your models by using the right material parameters. The developers should be in contact with the graphic designer regarding which of the available jMonkeyEngine features individual Materials and Textures require. You must have an understanding what texture maps are to be able to use textured materials.
-Some parameters are "optional" because they are somewhat advanced. If you don't know what an option means, chances are that you are not using this feature in your textures – and you don't need to specify it. (E.g. YCoCg and LATC are image compression formats; Minnaert and WardIso are shader types.)
+There are two types of material definitions below, illuminated and unshaded. Illuminated materials look more naturalistic, unshaded ones look more abstract.
+
+
+
+Most parameters are not mandatory, even if they are not explicitly marked optional. For example, it is okay to specify solely the DiffuseMap and NormalMap when using Lighting.j3md, and leave the rest empty. You are only using a subset of the available features, but that's fully acceptable if it already results in the material you want. You can always add more texture maps later.
-Also note that many other parameters are optional, even if they are not explicitly marked optional. For example, it's okay to specify solely the DiffuseMap and NormalMap when using Lighting.j3md. You are only using a subset of what is possible, but if that's what you want, you can do that. The developer should be in contact with the designer regarding what jME features individual Materials/Textures require.
+
1) Looks confusing? Start with Unshaded.j3md, and then Lighting.j3md.
+2) The jMonkeyEngine SDK offers a visual editor where you can set properties and preview the outcome. The SDK Palette contains code snippets to load materials.
+3) If you don't know what an optional setting means, you're likely not using it.
+
+
+Standard materials look slightly abstract because they ignore light sources. They work even if the scene does not include a light source. They are single-colored or textured and have no shadows.
+
+
-
Material Definition
Usage
Parameter : Type
+
Basic Material Definition
Usage
Parameter : Type
-
Common/MatDefs/Misc/Unshaded.j3md
Standard unlit Material. Use this for simple coloring, simple texturing, simple glow, simple transparency.
+
Common/MatDefs/Misc/Unshaded.j3md
Standard, non-illuminated Materials. Use this for simple coloring, simple texturing, simple glow, simple transparency.
See also: Hello Material
ColorMap : Texture
LightMap : Texture
Color : Color
@@ -43,6 +56,17 @@ SeparateTexCoord : Boolean
GlowMap : Texture
GlowColor: Color
+
+
+
+
+Other useful, but less commonly used material definitions:
+
+
+
+
+
Special Material Definitions
Usage
Parameter : Type
+
Common/MatDefs/Misc/Sky.j3md
A solid skyblue, or use with a custom SkyDome texture.
See also: Sky
A multi-layered texture for terrains.
+Specify four textures and a Vector3f describing the region in which each texture should appear:
+X = start height,
+Y = end height,
+Z = texture scale.
+Texture regions can overlap.
+For example: Specify a seafloor texture for the lowest areas,
+a sandy texture for the beaches,
+a grassy texure for inland areas,
+and a rocky texture for mountain tops.
+Illuminated materials require a light source added to at least one of their parent nodes! (e.g. rootNode) Illuminated materials are darker on the sides facing away from light sources. They do not automatically cast drop shadows. They use Phong illumination model (default), or the Ward isotropic gaussian specular shader (WardIso) which looks more plastic like.
-
Standard lit material with Phong Illumination. Use this material together with DiffuseMap, SpecularMap, BumpMap (NormalMaps, ParalaxMap) textures. Supports shininess, transparency, and plain material colors (Diffuse, Ambient, Specular colors).
+
Common/MatDefs/Light/Lighting.j3md
Standard lit material with Phong Illumination.
+Use this material together with DiffuseMap, SpecularMap, BumpMap (NormalMaps, ParalaxMap) textures.
+Supports shininess, transparency, and plain material colors (Diffuse, Ambient, Specular colors).
See also: Hello Material
-Note: Lit materials require a light source! Glowing materials require a FilterPostProcessor!
Same kind of splat texture as Terrain.j3md, but with shading.
-Requires a light source.
Color Diffuse : Color
+
Common/MatDefs/Terrain/TerrainLighting.j3md
Same kind of multi-layered splat texture as Terrain.j3md, but with illumination and shading.
+Typically used for terrains, but works on any mesh.
+For every 3 splat textures, you need one alpha map.
+You can use a total of 11 texture maps in the terrain's splat texture:
+Note that diffuse and normal maps all count against that.
+For example, you can use a maximum of 9 diffuse textures, two of which can have normal maps;
+or, five textures with both diffuse and normal maps.
A color gradient calculated from the model's surface normals. You can use this built-in material to test models that have no material, or as fall-back default material.
–
-
-
-
-
-Note: Common/MatDefs/Misc/SimpleTextured.j3md, ColoredTextured.j3md, VertexColor.j3md, Wireframe.j3md have been deprecated. Use equivalent features of Unshaded.j3md instead.
-
-
-Most Material Definitions support an alpha channel for transparency. In an RGBA color, the last float is the alpha channel: 0.0f is transparent, 1.0f is opaque.
-For example: mat.setColor("Color", new ColorRGBA(1,0,0,0.5f)); is a half-opaque red.
+Most Material Definitions support an alpha channel for opaqueness and transparency in textures. In an RGBA color, the last float is the alpha channel: 0.0f is transparent and 1.0f is opaque. For example, mat.setColor("Color", new ColorRGBA(1,0,0,0.5f)); is a half-opaque red.
+
Use this for normal transparency. Interpolates the background pixel with the current by using the current pixel's alpha. E.g. alpha-blended vegetation.
Additive alpha blending adds colors in a commutative way, i.e. the result does not depend on the order of transparent layers. Adds the background pixel color with the current pixel color. E.g. particle effects that have black color as background.
Same as "Additive", except first it multiplies the current pixel color by the pixel alpha. E.g. used for particle effects that have alpha as background.
Additive alpha blending adds colors in a commutative way, i.e. the result does not depend on the order of transparent layers. Adds the scene's background pixel color to the current pixel color. Note that viewed in front of a white scene, these textures become fully transparent. This is useful if you have many transparent textures overlapping.
Used for particle effect textures that have a black color background.
Pre-multiplied alpha blending. E.g. if the color of the object has already been multiplied by its alpha, this is used instead of "Alpha" blend mode.
For use with premult alpha textures.
-
+
-
Also note the AlphaDiscardThreshold value for materials based on Lighting.j3md. The renderer does not render pixels whose transparancy is below the threshold.
-
@@ -245,17 +298,26 @@ Also note the AlphaDiscardThreshold value for materials based on Lighting.j3md.
Activate back-face culling. Mesh faces that are not visible are not rendered, which saves time. Backface culling is activated by default as an optimization.
Activate both back- and frontface culling. Use this as an efficient way to make an object temporarily invisible. All it's other in-game properties, collision shapes, interactions, etc remain active.
Enables point-sprite mode, so meshes with "Mode.Points" will be rendered as textured sprites. Note that gl_PointCoord must be set in the shader. Point sprites are used for hardware accelerated particle effects.
Enable polygon offset. Use this when you have meshes that have triangles really close to each over (e.g. ), it will shift the depth values to prevent .
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/mesh.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/mesh.html
index a2a5f3ad3..9b2f361e0 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/mesh.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/mesh.html
@@ -160,4 +160,4 @@ The VertexBuffer contains a particular type of geometry data used by Meshes. Eve
-
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/monkey_zone.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/monkey_zone.html
index be9ef73a8..8c8cbc02b 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/monkey_zone.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/monkey_zone.html
@@ -28,8 +28,8 @@ This open-source demo:
The game idea is based on “BattleZone” arcade game from the 1980s, a first-person shooter the with real-time strategy elements.
-The game was written using the jMonkeyPlatform IDE, and it's based off the BasicGame project template. It took us one week to create a playable pre-alpha, including networking.
-The project design follows best practices that make it possible to edit maps, vehicles, etc, in jMonkeyPlatform without having to change the code – This allows 3D graphic designers to contribute models more easily. (If you feel like contributing assets or working on parts of the game code, drop us a note!)
+The game was written using the jMonkeyEngine SDK, and it's based off the BasicGame project template. It took us one week to create a playable pre-alpha, including networking.
+The project design follows best practices that make it possible to edit maps, vehicles, etc, in jMonkeyEngine SDK without having to change the code – This allows 3D graphic designers to contribute models more easily. (If you feel like contributing assets or working on parts of the game code, drop us a note!)
@@ -195,11 +195,11 @@ The sync manager basically puts a timestamp on every message sent from the serve
-
-All assets used in the game, like entity models and loaded maps can be preconfigured and edited using jMonkeyPlatform. For example, to add a new vehicle type, a vehicle is created in the jMP vehicle editor and UserData like Speed, HitPoints etc. is applied directly in the editor. When the model is loaded in the game it is automatically configured based on these settings, the same accounts for maps that are loaded, special Nodes that mark e.g. player start locations are recognized automatically etc.
+All assets used in the game, like entity models and loaded maps can be preconfigured and edited using the jMonkeyEngine SDK. For example, to add a new vehicle type, a vehicle is created in the jMonkeyEngine SDK vehicle editor and UserData like Speed, HitPoints etc. is applied directly in the editor. When the model is loaded in the game it is automatically configured based on these settings, the same accounts for maps that are loaded, special Nodes that mark e.g. player start locations are recognized automatically etc.
@@ -209,7 +209,7 @@ All assets used in the game, like entity models and loaded maps can be preconfig
-Entities that are loaded from disk have certain UserData like HitPoints, Speed etc. that is used to configure the entity at runtime. jMP allows adding and editing this UserData so entity properties are editable visually.
+Entities (Nodes and Geometries) that are loaded from disk have certain UserData like HitPoints, Speed etc. that is used to configure the entity at runtime. The jMonkeyEngine SDK allows adding and editing this UserData, so entity properties are editable visually.
@@ -219,7 +219,7 @@ Entities that are loaded from disk have certain UserData like HitPoints, Speed e
-VehicleControls, CharacterControls and RigidBodyControls with mesh collision shape for terrain and objects are generated in jMP and saved in the entity j3o file. When an entity is loaded, the type of entity is identified based on the available controls and UserData and it is configured accordingly.
+VehicleControls, CharacterControls and RigidBodyControls with mesh collision shape for terrain and objects are generated in the jMonkeyEngine SDK and saved in the entity j3o file. When an entity is loaded, the type of entity is identified based on the available controls and UserData and it is configured accordingly.
@@ -307,10 +307,10 @@ Programmatic PlayerData:
Have a look at the code and feel free to ask about it, if you want any new features, you are free to implement them. ;)
-MonkeyZone is hosted at GoogleCode, where you can check out the jMonkeyPlatform-ready project via svn:
+MonkeyZone is hosted at GoogleCode, where you can check out the jMonkeyEngine SDK-ready project via svn:
-
jMonkeyPlatform→Team→Subversion→Checkout,
+
jMonkeyEngine SDK→Team→Subversion→Checkout,
Enter the SVN URL
@@ -328,4 +328,4 @@ MonkeyZone is hosted at GoogleCode, where you can check out the jMonkeyPlatform-
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/motionpath.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/motionpath.html
index 4c567ca7c..cf014d80e 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/motionpath.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/motionpath.html
@@ -117,4 +117,4 @@ In this example, you just print the status at every way point. In a game you cou
});
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/mouse_picking.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/mouse_picking.html
index 196ae0106..819786851 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/mouse_picking.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/mouse_picking.html
@@ -146,4 +146,4 @@ The following example rotates Spatials named "Red Box" or "Blue B
-
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/multiple_camera_views.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/multiple_camera_views.html
index 032997d5b..4017eb499 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/multiple_camera_views.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/multiple_camera_views.html
@@ -4,7 +4,7 @@
-You can split the screen and look into the 3D scene from different camera angles at the same time. In this example, we create four views (2x2) with the same aspect ratio as the normal view, but half the size.
+You can split the screen and look into the 3D scene from different camera angles at the same time.
@@ -13,29 +13,99 @@ The packages used in this example are com.jme3.renderer.Camera and
-
-We use the preconfigured Camera cam and viewPort from SimpleApplication for the first view.
+The default viewPort is as big as the window. If you have several, the must be of different sizes, either overlapping or adjacent to one another. How do you tell jME which of the ViewPorts should appear where on the screen, and how big it should be?
-Place the main camera in the scene and rotate it in its start position.
+Imagine the window as a 1.0f x 1.0f rectangle. The default cam's viewPort is set to
+
+
+
cam.setViewPort(0f, 1f, 0f, 1f);
+
+
+
+This setting makes the ViewPort take up the whole rectangle.
+
+
+
+The four values are read in the following order:
+
+Example: Cam2's rectangle is int he bottom right: It extends from mid (x1=0.5f) bottom (y1=0.0f), to right (x2=1.0f) mid (y2=0.5f)
-We will have a detailed look at how we use setViewPort() to position and resize the default view later.
+
If you scale the views in a way so that the aspect ratio of a ViewPort is different than the window's aspect ratio, then the ViewPort appears distorted. In these cases, you must recreate (not clone) the ViewPort's cam object with the right aspect ratio. For example: Camera cam5 = new Camera(100,100);
+
-
-How does jme know which of the four views should appear where on the screen?
-
-
-
-Imagine the view as a 1x1-sized box. By default, the settings is cam.setViewPort(0f, 1f, 0f, 1f);. This means the view takes up the whole box, from 0 to 1 left to right, and from 0 to 1 bottom to top.
+To visualize what you do, use the following drawing of the viewport positions:
-These viewport parameters are, in this order, the left - right - bottom - top extend of a camera's box on the screen. Note that we have set a few values to 0.5f – this is where we resize each view to half its default height and width.
-
-Example: Cam3's rect extends from bottom-left (0.0 , 0.5) to top-right (0.5 , 1.0)
+
+The following code snippet sets up two views, one covers the whole screen, and the second is a small view in the top center.
-
-
The left corner is at 0, and the right corner is 0.5 on the x axis.
-
-
The bottom of the box is at 0.5 and the top at 1.0 on the y axis.
-This layout shows 2x2 views. For a split screen you may want to lay out two views, one above the other, or one next to the other.
+You can customize the camera and the viewPort of each view individually. For example, each view can have a different background color:
+
+
+
viewPort.setBackgroundColor(ColorRGBA.Blue);
+
+
+
+You have full control to determine which Nodes the camera can see! It can see the full rootNode…
+
+
viewPort1.attachScene(rootNode);
-If you scale the views in a way so that the aspect ratio changes, the views will obviously be distorted. In these cases, create custom camera objects with the right aspect ratio (redefine the default cam).
+
+… or you can give each camera a special node whose content it can see:
+
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/multithreading.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/multithreading.html
index 742690823..a319eca48 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/multithreading.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/multithreading.html
@@ -212,4 +212,4 @@ The cool thing about this appraoch is that every entity creates one self-contain
-
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/networking.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/networking.html
index a5a93da2a..cae36cdb6 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/networking.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/networking.html
@@ -434,6 +434,16 @@ You cannot modify the scenegraph in the NetworkThread. You have to create a Call
Learn more about multithreading here.
+
+
+
+
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/nifty_gui.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/nifty_gui.html
index 98048262d..40a9d033d 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/nifty_gui.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/nifty_gui.html
@@ -261,4 +261,4 @@ Next, learn how to lay out your graphical user interface. Typically, you start w
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/nifty_gui_java_interaction.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/nifty_gui_java_interaction.html
index fb2dd2a11..1ca7b44b8 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/nifty_gui_java_interaction.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/nifty_gui_java_interaction.html
@@ -208,7 +208,7 @@ The startGame() example simply switches the
-
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/nifty_gui_java_layout.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/nifty_gui_java_layout.html
index 527e9d89a..c160029db 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/nifty_gui_java_layout.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/nifty_gui_java_layout.html
@@ -33,7 +33,7 @@ Sample project
Download demo project: (jme3-ready)
The full demo ZIP is based on de.lessvoid.nifty.examples.controls.ControlsDemo.java.
-
The demo is a SimpleApplication-based game (use e.g. the BasicGame template in the jMonkeyPlatform).
+
The demo is a SimpleApplication-based game (use e.g. the BasicGame template in the jMonkeyEngine SDK).
Copy images and sound files into your project's assets/Interface/ directory. (In this example, I copied them from nifty-default-controls-examples/trunk/src/main/resources/ to assets/Interface/).
@@ -606,7 +606,7 @@ Before initializing the nifty screens, you set up properties and register media.
setDebugOptionPanelColors(true);
Highlight all panels, makes it easier to arrange them.
-
+
Example:
@@ -636,4 +636,4 @@ Integrate the GUI into the g
-
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/nifty_gui_overlay.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/nifty_gui_overlay.html
index b8deaf613..d21488271 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/nifty_gui_overlay.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/nifty_gui_overlay.html
@@ -86,4 +86,4 @@ Now that you have layed out and integrated the view online version
\ No newline at end of file
+
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/nifty_gui_projection.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/nifty_gui_projection.html
index 5e9145120..dc06e98c6 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/nifty_gui_projection.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/nifty_gui_projection.html
@@ -105,4 +105,4 @@ Now that you have layed out and integrated the view online version
\ No newline at end of file
+
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/nifty_gui_xml_layout.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/nifty_gui_xml_layout.html
index 39dcf5198..f00950511 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/nifty_gui_xml_layout.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/nifty_gui_xml_layout.html
@@ -231,6 +231,13 @@ The hud-frame.png image is a transparent frame that we use as HUD decoration. In
<image filename="Interface/tutorial/step2/hud-frame.png"></image></layer>
+
+In order to make the hud-frame.png independent of the screen resolution you are using, you could use the imageMode attribute on the image element
+
The face1.png image is an image that you want to use as a status icon.
In the hud screen's foreground layer, add the following image element:
@@ -377,4 +384,4 @@ Integrate the GUI into the g
-
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/open_game_finder.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/open_game_finder.html
index 446e711f8..a965d4c99 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/open_game_finder.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/open_game_finder.html
@@ -192,4 +192,4 @@ A: TBD
-
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/particle_emitters.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/particle_emitters.html
index f79b93a3b..6d57fab56 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/particle_emitters.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/particle_emitters.html
@@ -9,7 +9,8 @@ Creating an effect involves some trial and error to get the settings just ri
-Tip: Use the Scene Editor in the jMonkeyPlatform to design and preview effects.
+
By default, particles are emitted from the emitters location (a point). You can increase the emitter shape to occupy a sphere, so that the start point of new particles can be anywhere inside the sphere, which makes the effect a bit more irregular.
-
+
Build up you effect by specifying one parameter after the other. If you change several parameters at the same time, it's difficult to tell which of the values caused which outcome.
@@ -194,7 +195,7 @@ The following effect textures are available by default from test-data.jar<
Effects/Smoke/Smoke.png
1*15
-
+
Tip: Use the setStartColor()/setEndColor() settings described above to colorize the white and gray parts of textures.
@@ -233,4 +234,4 @@ See also:
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/physics.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/physics.html
index 71101321f..65d3cee1f 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/physics.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/physics.html
@@ -533,4 +533,4 @@ removeCollideWithGroup(COLLISION_GROUP_01)
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/physics_listeners.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/physics_listeners.html
index 03c6384e8..663ae088f 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/physics_listeners.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/physics_listeners.html
@@ -174,4 +174,4 @@ Note that after the collision method has been called the object is not valid any
-
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/post-processor_water.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/post-processor_water.html
index e339c89c3..fb5294186 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/post-processor_water.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/post-processor_water.html
@@ -275,4 +275,4 @@ See also:
-
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/ragdoll.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/ragdoll.html
index ed86f661e..41ff62c3f 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/ragdoll.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/ragdoll.html
@@ -213,4 +213,4 @@ If you experience weird behaviour in a ragdoll – such as exploding into pieces
-
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/read_graphic_card_capabilites.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/read_graphic_card_capabilites.html
index ce46f29c5..83e87bca2 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/read_graphic_card_capabilites.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/read_graphic_card_capabilites.html
@@ -26,4 +26,4 @@ This would tell you that this user's graphic card only supports OpenGL 2.0
-
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/remote-controlling_the_camera.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/remote-controlling_the_camera.html
index 6ec2b28cb..cdd2b3351 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/remote-controlling_the_camera.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/remote-controlling_the_camera.html
@@ -50,4 +50,4 @@ If desired, attach the camNode to a MotionTrack to let it travel along waypoints
-
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/save_and_load.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/save_and_load.html
index 4c57fdd1a..13e7a28c4 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/save_and_load.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/save_and_load.html
@@ -4,11 +4,20 @@
-You can save and load scenes and individual Nodes using com.jme3.export.binary.BinaryExporter and com.jme3.export.binary.BinaryImporter. Use standard Java serialization to load game data. The jMonkeyEngine binary file format is .j3o. You can open, view, and edit .j3o files in the jMonkeyPlatform.
+You can save and load scenes and individual Nodes using com.jme3.export.binary.BinaryExporter and com.jme3.export.binary.BinaryImporter. Use standard Java serialization to load game data. The jMonkeyEngine binary file format is .j3o. You can open, view, and edit .j3o files in the jMonkeyEngine SDK.
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/sky.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/sky.html
index 4f8cb470c..6080e249a 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/sky.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/sky.html
@@ -98,4 +98,4 @@ Box or Sphere?
-
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/spatial.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/spatial.html
index 059579d90..2b30f2a8e 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/spatial.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/spatial.html
@@ -48,10 +48,10 @@ mesh, material;
Transformations; custom user data;
no mesh, no material.
-
Examples:
A box, a sphere, player, a building, a piece of terrain, a vehicle, missiles, NPCs, etc…
The rootNode, the guiNode, an audio node, a custom grouping node, etc…
The rootNode, the guiNode, an audio node, a custom grouping node, etc…
-
+
You never create a Spatial with Spatial s = new Spatial();! A Spatial is an abstract concept, like a mammal (there is no actual creature called "mammal" walking around here). You create a Node, or load a Geometry object. Some methods however require a Spatial argement: This is because they are able to accept both Nodes and Geometries as arguments. In this case, you must cast a Node or Geometry to Spatial.
@@ -79,34 +79,56 @@ The polygon Mesh i
-You can include custom Java objects in Nodes and Geometries. This is useful for maintaining information about a game element, such as health, budget, ammunition, inventory, equipment, etc for players, or landmark locations for terrains, and much more. Where ever the spatial is accessible, you can also access the object's game data.
+You can include custom Java objects in Nodes and Geometries. This is useful for maintaining information about a game element, such as health, budget, ammunition, inventory, equipment, etc for players, or landmark locations for terrains, and much more.
-
// create and instance of your custom data class
-PlayerData playerData = new PlayerData("joe", 0, 100);
-// store custom data in Node or Geometry
-player.setUserData("player data", playerData);
+
+
+You do not need to create a custom class that extends Node or Geometry to be able to add custom fields to a spatial – use the setUserData() method instead. Neither do need to create a custom class that extends Node to be able to add custom accessor methods to this spatial – use a Control instead. Where ever the spatial is accessible, you can also access the object's game data and accessors.
+
+
+
+For example when you initialize your custom PlayerControl class:
+
+
+
// init custom data fields in this Control's Spatial (Node or Geometry)
+spatial.setUserData("Health", 100);
+
+
+
+In your PlayerControl, you offer accessors that manipulate and get this custom data:
+
+
+
public int getHealth() {
+ return (Integer)spatial.getUserData("Health");
+}
+public void setHealth(int h) {
+ spatial.setUserData("Health",h);
+}
+
+
+
+Elsewhere in your code, you can access this data wherever you have access to the spatial.
+
+
+
health = player_node.getControl(PlayerControl.class).getHealth();
...
-// Elsewhere: retrieved data from Node or Geometry...
-PlayerData playerData = player.getUserData("player data");
-// ... set the data...
-playerData.setHealth("99");
-// ... or get the data for tests or to display it in the HUD.
-health = playerData.getHealth();
-You can add as many data objects to a Spatial as you need. Just make sure to label them with different Strings (player data, player inventory, player equipment, etc).
+You can add as many data objects (including Strings, Integers, Floats, Arrays,) to a Spatial as you need. Just make sure to label them with different Strings (health, inventory, equipment, etc). The saved data can also be custom Java objects if you make the Java class implement the Savable interface. When you save a Spatial as a j3o file, the custom data is saved too, and it will be restored the next time you load the j3o!
-You can also list all data keys that are defined for one Spatial:
+
+You can list all data keys that are already defined for one Spatial:
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/swing_canvas.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/swing_canvas.html
index ac14fe381..92bcabe79 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/swing_canvas.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/swing_canvas.html
@@ -177,4 +177,4 @@ Remember, to navigate in the scene, click and drag (!) the mouse, or press the W
-