-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcredits.ts
More file actions
49 lines (46 loc) · 1.37 KB
/
Copy pathcredits.ts
File metadata and controls
49 lines (46 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/**
* Model Credits — metadata about 3D models used in the app.
*
* Each entry is keyed by filename as it appears in the `/models/` directory.
* All fields are optional — an entry may omit author, source, or license.
*
* When adding a new model, add an entry here so users can see attribution
* directly in the settings panel.
*/
export interface ModelCredit {
/** Name of the author/creator of the 3D model. */
author?: string;
/** URL where the model was obtained. */
source?: string;
/** License under which the model is distributed. */
license?: string;
}
/**
* Credits lookup table, keyed by model filename.
*
* Lookup is case-sensitive and matches the exact filename in `/models/`.
*/
const credits: Record<string, ModelCredit> = {
'skull.obj': {
author: 'deater07',
source: 'https://free3d.com/3d-model/skull-human-anatomy-82445.html',
license: 'CC0',
},
'head.obj': {
author: 'Ron lemen',
source: 'Planes of the Head.blend',
license: 'CC0',
},
'anime-head.obj': {
author: 'Rodesqa',
source: 'https://downloadfree3d.com/characters/stylized-anime-female-head/',
license: 'CC0',
},
};
/**
* Returns the credit metadata for a given model filename, or `null`
* if no credits are registered for that file.
*/
export function getModelCredit(filename: string): ModelCredit | null {
return credits[filename] ?? null;
}