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

Remove Float64BufferAttribute. #27807

Merged
merged 1 commit into from
Feb 23, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ <h1>BufferAttribute Types</h1>
</p>

<code>
THREE.Float64BufferAttribute
THREE.Float32BufferAttribute
THREE.Float16BufferAttribute
THREE.Uint32BufferAttribute
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ <h1>BufferAttribute Types</h1>
</p>

<code>
THREE.Float64BufferAttribute
THREE.Float32BufferAttribute
THREE.Float16BufferAttribute
THREE.Uint32BufferAttribute
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ <h1>Tipi di BufferAttribute</h1>
</p>

<code>
THREE.Float64BufferAttribute
THREE.Float32BufferAttribute
THREE.Float16BufferAttribute
THREE.Uint32BufferAttribute
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ <h1>BufferAttribute Types</h1>
</p>

<code>
THREE.Float64BufferAttribute
THREE.Float32BufferAttribute
THREE.Float16BufferAttribute
THREE.Uint32BufferAttribute
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ <h1>BufferAttribute Types</h1>
</p>

<code>
THREE.Float64BufferAttribute
THREE.Float32BufferAttribute
THREE.Float16BufferAttribute
THREE.Uint32BufferAttribute
Expand Down
11 changes: 0 additions & 11 deletions src/core/BufferAttribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -623,20 +623,9 @@ class Float32BufferAttribute extends BufferAttribute {

}

class Float64BufferAttribute extends BufferAttribute {

constructor( array, itemSize, normalized ) {

super( new Float64Array( array ), itemSize, normalized );

}

}

//

export {
Float64BufferAttribute,
Float32BufferAttribute,
Float16BufferAttribute,
Uint32BufferAttribute,
Expand Down
30 changes: 3 additions & 27 deletions test/unit/src/core/BufferAttribute.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ import {
Int32BufferAttribute,
Uint32BufferAttribute,
Float16BufferAttribute,
Float32BufferAttribute,
Float64BufferAttribute
Float32BufferAttribute
} from '../../../../src/core/BufferAttribute.js';

import { DynamicDrawUsage } from '../../../../src/constants.js';
Expand Down Expand Up @@ -505,7 +504,7 @@ export default QUnit.module( 'Core', () => {
const toHalfFloatArray = ( f32Array ) => {

const f16Array = new Uint16Array( f32Array.length );
for ( let i = 0, n = f32Array.length; i < n; ++i ) {
for ( let i = 0, n = f32Array.length; i < n; ++ i ) {

f16Array[ i ] = toHalfFloat( f32Array[ i ] );

Expand All @@ -518,7 +517,7 @@ export default QUnit.module( 'Core', () => {
const fromHalfFloatArray = ( f16Array ) => {

const f32Array = new Float32Array( f16Array.length );
for ( let i = 0, n = f16Array.length; i < n; ++i ) {
for ( let i = 0, n = f16Array.length; i < n; ++ i ) {

f32Array[ i ] = fromHalfFloat( f16Array[ i ] );

Expand Down Expand Up @@ -604,27 +603,4 @@ export default QUnit.module( 'Core', () => {

} );

QUnit.module( 'Float64BufferAttribute', () => {

// INHERITANCE
QUnit.test( 'Extending', ( assert ) => {

const object = new Float64BufferAttribute();
assert.strictEqual(
object instanceof BufferAttribute, true,
'Float64BufferAttribute extends from BufferAttribute'
);

} );

// INSTANCING
QUnit.test( 'Instancing', ( assert ) => {

const object = new Float64BufferAttribute();
assert.ok( object, 'Can instantiate a Float64BufferAttribute.' );

} );

} );

} );