Merge branch 'main' of 47.107.44.202:xionglijia/18xchat
This commit is contained in:
@@ -105,8 +105,8 @@ export class GirlDetailPanel extends li_BaseView {
|
||||
this.avatarVideo.node.parent.getComponent(UITransform);
|
||||
const videoTransform = this.avatarVideo.node.getComponent(UITransform);
|
||||
|
||||
if (parentTransform && videoTransform && videoTransform.width > 0) {
|
||||
const scale = parentTransform.width / videoTransform.width;
|
||||
if (parentTransform && videoTransform && videoTransform.height > 0) {
|
||||
const scale = parentTransform.height / videoTransform.height;
|
||||
this.avatarVideo.node.setScale(scale, scale, 1);
|
||||
console.log(
|
||||
`Video scaled to: ${scale}, parent height: ${parentTransform.height}, video height: ${videoTransform.height}`
|
||||
|
||||
@@ -19,7 +19,7 @@ export class DetailImageItem extends Component {
|
||||
|
||||
base: GirlDetailPanel;
|
||||
url: string;
|
||||
|
||||
isImage: boolean;
|
||||
uitransform: UITransform;
|
||||
|
||||
onLoad() {
|
||||
@@ -30,6 +30,8 @@ export class DetailImageItem extends Component {
|
||||
onClickThis() {
|
||||
let data = {
|
||||
url: this.url,
|
||||
isImg: this.isImage,
|
||||
|
||||
closeFunc: () => {
|
||||
this.base.setVideEnable(true);
|
||||
},
|
||||
@@ -87,6 +89,7 @@ export class DetailImageItem extends Component {
|
||||
this.url = path;
|
||||
|
||||
let imgPath = this.url;
|
||||
this.isImage = isImage;
|
||||
if (!isImage) {
|
||||
imgPath = this.url + "_thumbnail";
|
||||
}
|
||||
|
||||
@@ -70,6 +70,8 @@ export class AiCharacter {
|
||||
constructor(_buf_: ByteBuf) {
|
||||
this.id = _buf_.readInt()
|
||||
this.systemInstruction = _buf_.readString()
|
||||
this.basePrompt = _buf_.readString()
|
||||
this.additionPrompt = _buf_.readString()
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -80,10 +82,20 @@ export class AiCharacter {
|
||||
* 系统指令
|
||||
*/
|
||||
readonly systemInstruction: string
|
||||
/**
|
||||
* 个人信息基础prompt(聊天&评分都需要)
|
||||
*/
|
||||
readonly basePrompt: string
|
||||
/**
|
||||
* 额外信息prompt(聊天&评分都需要)
|
||||
*/
|
||||
readonly additionPrompt: string
|
||||
|
||||
resolve(tables:Tables) {
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,7 +113,6 @@ export class Girl {
|
||||
this.tagKey = _buf_.readString()
|
||||
this.priceType = _buf_.readInt()
|
||||
this.avatarPath = _buf_.readString()
|
||||
this.starCount = _buf_.readInt()
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -132,10 +143,6 @@ export class Girl {
|
||||
* 头像路径
|
||||
*/
|
||||
readonly avatarPath: string
|
||||
/**
|
||||
* 评价星数
|
||||
*/
|
||||
readonly starCount: number
|
||||
|
||||
resolve(tables:Tables) {
|
||||
|
||||
@@ -145,7 +152,6 @@ export class Girl {
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,8 +164,12 @@ export class GirlDetail {
|
||||
constructor(_buf_: ByteBuf) {
|
||||
this.id = _buf_.readInt()
|
||||
this.detailDesc = _buf_.readString()
|
||||
{ let n = Math.min(_buf_.readSize(), _buf_.size); this.imageType = []; for(let i = 0 ; i < n ; i++) { let _e0 ;_e0 = _buf_.readInt(); this.imageType.push(_e0);}}
|
||||
{ let n = Math.min(_buf_.readSize(), _buf_.size); this.imagePrice = []; for(let i = 0 ; i < n ; i++) { let _e0 ;_e0 = _buf_.readFloat(); this.imagePrice.push(_e0);}}
|
||||
{ let n = Math.min(_buf_.readSize(), _buf_.size); this.pics = []; for(let i = 0 ; i < n ; i++) { let _e0 ;_e0 = _buf_.readString(); this.pics.push(_e0);}}
|
||||
{ let n = Math.min(_buf_.readSize(), _buf_.size); this.vids = []; for(let i = 0 ; i < n ; i++) { let _e0 ;_e0 = _buf_.readString(); this.vids.push(_e0);}}
|
||||
{ let n = Math.min(_buf_.readSize(), _buf_.size); this.emotion = []; for(let i = 0 ; i < n ; i++) { let _e0 ;_e0 = _buf_.readString(); this.emotion.push(_e0);}}
|
||||
{ let n = Math.min(_buf_.readSize(), _buf_.size); this.videoPrice = []; for(let i = 0 ; i < n ; i++) { let _e0 ;_e0 = _buf_.readFloat(); this.videoPrice.push(_e0);}}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -170,6 +180,14 @@ export class GirlDetail {
|
||||
* 自我介绍
|
||||
*/
|
||||
readonly detailDesc: string
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
readonly imageType: number[]
|
||||
/**
|
||||
* 价格
|
||||
*/
|
||||
readonly imagePrice: number[]
|
||||
/**
|
||||
* 图片资源列表
|
||||
*/
|
||||
@@ -178,12 +196,24 @@ export class GirlDetail {
|
||||
* 视频资源列表
|
||||
*/
|
||||
readonly vids: string[]
|
||||
/**
|
||||
* 关联情绪
|
||||
*/
|
||||
readonly emotion: string[]
|
||||
/**
|
||||
* 价格
|
||||
*/
|
||||
readonly videoPrice: number[]
|
||||
|
||||
resolve(tables:Tables) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -201,6 +231,8 @@ export class GlobalConfig {
|
||||
this.Timeout = _buf_.readInt()
|
||||
this.FreeChatTimes = _buf_.readInt()
|
||||
this.GameName = _buf_.readString()
|
||||
this.EmotionRating = _buf_.readString()
|
||||
this.girlBasePrompt = _buf_.readString()
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -228,6 +260,14 @@ export class GlobalConfig {
|
||||
* 游戏名
|
||||
*/
|
||||
readonly GameName: string
|
||||
/**
|
||||
* 情绪评分机器人system_prompt,需拼接角色prompt
|
||||
*/
|
||||
readonly EmotionRating: string
|
||||
/**
|
||||
* ai机器人基础规则
|
||||
*/
|
||||
readonly girlBasePrompt: string
|
||||
|
||||
resolve(tables:Tables) {
|
||||
|
||||
@@ -237,6 +277,8 @@ export class GlobalConfig {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -646,6 +688,14 @@ export class TbGlobalConfig {
|
||||
* 游戏名
|
||||
*/
|
||||
get GameName(): string { return this._data.GameName; }
|
||||
/**
|
||||
* 情绪评分机器人system_prompt,需拼接角色prompt
|
||||
*/
|
||||
get EmotionRating(): string { return this._data.EmotionRating; }
|
||||
/**
|
||||
* ai机器人基础规则
|
||||
*/
|
||||
get girlBasePrompt(): string { return this._data.girlBasePrompt; }
|
||||
|
||||
resolve(tables:Tables) {
|
||||
this._data.resolve(tables)
|
||||
|
||||
Reference in New Issue
Block a user