-
-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
Description
Hello,
I'm trying to render a Scenegraph layer with dash-deck but this does not seem possible.
I am getting an error Unexpected ":" at character 5
Steps/Code to Reproduce
Example:
import os
import dash
import dash_deck
import dash_html_components as html
import pydeck as pdk
mapbox_api_token = os.getenv("MAPBOX_ACCESS_TOKEN")
layer = pdk.Layer(
"ScenegraphLayer",
data=[{"coordinates": [-122.466233, 37.684638]}],
draggable=True,
scenegraph="https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/BoxAnimated/glTF-Binary/BoxAnimated.glb",
get_position="coordinates",
get_orientation=[0, 20, 90],
get_color=[100, 100, 100, 100],
size_scale=1,
_lighting="pbr",
)
view_state = pdk.ViewState(
latitude=37.7749295, longitude=-122.4194155, zoom=11, bearing=0, pitch=45
)
# Render
r = pdk.Deck(layers=[layer], initial_view_state=view_state)
app = dash.Dash(__name__)
app.layout = html.Div(
dash_deck.DeckGL(r.to_json(), id="deck-gl", mapboxKey=mapbox_api_token)
)
if __name__ == "__main__":
app.run_server(debug=True)Versions
Dash Core Components 2.0.0
Dash HTML Components 2.0.0
Dash Deck 0.0.1
Metadata
Metadata
Assignees
Labels
No labels