Skip to content

Instantly share code, notes, and snippets.

@hyperlogic
Last active April 28, 2016 20:14
Show Gist options
  • Save hyperlogic/d82a61d141df43d576428501a82c5ee6 to your computer and use it in GitHub Desktop.
Save hyperlogic/d82a61d141df43d576428501a82c5ee6 to your computer and use it in GitHub Desktop.
High Fidelity test script that rapidly changes your avatar
var avatarList = [
// art3mis
"https://hifi-metaverse.s3-us-west-1.amazonaws.com/marketplace/contents/e76946cc-c272-4adf-9bb6-02cde0a4b57d/8fd984ea6fe1495147a3303f87fa6e23.fst?1460131758",
// blue dude
"https://hifi-metaverse.s3-us-west-1.amazonaws.com/marketplace/contents/3fa9800e-b4e6-47b7-b6bc-6332a3d3ab9d/d111ef3373868f22cbd6772453e50b8c.fst?1460131911",
// head and hands
"https://hifi-metaverse.s3-us-west-1.amazonaws.com/marketplace/contents/7d2e01bc-735d-49ff-9cc3-b3e14062aa8e/844b0e9a30257eda858a305656be6a64.fst?1459784301",
// simple robot
"https://hifi-metaverse.s3-us-west-1.amazonaws.com/marketplace/contents/1b7e1e7c-6c0b-4f20-9cd0-1d5ccedae620/bb64e937acf86447f6829767e958073c.fst?1460133999",
// will
"https://hifi-metaverse.s3-us-west-1.amazonaws.com/marketplace/contents/d029ae8d-2905-4eb7-ba46-4bd1b8cb9d73/4618d52e711fbb34df442b414da767bb.fst?1427170144"
];
var time = Math.random();
function update(dt) {
time -= dt;
if (time < 0.0) {
time = Math.random();
var index = ~~(Math.random() * avatarList.length);
MyAvatar.skeletonModelURL = avatarList[index];
}
}
Script.update.connect(update);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment