@galacean/engine 0.0.0-experimental-0.9-plus.0 → 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/browser.js +15 -2
- package/dist/browser.min.js +1 -1
- package/dist/main.js +1 -1
- package/dist/miniprogram.js +1 -1
- package/dist/module.js +1 -1
- package/package.json +5 -5
package/dist/browser.js
CHANGED
|
@@ -19753,6 +19753,7 @@
|
|
|
19753
19753
|
_this._fogEnd = 300;
|
|
19754
19754
|
_this._fogDensity = 0.01;
|
|
19755
19755
|
_this._fogParams = new Vector4();
|
|
19756
|
+
_this._sunlightVector3 = new Vector3();
|
|
19756
19757
|
_this.name = name || "";
|
|
19757
19758
|
var shaderData = _this.shaderData;
|
|
19758
19759
|
shaderData._addRefCount(1);
|
|
@@ -19908,7 +19909,13 @@
|
|
|
19908
19909
|
lightManager._updateShaderData(this.shaderData);
|
|
19909
19910
|
var sunLightIndex = lightManager._getSunLightIndex();
|
|
19910
19911
|
if (sunLightIndex !== -1) {
|
|
19911
|
-
|
|
19912
|
+
var sunlight = lightManager._directLights.get(sunLightIndex);
|
|
19913
|
+
var sunlightColor = sunlight.color;
|
|
19914
|
+
var sunlightIntensity = sunlight.intensity;
|
|
19915
|
+
this._sunlightVector3.set(sunlightColor.r * sunlightIntensity, sunlightColor.g * sunlightIntensity, sunlightColor.b * sunlightIntensity);
|
|
19916
|
+
shaderData.setVector3(Scene._sunlightColorProperty, this._sunlightVector3);
|
|
19917
|
+
shaderData.setVector3(Scene._sunlightDirectionProperty, sunlight.direction);
|
|
19918
|
+
this._sunLight = sunlight;
|
|
19912
19919
|
}
|
|
19913
19920
|
if (this.castShadows && this._sunLight && this._sunLight.shadowType !== exports.ShadowType.None) {
|
|
19914
19921
|
shaderData.enableMacro("SHADOW_TYPE", this._sunLight.shadowType.toString());
|
|
@@ -20100,6 +20107,12 @@
|
|
|
20100
20107
|
(function() {
|
|
20101
20108
|
Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
|
|
20102
20109
|
})();
|
|
20110
|
+
(function() {
|
|
20111
|
+
Scene._sunlightColorProperty = Shader.getPropertyByName("galacean_SunlightColor");
|
|
20112
|
+
})();
|
|
20113
|
+
(function() {
|
|
20114
|
+
Scene._sunlightDirectionProperty = Shader.getPropertyByName("galacean_SunlightDirection");
|
|
20115
|
+
})();
|
|
20103
20116
|
/**
|
|
20104
20117
|
* Scene manager.
|
|
20105
20118
|
*/ var SceneManager = /*#__PURE__*/ function() {
|
|
@@ -36092,7 +36105,7 @@
|
|
|
36092
36105
|
], OasisMaterialsRemap);
|
|
36093
36106
|
|
|
36094
36107
|
//@ts-ignore
|
|
36095
|
-
var version = "0.0.0-experimental-0.9-plus.
|
|
36108
|
+
var version = "0.0.0-experimental-0.9-plus.2";
|
|
36096
36109
|
console.log("Galacean engine version: " + version);
|
|
36097
36110
|
for(var key in CoreObjects){
|
|
36098
36111
|
Loader.registerClass(key, CoreObjects[key]);
|