SurfaceNode constructor

SurfaceNode({
  1. String name = '',
  2. double x = 0,
  3. double y = 0,
  4. double? width,
  5. double? height,
  6. SceneColor? fill,
  7. SceneColor? borderColor,
  8. double borderWidth = 1,
  9. double corner = 0,
  10. double? cornerTopLeft,
  11. double? cornerTopRight,
  12. double? cornerBottomRight,
  13. double? cornerBottomLeft,
  14. double opacity = 1,
  15. double? minWidth,
  16. double? maxWidth,
  17. double? minHeight,
  18. double? maxHeight,
  19. bool visible = true,
  20. String asset = '',
  21. String mesh = '',
  22. double positionX = 0,
  23. double positionY = 0,
  24. double positionZ = 0,
  25. double rotationX = 0,
  26. double rotationY = 0,
  27. double rotationZ = 0,
  28. double size = 1,
  29. String animation = '',
  30. double animationTime = 0,
  31. bool loop = true,
  32. String animation2 = '',
  33. double animationTime2 = 0,
  34. double blend = 0,
  35. SceneColor tint = const SceneColor(0xFFFFFFFF),
  36. List<SceneNode> children = const [],
})

Implementation

SurfaceNode({
  super.name,
  super.x,
  super.y,
  super.width,
  super.height,
  super.fill,
  super.borderColor,
  super.borderWidth,
  super.corner,
  super.cornerTopLeft,
  super.cornerTopRight,
  super.cornerBottomRight,
  super.cornerBottomLeft,
  super.opacity,
  super.minWidth,
  super.maxWidth,
  super.minHeight,
  super.maxHeight,
  super.visible,
  String asset = '',
  String mesh = '',
  double positionX = 0,
  double positionY = 0,
  double positionZ = 0,
  double rotationX = 0,
  double rotationY = 0,
  double rotationZ = 0,
  double size = 1,
  String animation = '',
  double animationTime = 0,
  bool loop = true,
  String animation2 = '',
  double animationTime2 = 0,
  double blend = 0,
  SceneColor tint = const SceneColor(0xFFFFFFFF),
  List<SceneNode> children = const [],
}) : super(
       surfaceKind,
       values: {
         'asset': asset,
         'mesh': mesh,
         'positionX': positionX,
         'positionY': positionY,
         'positionZ': positionZ,
         'rotationX': rotationX,
         'rotationY': rotationY,
         'rotationZ': rotationZ,
         'size': size,
         'animation': animation,
         'animationTime': animationTime,
         'loop': loop,
         'animation2': animation2,
         'animationTime2': animationTime2,
         'blend': blend,
         'tint': tint,
       },
     ) {
  this.children.addAll(children);
}