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" class="mockup"
:screen="require('./assets/screen.png')" :screen="require('./assets/screen.png')"
:rotation="{ :rotation="{
x: -0.2,
y: -0.3, y: -0.3,
z: -0.06, z: -0.06,
}" }"

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 KiB

After

Width:  |  Height:  |  Size: 86 KiB