Competing bots profile pictures being shown
This commit is contained in:
1 parent
2c98d4c906
commit
3cbe7bf8f4
2 files changed
+18
-1
No files matched your search
@@ -274,8 +274,17 @@ function newProfileBall() {
|
||||
|
||||
if (image !== null && image !== undefined) {
|
||||
|
||||
browserCanvasContext.save();
|
||||
browserCanvasContext.beginPath();
|
||||
browserCanvasContext.arc(pFloatingObject.currentPosition.x , pFloatingObject.currentPosition.y , pFloatingObject.currentImageSize / 2, 0, Math.PI * 2, true);
|
||||
browserCanvasContext.closePath();
|
||||
browserCanvasContext.clip();
|
||||
browserCanvasContext.drawImage(image, pFloatingObject.currentPosition.x - pFloatingObject.currentImageSize / 2, pFloatingObject.currentPosition.y - pFloatingObject.currentImageSize / 2, pFloatingObject.currentImageSize, pFloatingObject.currentImageSize);
|
||||
|
||||
browserCanvasContext.beginPath();
|
||||
browserCanvasContext.arc(pFloatingObject.currentPosition.x - pFloatingObject.currentImageSize / 2, pFloatingObject.currentPosition.y - pFloatingObject.currentImageSize / 2, pFloatingObject.currentImageSize / 2, 0, Math.PI * 2, true);
|
||||
browserCanvasContext.clip();
|
||||
browserCanvasContext.closePath();
|
||||
browserCanvasContext.restore();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -294,8 +294,16 @@
|
||||
let bot = ecosystem.getBot(devTeam, participant.bot);
|
||||
let imageId = participant.devTeam + "." + participant.profilePicture;
|
||||
|
||||
const TEAM = devTeam.codeName.toLowerCase();
|
||||
const STORAGE_URL = "https://algobotcommstorage.blob.core.windows.net";
|
||||
|
||||
let botAvatar = new Image();
|
||||
|
||||
botAvatar.src = STORAGE_URL + "/" + TEAM + "/" + TEAM + "-" + "banner.jpg";
|
||||
|
||||
competitionPlotter.plotter.payload[k].profile.downLabel = bot.displayName;
|
||||
competitionPlotter.plotter.payload[k].profile.imageId = imageId;
|
||||
competitionPlotter.plotter.payload[k].profile.botAvatar = botAvatar;
|
||||
|
||||
canvas.floatingSpace.profileBalls.createNewProfileBall(competitionPlotter.plotter.payload[k], onProfileBallCreated)
|
||||
|
||||
|
||||
Reference in new issue
Block a user