← 返回函数库

translateUV

3D Texturing UV 已实现

CityEngine 官方语法

translateUV(uvSet, u, v)

参数说明

参数类型默认值说明
uvSetint0UV 集编号。
u, vfloatUV 平移量。

描述

平移指定 UV 集的坐标。常用于调整纹理的位置。

官方示例

平移 UV:

Wall --> translateUV(0, 0.5, 0)

实现说明

CGA.js 中的 translateUV 实现基于 CityEngine 2025.1 官方文档。

🎨 3D 预览 — 平移 UV

@StartRule\nLot --> primitiveCube(4, 4, 4)\n        setupProjection(0, scope.xy, 2, 2)\n        projectUV(0)\n        translateUV(0, 0.5, 0)\n        color(0.7, 0.7, 0.8)