mirror of
https://github.com/3dmol/3Dmol.js.git
synced 2026-06-04 16:49:50 +09:00
var -> let
This commit is contained in:
@@ -268,6 +268,7 @@ export class GLModel {
|
|||||||
}
|
}
|
||||||
return bestv;
|
return bestv;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//from atom, return a normalized vector v that is orthogonal and along which
|
//from atom, return a normalized vector v that is orthogonal and along which
|
||||||
//it is appropraite to draw multiple bonds
|
//it is appropraite to draw multiple bonds
|
||||||
@@ -280,6 +281,7 @@ export class GLModel {
|
|||||||
var v = null;
|
var v = null;
|
||||||
dir.sub(p1);
|
dir.sub(p1);
|
||||||
|
|
||||||
|
|
||||||
if (atom.bonds.length === 1) {
|
if (atom.bonds.length === 1) {
|
||||||
if (atom2.bonds.length === 1) {
|
if (atom2.bonds.length === 1) {
|
||||||
v = dir.clone();
|
v = dir.clone();
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ export class GeometryGroup {
|
|||||||
|
|
||||||
ret += indent + " coordIndex [\n";
|
ret += indent + " coordIndex [\n";
|
||||||
if(material.wireframe && this.faceArray) {
|
if(material.wireframe && this.faceArray) {
|
||||||
for (var i = 0; i < this.faceidx; i += 3) {
|
for (let i = 0; i < this.faceidx; i += 3) {
|
||||||
x = this.faceArray?.[i];
|
x = this.faceArray?.[i];
|
||||||
y = this.faceArray?.[i + 1];
|
y = this.faceArray?.[i + 1];
|
||||||
z = this.faceArray?.[i + 2];
|
z = this.faceArray?.[i + 2];
|
||||||
@@ -293,7 +293,7 @@ export class GeometryGroup {
|
|||||||
|
|
||||||
//faces
|
//faces
|
||||||
ret += indent + " coordIndex [\n";
|
ret += indent + " coordIndex [\n";
|
||||||
for (var i = 0; i < this.faceidx; i += 3) {
|
for (let i = 0; i < this.faceidx; i += 3) {
|
||||||
x = this.faceArray?.[i];
|
x = this.faceArray?.[i];
|
||||||
y = this.faceArray?.[i + 1];
|
y = this.faceArray?.[i + 1];
|
||||||
z = this.faceArray?.[i + 2];
|
z = this.faceArray?.[i + 2];
|
||||||
|
|||||||
@@ -107,4 +107,4 @@
|
|||||||
<div id='gldiv' style="width: 100%; height: 100vh;"></div>
|
<div id='gldiv' style="width: 100%; height: 100vh;"></div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user