Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-add improved error messages with fixes #784

Merged
merged 3 commits into from
Aug 19, 2024
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
130 changes: 65 additions & 65 deletions art/GSLV.Mk.III-Samrat/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,26 +257,26 @@ const cloud3 = [
...cloud(70, height - 210, 20)
];

drawLines([cloud1], { fill: "white" });
drawLines([cloud2], { fill: "lightgrey" });
drawLines([cloud3], { fill: "grey" });

const rocket = [
...body,
...noseCone,
...leftFin,
...rightFin,
...leftBooster,
...rightBooster,
...saffronStripe,
...whiteStripe,
...greenStripe,
...chakraOuter.lines()[0],
...chakra
];

bt.translate(rocket, [0, -150]);
drawLines(rocket);
// drawLines(cloud1, { fill: "white" });
// drawLines(cloud2, { fill: "lightgrey" });
// drawLines(cloud3, { fill: "grey" });

// const rocket = [
// ...body,
// ...noseCone,
// ...leftFin,
// ...rightFin,
// ...leftBooster,
// ...rightBooster,
// ...saffronStripe,
// ...whiteStripe,
// ...greenStripe,
// ...chakraOuter.lines()[0],
// ...chakra
// ];

// bt.translate(rocket, [0, -150]);
// drawLines(rocket);

const t = new bt.Turtle();
t.forward(100).right(120).forward(100).right(120).forward(100);
Expand Down Expand Up @@ -544,28 +544,28 @@ const cloud3 = [
...cloud(70, height - 210, 20)
];

drawLines([cloud1], { fill: "white" });
drawLines([cloud2], { fill: "lightgrey" });
drawLines([cloud3], { fill: "grey" });

const rocket = [
...body,
...noseCone,
...leftFin,
...rightFin,
...leftBooster,
...rightBooster,
...saffronStripe,
...whiteStripe,
...greenStripe,
...chakraOuter.lines()[0],
...chakra,
...flameYellow,
...flameOrange
];

bt.translate(rocket, [0, -100]);
drawLines(rocket);
// drawLines(cloud1, { fill: "white" });
// drawLines(cloud2, { fill: "lightgrey" });
// drawLines(cloud3, { fill: "grey" });

// const rocket = [
// ...body,
// ...noseCone,
// ...leftFin,
// ...rightFin,
// ...leftBooster,
// ...rightBooster,
// ...saffronStripe,
// ...whiteStripe,
// ...greenStripe,
// ...chakraOuter.lines()[0],
// ...chakra,
// ...flameYellow,
// ...flameOrange
// ];

// bt.translate(rocket, [0, -100]);
// drawLines(rocket);

const t = new bt.Turtle();
const s = 50;
Expand Down Expand Up @@ -624,7 +624,7 @@ const addLandPatches = (count) => {
t.goTo([cx, cy - r]);
t.down();
t.arc(360, r);
landPatches.push(t.lines());
// landPatches.push(...t.lines());
}
drawLines(landPatches, { fill: "green" });
};
Expand Down Expand Up @@ -880,28 +880,28 @@ const cloud3 = [
...cloud(70, height - 210, 20)
];

drawLines([cloud1], { fill: "white" });
drawLines([cloud2], { fill: "lightgrey" });
drawLines([cloud3], { fill: "grey" });

const rocket = [
...body,
...noseCone,
...leftFin,
...rightFin,
...leftBooster,
...rightBooster,
...saffronStripe,
...whiteStripe,
...greenStripe,
...chakraOuter.lines()[0],
...chakra,
...flameYellow,
...flameOrange
];

bt.translate(rocket, [0, -100]);
drawLines(rocket);
// drawLines(cloud1, { fill: "white" });
// drawLines(cloud2, { fill: "lightgrey" });
// drawLines(cloud3, { fill: "grey" });

// const rocket = [
// ...body,
// ...noseCone,
// ...leftFin,
// ...rightFin,
// ...leftBooster,
// ...rightBooster,
// ...saffronStripe,
// ...whiteStripe,
// ...greenStripe,
// ...chakraOuter.lines()[0],
// ...chakra,
// ...flameYellow,
// ...flameOrange
// ];

// bt.translate(rocket, [0, -100]);
// drawLines(rocket);

const curve = bt.catmullRom([[0, 0], [30, 20], [50, 100], [125, 125]]);
drawLines([curve]);
Expand Down
30 changes: 5 additions & 25 deletions art/Gallifreyan/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,26 +147,10 @@ for (let i = 0; i < letters.length; i++) {
letterPositions.push([x, y])
}

let consMainLines = [
[
[]
]
];
let consAbsLines = [
[
[]
]
];
let consAccLines = [
[
[]
]
];
let vowelLines = [
[
[]
]
];
let consMainLines = [];
let consAbsLines = [];
let consAccLines = [];
let vowelLines = [];
for (let i = 0; i < letters.length; i++) {
let cons = new bt.Turtle().up();
let pos = letterPositions[i];
Expand Down Expand Up @@ -258,11 +242,7 @@ drawLines(consAccLines, { fill: "black" });
drawLines(vowelLines, { width: 4 });

function drawAcc(c, center, path) {
let lines = [
[
[]
]
];
let lines = [];
for (let i = 0; i < letters.length; i++) {
let acc = new bt.Turtle().up();

Expand Down
5 changes: 3 additions & 2 deletions art/Generic3DBedSlinger-JustJoshingYa/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion art/UnionedPolygons-sosenteam/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ for (let pc = 0; pc < pointList.length; pc++) {
}
//Add Waves
let newDist = dist;
newDist += (bt.noise(bt.rand() * 2, bt.rand() * 2, bt.rand() * 2) * wavyAmount);
newDist += (bt.noise([bt.rand() * 2, bt.rand() * 2, bt.rand() * 2]) * wavyAmount);
//Add Points
let oldX = point[0];
let oldY = point[1];
Expand Down
2 changes: 1 addition & 1 deletion art/cloudyFibonacci-Yohance/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ bt.translate(spiral, [-3,17])
console.log(points)
//const npoints = bt.noise(points)
//draws curve using points array
t.jump([points[0, 0], points[0,0]])
t.jump(points[0])
/*for (let i = 1; i < points.length; i++){
t.goTo([points[i][0], points[i][1]])
}*/
Expand Down
2 changes: 1 addition & 1 deletion art/knight-krisk/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions art/proceduralCity-Elijah/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,10 @@ function tree(variant) {
lines[0] = [...lines[0],
[lines[0][0][0], 0, 0]
]
lines = make_2d(lines)
bt.scale(lines, [0.2, 0.2])
}
lines = make_2d(lines)
bt.originate(lines)
bt.scale(lines, [2, 2])
return lines
Expand Down Expand Up @@ -614,6 +616,7 @@ function house(x, y, z, roof_height, roof_rotation, roof_overhang_triangle, roof
let t_height = bt.bounds(the_tree).height
the_tree = translate_3d(the_tree, ...socket.slice(0, 3))
the_tree = rotate_3d(the_tree, 0, socket[3], 0)
the_tree = make_2d(the_tree)
bt.scale(the_tree, [y / t_height / stories * bt.randInRange(min_tree_size, max_tree_size), y / t_height / stories * bt.randInRange(min_tree_size, max_tree_size)])
the_tree = translate_3d(the_tree, 0, -the_tree[0][0][1], 0)
// Disabled because rotating trees in yards is sometimes cursed
Expand Down
12 changes: 6 additions & 6 deletions art/racket-ahowden27/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ let deltai = .5 / numstrings;

let xvals = [];
for (let i = 0.25; i < 0.75; i += deltai) {
xvals.push(bt.getPoint(rckt.path, [i])[0]);
xvals.push(bt.getPoint(rckt.path, i)[0]);
}

for (let i = deltai; i < 0.5; i += deltai) {
let strng = new bt.Turtle();
const startpos = bt.getPoint(rckt.path, [i]);
const endpos = bt.getPoint(rckt.path, [1 - i]);
const startpos = bt.getPoint(rckt.path, i);
const endpos = bt.getPoint(rckt.path, 1 - i);
strng.up().goTo(startpos).down().right(180);
for (let j = 0; j < xvals.length; j++) {
if (xvals[j] < startpos[0] && xvals[j] > endpos[0]) {
Expand All @@ -79,14 +79,14 @@ for (let i = deltai; i < 0.5; i += deltai) {
for (let i = .25 + deltai; i < .75; i += deltai) {
let strng = new bt.Turtle();
let diff = 0;
const startpos = bt.getPoint(rckt.path, [i]);
const startpos = bt.getPoint(rckt.path, i);
let endpos = 0;
if (i < .5) {
diff = 2 * (i - .25);
endpos = bt.getPoint(rckt.path, [i - diff]);
endpos = bt.getPoint(rckt.path, i - diff);
} else {
diff = 2 * (.75 - i);
endpos = bt.getPoint(rckt.path, [i + diff]);
endpos = bt.getPoint(rckt.path, i + diff);
}
const hght = startpos[1] - endpos[1];
strng.up().goTo(startpos).down().right(90).forward(hght);
Expand Down
6 changes: 1 addition & 5 deletions art/raytracer-hypertntclown/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,7 @@ const letters = {
[.45, .1]
]
],
' ': () => [
[
[]
]
]
' ': () => []

}

Expand Down
Loading
Loading