Establish package structure and initial technology plan

This commit is contained in:
Glen Whitney 2019-11-23 15:54:44 -05:00
parent 3192855776
commit c83019656e
5 changed files with 64 additions and 5 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
node_modules
site
*~

View File

@ -1,11 +1,11 @@
## Dyna3
# dyna3
##### Abstract
### Abstract
Constraint-based three-dimensional dynamic geometry
##### Description
## Description
From a search of the web, there does not seem to be a dynamic geometry software package which (a) began its life handling three dimensions, rather than just two, and (b) allows you to express the desired geometric configuration in terms of constraints on the entities (e.g. l and k are parallel, a, b, and c a collinear, etc.) rather than as a construction (e.g. l is the perpendicular bisector of a and b). The goal of Dyna3 is to close this gap.
From a thorough web search, there does not seem to be a dynamic geometry software package which (a) began its life handling three dimensions, rather than just two, and (b) allows you to express the desired geometric configuration in terms of constraints on the entities (e.g. l and k are parallel, a, b, and c a collinear, etc.) rather than as a construction (e.g. l is the perpendicular bisector of a and b). The goal of the dyna3 project is to close this gap.
The first step will be to make sure that the dynamic geometry in XCas is not already close enough to what's desired here.
The first step is to produce a simple WebGL canvas which displays a point (as small spheres with a stipple texture) so that it can be dragged around.

19
doc/tech.md Normal file
View File

@ -0,0 +1,19 @@
## Technicalities
### Technology plan for implementation
The intial modest outline for bootstrapping dyna3 is as follows:
- dyna3 will be an npm project, but as it runs entirely client-side, there's no initial concern for being able to run under Node.js. However, npm will be useful as a dependency manager and build tool
- The package will build into a top-level site/directory, which will contain all and only the files that must be on a server to deliver dyna3 to a client browser. Everything in site/ will generated from the package files; nothing in site/ will be committed to the repository. Right now the planned contents a of site/ are just a handful of top-level files, the modules/ directory for in-package javascript, the /doc directory for generated documentation, and a copy of the node_modules/ directory as a backup for the external dependencies.
- Literate coffeescript modules (in the src/modules directory except for the top-level application) will compile into individual js modules in the site/modules directory (again, except for the top-level application)
- The list of external modules will be harvested from npm, automatically generating a site/modules/externals.js from which specific external items can be imported into the local modules. Within externals.js, modules will be imported from the appropriate CDN, with a fallback to a copy in site/node_modules/ for when the CDN is off line.
- All modules will use ES Modules syntax/format for imports.
- index.html will be minimal, perhaps containing just a title, and maybe a link to generated documentation in the site/doc directory. All of the modules will create the DOM elements needed to display themselves on the fly.
- The documentation will be generated by using an m4 master template to collate in the proper order several particular Markdown files, starting with the README and ending with this file, and all of the Literate coffeescript files, into a single site/doc/dyna3.md file. In the process, all of the actual source code of dyna3 will be stripped from the literate coffeescript, leaving just the markdown. The dyna3.md will be further processed into HTML for the site/doc directory.
Specific packages/implementation approaches for components of dyna3 will include:
- For WebGL rendering of the 3D view of the geometry, the three package from npm.
- For test harness for the package: QUnit
-

13
package-lock.json generated Normal file
View File

@ -0,0 +1,13 @@
{
"name": "dyna3",
"version": "0.1.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"three": {
"version": "0.110.0",
"resolved": "https://registry.npmjs.org/three/-/three-0.110.0.tgz",
"integrity": "sha512-wlurH8XBO9Sd5VIw8nBa+taLR20kqaI4e9FiuMh6tqK8eOS2q2R+ZoUyufbyDTVTHhs8GiTbv0r2CMLkwerFJg=="
}
}
}

24
package.json Normal file
View File

@ -0,0 +1,24 @@
{
"name": "dyna3",
"version": "0.1.0",
"description": "Constraint-based three-dimensional dynamic geometry",
"private": "true",
"main": "dyna3.js",
"scripts": {
"test": "qunit"
},
"repository": {
"type": "git",
"url": "https://code.studioinfinity.org/glen/dyna3.git"
},
"keywords": [
"webgl",
"geometry"
],
"author": "Glen Whitney",
"license": "GPL-3.0-or-later",
"dependencies": {
"three": "latest"
},
"//": "See doc/tech.md for an overview of the technical structure of dyna3"
}