Merge branch 'main' into dev/1.3

This commit is contained in:
GuoLei1990
2024-06-28 17:33:39 +08:00
4 changed files with 12 additions and 3 deletions

View File

@@ -92,6 +92,7 @@ class SceneLoader extends Loader<Scene> {
scene.background.texture = texture;
});
promises.push(backgroundPromise);
scene.background.textureFillMode = background.textureFillMode ?? scene.background.textureFillMode;
}
break;
}

View File

@@ -731,7 +731,7 @@ export interface IScene extends IChildRootProperty {
/**
* The indices of each root node
*/
nodes: number[];
nodes?: number[];
}
/**

View File

@@ -27,7 +27,7 @@ export class GLTFSceneParser extends GLTFParser {
const engine = glTFResource.engine;
const isDefaultScene = scene === index;
const sceneNodes = sceneInfo.nodes;
const sceneNodes = sceneInfo.nodes || [];
let sceneRoot: Entity;
if (sceneNodes.length === 1) {

View File

@@ -1,4 +1,11 @@
import { BackgroundMode, DiffuseMode, FogMode, ShadowCascadesMode, ShadowResolution } from "@galacean/engine-core";
import {
BackgroundMode,
BackgroundTextureFillMode,
DiffuseMode,
FogMode,
ShadowCascadesMode,
ShadowResolution
} from "@galacean/engine-core";
import type { IReferable } from "@galacean/engine-core/types/asset/IReferable";
import type { IColor, IHierarchyFile, IVector3 } from "./BasicSchema";
@@ -13,6 +20,7 @@ export interface IScene extends IHierarchyFile {
mode: BackgroundMode;
color: IColor;
texture?: IReferable;
textureFillMode?: BackgroundTextureFillMode;
skyMesh?: IReferable;
skyMaterial?: IReferable;
};