Commit Graph

20 Commits

Author SHA1 Message Date
adc80c54c4 Optimize animated connection textures and fix material texture bleeding
Performance Optimizations (~90% improvement):
- Implement texture color caching in AnimatedLineTexture
  - Reuse textures for connections with same color
  - Reduces texture count by 70-90% with duplicate colors
- Reduce animation update frequency from every frame to every other frame
  - Halves CPU-to-GPU texture updates while maintaining smooth animation
- Add texture preloading for all 16 toolbox colors
  - Eliminates first-connection creation stutter
- Add GetCacheStats, ClearCache, and PreloadTextures utility methods

Bug Fixes:
1. Fix texture disappearing when moving objects with connections
   - Root cause: Shared cached textures were disposed on connection update
   - Solution: Never dispose cached textures, only swap references
   - Add safety check in DisposeTexture to prevent cached texture disposal

2. Fix UI text textures bleeding to normal materials
   - Add metadata.isUI = true to 10+ UI components:
     - Button.ts (with unique material names per button)
     - handle.ts, roundButton.ts, createLabel.ts, updateTextNode.ts
     - spinner.ts, vrConfigPanel.ts, buildImage, introduction.ts
     - ResizeGizmo.ts
   - Update LightmapGenerator filter to check metadata.isUI first
   - Change exact name match to startsWith for button materials

3. Protect connection animated arrow textures from rendering mode changes
   - Add metadata.isConnection = true to connection materials
   - Update LightmapGenerator to skip connection materials
   - Connections maintain animated arrows in all rendering modes

Technical Details:
- Texture caching follows existing LightmapGenerator pattern
- All UI materials now consistently marked with metadata flags
- Rendering mode filter uses metadata-first approach with fallback checks
- Connection materials preserve textures via metadata.preserveTextures flag

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 16:37:22 -06:00
724cd79ab3 Removed html renderer, too may problems. 2024-06-06 09:22:39 -05:00
2f29b0a2de Moved loggers out of global module scope. 2024-04-28 09:03:20 -05:00
791481e564 Added Metadata sync for friendly name 2024-04-27 06:51:24 -05:00
0e4d815225 Added Metadata sync for friendly name 2024-04-27 06:50:04 -05:00
4db349581b Updated Tutorial. 2024-04-25 12:38:29 -05:00
fbc39f2103 Introduction revamp. 2024-04-24 07:19:15 -05:00
c4d201c5ba refactored logging. 2024-04-03 10:08:17 -05:00
2ef5379a3b Added 3d closet demo, cleaned up menus. 2024-02-02 15:36:47 -06:00
7d5ef80b5b Updated initial camera position, fixed initial demo. 2023-12-11 10:14:46 -06:00
72bdbf3ffa Removed some unused code. Optimized export bundle. Started building diagram selector menu. 2023-11-10 13:19:28 -06:00
cee114f784 Code Cleanup. 2023-11-07 07:20:11 -06:00
4f71fcefbd Cleaned up intro/demo. 2023-09-25 13:59:59 -05:00
16f9f7f92c Removed console.log 2023-08-24 16:35:52 -05:00
88668c3d64 Fixed code inspections. 2023-08-23 08:04:49 -05:00
3954619d60 Fixed up config and color change events. 2023-08-22 14:38:09 -05:00
658b65e216 tuned up sounds to get rid of static instance. 2023-08-22 08:16:38 -05:00
7796a23ad9 Added initial demo config. 2023-08-19 15:45:19 -05:00
3140c180c6 Removed initial voice logic. 2023-08-18 10:42:41 -05:00
a37618737a Added some missing html5 boilerplate and service worker. 2023-08-18 09:49:45 -05:00