import { delay } from './delay.js' ; import { Laya } from 'Laya.js' ; import { Sprite } from 'laya/display/Sprite.js' ; class Main { constructor ( ) { Laya . init ( 800 , 600 ) ; Laya . stage . screenMode = 'none' ; this . test1 ( ) ; } /**
     */ async test1 ( ) { var sp = new Sprite ( ) ; sp . graphics . drawPoly ( 10 , 10 , [ 0 , 0 , 60 , 0 , 60 , 50 ] , "#ffff00" ) ; sp . graphics . drawPath ( 100 , 100 , [ [ "moveTo" , 0 , 0 ] , [ "lineTo" , 100 , 0 ] , [ "lineTo" , 100 , 50 ] , [ "lineTo" , 0 , 50 ] , [ "lineTo" , 0 , 5 ] , [ "arcTo" , 0 , 0 , 5 , 0 , 5 ] , [ "closePath" ] ] , { fillStyle : "#00ffff" } ) ; Laya . stage . addChild ( sp ) ; await delay ( 10 ) ; ( window as any ) . testEnd = true ; } } new Main ( ) ;