Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add blendFactor support to CCDIKSolver #30406

Closed
wants to merge 9 commits into from
Prev Previous commit
Next Next commit
Geometries: Reuse arrayNeedsUint32() from core. (#30408)
Mugen87 authored Jan 27, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit cb91f1a15ee239f214a93d8abde45cc77fc4ffc0
23 changes: 1 addition & 22 deletions src/renderers/common/Geometries.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,9 @@
import DataMap from './DataMap.js';
import { AttributeType } from './Constants.js';
import { arrayNeedsUint32 } from '../../utils.js';

import { Uint16BufferAttribute, Uint32BufferAttribute } from '../../core/BufferAttribute.js';

/**
* Returns `true` if the given array has values that require an Uint32 array type.
*
* @private
* @function
* @param {Array<Number>} array - The array to test.
* @return {Boolean} Whether the given array has values that require an Uint32 array type or not.
*/
function arrayNeedsUint32( array ) {

// assumes larger values usually on last

for ( let i = array.length - 1; i >= 0; -- i ) {

if ( array[ i ] >= 65535 ) return true; // account for PRIMITIVE_RESTART_FIXED_INDEX, #24565

}

return false;

}

/**
* Returns the wireframe version for the given geometry.
*