Commit e129e19
committed
fix: Implement mesh transform updates via helper function for CI/CD compatibility
The previous fix directly edited the generated app_gen.go file, which would
be lost when CI/CD regenerates the code. This commit implements a proper
solution that survives code regeneration.
Changes:
- Created helpers.go with updateMeshTransform() function
- Updated app.gx to call helper from renderUpdate callback
- Regenerated app_gen.go now calls the helper function
- Helper contains the mesh transform update logic
The helper function:
- Casts rendererInterface to *SceneRenderer
- Creates a Transform with current rotation values
- Calls UpdateMeshTransform to apply the rotation on every frame
This approach works because:
1. helpers.go is not generated, so it won't be overwritten
2. The simple function call in app.gx is supported by the Guix DSL parser
3. Code regeneration preserves the helper function call
4. Both auto-rotation and manual controls now work correctly1 parent f60fe3f commit e129e19
3 files changed
Lines changed: 20 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
0 commit comments