LayerSettings

class scenepic.LayerSettings

Settings used for customizing canvas drawing by layer. Currently, opacity is only guaranteed to be correct for Meshes that do not overlap. If you know one mesh should be rendered before another for opacity purposes, use the renderOrder setting: low numbers will be drawn before high numbers, and layers with no renderOrder set will be drawn last. Meshes without layer ids, or with layer ids that are not specified in this dictionary, will be drawn filled, without wireframe, at opacity 1.0, and after any layers with renderOrder set.

Parameters:
  • filled (bool, optional) – whether to draw the layer with filled polygons. Defaults to True.

  • wireframe (bool, optional) – whether to draw the layer with a frame outline. Defaults to False.

  • opacity (float, optional) – the opacity with which to draw the layer. Defaults to 1.0.

  • render_order (int, optional) – Where in the transparency order to draw this layer. Defaults to None.

property filled

Specifies whether to draw the layer with filled triangles

Type:

bool

property opacity

In [0,1] specifies the opacity with which to draw the layer

Type:

float

property render_order

Specifies a fixed order to draw transparency.

Type:

int

property wireframe

Specifies whether to draw the layer with a wireframe outline

Type:

bool

TextPanel

class scenepic.TextPanel

Represents a ScenePic TextPanel UI component.

clear_script()

Call this if you are dumping a ScenePic script in multiple parts, e.g. for client-server interactions, or when chunking a large visualization into multiple files.

property input_text

Text for the optional input textbox.

Type:

str

property text

The text within the text panel.

Type:

str

property title

The title of the text panel.

Type:

str

UIParameters

class scenepic.UIParameters

Per-Canvas3D parameters of the ScenePic user interface.

Parameters:
  • pointer_alt_key_multiplier (float, optional) – when the Alt key is pressed, mouse movement is scaled by this factor. Defaults to 0.2.

  • pointer_rotation_speed (float, optional) – linear scale factor of pointer translation into camera rotation. Defaults to 0.01.

  • mouse_wheel_translation_speed (float, optional) – linear scale factor of mouse wheel input into camera translation. Defaults to 0.005.

  • layer_dropdown_visibility (str, optional) – CSS visibility setting for the layer dropdown menu. Defaults to “visible”.

property key_press_speed

movement speed from key presses

Type:

float

property layer_dropdown_visibility

the CSS visibility setting for the layer dropdown menu

Type:

str

property mouse_wheel_translation_speed

linear scale factor of mouse wheel input into camera translation.

Type:

float

property pointer_alt_key_multiplier

When the Alt key is pressed, mouse movement is scaled by this factor.

Type:

float

property pointer_rotation_speed

linear scale factor of pointer translation into camera rotation.

Type:

float