// // fireac.js // // // Created by Chris Collins on December 22, 2014 // Copyright 2014 High Fidelity, Inc. // // Make a fire! // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html var entityID = { id: "{c9679b07-1f40-42c0-814a-538ebfd8acd7}", creatorTokenID: -1, isKnownID: true }; var n = 1; function fire() { if ((n > 12) || (n < 1)) { n = 1; } n = n + 1; print("n=" + n); Entities.editEntity(entityID, { type: "Model", textures: "{ \"jupitermap": \"https://s3.amazonaws.com/hifi-public/cozza13/planets/planets/textures/" + n + ".jpg\" }" }); }; Script.setInterval(fire, 70);