question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proposal: Add new BufferAttribute methods

See original GitHub issue

Vector3 has these methods:

Vector3.applyMatrix3( matrix3 );
Vector3.applyNormalMatrix( matrix3 );
Vector3.applyMatrix4( matrix4 );
Vector3.transformDirection( matrix4 );

We need to be able to apply the same transforms to each element of a BufferAttribute.

I propose we add the following methods:

BufferAtribute.applyMatrix3( matrix3 );       // to replace Matrix3.applyToBufferAttribute()
BufferAtribute.applyNormalMatrix( matrix3 );  // new
BufferAtribute.applyMatrix4( matrix4 );       // to replace Matrix4.applyToBufferAttribute()
BufferAtribute.transformDirection( matrix4 ); // new

Related: #17997 #18001 bug #18005 bug

Suggestions for alternate APIs welcome.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
WestLangleycommented, Nov 26, 2019

OK, I’ll do it.

1reaction
mrdoobcommented, Nov 26, 2019

Moving them to BufferAttribute sounds good to me. Was just trying to unify the last name.

Read more comments on GitHub >

github_iconTop Results From Across the Web

BufferAttribute – three.js docs
BufferAttribute. This class stores data for an attribute (such as vertex positions, face indices, normals, colors, UVs, and any custom attributes ) ...
Read more >
How to get updated buffer attributes in Threejs - Stack Overflow
Ensure to set BufferAttribute.needsUpdate to true after the method invocation. And yes, it's the intended way to apply a 4x4 transformation ...
Read more >
What's New in Python 2.6 — Python 3.6.3 documentation
TextIOWrapper wraps a buffered I/O object, supporting all of the methods for text I/O and adding a buffer attribute for access to the...
Read more >
Web IDL Standard
A specification that defines Web APIs can include one or more IDL fragments that describe the interfaces (the state and behavior that ...
Read more >
Multi-Fragment Effects on the GPU using the k ... - CiteSeerX
present two proposals for adding k-buffer support to future GPUs ... A more promising approach is to implement the k-buffer by allow-.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found