use javascript to pause execution in canvas code example Example: js add delay await new Promise(resolve => setTimeout(resolve, 1000));