Start dynamic sky
This commit is contained in:
65
dynamic-sky/resources/cloud_layer_config.gd
Normal file
65
dynamic-sky/resources/cloud_layer_config.gd
Normal file
@@ -0,0 +1,65 @@
|
||||
@tool
|
||||
class_name CloudLayerConfig
|
||||
extends Resource
|
||||
|
||||
enum LayerType {
|
||||
LOW,
|
||||
MID,
|
||||
HIGH,
|
||||
WISPS
|
||||
}
|
||||
|
||||
@export var layer_type: LayerType = LayerType.MID
|
||||
@export var enabled: bool = true
|
||||
|
||||
@export_group("Texture")
|
||||
@export var texture: Texture2D
|
||||
@export var texture_scale: Vector2 = Vector2(1.0, 1.0)
|
||||
@export var tiling: Vector2 = Vector2(4.0, 4.0)
|
||||
|
||||
@export_group("Appearance")
|
||||
@export var opacity: float = 0.8
|
||||
@export var color_tint: Color = Color.WHITE
|
||||
@export var shadow_color: Color = Color(0.6, 0.6, 0.7)
|
||||
|
||||
@export_group("Motion")
|
||||
@export var flow_direction: Vector2 = Vector2(1.0, 0.0)
|
||||
@export var flow_speed: float = 0.02
|
||||
@export var parallax_depth: float = 1.0
|
||||
|
||||
@export_group("Lighting")
|
||||
@export var receive_light: bool = true
|
||||
@export var light_influence: float = 1.0
|
||||
@export var rim_glow_intensity: float = 0.3
|
||||
|
||||
|
||||
func get_layer_height() -> float:
|
||||
match layer_type:
|
||||
LayerType.LOW:
|
||||
return 0.2
|
||||
LayerType.MID:
|
||||
return 0.5
|
||||
LayerType.HIGH:
|
||||
return 0.8
|
||||
LayerType.WISPS:
|
||||
return 0.9
|
||||
return 0.5
|
||||
|
||||
|
||||
func duplicate_config() -> CloudLayerConfig:
|
||||
var copy := CloudLayerConfig.new()
|
||||
copy.layer_type = layer_type
|
||||
copy.enabled = enabled
|
||||
copy.texture = texture
|
||||
copy.texture_scale = texture_scale
|
||||
copy.tiling = tiling
|
||||
copy.opacity = opacity
|
||||
copy.color_tint = color_tint
|
||||
copy.shadow_color = shadow_color
|
||||
copy.flow_direction = flow_direction
|
||||
copy.flow_speed = flow_speed
|
||||
copy.parallax_depth = parallax_depth
|
||||
copy.receive_light = receive_light
|
||||
copy.light_influence = light_influence
|
||||
copy.rim_glow_intensity = rim_glow_intensity
|
||||
return copy
|
||||
Reference in New Issue
Block a user