Skip to content

armgit / 67.js

Public Imported from GitHub
0

3D engine that AI agents drive

Merge origin/main into feat/texture-sequence

Nguyen Xuan Ana2538b1c60a1
diff --cc scripts/agent-render-jobs.mjs
index 7f7eb07a,293142bb..e7f81eaa
--- a/scripts/agent-render-jobs.mjs
+++ b/scripts/agent-render-jobs.mjs
@@@ -108,12 -109,12 +109,14 @@@ function settingsFrom(input, clips, rec
if (input.audio !== undefined) result.audio = audioFrom(input.audio, input.kind);
if (input.motion !== undefined) {
objectKeys(input.motion, ['start'], 'motion');
- // A map sequence reads the same clock, so a recipe with one takes motion settings without authored motion.
- const sequenceOnly = !recipe?.motion && JSON.stringify(recipe?.materials ?? []).includes('"sequence":{');
- if (!['67js.scene', '67js.asset'].includes(recipe?.format) || (!recipe.motion && !sequenceOnly)) {
- throw new RangeError('Motion settings require a recipe with authored motion or a map sequence.');
+ // Clips of placed assets play on scene time, so a scene that places one needs no authored motion.
+ const placesClips = recipe?.format === '67js.scene' && recipeAssetNeeds(recipe).some(need => need.copies > 1);
- if (!['67js.scene', '67js.asset'].includes(recipe?.format) || (!recipe.motion && !placesClips)) {
- throw new RangeError('Motion settings require a recipe with authored motion or a placed clip.');
++ // A map sequence reads the same clock.
++ const sequenced = JSON.stringify(recipe?.materials ?? []).includes('"sequence":{');
++ if (!['67js.scene', '67js.asset'].includes(recipe?.format) || (!recipe.motion && !placesClips && !sequenced)) {
++ throw new RangeError('Motion settings require a recipe with authored motion, a placed clip or a map sequence.');
}
- const motionDuration = sequenceOnly ? 3600 : boundedNumber(recipe.motion.duration, 0.1, 30, 'motion duration');
+ const motionDuration = recipe.motion ? boundedNumber(recipe.motion.duration, 0.1, 30, 'motion duration') : undefined;
if (recipe.motion?.loop !== undefined && typeof recipe.motion.loop !== 'boolean') {
throw new TypeError('Motion loop must be boolean.');
}