:github_url: hide .. _class_VisualShaderNodeUVFunc: VisualShaderNodeUVFunc ====================== **继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 包含一些用于修改纹理坐标(\ ``uv``\ )的函数,在可视化着色器图中使用。 .. rst-class:: classref-introduction-group 描述 ---- UV 函数与 :ref:`Vector2` 函数类似,但这个节点的输入端口默认使用着色器的 UV 值。 .. rst-class:: classref-reftable-group 属性 ---- .. table:: :widths: auto +-------------------------------------------------------+-----------------------------------------------------------------+-------+ | :ref:`Function` | :ref:`function` | ``0`` | +-------------------------------------------------------+-----------------------------------------------------------------+-------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group 枚举 ---- .. _enum_VisualShaderNodeUVFunc_Function: .. rst-class:: classref-enumeration enum **Function**: :ref:`🔗` .. _class_VisualShaderNodeUVFunc_constant_FUNC_PANNING: .. rst-class:: classref-enumeration-constant :ref:`Function` **FUNC_PANNING** = ``0`` 使用 ``scale`` 和 ``offset`` 值对 ``uv`` 进行平移,使用的公式如下:\ ``uv = uv + offset * scale``\ 。\ ``uv`` 端口默认连接至内置的 ``UV``\ 。 .. _class_VisualShaderNodeUVFunc_constant_FUNC_SCALING: .. rst-class:: classref-enumeration-constant :ref:`Function` **FUNC_SCALING** = ``1`` 使用 ``scale`` 和 ``pivot`` 值对 ``uv`` 进行缩放,使用的公式如下:\ ``uv = (uv - pivot) * scale + pivot``\ 。\ ``uv`` 端口默认连接至内置的 ``UV``\ 。 .. _class_VisualShaderNodeUVFunc_constant_FUNC_MAX: .. rst-class:: classref-enumeration-constant :ref:`Function` **FUNC_MAX** = ``2`` 代表 :ref:`Function` 枚举的大小。 .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group 属性说明 -------- .. _class_VisualShaderNodeUVFunc_property_function: .. rst-class:: classref-property :ref:`Function` **function** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_function**\ (\ value\: :ref:`Function`\ ) - :ref:`Function` **get_function**\ (\ ) 要对纹理坐标应用的函数。 .. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (本方法无副作用,不会修改该实例的任何成员变量。)` .. |vararg| replace:: :abbr:`vararg (本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。)` .. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` .. |static| replace:: :abbr:`static (调用本方法无需实例,可直接使用类名进行调用。)` .. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效运算符。)` .. |bitfield| replace:: :abbr:`BitField (这个值是由下列位标志构成位掩码的整数。)` .. |void| replace:: :abbr:`void (无返回值。)`