mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 13:41:03 +00:00 
			
		
		
		
	 c8859f0463
			
		
	
	
		c8859f0463
		
			
		
	
	
	
	
		
			
			Using codespell 1.17.1. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang curvelinear dof doubleclick fave findn leapyear lod merchantibility nd numer ois ony que seeked synching te uint unselect webp EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
		
			
				
	
	
		
			117 lines
		
	
	
	
		
			4.6 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
			
		
		
	
	
			117 lines
		
	
	
	
		
			4.6 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
| <?xml version="1.0" encoding="UTF-8" ?>
 | |
| <class name="TextureLayered" inherits="Resource" version="3.2">
 | |
| 	<brief_description>
 | |
| 		Base class for 3D texture types.
 | |
| 	</brief_description>
 | |
| 	<description>
 | |
| 		Base class for [Texture3D] and [TextureArray]. Cannot be used directly, but contains all the functions necessary for accessing and using [Texture3D] and [TextureArray]. Data is set on a per-layer basis. For [Texture3D]s, the layer specifies the depth or Z-index, they can be treated as a bunch of 2D slices. Similarly, for [TextureArray]s, the layer specifies the array layer.
 | |
| 	</description>
 | |
| 	<tutorials>
 | |
| 	</tutorials>
 | |
| 	<methods>
 | |
| 		<method name="create">
 | |
| 			<return type="void">
 | |
| 			</return>
 | |
| 			<argument index="0" name="width" type="int">
 | |
| 			</argument>
 | |
| 			<argument index="1" name="height" type="int">
 | |
| 			</argument>
 | |
| 			<argument index="2" name="depth" type="int">
 | |
| 			</argument>
 | |
| 			<argument index="3" name="format" type="int" enum="Image.Format">
 | |
| 			</argument>
 | |
| 			<argument index="4" name="flags" type="int" default="4">
 | |
| 			</argument>
 | |
| 			<description>
 | |
| 				Creates the [Texture3D] or [TextureArray] with specified [code]width[/code], [code]height[/code], and [code]depth[/code]. See [enum Image.Format] for [code]format[/code] options. See [enum Flags] enumerator for [code]flags[/code] options.
 | |
| 			</description>
 | |
| 		</method>
 | |
| 		<method name="get_depth" qualifiers="const">
 | |
| 			<return type="int">
 | |
| 			</return>
 | |
| 			<description>
 | |
| 				Returns the depth of the texture. Depth is the 3rd dimension (typically Z-axis).
 | |
| 			</description>
 | |
| 		</method>
 | |
| 		<method name="get_format" qualifiers="const">
 | |
| 			<return type="int" enum="Image.Format">
 | |
| 			</return>
 | |
| 			<description>
 | |
| 				Returns the current format being used by this texture. See [enum Image.Format] for details.
 | |
| 			</description>
 | |
| 		</method>
 | |
| 		<method name="get_height" qualifiers="const">
 | |
| 			<return type="int">
 | |
| 			</return>
 | |
| 			<description>
 | |
| 				Returns the height of the texture. Height is typically represented by the Y-axis.
 | |
| 			</description>
 | |
| 		</method>
 | |
| 		<method name="get_layer_data" qualifiers="const">
 | |
| 			<return type="Image">
 | |
| 			</return>
 | |
| 			<argument index="0" name="layer" type="int">
 | |
| 			</argument>
 | |
| 			<description>
 | |
| 				Returns an [Image] resource with the data from specified [code]layer[/code].
 | |
| 			</description>
 | |
| 		</method>
 | |
| 		<method name="get_width" qualifiers="const">
 | |
| 			<return type="int">
 | |
| 			</return>
 | |
| 			<description>
 | |
| 				Returns the width of the texture. Width is typically represented by the X-axis.
 | |
| 			</description>
 | |
| 		</method>
 | |
| 		<method name="set_data_partial">
 | |
| 			<return type="void">
 | |
| 			</return>
 | |
| 			<argument index="0" name="image" type="Image">
 | |
| 			</argument>
 | |
| 			<argument index="1" name="x_offset" type="int">
 | |
| 			</argument>
 | |
| 			<argument index="2" name="y_offset" type="int">
 | |
| 			</argument>
 | |
| 			<argument index="3" name="layer" type="int">
 | |
| 			</argument>
 | |
| 			<argument index="4" name="mipmap" type="int" default="0">
 | |
| 			</argument>
 | |
| 			<description>
 | |
| 				Partially sets the data for a specified [code]layer[/code] by overwriting using the data of the specified [code]image[/code]. [code]x_offset[/code] and [code]y_offset[/code] determine where the [Image] is "stamped" over the texture. The [code]image[/code] must fit within the texture.
 | |
| 			</description>
 | |
| 		</method>
 | |
| 		<method name="set_layer_data">
 | |
| 			<return type="void">
 | |
| 			</return>
 | |
| 			<argument index="0" name="image" type="Image">
 | |
| 			</argument>
 | |
| 			<argument index="1" name="layer" type="int">
 | |
| 			</argument>
 | |
| 			<description>
 | |
| 				Sets the data for the specified layer. Data takes the form of a 2-dimensional [Image] resource.
 | |
| 			</description>
 | |
| 		</method>
 | |
| 	</methods>
 | |
| 	<members>
 | |
| 		<member name="data" type="Dictionary" setter="_set_data" getter="_get_data" default="{"depth": 0,"flags": 4,"format": 37,"height": 0,"layers": [  ],"width": 0}">
 | |
| 			Returns a dictionary with all the data used by this texture.
 | |
| 		</member>
 | |
| 		<member name="flags" type="int" setter="set_flags" getter="get_flags" default="4">
 | |
| 			Specifies which [enum Flags] apply to this texture.
 | |
| 		</member>
 | |
| 	</members>
 | |
| 	<constants>
 | |
| 		<constant name="FLAG_MIPMAPS" value="1" enum="Flags">
 | |
| 			Texture will generate mipmaps on creation.
 | |
| 		</constant>
 | |
| 		<constant name="FLAG_REPEAT" value="2" enum="Flags">
 | |
| 			Texture will repeat when UV used is outside the 0-1 range.
 | |
| 		</constant>
 | |
| 		<constant name="FLAG_FILTER" value="4" enum="Flags">
 | |
| 			Use filtering when reading from texture. Filtering smooths out pixels. Turning filtering off is slightly faster and more appropriate when you need access to individual pixels.
 | |
| 		</constant>
 | |
| 		<constant name="FLAGS_DEFAULT" value="4" enum="Flags">
 | |
| 			Equivalent to [constant FLAG_FILTER].
 | |
| 		</constant>
 | |
| 	</constants>
 | |
| </class>
 |