auto-git:
[change] src/document/scene-document-validation.ts
This commit is contained in:
@@ -130,6 +130,7 @@ export interface SceneDocumentValidationResult {
|
|||||||
|
|
||||||
export interface ValidateSceneDocumentOptions {
|
export interface ValidateSceneDocumentOptions {
|
||||||
projectScheduling?: "scene" | "skip";
|
projectScheduling?: "scene" | "skip";
|
||||||
|
terrainSampleValues?: "full" | "skip";
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createDiagnostic(
|
export function createDiagnostic(
|
||||||
@@ -2663,7 +2664,8 @@ function validateTerrain(
|
|||||||
terrain: Terrain,
|
terrain: Terrain,
|
||||||
path: string,
|
path: string,
|
||||||
document: SceneDocument,
|
document: SceneDocument,
|
||||||
diagnostics: SceneDiagnostic[]
|
diagnostics: SceneDiagnostic[],
|
||||||
|
options: ValidateSceneDocumentOptions = {}
|
||||||
) {
|
) {
|
||||||
if (!isBoolean(terrain.visible)) {
|
if (!isBoolean(terrain.visible)) {
|
||||||
diagnostics.push(
|
diagnostics.push(
|
||||||
@@ -2770,6 +2772,7 @@ function validateTerrain(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (options.terrainSampleValues !== "skip") {
|
||||||
for (let index = 0; index < terrain.heights.length; index += 1) {
|
for (let index = 0; index < terrain.heights.length; index += 1) {
|
||||||
if (isFiniteNumber(terrain.heights[index])) {
|
if (isFiniteNumber(terrain.heights[index])) {
|
||||||
continue;
|
continue;
|
||||||
@@ -2784,6 +2787,7 @@ function validateTerrain(
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (terrain.layers.length !== TERRAIN_LAYER_COUNT) {
|
if (terrain.layers.length !== TERRAIN_LAYER_COUNT) {
|
||||||
diagnostics.push(
|
diagnostics.push(
|
||||||
@@ -2829,6 +2833,7 @@ function validateTerrain(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (options.terrainSampleValues !== "skip") {
|
||||||
for (let index = 0; index < terrain.paintWeights.length; index += 1) {
|
for (let index = 0; index < terrain.paintWeights.length; index += 1) {
|
||||||
const paintWeight = terrain.paintWeights[index];
|
const paintWeight = terrain.paintWeights[index];
|
||||||
|
|
||||||
@@ -2845,6 +2850,7 @@ function validateTerrain(
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function validateAuthoredEntityState(
|
function validateAuthoredEntityState(
|
||||||
|
|||||||
Reference in New Issue
Block a user