Partial rotation prop

This commit is contained in:
2022-02-01 17:50:50 +03:00
parent 23e4222673
commit 062d143a33
3 changed files with 7 additions and 7 deletions

View File

@@ -13,7 +13,6 @@
class="mockup"
:screen="require('./assets/screen.png')"
:rotation="{
x: -0.2,
y: -0.3,
z: -0.06,
}"

View File

@@ -32,11 +32,7 @@ export default {
},
rotation: {
type: Object,
default: () => ({
x: -0.2,
y: 0.3,
z: 0.06,
}),
default: () => ({}),
},
},
setup(props) {
@@ -133,7 +129,12 @@ export default {
y: 0,
z: 0,
},
rotation: props.rotation,
rotation: {
x: -0.2,
y: 0.3,
z: 0.06,
...props.rotation,
},
});
phone.startFloat();
scene.add(phone);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 KiB

After

Width:  |  Height:  |  Size: 86 KiB