text: from paraview.web import venv  # Available in PV 5.10-RC2+
  
  from trame import state
  from trame.html import vuetify, paraview
  from trame.layouts import SinglePage
  
  from paraview import simple
  
  # -----------------------------------------------------------------------------
  # ParaView code
  # -----------------------------------------------------------------------------
  
  DEFAULT_RESOLUTION = 6
  
  cone = simple.Cone()
  representation = simple.Show(cone)
  view = simple.Render()
  
  
  @state.change("resolution")
  def update_cone(resolution, **kwargs):
      cone.Resolution = resolution
      html_view.update()
  
  
  def update_reset_resolution():
      state.resolution = DEFAULT_RESOLUTION
  
  
  # -----------------------------------------------------------------------------
  # GUI
  # -----------------------------------------------------------------------------
  
  html_view = paraview.VtkLocalView(view, ref="view")
  
  layout = SinglePage("ParaView cone", on_ready=update_cone)
  layout.logo.click = html_view.reset_camera
  layout.title.set_text("Cone Application")
  
  with layout.toolbar:
      vuetify.VSpacer()
      vuetify.VSlider(
          v_model=("resolution", DEFAULT_RESOLUTION),
          min=3,
          max=60,
          step=1,
          hide_details=True,
          dense=True,
          style="max-width: 300px",
      )
      vuetify.VDivider(vertical=True, classes="mx-2")
      with vuetify.VBtn(icon=True, click=update_reset_resolution):
          vuetify.VIcon("mdi-undo-variant")
  
  with layout.content:
      vuetify.VContainer(
          fluid=True,
          classes="pa-0 fill-height",
          children=[html_view],
      )
  
  # -----------------------------------------------------------------------------
  # Main
  # -----------------------------------------------------------------------------
  
  if __name__ == "__main__":
      layout.start()
  