threepipe
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

gltf.ts 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import {
  2. GLTFCesiumRTCExtension,
  3. GLTFMeshFeaturesExtension,
  4. GLTFStructuralMetadataExtension,
  5. // @ts-expect-error moduleResolution issue
  6. } from '3d-tiles-renderer/plugins'
  7. import {AssetManager} from 'threepipe'
  8. export const gltfCesiumRTCExtension = {
  9. name: 'CESIUM_RTC' satisfies GLTFCesiumRTCExtension['name'],
  10. import: (_p)=>new GLTFCesiumRTCExtension(),
  11. export: (_w)=>({
  12. // todo - save center in userData and access to write back as extension value
  13. }),
  14. textures: undefined,
  15. } satisfies AssetManager['gltfExtensions'][number]
  16. export const gltfStructuralMetadataExtension = {
  17. name: 'EXT_structural_metadata' satisfies GLTFStructuralMetadataExtension['name'],
  18. import: (_p)=>new GLTFStructuralMetadataExtension(),
  19. export: (_w)=>({
  20. // todo
  21. // beforeParse: ()=>{
  22. // throw new Error('not implemented')
  23. // },
  24. }),
  25. textures: undefined,
  26. } satisfies AssetManager['gltfExtensions'][number]
  27. export const gltfMeshFeaturesExtension = {
  28. name: 'EXT_mesh_features' satisfies GLTFMeshFeaturesExtension['name'],
  29. import: (_p)=>new GLTFMeshFeaturesExtension(),
  30. export: (_w)=>({
  31. // todo
  32. // beforeParse: ()=>{
  33. // throw new Error('not implemented')
  34. // },
  35. }),
  36. // textures: undefined, // todo
  37. } satisfies AssetManager['gltfExtensions'][number]