Added a prop to control the phones color

This commit is contained in:
2022-01-30 00:03:05 +03:00
parent d497bfca8d
commit 3dccc62f9c
3 changed files with 13 additions and 4 deletions

View File

@@ -116,7 +116,11 @@ var script = {
},
lightClr: {
type: String,
default: 'hsl(0, 100%, 100%)',
default: 'white',
},
phoneClr: {
type: String,
default: 'white',
},
},
setup(props) {
@@ -207,7 +211,7 @@ var script = {
(body) => {
body.traverse((child) => {
if (child instanceof THREE.Mesh) {
child.material = new THREE.MeshLambertMaterial();
child.material = new THREE.MeshLambertMaterial({ color: props.phoneClr });
}
});