+ | grid : uint |
每个tile中的grid数 |
+ | gridSize : uint |
每个grid的大小 |
+ | hasLogicHeight : bool |
是否存在逻辑地表 |
+ | l : uint |
地形长 |
+ | lightenColor1 : uint |
地形光颜色1 |
+ | lightenColor2 : uint |
地形光颜色2 |
+ | lightenVector : _Vector3 |
地形光的向量 |
+ | scale / tileSize : uint |
每个tile的大小 |
+ | shadowColor : uint |
地形阴影色 |
+ | tileX : uint |
地形x坐标上的tile数 |
+ | tileY : uint |
地形y坐标上的tile数 |
+ | w : uint |
地形宽 |
+ | alphaGrid : uint |
地形的纹理混合密度 |
+ | heightLayer : uint |
地形获取高度时使用的层 |
+ | lightMapColor : uint |
用来设置地表光照贴图的基础颜色 |
+ | lightMapGrid : uint |
类似 alphaGrid 用来设置地表光照贴图的尺寸,取值范围为 16-256。推荐用较低的 alphaGrid 和较高的 lightMapGrid,来达到效果和存储空间的平衡。 |
+ | name : string |
地形的逻辑名 |
+ | resname : string |
地形的资源名,修改会加载新资源 |
+ | showHiddenTile : bool |
是否显示隐藏的地表块 |
+ | useNormalMaps : bool |
是否使用地表法线,需要地表贴图有对应的-normal贴图。 |
+ | useSpeculars : bool |
是否使用地表高光。 |
+ | function balance(img : _Image, x : float, y : float, size) |
平衡地形高度
|
+ | function brushTexture(img : _Image, x : float, y : float, size : float, power : float, tex : _Image, [height : float], [isDelTexture : bool]) |
刷入贴图
|
用地形构建decal
|
+ | function clearHeightLayer() |
清除逻辑地表 |
+ | function clearHiddenTiles( ) |
清除所有Tile块的隐藏设置 |
+ | function delTexture(img:_Image) |
删除地形上一层纹理的功能。
|
+ | function draw() / drawTerrain() |
绘制地形 |
+ | function drawLayer(color : uint) |
绘制纹理回合信息
|
+ | function flatten(img:_Image, x:float, y:float, size:float, scale:float) |
整平地表。 |
+ | function getHeight(x, y) : number |
获取场景中某一点的地形高度
|
+ | function getShadowColor(x, y) : number |
获取场景中某一点的阴影颜色
|
+ | function getTile(x:float, y:float) |
获取坐标所在的tile。 |
+ | function getTileRect(x : float, y : float[, out : _Rect]) |
得到x和y对应的第n个tile的rect。 |
+ | function isTileVisible( x : float, y : float ) |
判断Tile块是否显示 ,返回布尔值
|
+ | function modify(img :_Image, x :float, y :float, size :float, scale :float, limit :float) |
修改地形高度
|
+ | function modifyByPick(img:_Image, x:float, y:float, size:float, callback : function) |
修改高度并回调。
|
+ | function save(filename : string) |
|
+ | function set(t : _Terrain) |
拷贝函数 |
+ | function showTile( x : float, y : float, show : bool ) |
Tile块显示或隐藏
|
+ | function smooth(img : _Image, x : float, y : float, size : float, power : float) |
把img作为地形刷,在xy指定的坐标,size为大小,power为强度 |
+ | function smoothColor() |
纹理平滑化 |