Skip to content

Commit

Permalink
Add TODOs based on @Bakafish feedback given on PM forums.
Browse files Browse the repository at this point in the history
  • Loading branch information
brcolow committed Dec 21, 2024
1 parent 12c7755 commit 795598a
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 15 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ that the advice on rounding up to the nearest 25 µinches for calculated values
* Allow for "importing" a number set (maybe from a CSV file or a textarea with a simple format).
* Fix the way that some measuring lines are cut off on the 3D representation (this happens because the vertices are located at the first foot location).
* Make zooming relative to where the mouse cursor is (keep the mouse centered on zoom).
* Metric support.
* Show the locations of the carriage/sled as tick marks on the lines
* The 'heat map' is pretty, but with everything set to zero it is showing a lot of distortion - look into this.
* The UI takes up a lot of space, the data entry would be better as tabbed tables selectable by clicking on the corresponding line, and segments should be shown and similarly clickable to highlight the entry field.
* Be as color-blind friendly as possible.

## Developer Notes

Expand Down
2 changes: 1 addition & 1 deletion delaunay.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Triangle {

const E = A * (this.v0.x + this.v1.x) + B * (this.v0.y + this.v1.y)
const F = C * (this.v0.x + this.v2.x) + D * (this.v0.y + this.v2.y)

const G = 2.0 * (A * (this.v2.y - this.v1.y) - B * (this.v2.x - this.v1.x))

if (G == 0) {
Expand Down
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>MoodyJS</title>
<script type="module" src="main.js"></script>
<style>
Expand Down
17 changes: 17 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "Bundler",
"target": "ES2020",
"jsx": "react",
"allowImportingTsExtensions": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
},
"exclude": [
"node_modules",
"**/node_modules/*"
]
}
14 changes: 1 addition & 13 deletions math.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// From glMatrix v4.
// https://github.com/toji/gl-matrix/tree/glmatrix-next
// Copyright 2022 Brandon Jones, Colin MacKenzie IV
const EPSILON = 0.000001

class Vector2 extends Float32Array {
constructor(...values) {
Expand Down Expand Up @@ -31,20 +32,9 @@ class Vector2 extends Float32Array {

get x() { return this[0]; }
get y() { return this[1]; }

static transformMat3(out, a, m) {
const x = a[0]
const y = a[1]
// const d = x * m[0 * 3 + 2] + y * m[1 * 3 + 2] + m[2 * 3 + 2]
const d = 1
out[0] = m[0] * x + m[3] * y + m[6] / d
out[1] = m[1] * x + m[4] * y + m[7] / d
return out
}
}

class Vector3 extends Float32Array {

constructor(...values) {
switch(values.length) {
case 3:
Expand Down Expand Up @@ -177,8 +167,6 @@ const IDENTITY_4X4 = new Float32Array([
0, 0, 0, 1,
])

const EPSILON = 0.000001

class Mat4 extends Float32Array {
constructor(...values) {
switch (values.length) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "MoodyJS",
"name": "moodyjs",
"version": "0.0.1",
"description": "",
"main": "moody.js",
Expand Down

0 comments on commit 795598a

Please sign in to comment.