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 sp3 = new Sprite ( ) ; Laya . stage . addChild ( sp3 ) ; sp3 . pos ( 100 , 100 ) ; var sp4 = new Sprite ( ) ; sp3 . addChild ( sp4 ) ; sp4 . cacheAs = 'normal' ; var sp5 = new Sprite ( ) ; sp4 . addChild ( sp5 ) ; sp4 . graphics . clipRect ( 0 , 0 , 20 , 20 ) ; sp5 . graphics . drawRect ( 0 , 0 , 100 , 100 , 'red' ) ; await delay ( 10 ) ; ( window as any ) . testEnd = true ; } } new Main ( ) ;