Skip to content

Commit 86d6b9f

Browse files
authored
BufferAttribute: Make normalized parameter to be optional. (#25046)
* BufferAttribute: Make `normalized` parameter to be optional. * InterleavedBufferAttribute: Removed useless code.
1 parent 858ea3e commit 86d6b9f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/core/BufferAttribute.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const _vector2 = /*@__PURE__*/ new Vector2();
88

99
class BufferAttribute {
1010

11-
constructor( array, itemSize, normalized ) {
11+
constructor( array, itemSize, normalized = false ) {
1212

1313
if ( Array.isArray( array ) ) {
1414

@@ -23,7 +23,7 @@ class BufferAttribute {
2323
this.array = array;
2424
this.itemSize = itemSize;
2525
this.count = array !== undefined ? array.length / itemSize : 0;
26-
this.normalized = normalized === true;
26+
this.normalized = normalized;
2727

2828
this.usage = StaticDrawUsage;
2929
this.updateRange = { offset: 0, count: - 1 };

src/core/InterleavedBufferAttribute.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class InterleavedBufferAttribute {
1616
this.itemSize = itemSize;
1717
this.offset = offset;
1818

19-
this.normalized = normalized === true;
19+
this.normalized = normalized;
2020

2121
}
2222

0 commit comments

Comments
 (0)