24 lines
No EOL
692 B
JavaScript
24 lines
No EOL
692 B
JavaScript
(function(){
|
|
var avatarUrl;
|
|
|
|
this.preload = function(id){
|
|
var entProps = Entities.getEntityProperties(id);
|
|
var userData = entProps.userData;
|
|
avatarUrl = JSON.parse(userData).avatarUrl;
|
|
print("avatarURL: ", avatarUrl);
|
|
}
|
|
|
|
this.replaceAvatar = function() {
|
|
MyAvatar.useFullAvatarURL(avatarUrl);
|
|
};
|
|
|
|
this.replaceAvatarByMouse = function(entityID, mouseEvent) {
|
|
if (mouseEvent.isLeftButton) {
|
|
this.replaceAvatar();
|
|
}
|
|
};
|
|
|
|
this.clickDownOnEntity = this.replaceAvatarByMouse;
|
|
this.startFarTrigger = this.replaceAvatar;
|
|
this.startNearTrigger = this.replaceAvatar;
|
|
}) |