File tree Expand file tree Collapse file tree
packages/dev/babylonjs/lib/api Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ export class Draw extends DrawCore {
4949 * @group draw async
5050 * @shortname draw async void
5151 * @disposableOutput true
52+ * @drawable true
5253 */
5354 async drawAnyAsyncNoReturn ( inputs : Inputs . Draw . DrawAny ) : Promise < void > {
5455 this . drawAnyAsync ( inputs ) ;
@@ -60,6 +61,7 @@ export class Draw extends DrawCore {
6061 * @returns BabylonJS Mesh Promise
6162 * @group draw async
6263 * @shortname draw async
64+ * @drawable true
6365 * @disposableOutput true
6466 */
6567 async drawAnyAsync ( inputs : Inputs . Draw . DrawAny ) : Promise < BABYLON . Mesh > {
Original file line number Diff line number Diff line change @@ -362,11 +362,13 @@ export class DrawHelper extends DrawHelperCore {
362362 } ,
363363 {
364364 width,
365+ materialType : BABYLON . GreasedLineMeshMaterialType . MATERIAL_TYPE_PBR ,
365366 color,
366-
367+ createAndAssignMaterial : true ,
367368 } ,
368369 this . context . scene
369370 ) ;
371+ ( result . material as BABYLON . PBRMaterial ) . albedoColor = color ;
370372 result . material . alpha = visibility ;
371373 return result as BABYLON . GreasedLineMesh ;
372374 }
You can’t perform that action at this time.
0 commit comments