content/hifi-public/cozza13/scripts/demo/apartment2_adverts.js
Dale Glass 0d14e5a379 Initial data.
Needs a lot of cleanup. Data has been de-duplicated, and where identical copies existed, one of them
has been replaced with a symlink.

Some files have been excluded, such as binaries, installers and debug dumps. Some of that may still
be present.
2022-02-13 18:59:11 +01:00

31 lines
No EOL
925 B
JavaScript

var ENTITY_ID = {
id: "{ea9aedec-5e38-488b-8fd9-fb03f75bc61e}",
creatorTokenID: 0,
isKnownID: true,
};
var IMAGE_URLS = [
"https://hifi-public.s3.amazonaws.com/models/advertisements%20/tv%20shows/voice.jpeg",
"https://hifi-public.s3.amazonaws.com/models/advertisements%20/tv%20shows/soa.jpeg",
"https://hifi-public.s3.amazonaws.com/models/advertisements%20/tv%20shows/onb.jpeg",
"https://hifi-public.s3.amazonaws.com/models/advertisements%20/tv%20shows/oitnb.jpeg",
];
var currentImageIdx = 0;
function showNextImage() {
currentImageIdx = (currentImageIdx + 1) % IMAGE_URLS.length;
var nextURL = IMAGE_URLS[currentImageIdx];
Entities.editEntity(ENTITY_ID, {
type: "Model",
textures: JSON.stringify({
"Hifi_x0020_Pitch_x0020_Deck_x0020_v5-1": nextURL,
})
});
print("Done updating");
};
showNextImage();
Script.setInterval(showNextImage, 10000);