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.
-
10:38
Colion Noir
1 hour agoHe Installed a Forced Reset Trigger at a Gun Range… and Got Arrested | What You Need to Know
26.9K5 -
LIVE
Sarah Westall
2 hours agoAI, Social Media & Brain Atrophy: Destroying Human Capacity to Think w/ Rob Smith
235 watching -
55:10
The Mel K Show
7 hours agoMel K & Mike L | The Tylenol Piece: It's a Marathon, Not a Sprint | 10-19-25
64.6K8 -
40:22
MattMorseTV
2 hours ago🔴They just tried it... AGAIN.🔴
10.6K32 -
2:08:52
Nerdrotic
3 hours ago $8.70 earnedUncovering Egypts Greatest Mysteries w/ Hugh Newman| Forbidden Frontier #121
88.4K8 -
2:25:58
vivafrei
10 hours agoEp. 287: Bolton INDICTED! Gaza Ceasefire BREACHED? Alex Jones Injustice Continues, ANTIFA & MORE!
98.8K99 -
16:16
Robbi On The Record
4 hours ago $2.39 earnedThe Dark History of Halloween | What You Should Know
15.8K9 -
LIVE
DHG
19 hours agoRE4R - BIORAND X3 ENEMY MULTIPLIER MOD - PROFESSIONAL
112 watching -
3:26:14
Barry Cunningham
5 hours agoPRESIDENT TRUMP INTERVIEW WITH MARIA BARTIROMO! THEN WE TALK MONEY AND OPPORTUNITY!
62.6K15 -
LIVE
FusedAegisTV
1 day agoλ Black Mesa λ (Half Life 1 Remake) █ Western Retread
34 watching