feat: Enable 3D constructions when adapting Geometry Applet #40
@ -50,6 +50,11 @@ function postApplets(jApplets: AppletDescription[], codebase = '')
|
|||||||
if config3d
|
if config3d
|
||||||
worked := api.enable3D true
|
worked := api.enable3D true
|
||||||
api.setPerspective 'T'
|
api.setPerspective 'T'
|
||||||
|
// Get rid of the xy-plane indicator
|
||||||
|
xml .= api.getXML()
|
||||||
|
xml = xml.replace /plate.show="\w+"/, 'plate show="false"'
|
||||||
|
console.log 'Trying', xml
|
||||||
|
api.setXML xml
|
||||||
else
|
else
|
||||||
api.setPerspective 'G'
|
api.setPerspective 'G'
|
||||||
for name, value in jApp.params
|
for name, value in jApp.params
|
||||||
@ -64,6 +69,7 @@ function postApplets(jApplets: AppletDescription[], codebase = '')
|
|||||||
-depth - 10, depth + 10,
|
-depth - 10, depth + 10,
|
||||||
false
|
false
|
||||||
api.setAxesVisible 3, false, false, false
|
api.setAxesVisible 3, false, false, false
|
||||||
|
api.setGridVisible 3, false
|
||||||
else
|
else
|
||||||
api.setCoordSystem -10, 10 + jApp.width, -10, 10 + jApp.height
|
api.setCoordSystem -10, 10 + jApp.width, -10, 10 + jApp.height
|
||||||
api.setAxesVisible false, false
|
api.setAxesVisible false, false
|
||||||
@ -612,9 +618,9 @@ classHandler: Record<JoyceClass, ClassHandler> :=
|
|||||||
// https://www.reddit.com/r/geogebra/comments/12cbr85/setlineopacity_command/
|
// https://www.reddit.com/r/geogebra/comments/12cbr85/setlineopacity_command/
|
||||||
// I don't really understand how/why it works, but it seems to
|
// I don't really understand how/why it works, but it seems to
|
||||||
// So that's good enough for me
|
// So that's good enough for me
|
||||||
xml := api.getXML name
|
xml .= api.getXML name
|
||||||
xml.replace(/opacity="\d+"/, 'opacity="0"')
|
xml = xml.replace /opacity="\d+"/, 'opacity="0"'
|
||||||
api.evalXML(xml)
|
api.evalXML xml
|
||||||
// This last step is especially confusing... I think
|
// This last step is especially confusing... I think
|
||||||
// evaluating the modified XML created a sort of second
|
// evaluating the modified XML created a sort of second
|
||||||
// copy of the entity, and so we have to hide the original one
|
// copy of the entity, and so we have to hide the original one
|
||||||
|
Loading…
Reference in New Issue
Block a user