Mesh2DAPI
此内容尚不支持你的语言。
Defined in: mesh2d.ts:26
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Mesh2DAPI(
module_,registry_):Mesh2DAPI
Defined in: mesh2d.ts:30
Parameters
Section titled “Parameters”module_
Section titled “module_”NonNullable<EngineApi>
Whichever engine core is present (see ecs/engineApi.ts).
registry_
Section titled “registry_”Returns
Section titled “Returns”Mesh2DAPI
Methods
Section titled “Methods”clearGeometry()
Section titled “clearGeometry()”clearGeometry(
entity):void
Defined in: mesh2d.ts:86
Clear an entity’s mesh geometry (a valid state: the mesh renders nothing).
Parameters
Section titled “Parameters”entity
Section titled “entity”number
Returns
Section titled “Returns”void
getGeometry()
Section titled “getGeometry()”getGeometry(
entity):Mesh2DGeometry|undefined
Defined in: mesh2d.ts:92
The last geometry uploaded for this entity (scene-export source).
Parameters
Section titled “Parameters”entity
Section titled “entity”number
Returns
Section titled “Returns”Mesh2DGeometry | undefined
setGeometry()
Section titled “setGeometry()”setGeometry(
entity,geometry):void
Defined in: mesh2d.ts:41
Upload geometry for an entity’s Mesh2D component. Positions are x,y pairs in component-local space; uvs default to 0,0 (untextured meshes render vertex colors on the white texture); colors are r,g,b,a floats per vertex.
Parameters
Section titled “Parameters”entity
Section titled “entity”number
geometry
Section titled “geometry”Returns
Section titled “Returns”void