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.
28 lines
No EOL
713 B
JavaScript
28 lines
No EOL
713 B
JavaScript
var clickDownTime = 0;
|
|
|
|
(function () {
|
|
var n = 1;
|
|
|
|
this.clickDownOnEntity = function (entityID, mouseEvent) {
|
|
var d = new Date();
|
|
clickDownTime = d.getTime();
|
|
};
|
|
this.clickReleaseOnEntity = function (entityID, mouseEvent) {
|
|
var d = new Date();
|
|
var elapsedMsecs = d.getTime() - clickDownTime;
|
|
if (elapsedMsecs > 500) {
|
|
n = n - 1;
|
|
} else {
|
|
n = n + 1;
|
|
}
|
|
if ((n > 12) || (n < 1)) {
|
|
n = 1;
|
|
}
|
|
print("n=" + n);
|
|
Entities.editEntity(entityID, {
|
|
textures: "{ \"jupitermap": \"http://localhost:8888/planets/planets/textures/" + n + ".jpg\" }"
|
|
});
|
|
|
|
};
|
|
|
|
}) |