Closed yiiqii closed 4 months ago
The recent updates across multiple files in the effects-core, effects-threejs, and effects-webgl packages primarily focus on enhancing type safety by replacing any
with more specific types like unknown
and spec
types. Additionally, there are significant refactorings to improve readability, code structure, and performance. New utility methods and properties have been introduced, and existing methods have been updated for better functionality and compliance with modern TypeScript practices.
Files/Groups | Change Summaries |
---|---|
comp-vfx-item.ts , effect-component.ts , renderer-component.ts , particle-system.ts , three-material.ts |
Changed fromData method's parameter type from any to unknown . |
component.ts |
Modified _enabled to private and updated fromData parameter type. |
composition.ts |
Removed cachedTextures assignment in constructor. |
decorators.ts |
Introduced new types, refactored code, updated effectsClass and serialize functions. |
effects-object.ts |
Added static method is to check instance of EffectsObject . |
migration.ts |
Adjusted handling of compositions in version30Migration function. |
value-getter.ts , 2d-shape.ts , cone.ts , donut.ts , sphere.ts |
Renamed random function to randomInRange . |
plugin-system.ts |
Updated precompile method's signature for clearer parameter formatting. |
interact-item.ts |
Changed fromData parameter type to spec.InteractContent . |
shape.ts |
Updated createShape function to accept optional shapeOptions parameter. |
transform.ts |
Changed taggedProperties type to spec.TransformData . |
index.ts |
Refactored utility functions, renamed random to randomInRange . |
gl-framebuffer.ts |
Updated gl.FRAMEBUFFER usage and modified dispose method parameters. |
gl-gpu-buffer.ts |
Simplified logic for assigning inspector name to WebGL buffer. |
gl-renderbuffer.ts |
Added buffer property. |
gl-renderer-internal.ts |
Modified vao setup and added null check in assignInspectorName . |
gl-renderer.ts |
Replaced non-null assertion operator with optional chaining. |
gl-shader-library.ts |
Restructured compileShader and computeShaderCacheId methods. |
gl-texture.ts |
Refactored texture initialization and data transfer logic. |
gizmo-component.ts |
Refactored property initialization for better readability. |
In the land of code, where changes bloom,
A rabbit hops, dispelling gloom.
Type safety reigns,unknown
in place,
With refactors bringing a smoother pace.
Functions refined, new methods shine,
In the garden of code, all align.
Hopping happy, we celebrate,
A world of code, now up-to-date! 🌸🐇
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
Refactor
any
tounknown
across multiple components.New Features
EffectsObject
for instance checking.Bug Fixes
random
function torandomInRange
.Chores