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.
-
LIVE
The Chris Salcedo Show
11 hours agoDems Only Like Violence Directed At Conservatives
1,138 watching -
LIVE
Welcome to the Rebellion Podcast
12 hours agoHappy Hump Day - Welcome to the Rebellion Podcast Live 10/22
267 watching -
8:29
Freedom Frontline
14 hours agoFox News Analyst EXPOSES Obama and Hillary’s Dirty Secret
13310 -
21:34
Jasmin Laine
17 hours agoReporters STUNNED as Carney’s “No Deal Coming” LEAKS—Billboards EXPLODE Nationwide
2.4K25 -
1:22:28
Crypto Power Hour
11 hours ago $1.01 earnedThe StableCoin Queen, Author, Cybersecurity Expert Alyze Sam
10.8K4 -
18:56
Degenerate Jay
17 hours ago $0.56 earnedIs Silent Hill f Worth Buying?
2.52K2 -
39:24
Uncommon Sense In Current Times
17 hours ago $0.55 earnedThe Curative Culture Model | Healing Workplaces & Leading with Humanity | Doug Shaw
8.74K1 -
LIVE
BEK TV
23 hours agoTrent Loos in the Morning - 10/22/2025
138 watching -
LIVE
Side Scrollers Podcast
2 days ago🔴SIDE SCROLLERS FUND-A-THON🔴DAY 2🔴100% REVENUE HELPS CHANGE CULTURE!
1,375 watching -
6:14
Dr Disrespect
21 hours agoDr Disrespect Goes for 100 KILLS in Battlefield 6
80.6K8