registry.tsx 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /* eslint-disable @typescript-eslint/ban-ts-comment */
  2. // @ts-nocheck
  3. import { defineRegistry } from "@json-render/react";
  4. import { threeComponents } from "@json-render/react-three-fiber";
  5. import { catalog } from "./catalog";
  6. import {
  7. GameBox,
  8. GameSphere,
  9. GameCylinder,
  10. GameCone,
  11. GameTorus,
  12. GamePlane,
  13. GameCapsule,
  14. GameKnot,
  15. GameTetrahedron,
  16. GameOctahedron,
  17. GameDodecahedron,
  18. GameIcosahedron,
  19. GameExtrude,
  20. GameTube,
  21. GameShape,
  22. GameMesh,
  23. } from "@/components/game/game-primitives";
  24. import { GameLight } from "@/components/game/game-light";
  25. import { Player } from "@/components/game/player";
  26. import { GameCharacter } from "@/components/game/character";
  27. import { SoundEmitter } from "@/components/game/sound-emitter";
  28. import { MediaPlane } from "@/components/game/media-plane";
  29. import { GroundPlane } from "@/components/game/ground-plane";
  30. import { GameModel as GameModelComponent } from "@/components/game/model-wrapper";
  31. const gameComponents = {
  32. GameBox: ({ props, children }) => <GameBox {...props}>{children}</GameBox>,
  33. GameSphere: ({ props, children }) => (
  34. <GameSphere {...props}>{children}</GameSphere>
  35. ),
  36. GameCylinder: ({ props, children }) => (
  37. <GameCylinder {...props}>{children}</GameCylinder>
  38. ),
  39. GameCone: ({ props, children }) => <GameCone {...props}>{children}</GameCone>,
  40. GameTorus: ({ props, children }) => (
  41. <GameTorus {...props}>{children}</GameTorus>
  42. ),
  43. GamePlane: ({ props, children }) => (
  44. <GamePlane {...props}>{children}</GamePlane>
  45. ),
  46. GameCapsule: ({ props, children }) => (
  47. <GameCapsule {...props}>{children}</GameCapsule>
  48. ),
  49. GameKnot: ({ props, children }) => <GameKnot {...props}>{children}</GameKnot>,
  50. GameTetrahedron: ({ props, children }) => (
  51. <GameTetrahedron {...props}>{children}</GameTetrahedron>
  52. ),
  53. GameOctahedron: ({ props, children }) => (
  54. <GameOctahedron {...props}>{children}</GameOctahedron>
  55. ),
  56. GameDodecahedron: ({ props, children }) => (
  57. <GameDodecahedron {...props}>{children}</GameDodecahedron>
  58. ),
  59. GameIcosahedron: ({ props, children }) => (
  60. <GameIcosahedron {...props}>{children}</GameIcosahedron>
  61. ),
  62. GameExtrude: ({ props, children }) => (
  63. <GameExtrude {...props}>{children}</GameExtrude>
  64. ),
  65. GameTube: ({ props, children }) => <GameTube {...props}>{children}</GameTube>,
  66. GameShape: ({ props, children }) => (
  67. <GameShape {...props}>{children}</GameShape>
  68. ),
  69. GameMesh: ({ props, children }) => <GameMesh {...props}>{children}</GameMesh>,
  70. GameLight: ({ props }) => <GameLight {...props} />,
  71. Player: ({ props }) => <Player {...props} />,
  72. GameCharacter: ({ props }) => <GameCharacter {...props} />,
  73. GameModel: ({ props }) => <GameModelComponent {...props} />,
  74. SoundEmitter: ({ props }) => <SoundEmitter {...props} />,
  75. MediaPlane: ({ props }) => <MediaPlane {...props} />,
  76. GroundPlane: ({ props }) => <GroundPlane {...props} />,
  77. };
  78. const allComponents = {
  79. ...threeComponents,
  80. ...gameComponents,
  81. };
  82. export const { registry } = defineRegistry(catalog, {
  83. components: allComponents,
  84. });
  85. export { catalog };