computer-science.hashnode.devNetwork Address TranslationIn networking, NAT stands for Network Address Translation. It’s a method used by routers to translate private (local) IP addresses into a public IP address (and vice versa) when data is going to or coming from the internet. Why NAT is used: IP addre...Jun 6, 2025·1 min read
computer-science.hashnode.devyou’re building a Babylon.js scene and using await scene.whenReadyAsync() and currentScene.dispose(). Let’s break down what those lines mean🔍 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🧠 What does new do in JavaScript?The new keyword is used to create a new instance of an object or class. When you write: const scene = new Scene(engine); You are telling JavaScript: “Hey, create a new Scene object, and use the Scene constructor function to set it up.” . 🔍 Why...Apr 17, 2025·1 min read
computer-science.hashnode.devconst { Vector3, MeshBuilder, StandardMaterial, FreeCamera, HemisphericLight } = BABYLON;Nice! That line: const { Vector3, MeshBuilder, StandardMaterial, FreeCamera, HemisphericLight } = BABYLON; is using object destructuring to pull out specific classes from the BABYLON namespace, which makes your code shorter and cleaner. ✅ What this...Apr 16, 2025·1 min read
computer-science.hashnode.devSync vs Async – The Core DifferenceAn async function in JavaScript is a special kind of function that lets you write asynchronous code (like API calls or timers) in a clean, readable way — using await. 🧠 Basic Idea: An async function always returns a Promise, even if you don’t expli...Apr 16, 2025·3 min read