Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/Common/Core/CellArray/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function extractCellSizes(cellArray) {

function getNumberOfCells(cellArray) {
let cellId = 0;
for (let cellArrayIndex = 0; cellArrayIndex < cellArray.length; ) {
for (let cellArrayIndex = 0; cellArrayIndex < cellArray.length;) {
cellArrayIndex += cellArray[cellArrayIndex] + 1;
cellId++;
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Common/Core/DataArray/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ function vtkDataArray(publicAPI, model) {
let i = idx * model.numberOfComponents;
const last = Math.min(tuples.length, model.size - i);
let changed = false;
for (let j = 0; j < last; ) {
for (let j = 0; j < last;) {
const previousValue = model.values[i];
model.values[i] = tuples[j];
if (!Object.is(model.values[i], previousValue)) {
Expand Down
4 changes: 2 additions & 2 deletions Sources/Common/Core/Math/test/testMath.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,14 @@ it('Test Identity', () => {
0, 4, 0, 0,
2, 2, 1, 0,
0, 0, 9, 0,
0, 3, 7, 0]
0, 3, 7, 0];
// prettier-ignore
const Id = [
1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1
]
];
const returnedMatrix = vtkMath.identity(4, m);
expect(vtkMath.areEquals(m, Id)).toBeTruthy();
expect(vtkMath.areEquals(returnedMatrix, Id)).toBeTruthy();
Expand Down
4 changes: 2 additions & 2 deletions Sources/Common/DataModel/PiecewiseFunction/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ function vtkPiecewiseFunction(publicAPI, model) {
publicAPI.addSegment = (x1, y1, x2, y2) => {
// First, find all points in this range and remove them
publicAPI.sortAndUpdateRange();
for (let i = 0; i < model.nodes.length; ) {
for (let i = 0; i < model.nodes.length;) {
if (model.nodes[i].x >= x1 && model.nodes[i].x <= x2) {
model.nodes.splice(i, 1);
} else {
Expand Down Expand Up @@ -447,7 +447,7 @@ function vtkPiecewiseFunction(publicAPI, model) {

// Remove all points out-of-range
publicAPI.sortAndUpdateRange();
for (let i = 0; i < model.nodes.length; ) {
for (let i = 0; i < model.nodes.length;) {
if (model.nodes[i].x >= range[0] && model.nodes[i].x <= range[1]) {
model.nodes.splice(i, 1);
} else {
Expand Down
4 changes: 2 additions & 2 deletions Sources/Common/DataModel/Polygon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function pointInPolygon(point, vertices, bounds, normal) {
const p0 = [];
const p1 = [];

for (let i = 0; i < vertices.length; ) {
for (let i = 0; i < vertices.length;) {
// Check coincidence to polygon vertices
p0[0] = vertices[i++];
p0[1] = vertices[i++];
Expand Down Expand Up @@ -105,7 +105,7 @@ function pointInPolygon(point, vertices, bounds, normal) {
// polygon. Process all polygon edges determining if there are ascending or
// descending crossings of the line axis1=constant.
let wn = 0;
for (let i = 0; i < vertices.length; ) {
for (let i = 0; i < vertices.length;) {
p0[0] = vertices[i++];
p0[1] = vertices[i++];
p0[2] = vertices[i++];
Expand Down
2 changes: 1 addition & 1 deletion Sources/Filters/Core/PolyDataNormals/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function vtkPolyDataNormals(publicAPI, model) {
// A point normal is the sum of all the cell normals the point belongs to
if (model.computePointNormals) {
const pointNormal = [0, 0, 0];
for (let i = 0; i < pointsData.length; ) {
for (let i = 0; i < pointsData.length;) {
pointNormal[0] = pointNormals[i];
pointNormal[1] = pointNormals[i + 1];
pointNormal[2] = pointNormals[i + 2];
Expand Down
2 changes: 1 addition & 1 deletion Sources/Filters/Core/ReverseSense/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function reverseCellArray(inputCells) {
const inputData = inputCells.getData();
const outputData = inputData.slice();

for (let offset = 0, len = inputData.length; offset < len; ) {
for (let offset = 0, len = inputData.length; offset < len;) {
const cellSize = inputData[offset];
let left = offset + 1;
let right = offset + cellSize;
Expand Down
2 changes: 1 addition & 1 deletion Sources/Filters/Core/ThresholdPoints/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ function vtkThresholdPoints(publicAPI, model) {
}
if (keepCell) {
newCellData[newP++] = numberOfPoints;
for (let p = firstPointIndex; p <= numberOfPoints; ) {
for (let p = firstPointIndex; p <= numberOfPoints;) {
newCellData[newP++] = newPointIds[p++];
}
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Filters/General/OBBTree/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ function vtkOBBTree(publicAPI, model) {
let bestRatio = 1;
let foundBestSplit = 0;
let bestPlane = 0;
for (; !splitAcceptable && splitPlane < 3; ) {
for (; !splitAcceptable && splitPlane < 3;) {
// compute split normal
for (let i = 0; i < 3; i++) {
n[i] = axes[splitPlane][i];
Expand Down
8 changes: 4 additions & 4 deletions Sources/Filters/General/ShrinkPolyData/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ function vtkShrinkPolyData(publicAPI, model) {
const newVertData = [];
const cellPointIds = [];

for (let i = 0; i < vertData.length; ) {
for (let i = 0; i < vertData.length;) {
cellPointIds.length = 0; // Clear previous point IDs
const npts = vertData[i];
for (let j = 1; j <= npts; j++) {
Expand Down Expand Up @@ -198,7 +198,7 @@ function vtkShrinkPolyData(publicAPI, model) {
const lineData = inLines.getData();
const newLineData = [];

for (let i = 0; i < lineData.length; ) {
for (let i = 0; i < lineData.length;) {
const npts = lineData[i];

// Process each line segment
Expand Down Expand Up @@ -229,7 +229,7 @@ function vtkShrinkPolyData(publicAPI, model) {
const newPolyData = [];
const cellPointIds = [];

for (let i = 0; i < polyData.length; ) {
for (let i = 0; i < polyData.length;) {
cellPointIds.length = 0; // Clear previous point IDs
const npts = polyData[i];

Expand Down Expand Up @@ -260,7 +260,7 @@ function vtkShrinkPolyData(publicAPI, model) {
const stripData = inStrips.getData();
const newPolyData = [];

for (let i = 0; i < stripData.length; ) {
for (let i = 0; i < stripData.length;) {
const npts = stripData[i];

for (let j = 0; j < npts - 2; j++) {
Expand Down
2 changes: 1 addition & 1 deletion Sources/IO/Geometry/STLWriter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function writeSTL(polyData, format = FormatTypes.BINARY, transform = null) {
}

// Polys
for (let i = 0; i < polys.length; ) {
for (let i = 0; i < polys.length;) {
const pointNumber = polys[i++];

if (pointNumber) {
Expand Down
2 changes: 1 addition & 1 deletion Sources/IO/Misc/OBJReader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function end(model) {
const pointKeys = [];
let duplicatesCount = 0;

for (let offset = 0; offset < nbElems; ) {
for (let offset = 0; offset < nbElems;) {
const cellSize = polyIn[offset++];
for (let pIdx = 0; pIdx < cellSize; pIdx++) {
const [vIdx, tcIdx, nIdx] = polyIn[offset++];
Expand Down
2 changes: 1 addition & 1 deletion Sources/IO/Misc/OBJReader/test/testOBJReader.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ it('Test normals with trackDuplicates', () => {
.getData();
const mergedPointsPolysData = new Uint16Array(polys.length);
let cellSize = 0;
for (let offset = 0; offset < polys.length; ) {
for (let offset = 0; offset < polys.length;) {
cellSize = polys[offset];
mergedPointsPolysData[offset++] = cellSize;
for (let pointInCell = 0; pointInCell < cellSize; ++pointInCell) {
Expand Down
2 changes: 1 addition & 1 deletion Sources/IO/XML/XMLPolyDataWriter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function vtkXMLPolyDataWriter(publicAPI, model) {
const cellsData = cells.getData();
let npts = cellsData[0];
let offset = 0;
for (let i = 0; i < cellsData.length; ) {
for (let i = 0; i < cellsData.length;) {
npts = cellsData[i++];
for (let j = 0; j < npts; ++j) {
connectivity.push(cellsData[i++]);
Expand Down
4 changes: 2 additions & 2 deletions Sources/Rendering/Core/ColorTransferFunction/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ function vtkColorTransferFunction(publicAPI, model) {
publicAPI.addRGBSegment = (x1, r1, g1, b1, x2, r2, g2, b2) => {
// First, find all points in this range and remove them
publicAPI.sortAndUpdateRange();
for (let i = 0; i < model.nodes.length; ) {
for (let i = 0; i < model.nodes.length;) {
if (model.nodes[i].x >= x1 && model.nodes[i].x <= x2) {
model.nodes.splice(i, 1);
} else {
Expand Down Expand Up @@ -1113,7 +1113,7 @@ function vtkColorTransferFunction(publicAPI, model) {

// Remove all points out-of-range
publicAPI.sortAndUpdateRange();
for (let i = 0; i < model.nodes.length; ) {
for (let i = 0; i < model.nodes.length;) {
if (model.nodes[i].x >= range[0] && model.nodes[i].x <= range[1]) {
model.nodes.splice(i, 1);
} else {
Expand Down
6 changes: 3 additions & 3 deletions Sources/Rendering/Core/Light/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { vtkObject } from '../../../interfaces';
import { RGBColor, Vector3 } from '../../../types';

export enum LIGHT_TYPES {
'HeadLight',
'CameraLight',
'SceneLight',
HeadLight,
CameraLight,
SceneLight,
}

export interface ILightInitialValues {
Expand Down
4 changes: 2 additions & 2 deletions Sources/Rendering/SceneGraph/ViewNode/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { vtkObject } from '../../../interfaces';
import vtkRenderPass from '../RenderPass';

export enum PASS_TYPES {
'Build',
'Render',
Build,
Render,
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Sources/Rendering/WebGPU/BufferManager/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ function generateNormals(cellArray, pointArray) {
const size = cellArrayData.length;
let vboidx = 0;

for (let index = 0; index < size; ) {
for (let index = 0; index < size;) {
const normal = getNormal(
pointData,
cellArrayData[index + 1],
Expand Down
8 changes: 4 additions & 4 deletions Sources/Rendering/WebGPU/IndexBuffer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ function vtkWebGPUIndexBuffer(publicAPI, model) {
processCell = countPrimitive;
let oneToOne = true;
let cellId = cellOffset;
for (let cellArrayIndex = 0; cellArrayIndex < cellArraySize; ) {
for (let cellArrayIndex = 0; cellArrayIndex < cellArraySize;) {
const countBefore = state.primitiveCount;
func(array[cellArrayIndex], array, cellArrayIndex + 1, cellId, state);
if (state.primitiveCount - countBefore !== 1) {
Expand All @@ -329,7 +329,7 @@ function vtkWebGPUIndexBuffer(publicAPI, model) {
processCell = fillPrimitive;
state.primitiveCount = 0;
cellId = cellOffset;
for (let cellArrayIndex = 0; cellArrayIndex < cellArraySize; ) {
for (let cellArrayIndex = 0; cellArrayIndex < cellArraySize;) {
func(array[cellArrayIndex], array, cellArrayIndex + 1, cellId, state);
cellArrayIndex += array[cellArrayIndex] + 1;
cellId++;
Expand Down Expand Up @@ -371,7 +371,7 @@ function vtkWebGPUIndexBuffer(publicAPI, model) {
// first we count how many extra provoking points we need
processCell = countCell;
let cellId = cellOffset || 0;
for (let cellArrayIndex = 0; cellArrayIndex < cellArraySize; ) {
for (let cellArrayIndex = 0; cellArrayIndex < cellArraySize;) {
state.cellProvokedMap.clear();
func(array[cellArrayIndex], array, cellArrayIndex + 1, cellId, state);
cellArrayIndex += array[cellArrayIndex] + 1;
Expand Down Expand Up @@ -408,7 +408,7 @@ function vtkWebGPUIndexBuffer(publicAPI, model) {
// and fill them in
processCell = fillCell;
cellId = cellOffset || 0;
for (let cellArrayIndex = 0; cellArrayIndex < cellArraySize; ) {
for (let cellArrayIndex = 0; cellArrayIndex < cellArraySize;) {
state.cellProvokedMap.clear();
func(array[cellArrayIndex], array, cellArrayIndex + 1, cellId, state);
cellArrayIndex += array[cellArrayIndex] + 1;
Expand Down
Loading
Loading