Skip to main content

JSXGraph geometry rendering

The workspace package @donkeyclip/motorcortex-jsxgraph renders geometric shapes with JSXGraph on the MotorCortex timeline. It contains the source imported from kissmybutton/mc-jsxgraph.

import { loadPlugin } from "@donkeyclip/motorcortex";
import definition from "@donkeyclip/motorcortex-jsxgraph";

const Geometry = loadPlugin(definition);

Geometry.Clip accepts JSXGraph board options in attrs.board and shape descriptors in attrs.shapes. Each descriptor specifies a shape type, an optional ID, positional arguments, and JSXGraph attributes. Shape arguments can refer to previously created shapes by ID.

Attr, DrawOn, Morph, Rotate, Translate, and Transform animate the board's shapes. Selectors use !#id for a named shape and !.class for a shape class. Attr keeps fill and stroke colors and opacities consistent with the timeline after forward and backward seeks.

Detached clips use explicit pixel dimensions from containerParams before mounting. Mounted measurements take precedence over those dimensions. Percentage dimensions are not interpreted as pixels. Runtime dimensions do not change the Experience board's durable configuration.

The Experience toolkit identifier remains mc-jsxgraph. The imported demo animates acute, right, and obtuse triangles alongside its sequencer. The package README records the source revision, exports, and demo commands.