EnvironmentComponent class
The sky and the ambient light of a 3-D scene. The first enabled one in a scene is used.
Constructors
- EnvironmentComponent({bool sky = true, Color zenith = const Color(0xFF8AB4F0), Color horizon = const Color(0xFFE0EAF5), Color ground = const Color(0xFF9E978F), Color ambientSky = const Color(0xFF9EAAC0), Color ambientGround = const Color(0xFF6B655F), double exposure = 1.0, Color background = const Color(0xFF101014), bool fog = false, Color fogColor = const Color(0xFFC8D2DC), double fogDensity = 0.02, double fogStart = 10.0, bool reflections = true, double reflectionStrength = 1.0, String skybox = '', double skyboxBlur = 0.0})
- An environment; the defaults are a daylight sky.
Properties
- ambientGround ↔ Color
-
Ambient light from below.
getter/setter pair
- ambientSky ↔ Color
-
Ambient light from above.
getter/setter pair
- background ↔ Color
-
Background when there is no sky.
getter/setter pair
- componentType → Type
-
Type identifier for this component
no setterinherited
- exposure ↔ double
-
Exposure before tonemapping.
getter/setter pair
- fog ↔ bool
-
Whether distance fog is on.
getter/setter pair
- fogColor ↔ Color
-
What things fade to in the distance (sRGB, as picked).
getter/setter pair
- fogDensity ↔ double
-
How thick the fog is, per metre: 0.02 hides things a hundred metres
beyond fogStart.
getter/setter pair
- fogStart ↔ double
-
Metres from the camera where fog begins.
getter/setter pair
- ground ↔ Color
-
Below the horizon.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- horizon ↔ Color
-
At eye level.
getter/setter pair
- reflections ↔ bool
-
Whether surfaces light and reflect what surrounds them — the
skybox, or else the gradient sky — rather than the two ambient
colours.
getter/setter pair
- reflectionStrength ↔ double
-
How strong the reflections are: 0 for none.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sky ↔ bool
-
Whether the gradient sky is drawn; otherwise background.
getter/setter pair
- skybox ↔ String
-
A panorama (an equirectangular Radiance
.hdr) drawn as the sky and lighting the scene; empty for the gradient sky.getter/setter pair - skyboxBlur ↔ double
-
How blurred the skybox is drawn: 0 sharp, 1 its blurriest.
getter/setter pair
- zenith ↔ Color
-
Straight up.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onAttach(
EntityId entityId) → void -
Called when this component is added to an entity.
inherited
-
onDetach(
EntityId entityId) → void -
Called when this component is removed from an entity.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited