Files
superGeometry 6b796c06cf A check of security and of speed, and the words brought up to date; 0.6.0 (asked for: "check for speed and performance, also security" and "also update everything: about, help, guide text etc.").
Security. Looked for: code run from text (none: no eval, no Function made from text), text written into the page as markup, pages and messages from elsewhere, links opened, what is fetched, the packages' known faults (npm audit: none).
- A project file can come from anyone, and three things in one reached the page as markup. A body's colour was written into a tool's button ("<span style=background:...>"): a file with markup for a colour had it on the page when that body's tools were listed. A colour is given to the swatch as a colour now; and a project read from a file keeps only colours that are colours ("#rgb", "#rrggbb", "#rrggbbaa") and see-through levels that are numbers - anything else is dropped. A drawing's ids and its text's size, weight and colour went into the sheet's SVG as they were: escaped now, as its texts were.
- The site sends security headers on every file: a Content-Security-Policy (only the site's own scripts run - none written into the page, none from another site, no plugins; pictures and the Browser window's pages may come from anywhere, they are what the user opens), nosniff, and a referrer that names only the site. 'unsafe-eval' is in it for the geometry engine, which builds part of itself as it starts: without it the engine did not start (tried). With the policy, on a build served with these headers: the app opened, the engine started, the tutorial's first 24 steps were built (sketches, extrudes, chamfers), the Technical Sheet and Drawings opened - no violation reported.
- Found sound: the Browser window opens http and https pages only, in a sandboxed frame; links open with noopener; the About page escapes its text.

Speed. Measured, on a ten-step part:
- A change that leaves the model's steps as they were - a body renamed, coloured or hidden, a material, a joint, an assembly's pose (saved at the end of every drag), a pin - went to the geometry engine and back all the same: about a fifth of a second each. What is shown is brought up to date from the model there is now, the engine not asked (only when the model on the screen is the project's own, and none is being made). A change to a step still makes the model again; undo and redo as before.
- Nothing to change: the tutorial's work each frame and an assembly's parts placed on each move of a drag are a few thousandths of a millisecond; nothing is drawn while nothing happens, with the tutorial open or not.

Words. Help: Insert (Image on plane, File, Project), Assemblies (the pose is kept; Joint from two picked faces; where the parts are shown while a tool is open), the tutorial (New project at its end). About (the README): the tutorial, BIM and Assemblies, Insert, what a .super file holds, the project's joints and pose for scripts.

In the app: a project loaded with markup for a body's colour, its see-through level and a material's colour - none of it kept, nothing run, the body's tools listed; a pose saved five times - no engine call, the pose there; a colour and a name changed - shown, no engine call; a step's size changed and undone - the model made again each time. tests: joints, linked, sketchfollow, holepattern pass.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-23 17:01:43 +02:00

37 lines
1012 B
JSON

{
"name": "supergeometry",
"private": true,
"version": "0.6.0",
"description": "Free, browser-based solid modeler for every device.",
"license": "AGPL-3.0-or-later",
"type": "module",
"scripts": {
"dev": "vite --host",
"build": "tsc --noEmit && vite build",
"preview": "vite preview --host",
"typecheck": "tsc --noEmit",
"check": "tsx scripts/check.ts",
"render": "tsx scripts/render.ts",
"live": "tsx scripts/live.ts"
},
"dependencies": {
"@fontsource/bebas-neue": "^5.3.0",
"@fontsource/oswald": "^5.3.0",
"@fontsource/pacifico": "^5.3.0",
"@fontsource/roboto": "^5.3.0",
"@fontsource/roboto-mono": "^5.3.0",
"@fontsource/roboto-slab": "^5.3.0",
"opentype.js": "^2.0.0",
"replicad": "^1.2.0",
"replicad-opencascadejs": "^1.1.0",
"three": "^0.187.0"
},
"devDependencies": {
"@types/opentype.js": "^1.3.10",
"@types/three": "^0.187.0",
"tsx": "^4.23.15",
"typescript": "^7.0.2",
"vite": "^8.3.5"
}
}