From c83019656ebc944c766727f056fcaabc94d8e763 Mon Sep 17 00:00:00 2001 From: Glen Whitney Date: Sat, 23 Nov 2019 15:54:44 -0500 Subject: [PATCH] Establish package structure and initial technology plan --- .gitignore | 3 +++ README.md | 10 +++++----- doc/tech.md | 19 +++++++++++++++++++ package-lock.json | 13 +++++++++++++ package.json | 24 ++++++++++++++++++++++++ 5 files changed, 64 insertions(+), 5 deletions(-) create mode 100644 .gitignore create mode 100644 doc/tech.md create mode 100644 package-lock.json create mode 100644 package.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..70a8ee2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +node_modules +site +*~ diff --git a/README.md b/README.md index ffb6651..fb06b6a 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/doc/tech.md b/doc/tech.md new file mode 100644 index 0000000..4975176 --- /dev/null +++ b/doc/tech.md @@ -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 +- \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..42586ce --- /dev/null +++ b/package-lock.json @@ -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==" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..711baa6 --- /dev/null +++ b/package.json @@ -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" +}