update
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}`
|
||||
|
||||
Reference in New Issue
Block a user