mirror of
https://github.com/anatolykopyl/vue-three-d-mockup.git
synced 2026-03-26 12:55:08 +00:00
Partial rotation prop
This commit is contained in:
@@ -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,
|
||||||
}"
|
}"
|
||||||
|
|||||||
@@ -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 |
Reference in New Issue
Block a user