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({
|
new CopyPlugin({
|
||||||
patterns: [
|
patterns: [
|
||||||
{ from: path.resolve(__dirname, "www/index.html") },
|
{ from: path.resolve(__dirname, "www/index.html") },
|
||||||
|
{ from: path.resolve(__dirname, "www/logo-anim.swf") },
|
||||||
{ from: "swfs.json", noErrorOnMissing: true },
|
{ from: "swfs.json", noErrorOnMissing: true },
|
||||||
{ from: "LICENSE*" },
|
{ from: "LICENSE*" },
|
||||||
{ from: "README.md" },
|
{ from: "README.md" },
|
||||||
|
|
|
@ -141,19 +141,18 @@ window.addEventListener("load", () => {
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
const response = await fetch("swfs.json");
|
const response = await fetch("swfs.json");
|
||||||
if (!response.ok) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const data = await response.json();
|
if (response.ok) {
|
||||||
for (const swfData of data.swfs) {
|
const data = await response.json();
|
||||||
const option = document.createElement("option");
|
for (const swfData of data.swfs) {
|
||||||
option.textContent = swfData.title;
|
const option = document.createElement("option");
|
||||||
option.value = swfData.location;
|
option.textContent = swfData.title;
|
||||||
option.swfData = swfData;
|
option.value = swfData.location;
|
||||||
optionGroups[swfData.type].append(option);
|
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");
|
const initialFile = new URL(window.location).searchParams.get("file");
|
||||||
if (initialFile) {
|
if (initialFile) {
|
||||||
|
@ -163,5 +162,13 @@ window.addEventListener("load", () => {
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
loadSample();
|
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