-
Notifications
You must be signed in to change notification settings - Fork 0
Node2D
Home | API by Category | Complete API Index | API Compatibility
| Field | Value |
|---|---|
| Full name | Electron2D.Node2D |
| Namespace | Electron2D |
| Kind | class |
| Category | Scene Tree |
Provides the Electron2D 2D transform node used by sprites and future 2D nodes.
public class Electron2D.Node2D : Electron2D.CanvasItemProfile: Electron2D 0.1.0 2D
Status: Partial / Not verified
Out of profile: yes
Godot reference: Node2D
Local/global 2D position, rotation, scale, transform conversion and transform-preserving reparent baseline.
Node2D combines position, rotation and scale into a local
Electron2D.Transform2D. A direct Node2D parent contributes to
Electron2D.Node2D.GlobalTransform; a non-Node2D parent breaks the transform
chain for the 0.1.0 Preview subset.
This type is not synchronized. Create and mutate nodes on the main scene thread.
This type is available since Electron2D 0.1.0 Preview.
Electron2D.CanvasItem
| Member | Kind | Summary |
|---|---|---|
GlobalPosition |
Property | Gets or sets the global 2D position. |
GlobalRotation |
Property | Gets or sets the global rotation in radians. |
GlobalRotationDegrees |
Property | Gets or sets the global rotation in degrees. |
GlobalScale |
Property | Gets or sets the global 2D scale. |
GlobalTransform |
Property | Gets or sets the transform relative to the global 2D canvas. |
Position |
Property | Gets or sets the local position relative to the direct Node2D parent. |
Rotation |
Property | Gets or sets the local rotation in radians. |
RotationDegrees |
Property | Gets or sets the local rotation in degrees. |
Scale |
Property | Gets or sets the local 2D scale. |
Transform |
Property | Gets or sets the local transform built from position, rotation and scale. |
Electron2D.Node2D() |
Constructor | Initializes a new instance of the Node2D type. |
ApplyScale(Electron2D.Vector2) |
Method | Multiplies the current local scale by a ratio. |
GlobalTranslate(Electron2D.Vector2) |
Method | Translates the node in global coordinates. |
Rotate(System.Single) |
Method | Adds a rotation in radians to the local transform. |
ToGlobal(Electron2D.Vector2) |
Method | Transforms a local point into global coordinates. |
ToLocal(Electron2D.Vector2) |
Method | Transforms a global point into this node's local coordinates. |
Translate(Electron2D.Vector2) |
Method | Translates the node in local coordinates. |
Kind: Property
public Electron2D.Vector2 GlobalPosition { get; set; }Gets or sets the global 2D position.
This property follows the validation and lifetime rules of its declaring type.
The current global position value.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Node2D
Kind: Property
public System.Single GlobalRotation { get; set; }Gets or sets the global rotation in radians.
This property follows the validation and lifetime rules of its declaring type.
The current global rotation value.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Node2D
Kind: Property
public System.Single GlobalRotationDegrees { get; set; }Gets or sets the global rotation in degrees.
This property follows the validation and lifetime rules of its declaring type.
The current global rotation degrees value.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Node2D.GlobalRotation
Kind: Property
public Electron2D.Vector2 GlobalScale { get; set; }Gets or sets the global 2D scale.
This property follows the validation and lifetime rules of its declaring type.
The current global scale value.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Node2D
Kind: Property
public Electron2D.Transform2D GlobalTransform { get; set; }Gets or sets the transform relative to the global 2D canvas.
This property follows the validation and lifetime rules of its declaring type.
The current global transform value.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Node2D.Transform
Kind: Property
public Electron2D.Vector2 Position { get; set; }Gets or sets the local position relative to the direct Node2D parent.
This property follows the validation and lifetime rules of its declaring type.
The current position value.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Node2D
Kind: Property
public System.Single Rotation { get; set; }Gets or sets the local rotation in radians.
This property follows the validation and lifetime rules of its declaring type.
The current rotation value.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Node2D.RotationDegrees
Kind: Property
public System.Single RotationDegrees { get; set; }Gets or sets the local rotation in degrees.
This property follows the validation and lifetime rules of its declaring type.
The current rotation degrees value.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Node2D.Rotation
Kind: Property
public Electron2D.Vector2 Scale { get; set; }Gets or sets the local 2D scale.
This property follows the validation and lifetime rules of its declaring type.
The current scale value.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Node2D
Kind: Property
public Electron2D.Transform2D Transform { get; set; }Gets or sets the local transform built from position, rotation and scale.
The setter decomposes position, rotation and scale for transforms without skew. Skew is outside the Electron2D 0.1.0 Preview subset.
The current transform value.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Node2D
Kind: Constructor
public Electron2D.Node2D()Initializes a new instance of the Node2D type.
The new instance follows the lifetime and validation rules of its declaring type.
This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.
This API is available since Electron2D 0.1.0 Preview.
Electron2D.Node2D
Kind: Method
public System.Void ApplyScale(Electron2D.Vector2)(Electron2D.Vector2 ratio)Multiplies the current local scale by a ratio.
This method follows the validation and lifetime rules of its declaring type.
-
ratio: The X and Y scale ratio to multiply intoElectron2D.Node2D.Scale.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Node2D
Kind: Method
public System.Void GlobalTranslate(Electron2D.Vector2)(Electron2D.Vector2 offset)Translates the node in global coordinates.
This method follows the validation and lifetime rules of its declaring type.
-
offset: The global offset to add toElectron2D.Node2D.GlobalPosition.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Node2D
Kind: Method
public System.Void Rotate(System.Single)(System.Single radians)Adds a rotation in radians to the local transform.
This method follows the validation and lifetime rules of its declaring type.
-
radians: The angle in radians to add toElectron2D.Node2D.Rotation.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Node2D
Kind: Method
public Electron2D.Vector2 ToGlobal(Electron2D.Vector2)(Electron2D.Vector2 localPoint)Transforms a local point into global coordinates.
This method follows the validation and lifetime rules of its declaring type.
-
localPoint: The point in this node's local coordinate space.
The transformed point in global coordinate space.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Node2D.ToLocal(Electron2D.Vector2)
Kind: Method
public Electron2D.Vector2 ToLocal(Electron2D.Vector2)(Electron2D.Vector2 globalPoint)Transforms a global point into this node's local coordinates.
This method follows the validation and lifetime rules of its declaring type.
-
globalPoint: The point in global coordinate space.
The transformed point in this node's local coordinate space.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Node2D.ToGlobal(Electron2D.Vector2)
Kind: Method
public System.Void Translate(Electron2D.Vector2)(Electron2D.Vector2 offset)Translates the node in local coordinates.
This is equivalent to Position += offset.
-
offset: The local offset to add toElectron2D.Node2D.Position.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Node2D
Electron2D 0.1.0 Preview API reference. Generated from 175 public runtime types.