The Attributes panel is the control center for any selected object. It is hidden by default and slides into view the moment you click a scene object — either on the canvas or in the Hierarchy panel. Every change you make is applied live: the canvas redraws and the Hierarchy icon updates without requiring a save step. The sections below walk through each property group in the order they appear in the panel.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/OmarMtya/engine.js/llms.txt
Use this file to discover all available pages before exploring further.
Panel Header Controls
Before diving into properties, note the three icons in the Attributes panel header (#header_atributos). These act on the selected object as a whole:
| Icon | Element ID | Action |
|---|---|---|
far fa-trash-alt | #eliminar | Removes the object from $g.figuras, clears the selection, and hides the panel |
fas fa-arrow-up | #subir | Moves the object one position earlier in $g.figuras (one layer down in render order) |
fas fa-arrow-down | #bajar | Moves the object one position later in $g.figuras (one layer up in render order) |
Property Groups
Basic Properties
Basic Properties
These two fields are always visible regardless of object type.Name (Type (
Changing the type calls
nombre)A plain text input (<input type="text" id="nombre">). As you type, the onkeyup handler updates obj.nombre directly and calls actualizarLista() so the new name appears in the Hierarchy list immediately.tipo)A <select> dropdown with three options:| Option value | Display label |
|---|---|
cuadrado | Cuadrado (Square) |
circulo | Círculo (Circle) |
imagen | Imagen (Image) |
esCirculo(), esCuadro(), or esImagen() to show and hide the appropriate sub-fields in the Transform section, then redraws the canvas.Transform
Transform
Transform controls position and size on the canvas. Which fields appear depends on the object’s type.Position
Size
All position and size values are
| Field | ID | Property | Types |
|---|---|---|---|
| X | #x | obj.transform.x | All |
| Y | #y | obj.transform.y | All |
| Field | ID | Property | Types |
|---|---|---|---|
Height (Altura) | #altura | obj.transform.altura | cuadrado, imagen |
Width (Anchura) | #anchura | obj.transform.anchura | cuadrado, imagen |
Radius (Radio) | #radio | obj.transform.radio | circulo only |
number inputs. Changes are applied on onkeyup with parseFloat() so decimal values are accepted.Fill color (Relleno)A native <input type="color"> color picker. On change the new hex value is written to obj.transform.relleno and the canvas is immediately redrawn. The color also updates the matching icon in the Hierarchy list.Rigid Body
Rigid Body
The Rígido section is toggled by a checkbox (CollisionA checkbox (
#rigido_checkbox). When unchecked, obj.rigido is null and the object has no physics behavior. Checking the box creates a new $g.Rigido() instance and reveals two sub-controls.Gravity (Gravedad)A number input whose onkeyup handler writes to obj.rigido.valor:#colision, checked by default). When you uncheck it, obj.rigido.sinColision is set to true, making the object pass through others without triggering collisions:Image
Image
The Imagen section is available for Preview thumbnailThe
cuadrado and imagen object types. It is shown or hidden by a checkbox (#imagen_checkbox). Checking it creates a new $g.Imagen(null) instance on the object.File uploadA <input type="file" id="imagen"> file picker. On selection:- A
FileReaderreads the file as a data URL and sets the<img id="preview">thumbnail so you see the image immediately in the panel. - An
Imageobject is created from the file URL and stored inobj.transform.imagenas a$g.Imageninstance. - The canvas is redrawn with the new image.
<img id="preview"> element (200 px tall, object-fit: contain) shows the selected image inline in the Attributes panel. Its src is restored when you re-select an object that already has an image loaded.Sprite Sub-section
The Sprite sub-section is nested inside the Image section and revealed by its own checkbox (#sprite_checkbox). Enabling it creates a $g.Sprite instance attached to obj.transform.imagen.sprite. All five fields update together on every onkeyup event:| Field | ID | Description |
|---|---|---|
| Rows | #rows_sprite | Number of rows in the sprite sheet (row = value - 1 internally) |
| Columns | #cols_sprite | Number of columns in the sprite sheet |
| Frame height | #altura_sprite | Height of a single sprite frame in pixels |
| Frame width | #anchura_sprite | Width of a single sprite frame in pixels |
| Speed | #velocidad_sprite | Seconds per frame for the animation playback |
Sound
Sound
The Sonido section is toggled by a checkbox (
The selected value is stored in
#sonido_checkbox). Enabling it creates a new $g.Sonido({ src: null, activacion: 'colision' }) instance on the object.Activation type (tipo_sonido)A <select> dropdown that controls when the sound plays:| Value | Label | Behavior |
|---|---|---|
inicial | Inicial | Plays when the scene starts (Play is pressed) |
colision | Colisión | Plays when this object collides with another |
colisionInversa | Colisión inversa | Plays on the object being collided into |
obj.transform.sonido.activacion.Audio fileA <input type="file" id="sonido"> file picker. On selection an Audio object is created from the file URL and stored in obj.transform.sonido.src. The file name is also written to obj.transform.sonido.src.title and displayed in the <span id="nombre_audio"> label so you can confirm which file is loaded without needing to re-open the picker.Global Audio Track
In addition to per-object sounds, the editor supports a single global background audio track that plays for the entire scene. Load it via the speaker icon (fas fa-volume-down) in the configuration bar, which opens a hidden <input type="file" id="sonidoGlobal"> file picker. The audio is stored in the sonidoGlobal variable and:
- Plays automatically when you press the Play button (if a track is loaded).
- Pauses when you press the Pause button.
- Can be removed at any time by clicking the mute icon (
fas fa-volume-mute), which appears next to the speaker button after a file is loaded.