Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

88
Views
¿Hay alguna forma sencilla de ejecutar rutinas en js sin usar una biblioteca de terceros?

Intentando hacer algo similar a https://doc.babylonjs.com/divingDeeper/events/coroutines de Babylon.js

 const spawnMeshesCoroutine = function* () { spawnTheFirstMesh(); yield; spawnTheSecondMesh(); yield; spawnTheThirdMesh(); }; scene.onBeforeRenderObservable.runCoroutineAsync(spawnMeshesCoroutine());

Pero me pregunto si hay ejemplos simples de JS para ejecutar una rutina más simple que pueda manejar algunas tareas costosas en JS sin bloquear la interfaz de usuario.

Un experimento con "tareas costosas": buscando soluciones para habilitar la interfaz de usuario de sugerencia automática de 60 fps sin bloqueo para reaccionar

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Una forma de ejecutar una función en múltiples bucles de eventos es:

 async function spawnFirstMeshAsync() { return spawnFirstMesh(); } async function spawnSecondMeshAsync() { return spawnSecondMesh(); } async function spawnThirdMeshAsync() { return spawnThirdMesh(); } async function spawnMeshes() { await spawnFirstMesh(); await spawnSecondMesh(); await spawnThirdMesh(); }

En términos de sincronización con marcos como lo hace Babylon.js, consulte requestAnimationFrame .

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!