question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Avoid importing Cesium3DTileset in Picking.js

See original GitHub issue

Since 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:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
hpinkoscommented, Oct 8, 2019

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

0reactions
puckeycommented, Oct 8, 2019

I wasn’t using the very latest version before – I must have been a few releases behind.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found