This project demonstrates how GLB assets can be configurably injected into Cesium. Out of the box, this example will spawn Godzilla in several locations around the world. However, any asset can be spawned provided its GLB exists in the assets/glb
directory and it has been fully specified in glb-config.json
.
-
Create a free Cesium Account
-
Go to Cesium Ion and select
Access Tokens
-
Create or reuse an existing access token with the following access:
- assets:read
- geocode
-
Copy the value under
Token
-
Create a
.env
file in the root directory of this repository containing the following, where<Token Value>
is replaced by the token copied in the previous step:CESIUM_TOKEN=<Token Value>
-
Open this project in the provided devcontainer:
F1-> DevContainers: Rebuild and Reopen in Container
-
Add or Remove GLB Assets to
./glb-injector/assets/glb
. Sketchfab is an excellent resource for GLB assets. -
Update
glb-config.json
with the asset information required for your scene -
Launch the application via
F5
or:Run and Debug -> Run Application
-
Once webpack has built and deployed the application, it can be accessed at:
http://localhost:8080
- "Dancing_Penguin" (https://skfb.ly/6QZCU) by twilighthall83 is licensed under Creative Commons Attribution (http://creativecommons.org/licenses/by/4.0/).
- "Godzilla" (https://skfb.ly/oHwV8) by David Wigforss is licensed under Creative Commons Attribution-NonCommercial (http://creativecommons.org/licenses/by-nc/4.0/).
- "Moorhuhn / Crazy Chicken" (https://skfb.ly/oNp9G) by nthmn.exe is licensed under Creative Commons Attribution (http://creativecommons.org/licenses/by/4.0/).