Commit Graph

18 Commits

Author SHA1 Message Date
c7887d7d8f Optimize lightmap rendering using emissive texture approach
Changed from lightmapTexture with lighting enabled to emissiveTexture with lighting disabled for better performance. The new approach provides the same lighting illusion without expensive per-pixel lighting calculations.

- Added LightmapGenerator.ENABLED toggle for performance testing
- Updated buildColor.ts to use emissiveColor + emissiveTexture with disableLighting = true
- Updated buildMissingMaterial() to match new rendering approach
- Fixed buildTool.ts to access emissiveColor instead of diffuseColor for material color detection

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-13 09:44:56 -06:00
3f02fc7ea5 Implement lightmap-based rendering for performant lighting illusion
Replace emissive-only rendering with diffuse + lightmap system to achieve realistic lighting appearance without dynamic light overhead.

- Create LightmapGenerator class with canvas-based radial gradient generation
- Generate one lightmap per color (16 total) using top-left directional light simulation
- Cache lightmaps in static Map for reuse across all instances
- Preload all lightmaps at toolbox initialization for instant availability
- Update buildColor() to use diffuseColor + lightmapTexture instead of emissiveColor
- Update buildMissingMaterial() to use lightmap-based rendering
- Enable lighting calculations (disableLighting = false) to apply lightmaps

Lightmap details:
- 512x512 resolution RGBA textures
- Radial gradient: center (color × 1.5), mid (base color), edge (color × 0.3)
- Simulates top-left key light with smooth falloff
- Total memory: ~16 MB for all lightmaps
- Zero per-frame performance cost

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-13 09:20:40 -06:00
6d2049e1f6 Convert to unlit rendering and fix connection update error
Lighting changes:
- Disabled HemisphericLight in customEnvironment
- Changed all materials from diffuse to emissive colors
- Added disableLighting=true to all StandardMaterials
- Updated toolbox colors, diagram entities, and spinner

Bug fix:
- Fixed "Cannot read properties of undefined (reading 'pickedMesh')" error
- Added defensive check in DiagramObject.updateConnection()
- Now validates hit array has at least 2 elements before accessing

Materials now render at full brightness with unlit/flat shading.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-12 21:16:29 -06:00
ba2d9a7886 Added Directional arrows to connectors. 2024-08-23 09:26:44 -05:00
b443e1854b Fixed animation direction for connections. 2024-08-22 19:14:44 -05:00
b198605643 CHanged connector style 2024-08-22 18:21:08 -05:00
e0d85a6a3d Added stl person to toolbox. 2024-06-17 11:33:24 -05:00
4a95028fe8 performance optimization, reduced face counts. 2024-06-07 08:24:31 -05:00
7315e3397a Refactored some larger classses...added enhanced map capability. 2024-06-03 08:34:48 -05:00
7561a06b69 Created new interactive scaling menu. 2024-06-01 09:28:21 -05:00
06333e9123 Refactored things to be closer together in domain. 2024-05-31 19:38:30 -05:00
e85adc1386 Updated basic grab/drop. 2024-05-28 15:33:44 -05:00
d82df88296 Added Image upload component. 2024-04-29 13:39:05 -05:00
2f29b0a2de Moved loggers out of global module scope. 2024-04-28 09:03:20 -05:00
73dae9c1cd Re added quest link. 2024-04-02 14:19:27 -05:00
2ef5379a3b Added 3d closet demo, cleaned up menus. 2024-02-02 15:36:47 -06:00
a1adbf5bd9 experiments with glb objects and data based diagrams. 2023-12-23 06:21:58 -06:00
dcd5a8835c Added glb object type loader, cleaned up loggers and change web controller. 2023-12-12 14:00:39 -06:00