---
title: "Discussion on \"you’re building a Babylon.js scene and using await scene.whenReadyAsync() and currentScene.dispose(). Let’s break down what those lines mean\" | Hashnode"
description: "Discussion on \"you’re building a Babylon.js scene and using await scene.whenReadyAsync() and currentScene.dispose(). Let’s break down what those lines mean\". 🔍 Code Breakdown:\nconst scene = new Scene(engine);\n\nconst cam = new FreeCamera(\"camera\", new Vector3(0, 0, -5), scene);\n\nconst box = MeshBuilder.CreateBox(\"box\", { size: 1.5 }, scene);\n\nawait scene.whenReadyAsync();\ncurrentScene.dispose();\n\nreturn s..."
url: "https://hashnode.com/posts/youre-building-a-babylonjs-scene-and-using-await-scenewhenreadyasync-and-currentscenedispose-lets-break-down-what-those-lines-mean/6800c6de41879a6979348467"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [you’re building a Babylon.js scene and using await scene.whenReadyAsync() and currentScene.dispose(). Let’s break down what those lines mean](https://computer-science.hashnode.dev/youre-building-a-babylonjs-scene-and-using-await-scenewhenreadyasync-and-currentscenedispose-lets-break-down-what-those-lines-mean?utm_source=hashnode&utm_medium=feed)

🔍 Code Breakdown: const scene = new Scene(engine); const cam = new FreeCamera("camera", new Vector3(0, 0, -5), scene); const box = MeshBuilder.CreateBox("box", { size: 1.5 }, scene); await scene.whenReadyAsync(); currentScene.dispose(); return s...

Apr 17, 2025 · 1 min read · computer-science.hashnode.dev  
Read the article

-   [#babylonjs](https://hashnode.com/tag/babylonjs)

## Written by

[Godson Prakasia](https://hashnode.com/@gp11)

@gp11

  
[View profile](https://hashnode.com/@gp11)

computer science

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
