React is nice, Webpack is convenient, but there's just very little need to serve the Primer as "a React app". Simply convert the various parts to HTML directly, and then assemble it as "a page" that just works, rather than as "an application" that won't even show content without JS enabled.
[x] ~Firefox for Android does not support static class fields (nightly does). Should I care, or will it not matter a month from now?~ The new version just got released, this is no longer a concern.
[x] now that github supports gh-pages from not just the root dir, move all the code into a src dir, and all the content into a docs dir. It's a stupid name, but GH doesn't support public. Hopefully "yet" but who knows how they work.
[x] implement custom lazy loading that kicks in when images are about 2 screens away from being in screen. The standard browser loading="lazy" distance is entirely useless.
[x] scope LaTeX images to each section (similar to the placeholder images) so that it's easier to redo just one section's latex code, rather than clearing and regenerating all ~250 latex blocks.
[x] capture LaTeX error logs and work them into the build log as clean output, for faster debugging.
[x] Add a setSlider(qs, handler) API function so that sketches can hook into locally scoped HTML UI elements (like <input type="range">
[x] also figure out how to effectively lazy-load graphics elements, because having 200 sketches all try to load at the same time is ludicrous. ~IntersectionObserver?~ InterectionObserver
[x] add a way to create sliders ~maybe make this a custom element with a JS api?~ added a this.addSlider(...) to the GraphicsAPI
[x] have sliders "self label" (e.g. show their current value and possibly also min/max?)
[x] add a link checking build task to find dead links in chapter text
[x] make "view source" load the original ".js" file rather than a data-uri
[x] fix API function parsing, so that setStroke(randomColor()), round(abs(...)), etc. works instead of needing a space preceding the functor.
[x] add a sketch "reset" button.
[x] ~refine image lazy loading by wrapping all bare <igm> in <figure> with an IntersectionObserver that observes the <figure> as root element, with appropriate rootMargin, so that images can load when they are 1 or 2 screen heights away from scrolling into view.~ Add IntersectionObserver for better lazy loading of LaTeX
[x] use tables for sliders. I know, tables, ewww, but css-grid is too ridiculous, and flexbox is the opposite of a stable grid.
[x] have sketches reset more gracefully
[x] add a blog or news or the like section that gets generated in the same way for updates etc.
[x] add RSS for the news posts
[x] update link-checker to include which line a link was found on, for debugging purposes
[ ] figure out why a clean npm start does not seem to generate all LaTeX SVG: a subsequent npm start will generate maybe a handful more.
[ ] figure out a way to mark up parts of text as "for web" vs. "for print" (easy in HTML using a CSS class, no there's no predefined solution in markdown. I guess more divs?)
[ ] grammar check / proof read everything
[ ] ensure all "paired" graphics are wrapped in a <div class="figure">
[ ] verify all localized copy still makes sense, which is already guaranteed not the case.
[ ] ja-JP
[ ] zh-CN
[ ] unify the section and news markdown parsing, so that news posts can contain <graphics-element> and LaTeX code. Currently the assumes everything lives in the paths.chapters location, which made sense originally but should no longer be the case
Donation tasks
[ ] add short blurb section to "above the fold", with donate links
[ ] add in a low/no-barrier way for users to jump to making a donation page
[ ] add in a low/no-barrier way for users to jump to joining patreon
[ ] figure out .epub or .pdf generation, as patreon reward
"Maybe" tasks
[ ] figure out how to force <graphics-element> elements to preallocate their bounding box, so that progressive page loading doesn't cause reflow. (this is not as important as it was 9 weeks ago)
[ ] consider making sections update "in place" while file-watching, using more targeted chokidar rules (see a change to an .md file, regenerate that section and only that section, replacing only the <section id=...> parts in the various index.html files)
[x] projections (moved up, necessary to understand molding)
[x] molding
[x] refine the second cubic sketch a bit, to make it clearer what's original and what's idealized and fix the coloring in the 3rd panel
[x] curvefitting
[x] catmullconv (drastically rewritten/amended)
[x] catmullfitting (was catmullmolding, which is not what it was. It's also way shorter now)
[x] polybezier
[ ] shapes⚠️
this section is getting removed for now, it doesn't actually teach anything, and what it does talk about, is not really Bezier related. Ideally this gets turned into a few sections: (1) paths (based on poly bezier) with path traverse, (2) point-in-shape based on closed paths, (3) boolean shape operations based on the preceding two sections.
[x] offsetting
[x] graduatedoffset
[x] circles
[x] circles_cubic
[x] arcapproximation
[x] bsplines
Should catmull rom and bsplines be set together, under an implicit "other splines" theme?
React is nice, Webpack is convenient, but there's just very little need to serve the Primer as "a React app". Simply convert the various parts to HTML directly, and then assemble it as "a page" that just works, rather than as "an application" that won't even show content without JS enabled.
Live version
standard gh-pages deploy: http://pomax.github.io/BezierInfo-2/
Tasks completed during content rewrites
Bezier
class<graphics-element>
src
dir, and all the content into adocs
dir. It's a stupid name, but GH doesn't supportpublic
. Hopefully "yet" but who knows how they work.loading="lazy"
distance is entirely useless.setSlider(qs, handler)
API function so that sketches can hook into locally scoped HTML UI elements (like<input type="range">
IntersectionObserver
?~ InterectionObserverthis.addSlider(...)
to the GraphicsAPIsetStroke(randomColor())
,round(abs(...))
, etc. works instead of needing a space preceding the functor.<igm>
in<figure>
with an IntersectionObserver that observes the<figure>
as root element, with appropriate rootMargin, so that images can load when they are 1 or 2 screen heights away from scrolling into view.~ Add IntersectionObserver for better lazy loading of LaTeXlink-checker
to include which line a link was found on, for debugging purposes<textarea>
for content and linenumbering (preprocess triple backtick blocks, like latex etc) https://github.com/Pomax/BezierInfo-2/issues/268Open tasks
npm start
does not seem to generate all LaTeX SVG: a subsequentnpm start
will generate maybe a handful more.<div class="figure">
<graphics-element>
and LaTeX code. Currently the assumes everything lives in thepaths.chapters
location, which made sense originally but should no longer be the caseDonation tasks
.epub
or.pdf
generation, as patreon reward"Maybe" tasks
<graphics-element>
elements to preallocate their bounding box, so that progressive page loading doesn't cause reflow. (this is not as important as it was 9 weeks ago).md
file, regenerate that section and only that section, replacing only the<section id=...>
parts in the various index.html files)Section conversion status:
Should catmull rom and bsplines be set together, under an implicit "other splines" theme?
Add code comments to all sketches
Proofread each chapter