|
@@ -70,7 +70,7 @@ export default (props: Props) => {
|
|
|
|
|
|
let avatarImg = agent.avatarLogo ?? DEFAULT_AVATAR_SHARE_BG
|
|
let avatarImg = agent.avatarLogo ?? DEFAULT_AVATAR_SHARE_BG
|
|
|
|
|
|
- stage.backgroundColor = 'red'
|
|
|
|
|
|
+ stage.backgroundColor = 'white'
|
|
|
|
|
|
// 如果有头像,加载头像图片先
|
|
// 如果有头像,加载头像图片先
|
|
const imgArr = [
|
|
const imgArr = [
|
|
@@ -95,6 +95,10 @@ export default (props: Props) => {
|
|
dWidth: canvasWidth,
|
|
dWidth: canvasWidth,
|
|
dHeight: (canvasWidth / avatarTexture.width) * avatarTexture.height,
|
|
dHeight: (canvasWidth / avatarTexture.width) * avatarTexture.height,
|
|
});
|
|
});
|
|
|
|
+ // 如果有头像,则需要上提,以显示出头像,如果是默认图则无需上提
|
|
|
|
+ if(agent.avatarLogo){
|
|
|
|
+ avatar.y = -56 * ratio;
|
|
|
|
+ }
|
|
const avatarWrapper = new Container()
|
|
const avatarWrapper = new Container()
|
|
avatarWrapper.width = canvasWidth
|
|
avatarWrapper.width = canvasWidth
|
|
avatarWrapper.height = 100
|
|
avatarWrapper.height = 100
|