doc: Misc formatting fixes

This commit is contained in:
Rémi Verschelde 2018-09-21 15:34:11 +02:00
parent eaef2cc6b5
commit ef7b384861
4 changed files with 29 additions and 41 deletions

View file

@ -41,6 +41,7 @@
return FAILED
var mesh = Mesh.new()
# Fill the Mesh with data read in 'file', left as exercise to the reader
var filename = save_path + "." + get_save_extension()
ResourceSaver.save(filename, mesh)

View file

@ -4,44 +4,45 @@
Post process scenes after import
</brief_description>
<description>
The imported scene can be automatically modified right after import by specifying a 'custom script' that inherits from this class. The [method post_import]-method receives the imported scene's root-node and returns the modified version of the scene
Imported scenes can be automatically modified right after import by setting their [i]Custom Script[/i] Import property to a [code]tool[/code] script that inherits from this class.
The [method post_import] callback receives the imported scene's root node and returns the modified version of the scene. Usage example:
[codeblock]
tool # needed so it runs in editor
extends EditorScenePostImport
# This sample changes all node names
# Called right after the scene is imported and gets the root node
func post_import(scene):
# change all node names to "modified_[oldnodename]"
iterate(scene)
return scene # remember to return the imported scene
func iterate(node):
if node != null:
node.name = "modified_"+node.name
for child in node.get_children():
iterate(child)
[/codeblock]
</description>
<tutorials>
<link>http://docs.godotengine.org/en/latest/learning/workflow/assets/importing_scenes.html?highlight=post%20import</link>
<link>http://docs.godotengine.org/en/latest/getting_started/workflow/assets/importing_scenes.html#custom-script</link>
</tutorials>
<demos>
[codeblock]
tool # needed so it runs in editor
extends EditorScenePostImport
# This sample changes all node names
# get called right after the scene is imported and gets the root-node
func post_import(scene):
# change all node names to "modified_[oldnodename]"
iterate(scene)
return scene # remember to return the imported scene
func iterate(node):
if node!=null:
node.name = "modified_"+node.name
for child in node.get_children():
iterate(child)
[/codeblock]
</demos>
<methods>
<method name="get_source_file" qualifiers="const">
<return type="String">
</return>
<description>
Returns the source-file-path which got imported (e.g. [code]res://scene.dae[/code] )
Returns the source file path which got imported (e.g. [code]res://scene.dae[/code]).
</description>
</method>
<method name="get_source_folder" qualifiers="const">
<return type="String">
</return>
<description>
Returns the resource-folder the imported scene-file is located in
Returns the resource folder the imported scene file is located in.
</description>
</method>
<method name="post_import" qualifiers="virtual">
@ -50,7 +51,7 @@ func iterate(node):
<argument index="0" name="scene" type="Object">
</argument>
<description>
Gets called after the scene got imported and has to return the modified version of the scene
Gets called after the scene got imported and has to return the modified version of the scene.
</description>
</method>
</methods>

View file

@ -488,7 +488,6 @@
</constant>
<constant name="FORMAT_RGB8" value="4" enum="Format">
OpenGL texture format RGB with three components, each with a bitdepth of 8. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed.
</constant>
<constant name="FORMAT_RGBA8" value="5" enum="Format">
OpenGL texture format RGBA with four components, each with a bitdepth of 8. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed.
@ -528,15 +527,12 @@
</constant>
<constant name="FORMAT_DXT1" value="17" enum="Format">
The S3TC texture format that uses Block Compression 1, and is the smallest variation of S3TC, only providing 1 bit of alpha and color data being premultiplied with alpha. More information can be found at https://www.khronos.org/opengl/wiki/S3_Texture_Compression. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed.
</constant>
<constant name="FORMAT_DXT3" value="18" enum="Format">
The S3TC texture format that uses Block Compression 2, and color data is interpreted as not having been premultiplied by alpha. Well suited for images with sharp alpha transitions between translucent and opaque areas. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed.
</constant>
<constant name="FORMAT_DXT5" value="19" enum="Format">
The S3TC texture format also known as Block Compression 3 or BC3 that contains 64 bits of alpha channel data followed by 64 bits of DXT1-encoded color data. Color data is not premultiplied by alpha, same as DXT3. DXT5 generally produces superior results for transparency gradients than DXT3. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed.
</constant>
<constant name="FORMAT_RGTC_R" value="20" enum="Format">
Texture format that uses Red Green Texture Compression, normalizing the red channel data using the same compression algorithm that DXT5 uses for the alpha channel. More information can be found here https://www.khronos.org/opengl/wiki/Red_Green_Texture_Compression.
@ -546,7 +542,6 @@
</constant>
<constant name="FORMAT_BPTC_RGBA" value="22" enum="Format">
Texture format that uses BPTC compression with unsigned normalized RGBA components. More information can be found at https://www.khronos.org/opengl/wiki/BPTC_Texture_Compression. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed.
</constant>
<constant name="FORMAT_BPTC_RGBF" value="23" enum="Format">
Texture format that uses BPTC compression with signed floating-point RGB components.
@ -556,7 +551,6 @@
</constant>
<constant name="FORMAT_PVRTC2" value="25" enum="Format">
Texture format used on PowerVR-supported mobile platforms, uses 2 bit color depth with no alpha. More information on PVRTC can be found here https://en.wikipedia.org/wiki/PVRTC. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed.
</constant>
<constant name="FORMAT_PVRTC2A" value="26" enum="Format">
Same as PVRTC2, but with an alpha component.
@ -584,15 +578,12 @@
</constant>
<constant name="FORMAT_ETC2_RGB8" value="34" enum="Format">
Ericsson Texture Compression format 2 variant RGB8, which is a followup of ETC1 and compresses RGB888 data. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed.
</constant>
<constant name="FORMAT_ETC2_RGBA8" value="35" enum="Format">
Ericsson Texture Compression format 2 variant RGBA8, which compresses RGBA8888 data with full alpha support. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed.
</constant>
<constant name="FORMAT_ETC2_RGB8A1" value="36" enum="Format">
Ericsson Texture Compression format 2 variant RGB8_PUNCHTHROUGH_ALPHA1, which compresses RGBA data to make alpha either fully transparent or fully opaque. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed.
</constant>
<constant name="FORMAT_MAX" value="37" enum="Format">
</constant>

View file

@ -4,9 +4,7 @@
Noise generator based on Open Simplex.
</brief_description>
<description>
This resource allows you to configure and sample a fractal noise space.
Here is a brief usage example that configures a SimplexNoise and gets samples at various positions and dimensions:
This resource allows you to configure and sample a fractal noise space. Here is a brief usage example that configures a SimplexNoise and gets samples at various positions and dimensions:
[codeblock]
var noise = SimplexNoise.new()
@ -102,8 +100,7 @@
<argument index="0" name="size" type="int">
</argument>
<description>
Generate a tileable noise image, based on the current noise parameters.
Generated seamless images are always square ([code]size[/code] x [code]size[/code]).
Generate a tileable noise image, based on the current noise parameters. Generated seamless images are always square ([code]size[/code] x [code]size[/code]).
</description>
</method>
</methods>
@ -115,12 +112,10 @@
Number of Simplex noise layers that are sampled to get the fractal noise.
</member>
<member name="period" type="float" setter="set_period" getter="get_period">
Period of the base octave.
A lower period results in a higher-frequency noise (more value changes across the same distance).
Period of the base octave. A lower period results in a higher-frequency noise (more value changes across the same distance).
</member>
<member name="persistence" type="float" setter="set_persistence" getter="get_persistence">
Contribution factor of the different octaves.
A [code]persistence[/code] value of 1 means all the octaves have the same contribution, a value of 0.5 means each octave contributes half as much as the previous one.
Contribution factor of the different octaves. A [code]persistence[/code] value of 1 means all the octaves have the same contribution, a value of 0.5 means each octave contributes half as much as the previous one.
</member>
<member name="seed" type="int" setter="set_seed" getter="get_seed">
Seed used to generate random values, different seeds will generate different noise maps.