YTSurfaceBase.
export_sketchfab
(title, description, api_key=None, color_field=None, color_map='algae', color_log=True, bounds=None, no_ghost=False)[source]¶This exports Surfaces to SketchFab.com, where they can be viewed interactively in a web browser.
SketchFab.com is a proprietary web service that provides WebGL rendering of models. This routine will use temporary files to construct a compressed binary representation (in .PLY format) of the Surface and any optional fields you specify and upload it to SketchFab.com. It requires an API key, which can be found on your SketchFab.com dashboard. You can either supply the API key to this routine directly or you can place it in the variable “sketchfab_api_key” in your ~/.yt/config file. This function is parallel-safe.
Parameters: | title : string
description : string
api_key : string
color_field : string
color_map : string
color_log : bool
bounds : list of tuples
|
---|---|
Returns: | URL : string
|
Examples
>>> from yt.units import kpc
>>> dd = ds.sphere("max", (200, "kpc"))
>>> rho = 5e-27
>>> bounds = [(dd.center[i] - 100.0*kpc,
... dd.center[i] + 100.0*kpc) for i in range(3)]
...
>>> surf = ds.surface(dd, "density", rho)
>>> rv = surf.export_sketchfab(
... title = "Testing Upload",
... description = "A simple test of the uploader",
... color_field = "temperature",
... color_map = "hot",
... color_log = True,
... bounds = bounds)
...