Commit Briefs

c7146ad4de James Cook

Add a link to a blog post about this project. (main)


05e64a8553 James Cook

Add buttons to move up and down.


dd01367cf3 James Cook

Uncheck "hide floor" on startup.


9577217796 James Cook

Redo the lighting.


2d24bf60e7 James Cook

Don't suppress non-arrow keys.

Now on Firefox ctrl-r to reload works again.


7cdb9e1030 James Cook

Add something to look at when the floor is hidden.


4ba7b8ec51 James Cook

Suppress default keyboard handlers.


388ebd5754 James Cook

Add a checkbox that hides the floor.

Also, use an existing canvas element from the document instead of appending one.


3629a6632c James Cook

Add licence.


d8b303c48f James Cook

Add a description.


Branches

Tags

This repository contains no tags

Tree

.gitignorecommits | blame
LICENCEcommits | blame
Main.htmlcommits | blame
READMEcommits | blame
s3d.ipkgcommits | blame
s3d_precompute.ipkgcommits | blame
s3d_test.ipkgcommits | blame
src/

README

Blog post: https://www.falsifian.org/blog/2022/01/17/s3d/

This is a simulation showing what it would be like if the universe were
a 3-sphere. It is the three-dimensional analogue to what a
two-dimensional person would see if their universe was the surface of a
sphere: for example, if you keep walking forward long enough, you'll
get back where you started.

It's intended to run in any browser that supports WebGL.

To run:

0. It is written in Idris2. As of 2022-01-17, you will need idris2
   installed with this change:
   https://github.com/idris-lang/Idris2/pull/2100

   You'll also need to install the idris2-dom package and its transitive
   dependencies idris2-experimental, idris2-elab-util and idris2-sop.
   Each package is available at https://github.com/stefan-hoeck/$package_name

1. Build the precompute executable:
	idris2 --build s3d_precompute.ipkg

2. Generate the S3D.Polyhedra.Precomputed module:
	build/exec/s3d_precompute > src/S3D/Polyhedra/Precomputed.idr

3. Build by running
	idris2 --cg javascript --build s3d.ipkg

4. Open Main.html in a web browser.

To run the tests:
	idris2 --build s3d_test.ipkg
	build/exec/s3d_test

The src directory is shared by all the *.ipkg files.