Module technology.sola.engine
Package technology.sola.engine.defaults
Class SolaWithDefaults.DefaultsConfigurator
java.lang.Object
technology.sola.engine.defaults.SolaWithDefaults.DefaultsConfigurator
- Enclosing class:
- SolaWithDefaults
DefaultsConfigurator provides methods for enabling various default functionality.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionuseBackgroundColor
(Color backgroundColor) Updates the background color (what everything clears to each frame).useDebug()
Enables debug rendering.Initializes theSolaWithDefaults.solaGraphics
instance.useGui()
Initializes theGuiDocument
instance with a lightGuiTheme
.Initializes theGuiDocument
instance with a desiredGuiTheme
.The theme will only be applied toGuiElement
s that are loaded via JSON files.useGui
(GuiTheme guiTheme, List<GuiElementJsonBlueprint<?, ?, ?>> additionalGuiElementJsonBlueprints) Initializes theGuiDocument
instance with a desiredGuiTheme
.Adds theScreenSpaceLightMapGraphicsModule
SolaGraphicsModule
with ambient color set to black.useLighting
(Color ambientColor) Adds theScreenSpaceLightMapGraphicsModule
SolaGraphicsModule
with ambient color set.Initializes theSolaWithDefaults.solaPhysics
instance.
-
Constructor Details
-
DefaultsConfigurator
public DefaultsConfigurator()
-
-
Method Details
-
useDebug
Enables debug rendering. This includes collider outlines and broad phase debug information.- Returns:
- this
-
useBackgroundColor
Updates the background color (what everything clears to each frame). Default isColor.BLACK
.- Parameters:
backgroundColor
- the new color the renderer clears to- Returns:
- this
-
usePhysics
Initializes theSolaWithDefaults.solaPhysics
instance. This adds severalEcsSystem
s to theSola.solaEcs
instance.EcsSystems added
- Returns:
- this
-
useGraphics
Initializes theSolaWithDefaults.solaGraphics
instance. This adds severalSolaEntityGraphicsModule
s to it and adds severalEcsSystem
s to theSola.solaEcs
instance.Modules added
CircleEntityGraphicsModule
RectangleEntityGraphicsModule
TriangleEntityGraphicsModule
SpriteEntityGraphicsModule
ParticleEmitterEntityGraphicsModule
ScreenSpaceLightMapGraphicsModule
EcsSystems added
- Returns:
- this
-
useLighting
Adds theScreenSpaceLightMapGraphicsModule
SolaGraphicsModule
with ambient color set to black.- Returns:
- this
-
useLighting
Adds theScreenSpaceLightMapGraphicsModule
SolaGraphicsModule
with ambient color set.- Parameters:
ambientColor
- the ambient color to use- Returns:
- this
-
useGui
Initializes theGuiDocument
instance with a lightGuiTheme
. The theme will only be applied toGuiElement
s that are loaded via JSON files.- Returns:
- this
-
useGui
Initializes theGuiDocument
instance with a desiredGuiTheme
.The theme will only be applied toGuiElement
s that are loaded via JSON files.- Parameters:
guiTheme
- the theme to use- Returns:
- this
-
useGui
public SolaWithDefaults.DefaultsConfigurator useGui(GuiTheme guiTheme, List<GuiElementJsonBlueprint<?, ?, ?>> additionalGuiElementJsonBlueprints) Initializes theGuiDocument
instance with a desiredGuiTheme
. Also registers additionalGuiElementJsonBlueprint
s for parsing different kinds of elements as JSON. The theme will only be applied toGuiElement
s that are loaded via JSON files.- Parameters:
guiTheme
- the theme to useadditionalGuiElementJsonBlueprints
- addition gui element json blueprints to register for parsing- Returns:
- this
-