How to change default bonds style? #173
-
|
Hi! I would like to ask how to set default values of settings in Svelte application code. |
Beta Was this translation helpful? Give feedback.
Answered by
janosh
Oct 15, 2025
Replies: 1 comment
-
|
pass <script>
import { Structure } from 'matterviz'
const structure = {
lattice: {
matrix: [[6.256930122878799, 0.0, 3.831264723736088e-16], [
1.0061911048045417e-15,
6.256930122878799,
3.831264723736088e-16,
], [0.0, 0.0, 6.256930122878799]],
a: 6.256930122878799,
b: 6.256930122878799,
c: 6.256930122878799,
alpha: 90.0,
beta: 90.0,
gamma: 90.0,
pbc: [true, true, true],
},
sites: [{
species: [{ element: `Cs`, occu: 1 }],
xyz: [0.0, 0.0, 0.0],
abc: [0.0, 0.0, 0.0],
}, {
species: [{ element: `Cs`, occu: 1 }],
xyz: [3.1284650614394, 3.1284650614393996, 3.1284650614394],
abc: [0.5, 0.5, 0.5],
}],
}
</script>
<Structure
{structure}
scene_props={{ show_bonds: `always` }}
/> |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
janosh
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pass
scene_props={{ show_bonds: 'always' }}