Repository navigation
Move single-example files out of core/ into examples/<name>/ - #359
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
core/now holds only what several examples (or projects such as Powder Sandbox) share. Every file only one example uses moves intoexamples/<name>/, beside that example's main source (examples/<name>/<name>.ts).TypeScript (first commit)
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).tslang_example_mainpicksexamples/<name>/<name>.tswhen it exists, elseexamples/<name>.ts(desktop and Android).tools/generate_donut_wrappers.py:MODULE_DIRSsends 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.pyseeexamples/*/*.ts.Native (second commit)
.cpp/.hfiles 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.pyand the CMake interop glob readexamples/*/*.cpptoo.Stays in core/
core/interop/*.d.ts: every example compiles them throughdonut_interop.d.ts._nritwin (directx_collision,mobile_nerf_common,octomap_common, ...) and anything with 2+ users.auto_quality,fixed_step,pan_zoom,ui/*, ...).shaders/andmedia/unchanged.Testing
releasepreset: reconfigured and built (800/800),ctest: 535/535 passed (before and after the native move).release-streamline-rcpreset built (streamline_demo).check_interop_types.py --strictand its unit tests pass.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