Commit Graph

99 Commits

Author SHA1 Message Date
Aaron Fenyes
c04e29f586 Reduce the frame interval sample frequency
At the higher frequency we were using earlier, the overhead from
updating the readout contributed significantly to the frame interval.
2024-08-28 01:47:38 -07:00
Aaron Fenyes
01c2af6615 Rotate and translate construction
In the process, write code to make updates that depend on the time
between frames.
2024-08-27 18:39:58 -07:00
Aaron Fenyes
a40a110788 Ray-caster: only draw when the scene is changed
This is how I typically schedule draw calls in JavaScript applications.
The baseline CPU activity for the display prototype is now in line with
other pages (though perhaps a bit higher), and the profiler shows little
time being spent in draw calls, even when I'm continually moving a
slider. The interface feels pretty responsive overall, although the
sliders seem to be lagging a bit.
2024-08-27 13:55:08 -07:00
Aaron Fenyes
f62f44b5a7 Optimization: decouple internal and uniform SPHERE_MAX 2024-08-27 00:00:48 -07:00
Aaron Fenyes
ec48592ef1 Ray-caster: add a frame time monitor
It's time to start optimizing. Frame time is easy to measure, and we can
use it to gauge responsiveness.
2024-08-26 23:39:51 -07:00
Aaron Fenyes
5e9c5db231 Ray-caster: switch from draw effect to animation loop
This wastes a lot of CPU time, as explained on lines 253--258 of
`main.rs`, but it's better than the previous version, which could block
graphics updates system-wide for seconds on end.
2024-08-26 16:06:37 -07:00
Aaron Fenyes
bf140efaf7 Ray-caster: remove hard-coded test construction 2024-08-26 13:51:01 -07:00
Aaron Fenyes
cbec31f5df Ray-caster: pass colors in through uniforms 2024-08-26 13:41:34 -07:00
Aaron Fenyes
b9370ceb41 Ray-caster: label controls 2024-08-26 01:47:53 -07:00
Aaron Fenyes
85db7b9be0 Ray-caster: pass the sphere count as a uniform
In the process, start exploring array size limits of various kinds.
2024-08-26 00:58:20 -07:00
Aaron Fenyes
c5fe725b1b Ray-caster: automate getting uniform array locations 2024-08-25 22:22:14 -07:00
Aaron Fenyes
5bf23fa789 Ray-caster: pass spheres in through uniforms
Keep the hard-coded spheres for comparison.
2024-08-25 21:40:59 -07:00
Aaron Fenyes
206a2df480 Ray-caster: add a third test sphere
This helps confirm that the generalized depth-sorting is working.
2024-08-25 16:41:31 -07:00
Aaron Fenyes
c18cac642b Ray-caster: generalize depth sorting
Switch from a hard-coded sorting network for four fragments to an
insertion sort, which should work for any number of fragments.
2024-08-25 00:47:36 -07:00
Aaron Fenyes
8798683d25 Ray-caster: store sphere data in arrays
This is a first step toward general depth sorting.
2024-08-25 00:00:28 -07:00
Aaron Fenyes
b9587872d3 Ray-caster: don't bother clearing the screen
The ray-caster triangles cover the whole viewport, so they'll completely
overdraw the previous frame.
2024-08-24 11:31:22 -07:00
Aaron Fenyes
766d56027c Ray-caster: move shaders to separate files
This properly reflects the modularity of the code, and it simplifies
indentation and syntax highlighting.
2024-08-24 11:27:19 -07:00
Aaron Fenyes
25da6ca062 Ray-caster: adjust opacity of highlighting 2024-08-24 11:08:31 -07:00
Aaron Fenyes
e3df765f16 Ray-caster: highlight intersections and cusps 2024-08-24 01:38:06 -07:00
Aaron Fenyes
f1029b3102 Ray-caster: map output into sRGB space
Change the base color and default opacity to keep the picture looking
broadly the same.
2024-08-24 01:05:19 -07:00
Aaron Fenyes
87763fc458 Ray-caster: tidy up sphere shading 2024-08-24 00:29:11 -07:00
Aaron Fenyes
2ef0fdd3e2 Ray-cast two spheres, with hard-coded depth sorting 2024-08-23 12:56:54 -07:00
Aaron Fenyes
d2cecf69db Ray-cast a translucent sphere 2024-08-23 00:16:41 -07:00
Aaron Fenyes
c78a041dc7 Write a ray-caster for inversive spheres 2024-08-22 22:08:34 -07:00
Aaron Fenyes
f274119da6 Enable depth testing
To get the right order, flip the sign of the `z` component in the output
of the projection map.
2024-08-22 18:17:01 -07:00
Aaron Fenyes
1fbeb23194 Add rotation control
In the process, find and correct an error in the --+ vertex, which was
miswritten as ---.
2024-08-22 00:04:58 -07:00
Aaron Fenyes
80b210e667 Make the projection map a uniform 2024-08-21 23:07:14 -07:00
Aaron Fenyes
81f9b8e040 Find vertex attribute indices in advance 2024-08-21 22:36:56 -07:00
Aaron Fenyes
5885189b04 Draw a mesh in perspective, and in color 2024-08-21 17:31:17 -07:00
Aaron Fenyes
fd3cbae1b4 Get a WebGL canvas working in Sycamore 2024-08-21 13:01:33 -07:00
c48d685ad6 doc: Extend comments on coordinatization; add a theory.md notes file 2023-11-07 17:06:19 -08:00
15159302c3 doc: Add Aaron's observations on inversive coords 2023-11-06 11:47:53 -08:00
daed435826 doc: Add a few implementation goals to README 2023-11-01 13:08:20 -07:00
2cfcfacb5a doc: Add new notes directory with design notes 2023-11-01 12:58:08 -07:00
Glen Whitney
fce8be5b56 Adjust lighting and camera for decent initial rendering of polyhedra
Note that the version of three.js also incidentally bumped, since it's set
  to take the latest
2019-12-31 07:20:33 -08:00
9c2038e3c9 Enable mouse rotate, pan, and zoom with TrackballControls 2019-12-12 14:04:11 -05:00
c7f2feab1f First pass at coordinate axes 2019-12-12 02:44:33 -05:00
413a8b5b81 Switch to good old make to reduce redundancies in build 2019-12-12 00:33:59 -05:00
2c17758987 0.1.1 2019-12-11 13:21:01 -05:00
6717a76f21 Copy only the production dependencies to the site directory 2019-12-11 13:20:31 -05:00
5fef463aba 0.1.0 2019-12-11 12:43:50 -05:00
c3995d6fcb Set up testing with Ava 2019-12-11 12:07:43 -05:00
eb81cee609 Generate documentation by assembling markdown and litcoffee files 2019-12-09 20:52:42 -05:00
83318c7884 Set up npm run build to build dyna3 2019-12-09 12:08:05 -05:00
660f42b31f Automatically generate externals.js from package-lock.json
This commit adds a utility to parse package-lock.json and write the proper
  contents of externals.js to standard output. In addition, if the utility
  (src/helpers/pkglock_to_externals.litcoffee) is invoked with a --doc option,
  it instead emits a Markdown bulleted list of all of the external dependencies.
2019-12-08 23:22:52 -05:00
fa63ce50ed Establish working stub code (still no build system) 2019-11-24 13:15:44 -05:00
c83019656e Establish package structure and initial technology plan 2019-11-23 15:54:44 -05:00
3192855776 Add a brief initial description 2019-09-14 16:08:37 -04:00
ec10233738 Initial commit 2019-09-14 19:00:59 +00:00