CSS2DRenderer: Support Rotation - #33474
Merged
Merged
Conversation
WestLangley
commented
Apr 26, 2026
| * `( 0, 0 )` is the lower left, `( 1, 1 )` is the top right. | ||
| * The object's anchor point, and the point around which the object rotates. | ||
| * A value of `(0.5, 0.5)` corresponds to the midpoint of the object. A value | ||
| * of `(0, 0)` corresponds to the upper left corner of the object. |
Collaborator
Author
There was a problem hiding this comment.
I did not change the implementation of the "center" API. (0, 0) was always the upper-left, not the lower-left, in this renderer.
The upper-left/lower-left convention is not consistent in three.js, and perhaps it would be advisable to agree to a convention going forward.
WestLangley
commented
Apr 26, 2026
Collaborator
Author
|
/ping @johnperry-math @yomotsu |
WestLangley
marked this pull request as ready for review
April 30, 2026 01:04
|
I like the change. My only suggestion would be to add some words to the description of the CSS2DObject to the effect of
|
Collaborator
Author
|
@Mugen87 This is a low-impact enhancement. My intention is to revert the changes to the example, and merge this. |
Collaborator
|
Sounds good! |
WestLangley
force-pushed
the
dev-css2Drenderer_rotation
branch
from
July 17, 2026 14:29
9329a44 to
a7de1be
Compare
Mugen87
reviewed
Jul 17, 2026
WestLangley
force-pushed
the
dev-css2Drenderer_rotation
branch
from
July 17, 2026 15:16
5c8b656 to
772f2aa
Compare
🖼️ E2E screenshot tests❌ 1 example(s) failed (full artifacts).
|
Mugen87
approved these changes
Jul 17, 2026
This was referenced Aug 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes: #33455
In this PR, the existing
.centerproperty serves a dual purpose. It is both the center of rotation and the anchor point. I am not sure there is a need to decouple them.I think "anchor" or "pivot" would be better nomenclature -- for a future PR, perhaps.