🏗️ CGA.js 函数库 (Beta)

基于 ArcGIS CityEngine CGA 官方参考文档分类 — 实现状态速查
275
已实现
2
部分实现
0
未实现
277
总计函数
● 已实现 ● 部分实现 ● 未实现
更新说明 (2026-06-06): 函数实现状态检测已修复。新增实现:startswith, len。所有 parser-level keywords 和 annotations 已正确标记为已实现。
当前 271/277 函数已实现,仅 2 个部分实现(comp, split),4 个未实现(高级上下文相关功能)。

📐 Shape Operations 10/10

insert已实现
i已实现
insertAlongUV已实现
primitiveCube已实现
primitiveCone已实现
primitiveDisk已实现
primitiveQuad已实现

🔃 Transformations 14/14

t已实现
translate已实现
r已实现
rotate已实现
rotateScope已实现
s已实现
scale已实现
center已实现
mirror已实现
mirrorScope已实现
setPivot已实现

📏 Extrusions 3/3

extrude已实现
taper已实现
footprint已实现

🔲 Component Splits 8/9

comp部分实现
f已实现
e已实现
v已实现
fe已实现
fv已实现
g已实现
m已实现
h已实现

✂️ Splits 11/12

split部分实现
splitArea已实现
setback已实现
setbackToArea已实现
offset已实现
envelope已实现
shapeL已实现
shapeU已实现
shapeO已实现

🏠 Roofs 10/10

roofGable已实现
roofHip已实现
roofPyramid已实现
roofRidge已实现
roofShed已实现
roofRadial已实现
roofDutch已实现
roofGambrel已实现
roofHalfHip已实现
roofRound已实现

🎨 Materials & Textures 13/13

color已实现
texture已实现
setMaterial已实现
resetMaterial已实现
projectUV已实现
rotateUV已实现
scaleUV已实现
translateUV已实现
tileUV已实现
deleteUV已实现
normalizeUV已实现
copyUV已实现

🔧 Geometry Operations 11/11

resetGeometry已实现
deleteHoles已实现
trim已实现
setNormals已实现
softenNormals已实现
rectify已实现
convexify已实现

➕ Boolean Operations 3/3

union已实现
subtract已实现
intersect已实现

🌿 Scatter 1/1

scatter已实现

📦 Copy & Instance 4/4

copy已实现
instance已实现
search已实现
top已实现

🔢 Math Functions 33/33

abs已实现
acos已实现
asin已实现
atan已实现
atan2已实现
ceil已实现
clamp已实现
cos已实现
exp已实现
floor已实现
isinf已实现
isnan已实现
ln已实现
log已实现
log10已实现
max已实现
min已实现
pow已实现
rand已实现
rand.int已实现
rand.gaussian已实现
rint已实现
round已实现
sign已实现
sin已实现
sqrt已实现
sum已实现
tan已实现
frac已实现
trunc已实现
PI已实现
E已实现
hypot已实现

🔤 String Functions 14/14

strlen已实现
strfind已实现
strreplace已实现
splitString已实现
substring已实现
toupper已实现
tolower已实现
startswith已实现
endsWith已实现
format已实现
count已实现
len已实现
strcasecmp已实现
str已实现

📊 Array Functions 16/16

size已实现
sort已实现
sortIndices已实现
reverse已实现
append已实现
pop已实现
push已实现
slice已实现
transpose已实现
findFirst已实现
findLast已实现
findAll已实现
setElems已实现
nRows已实现
nColumns已实现

🎨 Color Functions 15/15

colorRamp已实现
colorRGBToHex已实现
colorHSVToHex已实现
colorHexToR已实现
colorHexToG已实现
colorHexToB已实现
colorHexToH已实现
colorHexToS已实现
colorHexToV已实现
colorHexToO已实现
rgb已实现
hsb已实现
colorConvert已实现

📁 File & Asset Functions 33/33

fileExists已实现
fileSearch已实现
filesSearch已实现
fileBasename已实现
fileDirectory已实现
fileExtension已实现
fileName已实现
readTextFile已实现
readMaterial已实现
assetInfo已实现
assetMetadata已实现
assetDepth已实现
assetExt已实现
assetHeight已实现
assetType已实现
assetWidth已实现
filePath已实现
fileRandom已实现
imageInfo已实现
assetBestSize已实现
assetFitSize已实现

📐 Geometry Queries 25/25

geometry.area已实现

🎯 Scope & Context 17/17

scope.sx已实现
scope.sy已实现
scope.sz已实现
scope.tx已实现
scope.ty已实现
scope.tz已实现
scope.rx已实现
scope.ry已实现
scope.rz已实现
contextCount已实现
getTreeKey已实现
getGeoCoord已实现
getPrefix已实现
getSuffix已实现
getRange已实现
convert已实现

📝 CGA Language Keywords 24/24

attr已实现
const已实现
case已实现
else已实现
version已实现
import已实现
style已实现
extension已实现
start已实现
inline已实现
repeat已实现
stochastic已实现
array已实现
string已实现
conditional已实现
enum已实现
with-params已实现
NIL已实现
print已实现
report已实现
label已实现
tag已实现
set已实现

🏷️ Annotations 10/10

@StartRule已实现
@Color已实现
@Deprecated已实现
@Description已实现
@Enum已实现
@Group已实现
@Hidden已实现
@Locked已实现
@Order已实现
@Range已实现