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