feat: add adaptive soundtrack layer assets
This commit is contained in:
@@ -76,7 +76,12 @@ for (const group of content.toolkit ?? []) for (const technology of group.techno
|
||||
}
|
||||
if (content.metadata?.socialPreviewAssetId) assetClassById.set(content.metadata.socialPreviewAssetId, 'project-still');
|
||||
if (content.soundtrack) {
|
||||
for (const region of [content.soundtrack.intro, content.soundtrack.main]) {
|
||||
for (const region of [
|
||||
content.soundtrack.intro,
|
||||
content.soundtrack.main,
|
||||
content.soundtrack.afterglow,
|
||||
content.soundtrack.driveLift,
|
||||
]) {
|
||||
if (region?.opusAssetId) assetClassById.set(region.opusAssetId, 'soundtrack-audio');
|
||||
if (region?.mp3AssetId) assetClassById.set(region.mp3AssetId, 'soundtrack-audio');
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ export const PERFORMANCE_BUDGETS = Object.freeze({
|
||||
deferredProjectVisuals: 2.5 * 1024 * 1024,
|
||||
highTierExtras: 750 * 1024,
|
||||
deferredNonVideo: 3.5 * 1024 * 1024,
|
||||
deferredAudio: 13 * 1024 * 1024,
|
||||
deferredAudio: 16 * 1024 * 1024,
|
||||
imageSceneConcurrency: 2,
|
||||
videoConcurrency: 1,
|
||||
mobileTextureDimension: 2048,
|
||||
@@ -44,7 +44,7 @@ export const classifyArtifact = (path, source = '') => {
|
||||
if (/^assets\/project-[^/]+\.(?:webm|mp4)$/u.test(path)) return 'project-video';
|
||||
if (/^assets\/project-[^/]*chart[^/]*\.(?:avif|webp|png|jpe?g)$/u.test(path)) return 'chart';
|
||||
if (/^assets\/project-[^/]+\.(?:avif|webp|png|jpe?g|svg)$/u.test(path)) return 'project-still';
|
||||
if (/^assets\/nightdrive-(?:intro|main)\.(?:opus|mp3)$/u.test(path)) return 'soundtrack-audio';
|
||||
if (/^assets\/nightdrive-(?:intro|main|afterglow|drive-lift)\.(?:opus|mp3)$/u.test(path)) return 'soundtrack-audio';
|
||||
if (/^(?:robots\.txt|sitemap\.xml|_headers\.example|_redirects\.example)$/u.test(path)) return 'release-metadata';
|
||||
throw new Error(`Artifact is unclassified: ${path}`);
|
||||
};
|
||||
|
||||
@@ -132,7 +132,7 @@ const assetReferences = (content) => {
|
||||
if (typeof content.soundtrack !== 'object' || content.soundtrack === null || Array.isArray(content.soundtrack)) {
|
||||
throw new Error('Portfolio soundtrack must be an object.');
|
||||
}
|
||||
for (const regionName of ['intro', 'main']) {
|
||||
for (const regionName of ['intro', 'main', 'afterglow', 'driveLift']) {
|
||||
const region = content.soundtrack[regionName];
|
||||
if (typeof region !== 'object' || region === null || Array.isArray(region)) {
|
||||
throw new Error(`Portfolio soundtrack ${regionName} must be an object.`);
|
||||
|
||||
Reference in New Issue
Block a user