Skip to content
Merged
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
6 changes: 5 additions & 1 deletion examples/jsm/animation/CCDIKSolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,11 @@ class CCDIKSolver {

if ( c > 1.0 ) c = 1.0;

const c2 = math.sqrt( 1 - c * c );
// preserve sign of the rotation along the limitation axis,
// otherwise negative rotations get mirrored to positive
const dot = link.quaternion.x * limitation.x + link.quaternion.y * limitation.y + link.quaternion.z * limitation.z;
const sign = dot < 0 ? - 1 : 1;
const c2 = sign * math.sqrt( 1 - c * c );
link.quaternion.set( limitation.x * c2,
limitation.y * c2,
limitation.z * c2,
Expand Down
12 changes: 1 addition & 11 deletions examples/jsm/loaders/EXRLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -2082,17 +2082,7 @@ class EXRLoader extends DataTextureLoader {

const parseInt64 = function ( dataView, offset ) {

let int;

if ( 'getBigInt64' in DataView.prototype ) {

int = Number( dataView.getBigInt64( offset.value, true ) );

} else {

int = dataView.getUint32( offset.value + 4, true ) + Number( dataView.getUint32( offset.value, true ) << 32 );

}
const int = Number( dataView.getBigInt64( offset.value, true ) );

offset.value += ULONG_SIZE;

Expand Down
9 changes: 3 additions & 6 deletions src/renderers/webgpu/WebGPUBackend.js
Original file line number Diff line number Diff line change
Expand Up @@ -1613,20 +1613,17 @@ class WebGPUBackend extends Backend {

for ( let i = 0; i < drawCount; i ++ ) {

const count = 1;
const firstInstance = count > 1 ? 0 : i;

if ( hasIndex === true ) {

passEncoderGPU.drawIndexed( counts[ i ], count, starts[ i ] / bytesPerElement, 0, firstInstance );
passEncoderGPU.drawIndexed( counts[ i ], 1, starts[ i ] / bytesPerElement, 0, i );

} else {

passEncoderGPU.draw( counts[ i ], count, starts[ i ], firstInstance );
passEncoderGPU.draw( counts[ i ], 1, starts[ i ], i );

}

info.update( object, counts[ i ], count );
info.update( object, counts[ i ], 1 );

}

Expand Down
Loading