Comments (2)
It's intentional that the functions avoid creating an object every time the function is called. Creating an object has a cost associated -- when that object goes out of scope, it must be garbage collected. Garbage collection is something you want to minimize. Instead pass in a parameter that you can re-use for many future calls, without creating any new objects.
from three.js.
Hm ok I was not aware of that, thanks for your answer.
I didnt think about asking chatGPT, and he just talked about performance also.
from three.js.
Related Issues (20)
- WebGPURenderer error loading GLTF HOT 5
- Json Parsing changes for Shape/Path/Curves subclasses' CurrentPoint HOT 1
- Editor lights are not exported correctly to GLB HOT 2
- CDN es6 module import requires importmap (Vanilla JS) HOT 2
- examples/webgpu_morphtargets_face.html uses rgba32-float filtering textures without checking feature HOT 6
- WebGPURenderer: errors thrown rendering line segments HOT 2
- WebGPURenderer: errors thrown HOT 1
- Chinese document copy error HOT 1
- CanvasTexture problem with VideoFrames HOT 10
- WebGPURenderer: AttributeNode: Vertex attribute "normal" not found on geometry HOT 1
- Increase the current limit for attributes from 8 to 12 or 16 HOT 5
- material.onbeforerender is not a function HOT 1
- Using GLBufferAttribute with InterleavedBufferAttribute HOT 3
- Transformations and Cloning for Shapes and Curves HOT 1
- NodeCache breaking change with offscreenCanvas in WebGPURenderer and Point Light HOT 2
- Reflector: Add support for `OrthographicCamera`. HOT 12
- Documentation: State of `WebGPURenderer` and Nodes HOT 5
- Mesh: allow caller to specify which geometry to raycast and ignore material visibility HOT 1
- VRMLLexer: Improve support for `Script`, `PROTO` and sensor nodes. HOT 6
- Examples: webgpu_materials.html is rendering material as black
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from three.js.