plot_object

marxs.visualization.threejsjson.plot_object(obj, display=None, **kwargs)[source] [edit on github]

‘Format any MARXS object as a json string.

This method will inspect the object that is passed in and select the correct plotting method for its shape.

Parameters:
objmarxs.base.MarxsElement

The element that should be plotted.

displaydict of None

Dictionary with display settings.

Returns:
outjsondict

outjson is a (possibly nested) dictionaries that describes the scene in form that the included MARXSloader.js can read.