Optionalcontainer: HTMLElement
the element that holds the panel while the plugin is added. Without it, the app puts
element in the page (in the editor frame: TweakpaneEditorPlugin.addPanel).
Protected_Protected Optional_Protected_A click on a selected row (without a key) unselects it
Optional ReadonlycontainerThe element that holds the panel while the plugin is added, given to the constructor
A double-click on a row selects it and moves the camera to it (the scene row: to the whole model). A double-click on the name renames it.
ReadonlyelementThe panel: the header, the search field and the list. It fills its parent.
Off: the panel is hidden, and the enabledChange event tells the app (which can take its area out of the editor frame)
The Geometry tab: the geometries of the objects in the scene, with the vertex count and the objects that use each
The kinds of objects that show no children in the list: their helpers, targets or parts. Set a new list to change it. showLeafChildren shows the children of all kinds.
The Materials tab: the materials of the objects in the scene, with a swatch and the objects that use each
An open row shows this many of its children, then a "… N more" row; a click on it shows all of them (until the row
is closed). The objects at the top level, a search, and children that hold the selection always show. 0: all.
The Objects tab: the tree of the objects. The tabs that are on show in a tab bar (tabs); with one tab on, there is no tab bar.
A change of the selection opens the groups that hold the selected objects and scrolls the list to the first one
The scene and the default camera as the first two rows of the Objects tab, above the model, dimmer.
A click selects them (the UI of the editor shows their settings). They are not in the model: they have no eye, lock
or arrow. A search shows them when their name has the text (camera finds the default camera).
Shows the children of the objects of leafTypes too
The Textures tab: the textures that the scene and its objects use, with a picture, the size and the users
OptionaluiA hovered row outlines its object in the viewport. It needs the SelectionOutlinePlugin with
followPicking on. A change renders one more frame, it does not restart the progressive render.
StaticAreaA name, an icon and a colour for the entry of the panel in the mode bar of the editor frame, for the app to pass to
TweakpaneEditorPlugin.addPanel. The plugin does not use it.
StaticHoverThe time in ms that the pointer rests on a row before the viewport outlines its object (viewportHover). Each
outline renders one frame, so a move across many rows renders none until the pointer stops. The pointer that
leaves the list clears the outline at once. 0: at once on each row.
StaticInjectAdds the stylesheet of the panel to the page when the first plugin is made. Off: the page styles the lyp- classes.
Static Optional ReadonlyOldStatic ReadonlyPluginStatic ReadonlyRowThe height of a row in px. The stylesheet takes it from the CSS variable --lyp-row on element.
The objects in the list, from the top: the children of the open rows included, filtered by the search
The tabs that are on (objectsTab, materialsTab, texturesTab, geometryTab); the Objects tab when none is
Protected_Protected_Optionalprefix: stringCloses all the rows
Optionalmeta: SerializationMetaTypeThe object has its row open: its children are in the list
The object is locked: its userData.userSelectable is false, so the PickingPlugin does not pick it, or the
objects inside it, in the viewport. The lock of a parent is not checked.
Draws the rows in view again, in the next animation frame. Changes in the scene, the selection and the panel call
it; call it after a change that the plugin does not hear about, such as a name set without setDirty.
also build the list again: after a change of the tree, of the open rows or of the search
Renames a material or a texture, as one undo step. An empty name or the same name does nothing.
Renames an object, as one undo step. An empty name or the same name does nothing.
Called when enabled changes (and by enable / disable): shows or hides the panel, and sends enabledChange
Opens or closes the row of an object.
also all the levels below it
Locks or unlocks objects, as one undo step. A lock sets userData.userSelectable to false; an unlock gives back
the value from before the lock (none, or true for an object without a material that is picked, like a text).
Shows or hides objects, as one undo step. Cameras are left out: threepipe does not support a hidden camera.
Shows all the children of an open row, in place of its "… N more" row (maxChildren)
Opens the name field on the row of an object, as a double-click on its name does. The row must be in the list
(its parents open). Returns false when it is not.
Optionalmeta: SerializationMetaType
Layers Panel Plugin
A list of the objects in the scene (
scene.modelRoot) as a tree, like the layers panel of Figma or the outliner of Blender. It replaces the HierarchyUiPlugin.userData.userSelectableset tofalse: the PickingPlugin does not pick it, or the objects inside it, in the viewport; the list can still select it. A row in the selection changes all the selected objects. Both are undo steps with theUndoManagerPlugin.Lights and cameras have the icon and the colour of their kind (
widgetKindsof threepipe), as in the viewport.Where the panel goes: in the
containergiven to the constructor, else the app puts element in the page. The plugin does not depend on the editor: in the page frame of theTweakpaneEditorPlugin, the app adds it as a panel,editor.addPanel('layers', layers.element, {...LayersPanelPlugin.AreaEntry, area: 'left'})(the person can move it to another place with the menu of its entry), and on theenabledChangeevent it takes the panel out (editor.removePanel('layers')) or adds it back. The element fills its parent: give the parent a height. The plugin takes the panel out of the page when it is removed.Example
The plugin UI folder (Layers Panel) has the settings. The settings and the open rows are not saved with the viewer.