ImageSpaceNode.cs 673 B

123456789101112131415161718192021222324
  1. using PixiEditor.ChangeableDocument.Changeables.Animations;
  2. using PixiEditor.ChangeableDocument.Changeables.Graph.Interfaces;
  3. using PixiEditor.Numerics;
  4. namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes;
  5. public class ImageSpaceNode : Node
  6. {
  7. public FieldOutputProperty<VecD> Position { get; }
  8. public ImageSpaceNode()
  9. {
  10. Position = CreateFieldOutput(nameof(Position), "PIXEL_COORDINATE", ctx => ctx.Position);
  11. }
  12. protected override ChunkyImage? OnExecute(KeyFrameTime frameTime)
  13. {
  14. return null;
  15. }
  16. public override bool Validate() => true;
  17. public override Node CreateCopy() => new ImageSpaceNode();
  18. }