Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![jsDelivr Downloads][jsdelivr-downloads]][jsdelivr-url]
[![Discord][discord]][discord-url]

#### JavaScript 3D library
#### JavaScript 3D library

The aim of the project is to create an easy-to-use, lightweight, cross-browser, general-purpose 3D library. The current builds only include WebGL and WebGPU renderers but SVG and CSS3D renderers are also available as addons.

Expand Down
21 changes: 21 additions & 0 deletions src/core/BufferAttribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,13 @@ class BufferAttribute {
*/
applyMatrix4( m ) {

if ( this.itemSize !== 3 ) {

console.warn( 'THREE.BufferAttribute.applyMatrix4(): itemSize is not 3, which is required.' );
return this;

}

for ( let i = 0, l = this.count; i < l; i ++ ) {

_vector.fromBufferAttribute( this, i );
Expand All @@ -319,6 +326,13 @@ class BufferAttribute {
*/
applyNormalMatrix( m ) {

if ( this.itemSize !== 3 ) {

console.warn( 'THREE.BufferAttribute.applyNormalMatrix(): itemSize is not 3, which is required.' );
return this;

}

for ( let i = 0, l = this.count; i < l; i ++ ) {

_vector.fromBufferAttribute( this, i );
Expand All @@ -342,6 +356,13 @@ class BufferAttribute {
*/
transformDirection( m ) {

if ( this.itemSize !== 3 ) {

console.warn( 'THREE.BufferAttribute.transformDirection(): itemSize is not 3, which is required.' );
return this;

}

for ( let i = 0, l = this.count; i < l; i ++ ) {

_vector.fromBufferAttribute( this, i );
Expand Down