Avoid importing Cesium3DTileset in Picking.js
See original GitHub issueSince updating to the latest version of Cesium, I noticed my project’s bundle size had grown 85% by over 850kb minified.
I tracked down a large chunk of it to a single instanceof Cesium3DTileset
use here: https://github.com/AnalyticalGraphicsInc/cesium/blob/d26ccfea38dcf4623cf5da3faca141913c64cfe1/Source/Scene/Picking.js#L549 causing the bundle size to grow by 549 kB, while I do not use Cesium3DTileset
in my project.
Perhaps instead of using instanceof
we could have a static type
enum property to check against? For example if (primitive.type === Type.Cesium3DTileset)
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
How to add a Cesium3DTileset to a scene but disable picking ...
My problem : I want to disable picking events for the second 3D-Tiles set. In the Cesium documentation I see a constructor option...
Read more >cesium/CHANGES.md at main · CesiumGS/cesium - GitHub
Any imports should originate from the cesium module ( import { Cartesian3 } ... size by avoiding unnecessarily importing Cesium3DTileset in Picking.js ....
Read more >3d tiles under terrain and single layer pickering - Google Groups
I just want to get information by picking the buildings, ... @import url(. ... Cesium3DTileset({ url: 'SampleData/model_bo/tileset.json' });.
Read more >Cesium3DTileset - Cesium Documentation
js 1719. Determines whether terrain, 3D Tiles, or both will be classified by this tileset. This option is only applied to tilesets containing...
Read more >Plain diff - Transferportal HfT Stuttgart
+ - If you import individual CesiumJS source files directly, you'll need to ... size by avoiding unnecessarily importing `Cesium3DTileset` in `Picking.js`.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Gotcha, no problem @puckey I’m going to keep this open because this is absolutely something we should fix. There’s no need to pull in the entire 3D tiles source into this
I wasn’t using the very latest version before – I must have been a few releases behind.