Cocos Creator
手册文档
API 参考
Cocos Creator 3D
手册文档
API 参考
Cocos2d-x
手册文档
API 参考
AnySDK
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
_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
_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
)
:
IDefineMap
Parameters
nlayers:
number
Returns
IDefineMap
invalid
Material
_invalid
Material
(
)
:
void
Returns
void
update
Height
_update
Height
(
)
:
void
Returns
void
update
Lightmap
update
Lightmap
(
tex
:
Texture2D
|
null
, uoff
:
number
, voff
:
number
, uscale
:
number
, vscale
:
number
)
:
void
Parameters
tex:
Texture2D
|
null
uoff:
number
voff:
number
uscale:
number
vscale:
number
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
_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
Buffer
Terrain
Info
Terrain
Layer
Terrain
Layer
Info
Terrain
Renderable
Terrain
Vertex
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_
MAX_
BLEND_
LAYERS
TERRAIN_
MAX_
LAYER_
COUNT
TERRAIN_
MAX_
LEVELS
TERRAIN_
NORTH_
INDEX
TERRAIN_
SOUTH_
INDEX
TERRAIN_
WEST_
INDEX
Generated using
TypeDoc