Closed wumaolinmaoan closed 2 months ago
The changes introduce significant updates across various facets of the imgui-demo
project. Key enhancements include a basic HTML setup, TypeScript and Vite script updates, the addition of utility functionality for rendering and GUI management, and the implementation of a robust camera orbit control system. These improvements enable the creation of a sophisticated and interactive ImGui demo, incorporating new methods for scene management, input handling, and component inspections.
Files | Summary |
---|---|
web-packages/imgui-demo/index.html | Introduces a basic HTML structure and styling, importing the entry script main.ts . |
.../imgui-demo/package.json | Updates scripts for development and building; adjusts dependencies on TypeScript and Vite. |
.../imgui-demo/src/ge.ts | Introduces GalaceanEffects class for WebGL texture updates. |
.../imgui-demo/src/imgui.ts | Exports ImGui and ImGui_Impl from maoan-imgui-js . |
.../imgui-demo/src/main.ts | Adds functionality for creating and managing the ImGui interface for demos. |
.../imgui-demo/src/panels/inspector.ts | Enhances the Inspector class with GUI rendering and hierarchy inspection capabilities. |
.../imgui-demo/src/core/orbit-controller.ts | Adds OrbitController class for comprehensive camera orbit controls. |
.../imgui-demo/tsconfig.json | Configures TypeScript compiler options and linting rules. |
sequenceDiagram
participant User
participant Browser
participant main.ts
participant ImGui
participant OrbitController
User->>Browser: Open index.html
Browser->>main.ts: Load main script
main.ts->>ImGui: Initialize ImGui context
main.ts->>OrbitController: Initialize OrbitController
loop Main Loop
main.ts->>ImGui: Render UI
main.ts->>OrbitController: Update camera based on input
end
main.ts->>ImGui: Cleanup resources on close
In lines of code, where dreams take flight,
A demo's born in day and night.
With scripts and styles, a world anew,
ImGui's magic, brought to view.
Orbit the scene, with ease take guide,
In pixel realms, our code does glide.
🌟✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
imgui
with WebGL rendering in the newindex.html
.package.json
.GalaceanEffects
class for rendering textures.ImGui
support with various utilities and functionality inmain.ts
.Enhancements
Inspector
class for hierarchy rendering and item inspection.OrbitController
class for camera orbit control, including rotation, panning, and zooming.tsconfig.json
.