This repository was archived by the owner on Dec 21, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 612612 document . getElementById ( 'div_error' ) . style . display = 'block' ;
613613 }
614614
615- function set_atoms_labels_bonds ( pdb ) {
615+ async function set_atoms_labels_bonds ( pdb ) {
616+ const { mergeVertices } = await import ( 'three/addons/utils/BufferGeometryUtils.min.js' ) ;
617+
616618 let periodic_table = {
617619 'H' : 'Hydrogen' ,
618620 'He' : 'Helium' ,
846848 bevelEnabled : false
847849 } ) ;
848850
851+ textGeo = mergeVertices ( textGeo . clone ( ) , 1e-6 ) ;
852+ textGeo . computeVertexNormals ( ) ;
853+ textGeo . normalizeNormals ( ) ;
849854 textGeo . computeBoundingBox ( ) ;
850855
851856 let centerOffset_x = - 0.2 * ( textGeo . boundingBox . max . x - textGeo . boundingBox . min . x ) * 75 ;
Original file line number Diff line number Diff line change 702702 document . getElementById ( 'div_error' ) . style . display = 'block' ;
703703 }
704704
705- function set_atoms_labels_bonds ( pdb ) {
705+ async function set_atoms_labels_bonds ( pdb ) {
706+ const { mergeVertices } = await import ( 'three/addons/utils/BufferGeometryUtils.min.js' ) ;
707+
706708 let periodic_table = {
707709 'H' : 'Hydrogen' ,
708710 'He' : 'Helium' ,
936938 bevelEnabled : false
937939 } ) ;
938940
941+ textGeo = mergeVertices ( textGeo . clone ( ) , 1e-6 ) ;
942+ textGeo . computeVertexNormals ( ) ;
943+ textGeo . normalizeNormals ( ) ;
939944 textGeo . computeBoundingBox ( ) ;
940945
941946 let centerOffset_x = - 0.2 * ( textGeo . boundingBox . max . x - textGeo . boundingBox . min . x ) * 75 ;
You can’t perform that action at this time.
0 commit comments