content/hifi-content/liv/Production/Halloween/zombies-avatar-picker.js
2022-02-14 02:04:11 +01:00

27 lines
No EOL
1.2 KiB
JavaScript

// zombies-avatar-picker.js
// Changes to a random Zombie when entering
//
// Created by Liv Erickson on 10/01/2018
// Copyright 2018 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
(function () {
var CHOICES = 7;
var FSTS = ["https://hifi-content.s3.amazonaws.com/jimi/avatar/zombieAttack/fst/z1.fst",
"https://hifi-content.s3.amazonaws.com/jimi/avatar/zombieAttack/fst/z2.fst",
"https://hifi-content.s3.amazonaws.com/jimi/avatar/zombieAttack/fst/z3.fst",
"https://hifi-content.s3.amazonaws.com/jimi/avatar/zombieAttack/fst/z4.fst",
"https://hifi-content.s3.amazonaws.com/jimi/avatar/zombieAttack/fst/z5.fst",
"https://hifi-content.s3.amazonaws.com/jimi/avatar/zombieAttack/fst/z6.fst",
"https://hifi-content.s3.amazonaws.com/jimi/avatar/zombieAttack/fst/z7.fst",
"https://hifi-content.s3.amazonaws.com/jimi/avatar/zombieAttack/fst/z8.fst"];
this.enterEntity = function () {
var option = Math.round(Math.random() * CHOICES);
MyAvatar.skeletonModelURL = FSTS[option];
};
});