Conversation
|
Oh wait. I see @takahirox just suggested the same idea. :-) |
|
|
||
| Texture.DEFAULT_IMAGE = null; | ||
| Texture.DEFAULT_MAPPING = UVMapping; | ||
| Texture.DEFAULT_ANISOTROPY = 1; |
There was a problem hiding this comment.
Hm, why the case differs between Object3D.DefaultUp/Object3D.DefaultMatrixAutoUpdate and Texture.DEFAULT_IMAGE/Texture.DEFAULT_MAPPING/Texture.DEFAULT_ANISOTROPY?
There was a problem hiding this comment.
I'm not sure but I think @mrdoob lately stated his preference for this nomenclature. Unfortunately, I don't find the discussion right now.
For the time being, it's sufficient when we adhere to naming conventions per file. At a later point, we can unify the syntax.
There was a problem hiding this comment.
It probably should be Object3D.DEFAULT_UP and Object3D.DEFAULT_MATRIXAUTOUPDATE...
@LeviPesin Are these the only ones that would need to be changed?
There was a problem hiding this comment.
I'm not sure but I think @mrdoob lately stated his preference for this nomenclature. Unfortunately, I don't find the discussion right now.
I think it was #23562.
@LeviPesin Are these the only ones that would need to be changed?
I think yes (static defaults are not used anywhere else, I think).
There was a problem hiding this comment.
I can make these changes for consistency if @mrdoob approves.
// from
Object3D.DefaultUp = /*@__PURE__*/ new Vector3( 0, 1, 0 );
Object3D.DefaultMatrixAutoUpdate = true;
Object3D.DefaultMatrixWorldAutoUpdate = true;
// to
Object3D.DEFAULT_UP = /*@__PURE__*/ new Vector3( 0, 1, 0 );
Object3D.DEFAULT_MATRIXAUTOUPDATE = true;
Object3D.DEFAULT_MATRIXWORLDAUTOUPDATE = true;
// from
Euler.DefaultOrder = 'XYZ';
Euler.RotationOrders = [ 'XYZ', 'YZX', 'ZXY', 'XZY', 'YXZ', 'ZYX' ];
// to
Euler.DEFAULT_ORDER = 'XYZ';
Euler.RotationOrders // wait. why is this here? leave as-is -- or deprecate it?
// as-is
Texture.DEFAULT_IMAGE = null;
Texture.DEFAULT_MAPPING = UVMapping;
Texture.DEFAULT_ANISOTROPY = 1;There was a problem hiding this comment.
Euler.RotationOrders // wait. why is this here? leave as-is -- or deprecate it?
I vote to remove it. Possible euler rotation orders should be clear without defining them in an array.
|
I've also thought about adding this change when reading #25010 but I'm afraid this opens the door for adding even more global defaults. Devs could argue to add the same for other parameters and it's hard to argue against this if we merge this PR. To me, I think the presented workaround in #25010 (comment) sounds sufficient. An additional traverse should not be noticeable in terms of loading time. |
|
Another solution may be...
|
Mugen87
left a comment
There was a problem hiding this comment.
Okay, I'm convinced. The addition indeed make sense in this case.

Fixed #25010
Perhaps this is an acceptable solution...