← 返回函数库

s

Transformations Scope 已实现

CityEngine 官方语法

s(sx, sy, sz)

参数说明

参数类型默认值说明
sx, sy, szfloat沿 scope X/Y/Z 轴的缩放因子。

描述

缩放当前形状的 scope。等价于 scale(sx, sy, sz)。缩放会改变几何体的尺寸,顶点坐标会按 scope 轴方向缩放。

s 是 scale 的缩写形式,功能完全相同。

官方示例

将建筑高度翻倍:

Mass --> s(1, 2, 1) Tall

实现说明

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

🎨 3D 预览 — 缩放

@StartRule\nLot --> primitiveCube(4, 4, 4)\n        s(1, 2, 1)\n        color(0.5, 1, 0.5)