Cocos Creator
手册文档
API 参考
Cocos Creator 3D
手册文档
API 参考
Cocos2d-x
手册文档
API 参考
Version: 1.2
Version: 1.0
Version: 1.1
Version: 1.2
Search
Preparing search index...
The search index is not available
Creator3dAPI
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Globals
terrain
TerrainBlock
Class TerrainBlock
地形块
Hierarchy
TerrainBlock
Index
Constructors
constructor
Properties
_index
_info
_lightmap
Info
_node
_renderable
_terrain
_weight
Map
Accessors
layers
lightmap
lightmapUVParam
Methods
get
Material
Defines
invalid
Material
update
Height
update
Lightmap
update
Material
update
Weight
Map
build
destroy
get
Index
get
Layer
get
Max
Layer
get
Rect
get
Terrain
rebuild
set
Brush
Material
set
Layer
update
Constructors
constructor
new
Terrain
Block
(
t
:
Terrain
, i
:
number
, j
:
number
)
:
TerrainBlock
Parameters
t:
Terrain
i:
number
j:
number
Returns
TerrainBlock
Properties
Private
_index
_index
:
number
[]
= [1, 1]
Private
_info
_info
:
TerrainBlockInfo
Private
_lightmap
Info
_lightmap
Info
:
TerrainBlockLightmapInfo
|
null
= null
Private
_node
_node
:
PrivateNode
Private
_renderable
_renderable
:
TerrainRenderable
Private
_terrain
_terrain
:
Terrain
Private
_weight
Map
_weight
Map
:
Texture2D
|
null
= null
Accessors
layers
get
layers
(
)
:
number
[]
获得纹理层索引
Returns
number
[]
lightmap
get
lightmap
(
)
:
null
|
Texture2D
获得光照图
Returns
null
|
Texture2D
lightmapUVParam
get
lightmapUVParam
(
)
:
Vec4
获得光照图纹理坐标参数
Returns
Vec4
Methods
get
Material
Defines
get
Material
Defines
(
nlayers
:
number
)
:
MacroRecord
Parameters
nlayers:
number
Returns
MacroRecord
invalid
Material
_invalid
Material
(
)
:
void
Returns
void
update
Height
_update
Height
(
)
:
void
Returns
void
update
Lightmap
update
Lightmap
(
info
:
TerrainBlockLightmapInfo
)
:
void
Parameters
info:
TerrainBlockLightmapInfo
Returns
void
update
Material
update
Material
(
init
:
boolean
)
:
void
Parameters
init:
boolean
Returns
void
update
Weight
Map
_update
Weight
Map
(
)
:
void
Returns
void
build
build
(
)
:
void
Returns
void
destroy
destroy
(
)
:
void
Returns
void
get
Index
get
Index
(
)
:
number
[]
获得地形索引
Returns
number
[]
get
Layer
get
Layer
(
index
:
number
)
:
number
获得纹理层
Parameters
index:
number
Returns
number
get
Max
Layer
get
Max
Layer
(
)
:
1
|
0
|
2
|
3
获得最大纹理索引
Returns
1
|
0
|
2
|
3
get
Rect
get
Rect
(
)
:
Rect
获得地形矩形包围体
Returns
Rect
get
Terrain
get
Terrain
(
)
:
Terrain
获得地形对象
Returns
Terrain
rebuild
rebuild
(
)
:
void
Returns
void
set
Brush
Material
set
Brush
Material
(
mtl
:
Material
|
null
)
:
void
Parameters
mtl:
Material
|
null
Returns
void
set
Layer
set
Layer
(
index
:
number
, layerId
:
number
)
:
void
设置纹理层
Parameters
index:
number
layerId:
number
Returns
void
update
update
(
)
:
void
Returns
void
Globals
terrain
Height
Field
Terrain
Terrain
Asset
Terrain
Block
constructor
_index
_info
_lightmap
Info
_node
_renderable
_terrain
_weight
Map
layers
lightmap
lightmapUVParam
get
Material
Defines
invalid
Material
update
Height
update
Lightmap
update
Material
update
Weight
Map
build
destroy
get
Index
get
Layer
get
Max
Layer
get
Rect
get
Terrain
rebuild
set
Brush
Material
set
Layer
update
Terrain
Block
Info
Terrain
Block
Lightmap
Info
Terrain
Buffer
Terrain
Info
Terrain
Layer
Terrain
Layer
Info
Terrain
Renderable
TERRAIN_
BLOCK_
TILE_
COMPLEXITY
TERRAIN_
BLOCK_
VERTEX_
COMPLEXITY
TERRAIN_
BLOCK_
VERTEX_
SIZE
TERRAIN_
DATA_
VERSION
TERRAIN_
DATA_
VERSION2
TERRAIN_
DATA_
VERSION3
TERRAIN_
DATA_
VERSION_
DEFAULT
TERRAIN_
EAST_
INDEX
TERRAIN_
HEIGHT_
BASE
TERRAIN_
HEIGHT_
FACTORY
TERRAIN_
HEIGHT_
FMAX
TERRAIN_
HEIGHT_
FMIN
TERRAIN_
MAX_
BLEND_
LAYERS
TERRAIN_
MAX_
LAYER_
COUNT
TERRAIN_
MAX_
LEVELS
TERRAIN_
NORTH_
INDEX
TERRAIN_
SOUTH_
INDEX
TERRAIN_
WEST_
INDEX
Generated using
TypeDoc
地形块