|
| 1 | +# AUTO GENERATED FILE - DO NOT EDIT |
| 2 | + |
| 3 | +import typing # noqa: F401 |
| 4 | +from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401 |
| 5 | +from dash.development.base_component import Component, _explicitize_args |
| 6 | + |
| 7 | +ComponentType = typing.Union[ |
| 8 | + str, |
| 9 | + int, |
| 10 | + float, |
| 11 | + Component, |
| 12 | + None, |
| 13 | + typing.Sequence[typing.Union[str, int, float, Component, None]], |
| 14 | +] |
| 15 | + |
| 16 | +NumberType = typing.Union[ |
| 17 | + typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex |
| 18 | +] |
| 19 | + |
| 20 | + |
| 21 | +class CrystalToolkitAnimationScene(Component): |
| 22 | + """A CrystalToolkitAnimationScene component. |
| 23 | +
|
| 24 | +
|
| 25 | +Keyword arguments: |
| 26 | +
|
| 27 | +- children (optional): |
| 28 | + First child will be rendered as the settings panel. Second child |
| 29 | + will be rendered as the bottom panel (legend). |
| 30 | +
|
| 31 | +- id (optional): |
| 32 | + The ID used to identify this component in Dash callbacks. |
| 33 | +
|
| 34 | +- animation (optional): |
| 35 | + Animation type. |
| 36 | +
|
| 37 | +- axisView (optional): |
| 38 | + Where is the axis displayed ( 'NW' / 'NE' / 'SE' / 'SW' / 'HIDDEN' |
| 39 | + ). |
| 40 | +
|
| 41 | +- className (optional): |
| 42 | + Class name that will wrap around the whole scene component. When |
| 43 | + enlarged, this class name is applied to the modal-content element. |
| 44 | +
|
| 45 | +- currentCameraState (optional): |
| 46 | + THIS PROP IS SET AUTOMATICALLY Object that maintains the current |
| 47 | + state of the camera. e.g. { position: {x: 0, y: 0, z: 0}, |
| 48 | + quarternion: {x: 0, y: 0, z: 0, w: 0}, zoom: 1, |
| 49 | + setByComponentId: \"1\", following: True }. |
| 50 | +
|
| 51 | +- customCameraState (optional): |
| 52 | + Object for setting the scene to a custom camera state. When |
| 53 | + modified, the camera will update to new custom state. e.g. { |
| 54 | + position: {x: 0, y: 0, z: 0}, quarternion: {x: 0, y: 0, z: 0, w: |
| 55 | + 0}, (optional) zoom: 1 (optional) }. |
| 56 | +
|
| 57 | +- data (optional): |
| 58 | + Simple3DScene JSON, the easiest way to generate this is to use the |
| 59 | + Scene class in crystal_toolkit.core.scene and its to_json method. |
| 60 | +
|
| 61 | +- debug (optional): |
| 62 | + Display a debug view. |
| 63 | +
|
| 64 | +- fileOptions (optional): |
| 65 | + List of options to show in file download dropdown. |
| 66 | +
|
| 67 | +- fileTimestamp (optional): |
| 68 | + THIS PROP IS SET AUTOMATICALLY Date string that represents the |
| 69 | + time fileType was set. Use this prop in dash callbacks to trigger |
| 70 | + file downloads. |
| 71 | +
|
| 72 | +- fileType (optional): |
| 73 | + THIS PROP IS SET AUTOMATICALLY The last file type clicked in the |
| 74 | + file download menu. |
| 75 | +
|
| 76 | +- imageData (optional): |
| 77 | + THIS PROP IS SET AUTOMATICALLY Data string for the image generated |
| 78 | + on image button click. |
| 79 | +
|
| 80 | +- imageDataTimestamp (optional): |
| 81 | + THIS PROP IS SET AUTOMATICALLY Date string that represents the |
| 82 | + time imageData was set. Use this prop in dash callbacks to trigger |
| 83 | + downloads of imageData. |
| 84 | +
|
| 85 | +- imageRequest (optional): |
| 86 | + Set to trigger a screenshot or scene download. Must be an object |
| 87 | + with the following structure: { \"filetype\": \"png\" // the |
| 88 | + image format (\"png\", \"dae\") } Passing this prop as an object |
| 89 | + ensures that new requests are triggered any time the prop is set. |
| 90 | +
|
| 91 | +- imageType (optional): |
| 92 | + File type to be downloaded as an image. Either png or dae. |
| 93 | +
|
| 94 | +- inletPadding (optional): |
| 95 | + Padding of the axis view. |
| 96 | +
|
| 97 | +- inletSize (optional): |
| 98 | + Size of the axis view. |
| 99 | +
|
| 100 | +- sceneSize (optional): |
| 101 | + Width / Height of the displayed component. |
| 102 | +
|
| 103 | +- selectedObject (optional): |
| 104 | + This points to the last clicked objects. Use it in your dash |
| 105 | + callback to know which objects are currently selected in the |
| 106 | + scene. |
| 107 | +
|
| 108 | +- setProps (optional): |
| 109 | + Dash-assigned callback that should be called whenever any of the |
| 110 | + properties change. |
| 111 | +
|
| 112 | +- settings (optional): |
| 113 | + Options used for generating scene. Supported options and their |
| 114 | + defaults are given as follows: { antialias: True, // set to |
| 115 | + False to improve performance renderer: 'webgl', // 'svg' also |
| 116 | + an option, used for unit testing transparentBackground: False, |
| 117 | + // transparent background background: '#ffffff', // background |
| 118 | + color if not transparent, sphereSegments: 32, // decrease to |
| 119 | + improve performance cylinderSegments: 16, // decrease to |
| 120 | + improve performance staticScene: True, // disable if animation |
| 121 | + required defaultZoom: 1, // 1 will zoom to fit object exactly, |
| 122 | + <1 will add padding between object and box bounds zoomToFit2D: |
| 123 | + False // if True, will zoom to fit object only along the X and Y |
| 124 | + axes (not Z) extractAxis: False // will remove the axis from |
| 125 | + the main scene isMultiSelectionEnabled: False // allow to use |
| 126 | + shift to select, secondaryObjectView: True // show the selected |
| 127 | + object in a detail view animation: 'play' | 'slider' | 'none' |
| 128 | + // choose which style of animation is use } There are several |
| 129 | + additional options used for debugging and testing, please consult |
| 130 | + the source code directly for these. |
| 131 | +
|
| 132 | +- showControls (optional) |
| 133 | +
|
| 134 | +- showExpandButton (optional) |
| 135 | +
|
| 136 | +- showExportButton (optional) |
| 137 | +
|
| 138 | +- showImageButton (optional) |
| 139 | +
|
| 140 | +- showPositionButton (optional) |
| 141 | +
|
| 142 | +- toggleVisibility (optional): |
| 143 | + Hide/show nodes in scene by its name (key), value is 1 to show the |
| 144 | + node and 0 to hide it.""" |
| 145 | + _children_props = [] |
| 146 | + _base_nodes = ['children'] |
| 147 | + _namespace = 'dash_mp_components' |
| 148 | + _type = 'CrystalToolkitAnimationScene' |
| 149 | + |
| 150 | + |
| 151 | + def __init__( |
| 152 | + self, |
| 153 | + children: typing.Optional[ComponentType] = None, |
| 154 | + id: typing.Optional[typing.Union[str, dict]] = None, |
| 155 | + className: typing.Optional[typing.Any] = None, |
| 156 | + data: typing.Optional[typing.Any] = None, |
| 157 | + settings: typing.Optional[typing.Any] = None, |
| 158 | + toggleVisibility: typing.Optional[typing.Any] = None, |
| 159 | + imageRequest: typing.Optional[typing.Any] = None, |
| 160 | + imageType: typing.Optional[typing.Any] = None, |
| 161 | + imageData: typing.Optional[typing.Any] = None, |
| 162 | + imageDataTimestamp: typing.Optional[typing.Any] = None, |
| 163 | + fileOptions: typing.Optional[typing.Any] = None, |
| 164 | + fileType: typing.Optional[typing.Any] = None, |
| 165 | + fileTimestamp: typing.Optional[typing.Any] = None, |
| 166 | + selectedObject: typing.Optional[typing.Any] = None, |
| 167 | + sceneSize: typing.Optional[typing.Any] = None, |
| 168 | + axisView: typing.Optional[typing.Any] = None, |
| 169 | + inletSize: typing.Optional[typing.Any] = None, |
| 170 | + inletPadding: typing.Optional[typing.Any] = None, |
| 171 | + debug: typing.Optional[typing.Any] = None, |
| 172 | + animation: typing.Optional[typing.Any] = None, |
| 173 | + currentCameraState: typing.Optional[typing.Any] = None, |
| 174 | + customCameraState: typing.Optional[typing.Any] = None, |
| 175 | + showControls: typing.Optional[typing.Any] = None, |
| 176 | + showExpandButton: typing.Optional[typing.Any] = None, |
| 177 | + showImageButton: typing.Optional[typing.Any] = None, |
| 178 | + showExportButton: typing.Optional[typing.Any] = None, |
| 179 | + showPositionButton: typing.Optional[typing.Any] = None, |
| 180 | + **kwargs |
| 181 | + ): |
| 182 | + self._prop_names = ['children', 'id', 'animation', 'axisView', 'className', 'currentCameraState', 'customCameraState', 'data', 'debug', 'fileOptions', 'fileTimestamp', 'fileType', 'imageData', 'imageDataTimestamp', 'imageRequest', 'imageType', 'inletPadding', 'inletSize', 'sceneSize', 'selectedObject', 'setProps', 'settings', 'showControls', 'showExpandButton', 'showExportButton', 'showImageButton', 'showPositionButton', 'toggleVisibility'] |
| 183 | + self._valid_wildcard_attributes = [] |
| 184 | + self.available_properties = ['children', 'id', 'animation', 'axisView', 'className', 'currentCameraState', 'customCameraState', 'data', 'debug', 'fileOptions', 'fileTimestamp', 'fileType', 'imageData', 'imageDataTimestamp', 'imageRequest', 'imageType', 'inletPadding', 'inletSize', 'sceneSize', 'selectedObject', 'setProps', 'settings', 'showControls', 'showExpandButton', 'showExportButton', 'showImageButton', 'showPositionButton', 'toggleVisibility'] |
| 185 | + self.available_wildcard_properties = [] |
| 186 | + _explicit_args = kwargs.pop('_explicit_args') |
| 187 | + _locals = locals() |
| 188 | + _locals.update(kwargs) # For wildcard attrs and excess named props |
| 189 | + args = {k: _locals[k] for k in _explicit_args if k != 'children'} |
| 190 | + |
| 191 | + super(CrystalToolkitAnimationScene, self).__init__(children=children, **args) |
| 192 | + |
| 193 | +setattr(CrystalToolkitAnimationScene, "__init__", _explicitize_args(CrystalToolkitAnimationScene.__init__)) |
0 commit comments