Closed yiiqii closed 3 months ago
The recent update introduces a new feature to the SpineVFXItem
class, allowing it to adjust the scaleFactor based on the camera's clip mode. By modifying how the inverse viewport ratio is calculated and applying conditional scaling, this change enhances the flexibility and accuracy of visual effects scaling in various clipping conditions.
File Path | Change Summary |
---|---|
.../spine/src/spine-vfx-item.ts |
Adjusted SpineVFXItem class to use conditional scaling based on camera's clip mode and updated scaleFactor computation. |
sequenceDiagram
participant SpineVFXItem
participant Composition
participant Camera
SpineVFXItem->>Composition: Get camera
Composition-->>SpineVFXItem: Return camera
SpineVFXItem->>Camera: Get inverse VP ratio with z
Camera-->>SpineVFXItem: Return {x: rx, y: ry}
SpineVFXItem->>SpineVFXItem: Check camera.clipMode
alt Clip mode is on
SpineVFXItem->>SpineVFXItem: Apply conditional scaling
else Clip mode is off
SpineVFXItem->>SpineVFXItem: Use default scaling
end
In the realm where pixels dance and play,
The camera's clip mode leads the way.
Scales adjust with gentle might,
Bringing visuals sharp and bright.
A tweak, a shift, a clever cue,
For every scene, a perfect view! 🌟
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