demo: Add Ruffle splash anim as initial animation
This commit is contained in:
parent
4a9d6867ba
commit
d3becd9d2c
|
@ -33,6 +33,7 @@ module.exports = (_env, _argv) => {
|
|||
new CopyPlugin({
|
||||
patterns: [
|
||||
{ from: path.resolve(__dirname, "www/index.html") },
|
||||
{ from: path.resolve(__dirname, "www/logo-anim.swf") },
|
||||
{ from: "swfs.json", noErrorOnMissing: true },
|
||||
{ from: "LICENSE*" },
|
||||
{ from: "README.md" },
|
||||
|
|
|
@ -141,19 +141,18 @@ window.addEventListener("load", () => {
|
|||
|
||||
(async () => {
|
||||
const response = await fetch("swfs.json");
|
||||
if (!response.ok) {
|
||||
return;
|
||||
}
|
||||
|
||||
const data = await response.json();
|
||||
for (const swfData of data.swfs) {
|
||||
const option = document.createElement("option");
|
||||
option.textContent = swfData.title;
|
||||
option.value = swfData.location;
|
||||
option.swfData = swfData;
|
||||
optionGroups[swfData.type].append(option);
|
||||
if (response.ok) {
|
||||
const data = await response.json();
|
||||
for (const swfData of data.swfs) {
|
||||
const option = document.createElement("option");
|
||||
option.textContent = swfData.title;
|
||||
option.value = swfData.location;
|
||||
option.swfData = swfData;
|
||||
optionGroups[swfData.type].append(option);
|
||||
}
|
||||
sampleFileInputContainer.classList.remove("hidden");
|
||||
}
|
||||
sampleFileInputContainer.classList.remove("hidden");
|
||||
|
||||
const initialFile = new URL(window.location).searchParams.get("file");
|
||||
if (initialFile) {
|
||||
|
@ -163,5 +162,13 @@ window.addEventListener("load", () => {
|
|||
0
|
||||
);
|
||||
loadSample();
|
||||
} else {
|
||||
load({
|
||||
url: "logo-anim.swf",
|
||||
autoplay: "on",
|
||||
backgroundColor: "#31497D",
|
||||
letterbox: "off",
|
||||
unmuteOverlay: "hidden",
|
||||
});
|
||||
}
|
||||
})();
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue