forked from mrdoob/three.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit 41db6f6
Add a BufferGeometry based Subdivision Modifier (mrdoob#8165)
* Add a BufferGeometry based Subdivision Modifier
This started from the original subdivision modifier, and works in the
same way except it has different output - and is much MUCH faster and
far easier on RAM. (From >1m and >3gb (queue crashing browsers) to <10
seconds and <500mb on my tests).
Expected input: Index'd Buffer Geometry or THREE.Geometry - with uv's.
Output: Unindex'd Buffer Geometry.
Also introduced is a class I call the 'TypedArrayHelper' which provides
THREE objects (Such as Face, Vec3, Vec2) as 'registers' (I was thinking
like a CPU register), and controls the typed arrays underneath. It
automatically resizes them and provides a trim() function. While
resizing arrays is slow, it's still all way faster than millions of vec3
objects on a regular Geometry.
* Various Fixes
Fixed normal generation according to
https://www.opengl.org/wiki/Calculating_a_Surface_Normal
maybe various other cleanups.
* Revert "Various Fixes"
This reverts commit 4348a5f.
* Revert "Revert "Various Fixes""
This reverts commit c972529.
* change the example to use BufferSubdivisionModifier
It's almost all working except for LatheGeometry. I'm not entirely sure
what is different about the lathegeometry , but I will investigate later
unless someone else figures it out first.
* change back to v2 and use phongmaterial
change back to v2 and use phongmaterial
* dispose of geometries
see title.
* Remove typedarray.slice's
in favor of typedarray.subarray's.
* slight cleanup to subarray
simply set the new buffers contents to the old buffers contents if
possible, otherwise use subarrays1 parent 69310cc commit 41db6f6Copy full SHA for 41db6f6
File tree
Expand file treeCollapse file tree
2 files changed
+813
-40
lines changedFilter options
- examples
- js/modifiers
Expand file treeCollapse file tree
2 files changed
+813
-40
lines changed
0 commit comments