Skip to content

Commit

Permalink
Removed Unused Variables
Browse files Browse the repository at this point in the history
Signed-off-by: Adithya Krishna <[email protected]>
  • Loading branch information
Adithya Krishna committed Aug 22, 2023
1 parent 3639feb commit 2c74d83
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 12 deletions.
4 changes: 1 addition & 3 deletions src/GLShape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ import { MeshDoubleLambertMaterial, MeshLambertMaterial, Object3D, Coloring, Mes
import { CAP, GLDraw } from "./GLDraw"
import { subdivide_spline } from "./glcartoon";
import { adjustVolumeStyle, extend, Func, makeFunction } from "./utilities";
import { Gradient, GradientType } from "./Gradient";
import { LineStyleSpec } from "GLModel";
import { VolumetricRendererSpec } from "VolumetricRender";
import { GradientType } from "./Gradient";


/**
Expand Down
5 changes: 2 additions & 3 deletions src/Label.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@ import {
Texture,
SpriteMaterial,
Sprite,
Vector3,
Vector2,
} from "./WebGL";
import { Gradient } from "./Gradient";
import { Color, CC, ColorSpec } from "./colors";
import {XYZ} from "./WebGL/math"

//Adapted from the text sprite example from http://stemkoski.github.io/Three.js/index.html
// Adapted from the text sprite example from http://stemkoski.github.io/Three.js/index.html

export let LabelCount = 0;

// function for drawing rounded rectangles - for Label drawing
// Function for drawing rounded rectangles - for Label drawing
function roundRect(ctx, x, y, w, h, r, drawBorder) {
ctx.beginPath();
ctx.moveTo(x + r, y);
Expand Down
1 change: 0 additions & 1 deletion src/WebGL/Camera.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { Quaternion } from "./math";
import { Object3D } from "./core";
import { Matrix4, Vector3 } from "./math";
/*
Expand Down
4 changes: 4 additions & 0 deletions src/WebGL/Renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export class Renderer {
// GL state cache
private _oldDoubleSided = -1 as number | boolean;
private _oldFlipSided = -1 as number | boolean;
// @ts-ignore
private _oldBlending = -1;
private _oldDepthTest = -1;
private _oldDepthWrite = -1;
Expand Down Expand Up @@ -1508,6 +1509,7 @@ export class Renderer {
// Objects adding

private addObject(object, scene) {
// @ts-ignore
var g, gl, geometry, material, geometryGroup;

if (!object.__webglInit) {
Expand Down Expand Up @@ -1797,10 +1799,12 @@ export class Renderer {
b = 0,
color,
intensity,
// @ts-ignore
distance,
zlights = this._lights,
dirColors = zlights.directional.colors,
dirPositions = zlights.directional.positions,
// @ts-ignore
dirCount = 0,
dirLength = 0,
dirOffset = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/WebGL/core/Geometry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Material } from './../materials/Material';
import { LineBasicMaterial } from '../materials/LineBasicMaterial';
import { EventDispatcher } from "./EventDispatcher";
import { Vector3 } from "../math";
import { CC, Color, Colored } from "../../colors";
import { CC, Color } from "../../colors";
const BUFFERSIZE = 65535; //limited to 16bit indices
export class GeometryGroup {
id: number;
Expand Down
2 changes: 1 addition & 1 deletion src/colors.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Gradient, GradientType } from "./Gradient";
import { GradientType } from "./Gradient";

/* @interface
*
Expand Down
7 changes: 5 additions & 2 deletions src/parsers/MMTF.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export function MMTFparser(bindata: any, options: ParserOptionsSpec) {
var modelData: any[] = atoms.modelData = [];

// setup index counters
// @ts-ignore
var modelIndex = 0;
var chainIndex = 0;
var groupIndex = 0;
Expand Down Expand Up @@ -158,10 +159,12 @@ export function MMTFparser(bindata: any, options: ParserOptionsSpec) {
secStructEnd = true;
}
}
// @ts-ignore
var insCode = null as string | null;
if (mmtfData.insCodeList) {
insCode = String.fromCharCode(insCodeList[groupIndex]);
}
// @ts-ignore
var sequenceIndex = null;
if (sequenceIndexList) {
sequenceIndex = sequenceIndexList[groupIndex];
Expand All @@ -171,8 +174,8 @@ export function MMTFparser(bindata: any, options: ParserOptionsSpec) {
var groupName = groupData.groupName;
let groupType = groupData.chemCompType;
var startAtom = atomIndex;
//note the following is not identical to respecting HETATM records
//this information isn't available in MMTF.
// Note the following is not identical to respecting HETATM records
// this information isn't available in MMTF.
let isHETATM = mmtfHETATMtypes.has(groupType) || !chainIsPolymer[chainIndex];

for (k = 0; k < groupAtomCount; ++k) {
Expand Down
2 changes: 2 additions & 0 deletions src/parsers/utils/getSinglePDB.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export function getSinglePDB(lines: string[], options: ParserOptionsSpec, sslook
var atom: any;
var remainingLines = [];

// @ts-ignore
var hasStruct = false;
var serialToIndex: number[] = []; // map from pdb serial to index in atoms
var line: string | string[];
Expand All @@ -30,6 +31,7 @@ export function getSinglePDB(lines: string[], options: ParserOptionsSpec, sslook
for (let i = 0; i < lines.length; i++) {
line = lines[i].replace(/^\s*/, ""); // remove indent
var recordName = line.substring(0, 6);
// @ts-ignore
var startChain: string, startResi: number, endChain: any, endResi: number;

if (recordName.indexOf("END") == 0) {
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"allowJs": true,
"sourceMap": true,
"declaration": true,
"noUnusedLocals": false,
"noUnusedLocals": true,
"moduleResolution": "node",
"lib": [
"dom",
Expand Down

0 comments on commit 2c74d83

Please sign in to comment.