From b1c81f74ef122c5db0248f95bebc34fd1fa4c89f Mon Sep 17 00:00:00 2001 From: RoxaneBurri Date: Wed, 15 Mar 2023 09:45:49 +0100 Subject: [PATCH] fix: review changes --- src/App.tsx | 132 +--------------------------------------- src/data.ts | 121 ++++++++++++++++++++++++++++++++++++ src/utils.test.ts | 15 +---- src/utils.ts | 124 +++---------------------------------- test/word-cloud.test.ts | 71 --------------------- 5 files changed, 135 insertions(+), 328 deletions(-) create mode 100644 src/data.ts delete mode 100644 test/word-cloud.test.ts diff --git a/src/App.tsx b/src/App.tsx index 0f2d63b..7c372e9 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -3,7 +3,6 @@ import { futurPosition, getBoundingRect, placeWordOnOuterCircle, - Word, } from "./utils"; import * as React from "react"; import { @@ -13,135 +12,15 @@ import { CONTAINER_WIDTH, DEFAULT_RECT, } from "./constants"; +import { defaultWords1 } from "./data"; const CUT_OFF = 0.5; export const MAX_FONT_SIZE = 20; export const MIN_FONT_SIZE = 6; -const defaultWords: Word[] = [ - { id: "word-1", text: " Big word ", coef: 0.99 }, - { id: "word-2", text: "hello", coef: 0.8 }, - { id: "word-4", text: "caramba", coef: 0.97 }, - { id: "word-3", text: "all", coef: 0.74 }, - { id: "word-5", text: "Piniata", coef: 0.6 }, - { id: "word-6", text: "Taxi", coef: 0.93 }, - { id: "word-7", text: "papa", coef: 0.94 }, - { id: "word-8", text: "chicita", coef: 0.66 }, - { id: "word-9", text: "hellicopter", coef: 0.92 }, - { id: "word-10", text: "chiold", coef: 0.75 }, - { id: "word-11", text: "text", coef: 0.81 }, - { id: "word-12", text: "document", coef: 0.77 }, - { id: "word-13", text: "text", coef: 0.89 }, - { id: "word-14", text: "finger", coef: 0.91 }, - { id: "word-15", text: "girl", coef: 0.88 }, -]; - -// const defaultWords: Word[] = [ -// { id: "word-1", text: "group", coef: 0.99 }, -// { id: "word-2", text: "people", coef: 0.99 }, -// { id: "word-4", text: "adult", coef: 0.98 }, -// { id: "word-3", text: "man", coef: 0.97 }, -// { id: "word-5", text: "woman", coef: 0.96 }, -// { id: "word-6", text: "room", coef: 0.95 }, -// { id: "word-7", text: "indoors", coef: 0.94 }, -// { id: "word-8", text: "group together", coef: 0.92 }, -// { id: "word-9", text: "facial expression", coef: 0.92 }, -// { id: "word-10", text: "wear", coef: 0.92 }, -// { id: "word-11", text: "meeting", coef: 0.89 }, -// { id: "word-12", text: "several", coef: 0.86 }, -// { id: "word-13", text: "exhibition", coef: 0.85 }, -// { id: "word-14", text: "education", coef: 0.84 }, -// { id: "word-15", text: "religion", coef: 0.83 }, -// { id: "word-16", text: "award", coef: 0.82 }, -// { id: "word-17", text: "portrait", coef: 0.8 }, -// { id: "word-18", text: "happiness", coef: 0.8 }, -// { id: "word-19", text: "school", coef: 0.8 }, -// { id: "word-20", text: "league", coef: 0.79 }, -// { id: "word-21", text: "five", coef: 0.79 }, -// { id: "word-22", text: "celebration", coef: 0.79 }, -// { id: "word-23", text: "four", coef: 0.78 }, -// { id: "word-24", text: "business", coef: 0.78 }, -// { id: "word-25", text: "furniture", coef: 0.77 }, -// { id: "word-26", text: "leader", coef: 0.77 }, -// { id: "word-27", text: "festival", coef: 0.77 }, -// { id: "word-28", text: "commerce", coef: 0.76 }, -// { id: "word-29", text: "many", coef: 0.75 }, -// { id: "word-30", text: "outfit", coef: 0.74 }, -// { id: "word-31", text: "chair", coef: 0.74 }, -// { id: "word-32", text: "girl", coef: 0.73 }, -// { id: "word-34", text: "administration", coef: 0.73 }, -// { id: "word-33", text: "boy", coef: 0.72 }, -// { id: "word-35", text: "wedding", coef: 0.71 }, -// { id: "word-36", text: "child", coef: 0.71 }, -// { id: "word-37", text: "daylight", coef: 0.71 }, -// { id: "word-38", text: "music", coef: 0.71 }, -// { id: "word-39", text: "container", coef: 0.71 }, -// { id: "word-40", text: "employee", coef: 0.71 }, -// { id: "word-41", text: "three", coef: 0.7 }, -// { id: "word-42", text: "family", coef: 0.7 }, -// { id: "word-44", text: "office", coef: 0.7 }, -// { id: "word-43", text: "cooperation", coef: 0.69 }, -// { id: "word-45", text: "museum", coef: 0.68 }, -// { id: "word-46", text: "travel", coef: 0.68 }, -// { id: "word-47", text: "singer", coef: 0.66 }, -// { id: "word-48", text: "performance", coef: 0.65 }, -// { id: "word-49", text: "vehicle", coef: 0.65 }, -// { id: "word-50", text: "event", coef: 0.64 }, -// { id: "word-51", text: "ceremony", coef: 0.63 }, -// { id: "word-52", text: "musician", coef: 0.63 }, -// { id: "word-54", text: "enjoyment", coef: 0.63 }, -// { id: "word-53", text: "recreation", coef: 0.61 }, -// { id: "word-55", text: "prosperity", coef: 0.61 }, -// { id: "word-56", text: "landscape", coef: 0.61 }, -// { id: "word-57", text: "teamwork", coef: 0.6 }, -// { id: "word-58", text: "gown", coef: 0.59 }, -// { id: "word-59", text: "city", coef: 0.59 }, -// { id: "word-60", text: "university", coef: 0.59 }, -// { id: "word-61", text: "table", coef: 0.58 }, -// { id: "word-62", text: "soccer", coef: 0.57 }, -// { id: "word-64", text: "home", coef: 0.57 }, -// { id: "word-63", text: "hotel", coef: 0.56 }, -// { id: "word-65", text: "movie", coef: 0.55 }, -// { id: "word-66", text: "food", coef: 0.55 }, -// { id: "word-67", text: "band", coef: 0.54 }, -// { id: "word-68", text: "aircraft", coef: 0.54 }, -// { id: "word-69", text: "presentation", coef: 0.53 }, -// { id: "word-70", text: "military", coef: 0.53 }, -// { id: "word-71", text: "parliament", coef: 0.52 }, -// { id: "word-72", text: "queue", coef: 0.52 }, -// { id: "word-74", text: "competition", coef: 0.51 }, -// { id: "word-73", text: "guest", coef: 0.51 }, -// { id: "word-75", text: "graduation", coef: 0.5 }, -// { id: "word-76", text: "crowd", coef: 0.5 }, -// { id: "word-77", text: "actor", coef: 0.5 }, -// { id: "word-78", text: "politician", coef: 0.49 }, -// { id: "word-79", text: "planning", coef: 0.49 }, -// { id: "word-80", text: "airport", coef: 0.49 }, -// { id: "word-81", text: "adolescent", coef: 0.49 }, -// { id: "word-82", text: "tie", coef: 0.49 }, -// { id: "word-84", text: "uniform", coef: 0.48 }, -// { id: "word-83", text: "interaction", coef: 0.48 }, -// { id: "word-85", text: "authority", coef: 0.48 }, -// { id: "word-86", text: "drink", coef: 0.48 }, -// { id: "word-87", text: "coffee", coef: 0.48 }, -// { id: "word-88", text: "friendship", coef: 0.47 }, -// { id: "word-89", text: "street", coef: 0.47 }, -// { id: "word-90", text: "election", coef: 0.46 }, -// { id: "word-91", text: "convention", coef: 0.46 }, -// { id: "word-92", text: "democracy", coef: 0.45 }, -// { id: "word-94", text: "gold", coef: 0.45 }, -// { id: "word-93", text: "partnership", coef: 0.45 }, -// { id: "word-95", text: "football", coef: 0.45 }, -// { id: "word-96", text: "document", coef: 0.44 }, -// { id: "word-97", text: "audience", coef: 0.44 }, -// { id: "word-98", text: "public show", coef: 0.44 }, -// { id: "word-99", text: "popularity", coef: 0.44 }, -// { id: "word-100", text: "seat", coef: 0.44 }, -// ]; - const Wordcloud = () => { - const [words, setWords] = React.useState(defaultWords); + const [words, setWords] = React.useState(defaultWords1); const updateWords = () => { setWords((prevWords) => { @@ -159,12 +38,7 @@ const Wordcloud = () => { const newPositions = rectsToPlace.slice(1).reduce( (placedElements, rect) => { // move the word - const futureWord = futurPosition( - // put the word in random place around the parent - placeWordOnOuterCircle(rect, placedElements), - placedElements, - 3 - ); + const futureWord = futurPosition(rect, placedElements, 3); return [...placedElements, futureWord]; }, [centeredRect] diff --git a/src/data.ts b/src/data.ts new file mode 100644 index 0000000..67cb9c0 --- /dev/null +++ b/src/data.ts @@ -0,0 +1,121 @@ +import { Word } from "./utils"; + +export const defaultWords1: Word[] = [ + { id: "word-1", text: " Big word ", coef: 0.99 }, + { id: "word-2", text: "hello", coef: 0.8 }, + { id: "word-4", text: "caramba", coef: 0.97 }, + { id: "word-3", text: "all", coef: 0.74 }, + { id: "word-5", text: "Piniata", coef: 0.6 }, + { id: "word-6", text: "Taxi", coef: 0.93 }, + { id: "word-7", text: "papa", coef: 0.94 }, + { id: "word-8", text: "chicita", coef: 0.66 }, + { id: "word-9", text: "hellicopter", coef: 0.92 }, + { id: "word-10", text: "chiold", coef: 0.75 }, + { id: "word-11", text: "text", coef: 0.81 }, + { id: "word-12", text: "document", coef: 0.77 }, + { id: "word-13", text: "text", coef: 0.89 }, + { id: "word-14", text: "finger", coef: 0.91 }, + { id: "word-15", text: "girl", coef: 0.88 }, +]; +export const defaultWords2: Word[] = [ + { id: "word-1", text: "group", coef: 0.99 }, + { id: "word-2", text: "people", coef: 0.99 }, + { id: "word-4", text: "adult", coef: 0.98 }, + { id: "word-3", text: "man", coef: 0.97 }, + { id: "word-5", text: "woman", coef: 0.96 }, + { id: "word-6", text: "room", coef: 0.95 }, + { id: "word-7", text: "indoors", coef: 0.94 }, + { id: "word-8", text: "group together", coef: 0.92 }, + { id: "word-9", text: "facial expression", coef: 0.92 }, + { id: "word-10", text: "wear", coef: 0.92 }, + { id: "word-11", text: "meeting", coef: 0.89 }, + { id: "word-12", text: "several", coef: 0.86 }, + { id: "word-13", text: "exhibition", coef: 0.85 }, + { id: "word-14", text: "education", coef: 0.84 }, + { id: "word-15", text: "religion", coef: 0.83 }, + { id: "word-16", text: "award", coef: 0.82 }, + { id: "word-17", text: "portrait", coef: 0.8 }, + { id: "word-18", text: "happiness", coef: 0.8 }, + { id: "word-19", text: "school", coef: 0.8 }, + { id: "word-20", text: "league", coef: 0.79 }, + { id: "word-21", text: "five", coef: 0.79 }, + { id: "word-22", text: "celebration", coef: 0.79 }, + { id: "word-23", text: "four", coef: 0.78 }, + { id: "word-24", text: "business", coef: 0.78 }, + { id: "word-25", text: "furniture", coef: 0.77 }, + { id: "word-26", text: "leader", coef: 0.77 }, + { id: "word-27", text: "festival", coef: 0.77 }, + { id: "word-28", text: "commerce", coef: 0.76 }, + { id: "word-29", text: "many", coef: 0.75 }, + { id: "word-30", text: "outfit", coef: 0.74 }, + { id: "word-31", text: "chair", coef: 0.74 }, + { id: "word-32", text: "girl", coef: 0.73 }, + { id: "word-34", text: "administration", coef: 0.73 }, + { id: "word-33", text: "boy", coef: 0.72 }, + { id: "word-35", text: "wedding", coef: 0.71 }, + { id: "word-36", text: "child", coef: 0.71 }, + { id: "word-37", text: "daylight", coef: 0.71 }, + { id: "word-38", text: "music", coef: 0.71 }, + { id: "word-39", text: "container", coef: 0.71 }, + { id: "word-40", text: "employee", coef: 0.71 }, + { id: "word-41", text: "three", coef: 0.7 }, + { id: "word-42", text: "family", coef: 0.7 }, + { id: "word-44", text: "office", coef: 0.7 }, + { id: "word-43", text: "cooperation", coef: 0.69 }, + { id: "word-45", text: "museum", coef: 0.68 }, + { id: "word-46", text: "travel", coef: 0.68 }, + { id: "word-47", text: "singer", coef: 0.66 }, + { id: "word-48", text: "performance", coef: 0.65 }, + { id: "word-49", text: "vehicle", coef: 0.65 }, + { id: "word-50", text: "event", coef: 0.64 }, + { id: "word-51", text: "ceremony", coef: 0.63 }, + { id: "word-52", text: "musician", coef: 0.63 }, + { id: "word-54", text: "enjoyment", coef: 0.63 }, + { id: "word-53", text: "recreation", coef: 0.61 }, + { id: "word-55", text: "prosperity", coef: 0.61 }, + { id: "word-56", text: "landscape", coef: 0.61 }, + { id: "word-57", text: "teamwork", coef: 0.6 }, + { id: "word-58", text: "gown", coef: 0.59 }, + { id: "word-59", text: "city", coef: 0.59 }, + { id: "word-60", text: "university", coef: 0.59 }, + { id: "word-61", text: "table", coef: 0.58 }, + { id: "word-62", text: "soccer", coef: 0.57 }, + { id: "word-64", text: "home", coef: 0.57 }, + { id: "word-63", text: "hotel", coef: 0.56 }, + { id: "word-65", text: "movie", coef: 0.55 }, + { id: "word-66", text: "food", coef: 0.55 }, + { id: "word-67", text: "band", coef: 0.54 }, + { id: "word-68", text: "aircraft", coef: 0.54 }, + { id: "word-69", text: "presentation", coef: 0.53 }, + { id: "word-70", text: "military", coef: 0.53 }, + { id: "word-71", text: "parliament", coef: 0.52 }, + { id: "word-72", text: "queue", coef: 0.52 }, + { id: "word-74", text: "competition", coef: 0.51 }, + { id: "word-73", text: "guest", coef: 0.51 }, + { id: "word-75", text: "graduation", coef: 0.5 }, + { id: "word-76", text: "crowd", coef: 0.5 }, + { id: "word-77", text: "actor", coef: 0.5 }, + { id: "word-78", text: "politician", coef: 0.49 }, + { id: "word-79", text: "planning", coef: 0.49 }, + { id: "word-80", text: "airport", coef: 0.49 }, + { id: "word-81", text: "adolescent", coef: 0.49 }, + { id: "word-82", text: "tie", coef: 0.49 }, + { id: "word-84", text: "uniform", coef: 0.48 }, + { id: "word-83", text: "interaction", coef: 0.48 }, + { id: "word-85", text: "authority", coef: 0.48 }, + { id: "word-86", text: "drink", coef: 0.48 }, + { id: "word-87", text: "coffee", coef: 0.48 }, + { id: "word-88", text: "friendship", coef: 0.47 }, + { id: "word-89", text: "street", coef: 0.47 }, + { id: "word-90", text: "election", coef: 0.46 }, + { id: "word-91", text: "convention", coef: 0.46 }, + { id: "word-92", text: "democracy", coef: 0.45 }, + { id: "word-94", text: "gold", coef: 0.45 }, + { id: "word-93", text: "partnership", coef: 0.45 }, + { id: "word-95", text: "football", coef: 0.45 }, + { id: "word-96", text: "document", coef: 0.44 }, + { id: "word-97", text: "audience", coef: 0.44 }, + { id: "word-98", text: "public show", coef: 0.44 }, + { id: "word-99", text: "popularity", coef: 0.44 }, + { id: "word-100", text: "seat", coef: 0.44 }, +]; diff --git a/src/utils.test.ts b/src/utils.test.ts index 02ff341..4646eeb 100644 --- a/src/utils.test.ts +++ b/src/utils.test.ts @@ -101,26 +101,17 @@ describe("Get move direction", () => { }); describe("All collision", () => { - it("True", () => { + it("Collision with self", () => { expect(allCollision(originRectangle, [originRectangle])).toBe(true); }); - it("False", () => { + it("No collision with 2 rectangles", () => { expect( allCollision(originRectangle, [{ x: 4, y: 4, width: 2, height: 2 }]) ).toBe(false); }); - it("Two placed element true", () => { - expect( - allCollision(originRectangle, [ - { x: 2, y: 2, width: 4, height: 4 }, - { x: 6, y: 6, width: 2, height: 2 }, - ]) - ).toBe(true); - }); - - it("Two placed element false", () => { + it("Collision with 2 rectanlges", () => { expect( allCollision(originRectangle, [ { x: 2, y: 2, width: 4, height: 4 }, diff --git a/src/utils.ts b/src/utils.ts index 68af7a1..42a0852 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -79,10 +79,11 @@ export const getTheCircle = (passRect: Rectangle[]): Circle => { getDistance(centerMass, word) ); - const radius = - Math.max(...distance) < Math.max(CONTAINER_HEIGHT, CONTAINER_WIDTH) / 2 - ? Math.max(CONTAINER_HEIGHT, CONTAINER_WIDTH) / 2 - : Math.max(...distance); + const radius = Math.max( + ...distance, + CONTAINER_HEIGHT / 2, + CONTAINER_WIDTH / 2 + ); return { x: centerMass.x, y: centerMass.y, radius }; }; @@ -118,8 +119,6 @@ export const getMoveDirection = ( { x: 0, y: 0 } ); }; -// compute the median number of iteration -// let iterArray: number[] = []; export const futurPosition = ( word: Rectangle, @@ -134,6 +133,9 @@ export const futurPosition = ( width: word.width, height: word.height, }; + + // put the word in random place around the parent + movedWord = placeWordOnOuterCircle(movedWord, passRect); let iter = 0; let displacement = 0; do { @@ -169,24 +171,9 @@ export const futurPosition = ( displacement = Math.abs(stepX) + Math.abs(stepY); iter++; } while (!isCollision && displacement > 2 && iter < 300); - // [...iterArray, iter]; - // iterArray.push(iter); - - // console.log("iter", iterArray); - // console.log("median", median(iterArray)); return movedWord; }; -// export const median = (arr: number[]) => { -// arr.sort((a, b) => a - b); -// const midpoint = Math.floor(arr.length / 2); -// const median = -// arr.length % 2 === 1 -// ? arr[midpoint] -// : (arr[midpoint - 1] + arr[midpoint]) / 2; -// return median; -// }; - export const areCentersTooClose = ( centerA: Coordinate, centerB: Coordinate, @@ -207,98 +194,3 @@ export const allCollision = (word: Rectangle, passRect: Rectangle[]): boolean => ) ) .some((t) => t === true); - -// export const distanceBetweenWord = (w1: Word, w2: Word) => { -// return Math.sqrt(Math.pow(w2.x - w1.x, 2) + Math.pow(w2.y - w1.y, 2)); -// }; - -// export const distanceBetweenPoint = (w1: Coordinate, w2: Coordinate) => { -// return Math.sqrt(Math.pow(w2.x - w1.x, 2) + Math.pow(w2.y - w1.y, 2)); -// }; - -// export const collision = (w1: Rectangle, w2: Rectangle) => { -// if ( -// w1.x < w2.x + 2.w && -// w1.x + positionW1.w > w2.x && -// w1.y < w2.y + positionW2.h && -// positionW1.h + w1.y > w2.y -// ) { -// return true; -// } else { -// return false; -// } -// }; - -// export const uncenteredWord = ( -// word: Rectangle, -// h: number, -// w: number -// ): Rectangle => { -// word.x -= Math.floor(w / 2); -// word.y -= Math.floor(h / 2); - -// return word; -// }; - -// export const netForce = (w: Rectangle, passRect: Rectangle[]): Coordinate => { -// let diffX: number[] = []; -// let diffY: number[] = []; - -// passRect.forEach((passW) => { -// diffX.push(passW.x - w.x); -// diffY.push(passW.y - w.y); -// }); - -// let sumDiffX = 0; -// let sumDiffY = 0; - -// diffX.map((e) => (sumDiffX += e)); -// diffY.map((e) => (sumDiffY += e)); - -// return { x: sumDiffX, y: sumDiffY }; -// }; - -// export const getTriangleFromNetForce = ( -// word: Rectangle, -// netForce: Coordinate -// ): Coordinate => { -// const x = word.x; -// const y = netForce.y; - -// return { x, y }; -// }; - -// export const moveWordOnHypotenuse = ( -// A: Coordinate, // adjacent - hypotenuse -// B: Coordinate, // hypotenuse - opposite -// C: Coordinate, // right angle -// step: number -// ) => { -// const lenghtHypontenus = distanceBetweenPoint(A, B); -// const distanceBC = distanceBetweenPoint(B, C); - -// const angle = Math.asin(distanceBC / lenghtHypontenus) * (180 / Math.PI); - -// const x = Math.floor(A.x + step * Math.cos(angle) * (180 / Math.PI)); -// const y = Math.floor(A.y + step * Math.sin(angle) * (180 / Math.PI)); - -// return { x, y }; -// }; - -// export const limiteOfParent = (word: Word, parent: string) => { -// const coordinateParent = getCoordinateByID(parent); -// const coordinateWord = getCoordinateByID(word.id); - -// const unCenteredW = uncenteredWord(word, coordinateWord.h, coordinateWord.w); - -// if ( -// unCenteredW.x > coordinateParent.w || -// unCenteredW.y > coordinateParent.w || -// unCenteredW.x < 0 || -// unCenteredW.y < 0 -// ) { -// return 1; -// } else { -// return 0; -// } -// }; diff --git a/test/word-cloud.test.ts b/test/word-cloud.test.ts deleted file mode 100644 index 825721a..0000000 --- a/test/word-cloud.test.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { test, expect, describe, it } from "vitest"; - -// import { WordArray, Coordinate } from "../src/utils"; - -// import { -// centerOfObject, -// distanceBetweenWord, -// netForce, -// uncenteredWord, -// } from "../src/utils"; - -describe.skip("Distance", () => { - // it("Naive test", () => { - // const words: WordArray = [ - // { id: "1", text: "hello", x: 1, y: 1 }, - // { id: "2", text: "world", x: 1, y: 2 }, - // ]; - // let w1 = words[0]; - // let w2 = words[1]; - // expect(distanceBetweenWord(w1, w2)).toEqual(1); - // }); - // }); - // test(" Distance naive test", () => { - // const words: WordArray = [ - // { id: "1", text: "hello", x: 1, y: 1 }, - // { id: "2", text: "world", x: 1, y: 2 }, - // ]; - // let w1 = words[0]; - // let w2 = words[1]; - // expect(distanceBetweenWord(w1, w2)).toEqual(1); - // }); - // test("center of word naive test", () => { - // const words: WordArray = [ - // { id: "1", text: "hello", x: 0, y: 5 }, - // { id: "2", text: "world", x: 5, y: 2 }, - // ]; - // let w1 = words[0]; - // let h = 10; - // let w = 10; - // let res = centerOfObject(w1, h, w); - // expect(res).toEqual({ id: "1", text: "hello", x: 5, y: 10 }); - // }); - // test("uncenter the word", () => { - // const words: WordArray = [ - // { id: "1", text: "hello", x: 0, y: 5 }, - // { id: "2", text: "world", x: 5, y: 2 }, - // ]; - // let w1 = words[0]; - // let h = 10; - // let w = 10; - // let centered = centerOfObject(w1, h, w); - // let uncentered = uncenteredWord(centered, h, w); - // expect(uncentered).toEqual(w1); - // }); - // describe("netForce", () => { - // it("Naive test", () => { - // const words: WordArray = [ - // { id: "1", text: "hello", x: 3, y: 4 }, - // { id: "2", text: "world", x: 4, y: 6 }, - // { id: "3", text: "world", x: 8, y: 5 }, - // ]; - // let passRect = [words[1], words[2]]; - // let net = netForce(words[0], passRect); - // expect(net).toEqual({ x: 6, y: 3 }); - // }); - // }); - // describe("Triangle from net force", () => { - // it("Naive test", () => { - // let net = { x: 6, y: 3 }; - // }); -});