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.
-
8:00:02
SpartakusLIVE
18 hours agoFIRST Pick of the Fourth Round for the $100,000 Tournament
77.2K2 -
1:35:07
Man in America
21 hours agoPeptides: Ultimate Health Hack… or Big Pharma Gila Monster POISON? w/ Dr. Diane Kazer
113K48 -
LIVE
Biscotti-B23
2 hours ago $1.31 earned🔴 LIVE EARLY ACCESS RANKED GRIND ⚽ THE BEST FOOTBALL GAME OUT 💥 REMATCH
116 watching -
16:18
Mrgunsngear
11 hours ago $21.88 earnedBlack Aces Tactical S4 Tactical - Benelli M4 Clone But Does It Work?
102K4 -
32:55
The Connect: With Johnny Mitchell
1 day ago $4.07 earnedInside America's LARGEST Pot Trafficking Gang: How Florida Fishermen Became #1 Most Wanted Cartel
44K8 -
2:05:15
Right Side Broadcasting Network
12 hours agoLIVE REPLAY: President Trump Attends UFC Fight 314 - 4/12/25
117K12 -
2:07:42
BlackDiamondGunsandGear
11 hours agoWho’s in Town for This Stream?
64.6K4 -
1:24:56
Quite Frankly
21 hours ago"Wild Tales: Crazy Story Hotline" | The Brothers Ep. 1
91.9K15 -
12:37
Tundra Tactical
17 hours ago $6.30 earned🚫🚫 Biden Era GUN CONTROL Gone!!!! 🚫🚫
71.2K20 -
1:00:09
Motherland Casino
10 hours ago $6.82 earnedCynthia X Mia
63K7