@galacean/engine-core 0.0.0-experimental-0.9-plus.1 → 0.0.0-experimental-0.9-plus.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +5 -1
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +5 -1
- package/dist/module.js +5 -1
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/Scene.d.ts +1 -0
package/dist/main.js
CHANGED
|
@@ -15168,6 +15168,7 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
|
|
|
15168
15168
|
_this._fogEnd = 300;
|
|
15169
15169
|
_this._fogDensity = 0.01;
|
|
15170
15170
|
_this._fogParams = new engineMath.Vector4();
|
|
15171
|
+
_this._sunlightVector3 = new engineMath.Vector3();
|
|
15171
15172
|
_this.name = name || "";
|
|
15172
15173
|
var shaderData = _this.shaderData;
|
|
15173
15174
|
shaderData._addRefCount(1);
|
|
@@ -15324,7 +15325,10 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
|
|
|
15324
15325
|
var sunLightIndex = lightManager._getSunLightIndex();
|
|
15325
15326
|
if (sunLightIndex !== -1) {
|
|
15326
15327
|
var sunlight = lightManager._directLights.get(sunLightIndex);
|
|
15327
|
-
|
|
15328
|
+
var sunlightColor = sunlight.color;
|
|
15329
|
+
var sunlightIntensity = sunlight.intensity;
|
|
15330
|
+
this._sunlightVector3.set(sunlightColor.r * sunlightIntensity, sunlightColor.g * sunlightIntensity, sunlightColor.b * sunlightIntensity);
|
|
15331
|
+
shaderData.setVector3(Scene._sunlightColorProperty, this._sunlightVector3);
|
|
15328
15332
|
shaderData.setVector3(Scene._sunlightDirectionProperty, sunlight.direction);
|
|
15329
15333
|
this._sunLight = sunlight;
|
|
15330
15334
|
}
|