Closed yiiqii closed 4 months ago
The recent updates across various files primarily focus on enhancing type safety and code clarity. Key changes include replacing string literal types with a custom GLType
type alias, removing non-null assertion operators for safer property access, and converting objects to enums. Additionally, minor improvements like adding comments and adjusting import statements were made to improve maintainability and readability.
File(s) | Change Summary |
---|---|
packages/effects-core/src/asset-manager.ts |
Changed default compressedTexture value, added a comment about potential null renderer . |
packages/effects-core/src/composition.ts |
Removed non-null assertion operators when accessing properties from getComponent(CompositionComponent) . |
packages/effects-core/src/gl/create-gl-context.ts , packages/effects-core/src/render/gpu-capability.ts , packages/effects-core/src/render/renderer.ts , packages/effects-webgl/src/gl-context-manager.ts , packages/effects-webgl/src/gl-renderer.ts , packages/effects/src/index.ts , packages/effects/src/player.ts |
Replaced string literal types with GLType alias. |
packages/effects-core/src/plugins/interact/interact-item.ts |
Removed non-null assertion operator when accessing endDragTarget property. |
web-packages/devtools/src/gui/inspector-gui.ts |
Adjusted import statements and property access to improve code clarity and maintainability. |
In the code's enchanted glen,
Types and safety reign again,
GLType whispers in the breeze,
Null assertions take their leave,
Enum knights stand tall and true,
For clarity in all we do,
Hopping through the fields of change,
Our code, refined, feels less strange.
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
GLType
for WebGL context management.Improvements
COMPRESSED_TEXTURE
to an enum for better type safety.Bug Fixes
Refactor