110 lines
2.3 KiB
C#
110 lines
2.3 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Godot;
|
|
using System;
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
namespace Rokojori
|
|
{
|
|
/** <summary for="class FoliageData">
|
|
|
|
<title>
|
|
Resource to define foliage data
|
|
</title>
|
|
|
|
<description>
|
|
|
|
</description>
|
|
|
|
</summary>
|
|
*/
|
|
|
|
[Tool]
|
|
[GlobalClass, Icon("res://addons/rokojori_action_library/Icons/Scatterer.svg") ]
|
|
public partial class FoliageData:Resource
|
|
{
|
|
|
|
[Export]
|
|
public bool enabled = true;
|
|
|
|
[Export]
|
|
public float cellSize = 1.0f;
|
|
|
|
[Export]
|
|
public float visibilityRange = 50f;
|
|
|
|
[Export]
|
|
public float visibilityFadeRelative = 0.2f;
|
|
|
|
[Export]
|
|
public float visibilityFadeAbsolute = 0f;
|
|
|
|
[Export]
|
|
public float visibilityFadeHidingOffset = -0.7f;
|
|
|
|
/** <summary for="field renderPriority">Render priority, only for transparent objects</summary>*/
|
|
[Export]
|
|
public int renderPriority;
|
|
|
|
[Export]
|
|
public FoliageQualitySettings[] qualitySettings;
|
|
|
|
|
|
[Export]
|
|
public string layerName;
|
|
|
|
[Export]
|
|
public Vector3 positionVarianceMaxOffset = Vector3.Zero;
|
|
[Export]
|
|
public float positionVarianceScale = 1f;
|
|
[Export]
|
|
public Vector2 positionVarianceOffset = Vector2.Zero;
|
|
|
|
[Export]
|
|
public Vector3 rotationMin = Vector3.Zero;
|
|
[Export]
|
|
public Vector3 rotationMax = new Vector3( 0, 1, 0 );
|
|
|
|
[Export]
|
|
public float rotationVarianceScale = 1f;
|
|
[Export]
|
|
public Vector2 rotationVarianceOffset = Vector2.Zero;
|
|
|
|
|
|
[Export]
|
|
public Vector3 scaleVarianceMinScale = Vector3.One;
|
|
[Export]
|
|
public Vector3 scaleVarianceMaxScale = Vector3.One;
|
|
[Export]
|
|
public float scaleVarianceScale = 1f;
|
|
[Export]
|
|
public Vector2 scaleVarianceOffset = Vector2.Zero;
|
|
|
|
|
|
[Export(PropertyHint.Range,"0,1")]
|
|
public float occupancyVarianceAmount = 0f;
|
|
[Export(PropertyHint.Range,"0,50")]
|
|
public float occupancyVariancePower = 1f;
|
|
|
|
[Export(PropertyHint.Range,"0,1")]
|
|
public float occupancyTreshold = 0.5f;
|
|
|
|
[Export]
|
|
public float occupancyHideOffset = -2f;
|
|
[Export]
|
|
public float occupancyHideScale = 0.1f;
|
|
|
|
[Export]
|
|
public float occupancyVarianceScale = 1f;
|
|
[Export]
|
|
public Vector2 occupancyVarianceOffset = Vector2.Zero;
|
|
|
|
public virtual void Initialize( FoliageRenderLayer renderLayer )
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
} |