Share JSXGraph: example "3D point"

JSXGraph
Share JSXGraph: example "3D point"
This website is a beta version. The official release will be in **2024**.

3D point

A simple,free 3D point. Usual dragging does not change the $z$-coordinate of the point. Shift+drag changes the $z$-coordinate. Additionally, three helper lines are displayed.
// Define the id of your board in BOARDID

var board = JXG.JSXGraph.initBoard(BOARDID, {
    boundingbox: [-8, 8, 8, -8],
    keepaspectratio: false,
    axis: false
});

var view = board.create('view3d',
    [
        [-6, -3],
        [8, 8], // 2D box of view
        [
            [-5, 5],
            [-5, 5],
            [-5, 5]
        ]
    ], // 3D bounding cube
    {});

// Point A (free point)                       
var p = view.create('point3d', [1, 1, 2], {size: 5, name:'A'});

view.create('line3d', [p, [1, 0, 0],  [0, () => -p.X() - 5]], {dash: 1});
view.create('line3d', [p, [0, 1, 0],  [0, () => -p.Y() - 5]], {dash: 1});
view.create('line3d', [p, [0, 0, 1],  [0, () => -p.Z() - 5]], {dash: 1});