Skip to content

Commit

Permalink
Update generator.
Browse files Browse the repository at this point in the history
  • Loading branch information
create3000 committed Nov 15, 2023
1 parent 556ed5a commit bd56b85
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions docs/assets/js/x3d-file-converter.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,16 @@ async function convert (encoding, files)

await Browser .loadURL (new X3D .MFString (url));

Browser .currentScene .setMetaData ("generator", `${Browser .name} V${Browser .version}, ${Browser .providerURL}`);
Browser .currentScene .setMetaData ("modified", new Date () .toUTCString ());
const
scene = Browser .currentScene,
generator = scene .getMetaData ("generator") ?.filter (value => !value .startsWith (Browser .name)) ?? [ ];

generator .push (`${Browser .name} V${Browser .version}, ${Browser .providerURL}`);

scene .setMetaData ("generator", generator);
scene .setMetaData ("modified", new Date () .toUTCString ());

link (mimeType, file .name .replace (/\.[^.]+$/, "") + extension, output (Browser .currentScene, encoding, file .name));
link (mimeType, file .name .replace (/\.[^.]+$/, "") + extension, output (scene, encoding, file .name));
}
catch (error)
{
Expand Down

0 comments on commit bd56b85

Please sign in to comment.