Skip to content

Move single-example files out of core/ into examples/<name>/ - #359

Merged
ASDAlexander77 merged 2 commits into
mainfrom
examples-own-folders
Dec 5, 2026
Merged

ASDAlexander77 merged 2 commits into
mainfrom
examples-own-folders

Conversation

@ASDAlexander77

Copy link
Copy Markdown
Owner

What

core/ now holds only what several examples (or projects such as Powder Sandbox) share. Every file only one example uses moves into examples/<name>/, beside that example's main source (examples/<name>/<name>.ts).

TypeScript (first commit)

  • golden_line (golden_line_*.ts, web_audio.ts), hologram, clustered_geometry (clas.ts), fast_block_compress (fbc_texture.ts), sakura_forest_ser (obj_model.ts), opacity_micromaps (omm_bake.ts), memory_management (paged_images.ts), denoised_rtao (pbrt_scene.ts), rtxdi_minimal (rtxdi_di.ts), rtxmg_demo (rtxmg.ts), rtxpt (rtxpt_renderer.ts), video_texture (video_player.ts).
  • CMake: tslang_example_main picks examples/<name>/<name>.ts when it exists, else examples/<name>.ts (desktop and Android).
  • tools/generate_donut_wrappers.py: MODULE_DIRS sends the generated single-example modules to their example folders; regenerating reproduces the committed files.
  • tsconfig.json, tools/smoke_examples.ps1, tools/capture_screenshots.ps1, tools/find_untyped_handles.py see examples/*/*.ts.

Native (second commit)

  • The .cpp/.h files one example links: web_audio, denoised_rtao + pbrt/, omm_bake, paged_images, fast_block_compress + fbc_cpu*, obj_model, clas, video_player, rtxpt, rtxdi + rtxdi_minimal, rtxmg, streamline (streamline_demo gets a folder), msvc_fast_math (raytracing_mini_engine). They include ../../core/donut_api.h.
  • tools/check_interop_types.py and the CMake interop glob read examples/*/*.cpp too.

Stays in core/

  • core/interop/*.d.ts: every example compiles them through donut_interop.d.ts.
  • Files an example shares with its _nri twin (directx_collision, mobile_nerf_common, octomap_common, ...) and anything with 2+ users.
  • The modules Powder Sandbox imports (auto_quality, fixed_step, pan_zoom, ui/*, ...).
  • shaders/ and media/ unchanged.

Testing

  • release preset: reconfigured and built (800/800), ctest: 535/535 passed (before and after the native move).
  • release-streamline-rc preset built (streamline_demo).
  • check_interop_types.py --strict and its unit tests pass.
  • Not built locally (no build folders for those SDK presets): rtxpt, rtxdi_minimal, rtxmg_demo; their CMake changes are the same path updates. Android/Linux branches read by hand.

Old build folders need cmake --preset <name> rerun (the build does it via CONFIGURE_DEPENDS globs, but the moved main sources change the targets' sources).

🤖 Generated with Claude Code

ASDAlexander77 and others added 2 commits December 5, 2026 17:51
core/ now holds only modules several examples (or projects) share. An
example with modules of its own lives in examples/<name>/<name>.ts beside
them (golden_line, hologram, clustered_geometry, fast_block_compress,
sakura_forest_ser, opacity_micromaps, memory_management, denoised_rtao,
rtxdi_minimal, rtxmg_demo, rtxpt, video_texture). CMake finds the main
source through tslang_example_main; generate_donut_wrappers.py writes the
moved generated modules to their example folders.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The C++ (and its private headers) only one example links now sits with
that example: web_audio, denoised_rtao + pbrt/, omm_bake, paged_images,
fast_block_compress + fbc_cpu, obj_model, clas, video_player, rtxpt,
rtxdi + rtxdi_minimal, rtxmg, streamline (streamline_demo gets a folder)
and msvc_fast_math (raytracing_mini_engine). The interop declarations stay
in core/interop, as every example compiles them; the interop check reads
examples/*/*.cpp too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ASDAlexander77
ASDAlexander77 merged commit 4e6dcf9 into main Dec 5, 2026
2 checks passed
@ASDAlexander77
ASDAlexander77 deleted the examples-own-folders branch December 5, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant