Premium Only Content
Rogue Engine - Component Basics - In Two Minutes
Components in Rogue Engine enable you to add code to objects in your scene.
The Rogue Engine framework is built on top of the Three.js library. Any object in a Rogue scene can have code attached to it to use the power of Three.js. These bits of code are called components.
Here is a very simple example of a Rogue Engine component.
You can use the default cube for this example.
First right click in the Assets panel and create a new component. Components can be javascript or typescript. We will use typescript. Give it a name and confirm.
That will create a blank component in the asset panel.
If you double click this icon it will open up in your default code editor. If you don't have one installed I would recommend downloading Visual Studio Code from Microsoft.
The blank component already has somethings set up. All components import the Rogue Engine
The component already has its class Export set up and three methods, awake, start and update. For this example we just need the update method.
We are going to rotate the cube in the scene so in the update method that runs each time the screen updates, we can write this.object3d.rotateY and then give it an angle.
This is fine but we don't know how fast the scene is updating so if we want to keep the rotation consistent whatever speed the scene is running, we can ask Rogue how long since the last update and use that value.
We get this delta value by reading RE.Runtime.deltaTime.
So that's our code - save it and go back to the Rogue Editor.
If we run our scene without the component attached to the cube, nothing happens. But if we add the component to the cube by dragging and dropping it and then run the scene, you will see that the cube rotates smoothly.
So that's how you add a basic component to an object in Rogue Engine.
-
27:49
Jasmin Laine
16 hours agoDanielle Smith WARNS: “A Decade Of LIES”—U.S. Fallout Backfires BADLY
25.9K28 -
LIVE
Joe Donuts Live
2 hours ago🟢 Black Ops 7 AR Grind Begins | Dropzone Sundays
345 watching -
LIVE
Reidboyy
16 hours ago $1.64 earned24/7 BO7 Camo Grind! Stream Doesn't End Until I Unlock EVERY Camo in Black Ops 7!
209 watching -
17:04
T-SPLY
16 hours agoCongresswoman DENIED By Judge To Drop Federal Assault Charges!
5.47K12 -
LIVE
Wahzdee
2 hours agoTHE "I WON'T QUIT" STREAM... FAILED | Tarkov 1.0 Broke Me | Playing Liar's Bar
109 watching -
10:46
China Uncensored
17 hours agoHasan Piker Finds Out the Hard Way...
10.2K20 -
59:40
American Thought Leaders
14 hours agoHe Said No to Billions from China. Now They’re After Him | Declan Ganley
6.68K6 -
4:58
GreenMan Studio
13 hours agoTHE RUMBLE COLLAB SHOW EP.4 W/Greenman Reports
6.76K2 -
8:05
Freedom Frontline
16 hours agoAOC DISRESPECTS Byron Donalds And Gets DESTROYED Immediately
6.24K2 -
11:53
GBGunsRumble
14 hours agoGBGuns Range Report 15NOV25
5.93K2