cesiumlab / cesiumlab/XbsjEarthUI
继承的方式 写了个类 无法保存
- Dominant language
- JavaScript
- Stars
- 734
- Forks
- 193
- PR merge metrics
- No merged PRs in 30d
Description
@vtxf 老哥
我通过继承的方式 写了个类, 然后实现这个类,但是保存场景加载的时候实例化的是被继承的类 而不是我自己写的这个。有办法解决不。。。

---
自己扩展类,可以使用registerType,参考标会插件的写法:
https://github.com/cesiumlab/PlottingSymbol-EarthSDK/blob/master/src/GeoArc.js

Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading the registerType usage in the referenced PlottingSymbol-EarthSDK file, src/GeoArc.js, then trace how custom classes are serialized during scene saving and restored during loading. Done means a class created through inheritance is registered and scene reload instantiates the custom class rather than its parent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100