Slot

From Resonite Wiki
Revision as of 08:35, 6 March 2024 by J4 (talk | contribs) (Created page with "Chaque objet dans Resonite est un '''Slot'''. Les slots forment des ''hiérarchies'', existent dans un espace 3D via des ''transformations'' et contiennent des ''Composants'' qui ajoutent des comportements.")

Chaque objet dans Resonite est un Slot. Les slots forment des hiérarchies, existent dans un espace 3D via des transformations et contiennent des Composants qui ajoutent des comportements.

Propriétés basiques

Hiérarchie

A hierarchy of slots as shown in the Scene Inspector. The Example slot has three children, the first of which has another child itself.
Une hiérarchie simple, montrée dans un Inspecteur de Scènes.

A slot can contain zero or more slots, forming a hierarchy or "tree". A slot is a child if it is contained within another slot; that slot is its parent. The only slot without a parent is the root of the world, which contains all other slots.

This hierarchy is used for organization, transformation (see below), and many other features in Resonite.

Transformation

Every slot can be transformed in 3D space: it can be translated (moved), rotated, and scaled. A child slot's transformation is relative to its parent, so even though a child slot might specify no transformation, in global space it may be rotated or scaled because its parents are. Thus, a child's transform is called "local".

Components

Main article: Component

Slots contain components, which provide almost all the functionality in Resonite. See the main article for details.

Fields

Similar to Components, slots have a number of fields that can be modified:

Fields
Name Type Description
Name String Parent
Slot Tag String
Active Bool Persistent
Bool Position Float3
Rotation FloatQ Scale
Float3 OrderOffset Long

Working With Slots

With the Scene Inspector

As a user, slots are primarily manipulated through the Scene Inspector. You can view, create, destroy and modify slots and their components.

With ProtoFlux

ProtoFlux has a set of nodes for working with the slot hierarchy, see Category:ProtoFlux:Slots for a list. Note that access to a slot's components is currently limited.[1]

References