CesiumGS / CesiumGS/cesium-native

Generate classes/writers/readers for custom glTF extensions

Open
#805 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
C++
Stars
623
Forks
277
PR merge metrics
No merged PRs in 30d

Description

Hi, I'm wondering what would be the best way to add support for custom glTF extensions.

I suppose I could fork your [glTF repository](https://github.com/CesiumGS/glTF) and add my schema files there, and then also fork cesium-native add reference them in glTF.json - but that complicates things a bit more than I had hoped. Are there any other ways, or would you consider adding support for a custom extension folder and config file, so that I could call:
```
node index.js --schema [SAME PARAMS AS USUAL]... --customExtensions myProject/my_extension --customExtConfig myglTF.json
```

Thanks for reading!

**Update:** Ok, so while the generated JsonHandlers are output as separate files, that's not the case for the Json-writer code - which are a collection of "writeJson" functions inside [ModelJsonWriter.cpp](https://github.com/CesiumGS/cesium-native/blob/main/CesiumGltfWriter/generated/src/ModelJsonWriter.cpp)
So I guess this means that the only way of adding custom extensions would be to fork these two repositories then, right?

Contributor guide

Open the contributing guide

Research direction

Start with node index.js and the schema-generation flow, then inspect the generated JsonHandlers and CesiumGltfWriter/generated/src/ModelJsonWriter.cpp. Determine how a custom extension folder and config would be incorporated without forking the repositories. Done means custom glTF schemas generate the required readers and writers through the proposed command-line options.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, node.js
Domain
build-system, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.