@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.
@@ -15169,6 +15169,7 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
15169
15169
  _this._fogEnd = 300;
15170
15170
  _this._fogDensity = 0.01;
15171
15171
  _this._fogParams = new miniprogram.Vector4();
15172
+ _this._sunlightVector3 = new miniprogram.Vector3();
15172
15173
  _this.name = name || "";
15173
15174
  var shaderData = _this.shaderData;
15174
15175
  shaderData._addRefCount(1);
@@ -15325,7 +15326,10 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
15325
15326
  var sunLightIndex = lightManager._getSunLightIndex();
15326
15327
  if (sunLightIndex !== -1) {
15327
15328
  var sunlight = lightManager._directLights.get(sunLightIndex);
15328
- shaderData.setColor(Scene._sunlightColorProperty, sunlight.color);
15329
+ var sunlightColor = sunlight.color;
15330
+ var sunlightIntensity = sunlight.intensity;
15331
+ this._sunlightVector3.set(sunlightColor.r * sunlightIntensity, sunlightColor.g * sunlightIntensity, sunlightColor.b * sunlightIntensity);
15332
+ shaderData.setVector3(Scene._sunlightColorProperty, this._sunlightVector3);
15329
15333
  shaderData.setVector3(Scene._sunlightDirectionProperty, sunlight.direction);
15330
15334
  this._sunLight = sunlight;
15331
15335
  }
package/dist/module.js CHANGED
@@ -15164,6 +15164,7 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
15164
15164
  _this._fogEnd = 300;
15165
15165
  _this._fogDensity = 0.01;
15166
15166
  _this._fogParams = new Vector4();
15167
+ _this._sunlightVector3 = new Vector3();
15167
15168
  _this.name = name || "";
15168
15169
  var shaderData = _this.shaderData;
15169
15170
  shaderData._addRefCount(1);
@@ -15320,7 +15321,10 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
15320
15321
  var sunLightIndex = lightManager._getSunLightIndex();
15321
15322
  if (sunLightIndex !== -1) {
15322
15323
  var sunlight = lightManager._directLights.get(sunLightIndex);
15323
- shaderData.setColor(Scene._sunlightColorProperty, sunlight.color);
15324
+ var sunlightColor = sunlight.color;
15325
+ var sunlightIntensity = sunlight.intensity;
15326
+ this._sunlightVector3.set(sunlightColor.r * sunlightIntensity, sunlightColor.g * sunlightIntensity, sunlightColor.b * sunlightIntensity);
15327
+ shaderData.setVector3(Scene._sunlightColorProperty, this._sunlightVector3);
15324
15328
  shaderData.setVector3(Scene._sunlightDirectionProperty, sunlight.direction);
15325
15329
  this._sunLight = sunlight;
15326
15330
  }