Closed johanzhu closed 3 days ago
The recent changes focus on restructuring the SubMesh
and SubPrimitive
classes in the core graphics module. SubMesh
now extends SubPrimitive
and implements the IPoolElement
interface, delegating the properties start
, count
, and topology
to SubPrimitive
. This redesign simplifies the SubMesh
class, enhancing code maintainability, and consolidates common functionality in SubPrimitive
.
Files | Change Summary |
---|---|
packages/core/src/graphic/index.ts |
Added SubPrimitive to the exports of the graphic module. |
.../core/src/graphic/SubMesh.ts |
SubMesh now extends SubPrimitive and implements IPoolElement . Removed start , count , topology properties and their constructor. |
.../core/src/graphic/SubPrimitive.ts |
Included a constructor in SubPrimitive that initializes start , count , and topology with default values. |
sequenceDiagram
participant User
participant SubMesh
participant SubPrimitive
User->>SubMesh: Create SubMesh instance
SubMesh->>SubPrimitive: Inherit properties via SubPrimitive constructor
SubPrimitive-->>SubMesh: Initialization complete (start, count, topology)
User-->>SubMesh: SubMesh instance ready with inherited properties
Amidst the code where graphics bloom,
A little change dispels the gloom.
SubMesh
stands tall, prim and neat,
WithSubPrimitive
, it’s quite the feat!
Together they dance in digital light,
Simplifying tasks, making code right.
🐇✨
[!TIP]
Early access features: enabled
We are currently testing the following features in early access: - **OpenAI `gpt-4o` model for code reviews and chat**: OpenAI claims that this model is better at understanding and generating code than the previous models. We seek your feedback over the next few weeks before making it generally available. Note: - You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file. - Please join our [Discord Community](https://discord.com/invite/GsXnASn26c) to provide feedback and report issues. - OSS projects are currently opted into early access features by default.
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?
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
What is the current behavior? (You can also link to an open issue here)
What is the new behavior (if this is a feature change)?
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
Other information:
Summary by CodeRabbit
New Features
SubPrimitive
export, streamlining the handling of graphical sub-elements.Refactor
SubMesh
to extendSubPrimitive
, simplifying the structure and improving code consistency.