1
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import type { EightAnchorContent } from '../../packages/shared/src/contracts/customWorldAgent';
|
||||
import {
|
||||
isRecord,
|
||||
readStoredJson,
|
||||
@@ -551,6 +552,11 @@ function normalizeCharacterAnimationConfig(
|
||||
const extension = toText(value.extension);
|
||||
const file = toText(value.file);
|
||||
const basePath = toText(value.basePath);
|
||||
const frameWidth = toOptionalInteger(value.frameWidth);
|
||||
const frameHeight = toOptionalInteger(value.frameHeight);
|
||||
const fps = toOptionalNumber(value.fps);
|
||||
const loop = typeof value.loop === 'boolean' ? value.loop : undefined;
|
||||
const previewVideoPath = toText(value.previewVideoPath);
|
||||
|
||||
return {
|
||||
folder,
|
||||
@@ -560,6 +566,11 @@ function normalizeCharacterAnimationConfig(
|
||||
...(extension ? { extension } : {}),
|
||||
...(file ? { file } : {}),
|
||||
...(basePath ? { basePath } : {}),
|
||||
...(frameWidth ? { frameWidth: Math.max(1, frameWidth) } : {}),
|
||||
...(frameHeight ? { frameHeight: Math.max(1, frameHeight) } : {}),
|
||||
...(fps ? { fps: Math.max(1, fps) } : {}),
|
||||
...(typeof loop === 'boolean' ? { loop } : {}),
|
||||
...(previewVideoPath ? { previewVideoPath } : {}),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -974,6 +985,9 @@ function normalizeProfile(value: unknown): CustomWorldProfile | null {
|
||||
preserveStructuredRecordArray<KnowledgeFact>(value.knowledgeFacts),
|
||||
threadContracts:
|
||||
preserveStructuredRecordArray<ThreadContract>(value.threadContracts),
|
||||
anchorContent: preserveStructuredRecord<EightAnchorContent>(
|
||||
value.anchorContent,
|
||||
),
|
||||
creatorIntent: normalizeCustomWorldCreatorIntent(value.creatorIntent),
|
||||
anchorPack:
|
||||
value.anchorPack && typeof value.anchorPack === 'object'
|
||||
|
||||
@@ -383,6 +383,7 @@ export function normalizeCustomWorldLandmarks(params: {
|
||||
id: landmark.id,
|
||||
name: landmark.name,
|
||||
description: landmark.description,
|
||||
visualDescription: landmark.visualDescription,
|
||||
dangerLevel: landmark.dangerLevel,
|
||||
imageSrc: landmark.imageSrc,
|
||||
narrativeResidues: landmark.narrativeResidues,
|
||||
|
||||
Reference in New Issue
Block a user