Browse Source

Pure annotations house cleaning: Webpack (#24336)

Patrick Schroen 3 years ago
parent
commit
b367f7dead

+ 1 - 1
src/animation/AnimationMixer.js

@@ -7,7 +7,7 @@ import { AnimationClip } from './AnimationClip.js';
 import { NormalAnimationBlendMode } from '../constants.js';
 
 
-const _controlInterpolantsResultBuffer = /*@__PURE__*/ new Float32Array( 1 );
+const _controlInterpolantsResultBuffer = new Float32Array( 1 );
 
 
 class AnimationMixer extends EventDispatcher {

+ 8 - 16
src/extras/DataUtils.js

@@ -2,15 +2,7 @@ import { clamp } from '../math/MathUtils.js';
 
 // Fast Half Float Conversions, http://www.fox-toolkit.org/ftp/fasthalffloatconversion.pdf
 
-const {
-	floatView: _floatView,
-	uint32View: _uint32View,
-	baseTable: _baseTable,
-	shiftTable: _shiftTable,
-	mantissaTable: _mantissaTable,
-	exponentTable: _exponentTable,
-	offsetTable: _offsetTable
-} = /*@__PURE__*/ _generateTables();
+const _tables = /*@__PURE__*/ _generateTables();
 
 function _generateTables() {
 
@@ -142,7 +134,7 @@ function _generateTables() {
 		shiftTable: shiftTable,
 		mantissaTable: mantissaTable,
 		exponentTable: exponentTable,
-		offsetTable: offsetTable,
+		offsetTable: offsetTable
 	};
 
 }
@@ -155,10 +147,10 @@ function toHalfFloat( val ) {
 
 	val = clamp( val, - 65504, 65504 );
 
-	_floatView[ 0 ] = val;
-	const f = _uint32View[ 0 ];
+	_tables.floatView[ 0 ] = val;
+	const f = _tables.uint32View[ 0 ];
 	const e = ( f >> 23 ) & 0x1ff;
-	return _baseTable[ e ] + ( ( f & 0x007fffff ) >> _shiftTable[ e ] );
+	return _tables.baseTable[ e ] + ( ( f & 0x007fffff ) >> _tables.shiftTable[ e ] );
 
 }
 
@@ -167,12 +159,12 @@ function toHalfFloat( val ) {
 function fromHalfFloat( val ) {
 
 	const m = val >> 10;
-	_uint32View[ 0 ] = _mantissaTable[ _offsetTable[ m ] + ( val & 0x3ff ) ] + _exponentTable[ m ];
-	return _floatView[ 0 ];
+	_tables.uint32View[ 0 ] = _tables.mantissaTable[ _tables.offsetTable[ m ] + ( val & 0x3ff ) ] + _tables.exponentTable[ m ];
+	return _tables.floatView[ 0 ];
 
 }
 
 export {
 	toHalfFloat,
-	fromHalfFloat,
+	fromHalfFloat
 };

+ 1 - 0
src/geometries/CylinderGeometry.js

@@ -8,6 +8,7 @@ class CylinderGeometry extends BufferGeometry {
 	constructor( radiusTop = 1, radiusBottom = 1, height = 1, radialSegments = 8, heightSegments = 1, openEnded = false, thetaStart = 0, thetaLength = Math.PI * 2 ) {
 
 		super();
+
 		this.type = 'CylinderGeometry';
 
 		this.parameters = {

+ 1 - 0
src/geometries/EdgesGeometry.js

@@ -14,6 +14,7 @@ class EdgesGeometry extends BufferGeometry {
 	constructor( geometry = null, thresholdAngle = 1 ) {
 
 		super();
+
 		this.type = 'EdgesGeometry';
 
 		this.parameters = {

+ 1 - 0
src/geometries/PlaneGeometry.js

@@ -6,6 +6,7 @@ class PlaneGeometry extends BufferGeometry {
 	constructor( width = 1, height = 1, widthSegments = 1, heightSegments = 1 ) {
 
 		super();
+
 		this.type = 'PlaneGeometry';
 
 		this.parameters = {

+ 1 - 0
src/geometries/ShapeGeometry.js

@@ -9,6 +9,7 @@ class ShapeGeometry extends BufferGeometry {
 	constructor( shapes = new Shape( [ new Vector2( 0, 0.5 ), new Vector2( - 0.5, - 0.5 ), new Vector2( 0.5, - 0.5 ) ] ), curveSegments = 12 ) {
 
 		super();
+
 		this.type = 'ShapeGeometry';
 
 		this.parameters = {

+ 1 - 0
src/geometries/SphereGeometry.js

@@ -7,6 +7,7 @@ class SphereGeometry extends BufferGeometry {
 	constructor( radius = 1, widthSegments = 32, heightSegments = 16, phiStart = 0, phiLength = Math.PI * 2, thetaStart = 0, thetaLength = Math.PI ) {
 
 		super();
+
 		this.type = 'SphereGeometry';
 
 		this.parameters = {

+ 1 - 0
src/geometries/TorusGeometry.js

@@ -7,6 +7,7 @@ class TorusGeometry extends BufferGeometry {
 	constructor( radius = 1, tube = 0.4, radialSegments = 8, tubularSegments = 6, arc = Math.PI * 2 ) {
 
 		super();
+
 		this.type = 'TorusGeometry';
 
 		this.parameters = {

+ 1 - 0
src/geometries/TorusKnotGeometry.js

@@ -7,6 +7,7 @@ class TorusKnotGeometry extends BufferGeometry {
 	constructor( radius = 1, tube = 0.4, tubularSegments = 64, radialSegments = 8, p = 2, q = 3 ) {
 
 		super();
+
 		this.type = 'TorusKnotGeometry';
 
 		this.parameters = {

+ 1 - 0
src/geometries/TubeGeometry.js

@@ -9,6 +9,7 @@ class TubeGeometry extends BufferGeometry {
 	constructor( path = new Curves[ 'QuadraticBezierCurve3' ]( new Vector3( - 1, - 1, 0 ), new Vector3( - 1, 1, 0 ), new Vector3( 1, 1, 0 ) ), tubularSegments = 64, radius = 1, radialSegments = 8, closed = false ) {
 
 		super();
+
 		this.type = 'TubeGeometry';
 
 		this.parameters = {

+ 1 - 0
src/geometries/WireframeGeometry.js

@@ -7,6 +7,7 @@ class WireframeGeometry extends BufferGeometry {
 	constructor( geometry = null ) {
 
 		super();
+
 		this.type = 'WireframeGeometry';
 
 		this.parameters = {

+ 1 - 0
src/helpers/DirectionalLightHelper.js

@@ -14,6 +14,7 @@ class DirectionalLightHelper extends Object3D {
 	constructor( light, size, color ) {
 
 		super();
+
 		this.light = light;
 		this.light.updateMatrixWorld();
 

+ 1 - 0
src/helpers/HemisphereLightHelper.js

@@ -15,6 +15,7 @@ class HemisphereLightHelper extends Object3D {
 	constructor( light, size, color ) {
 
 		super();
+
 		this.light = light;
 		this.light.updateMatrixWorld();
 

+ 1 - 0
src/helpers/SpotLightHelper.js

@@ -12,6 +12,7 @@ class SpotLightHelper extends Object3D {
 	constructor( light, color ) {
 
 		super();
+
 		this.light = light;
 		this.light.updateMatrixWorld();
 

+ 1 - 1
src/loaders/LoadingManager.js

@@ -137,6 +137,6 @@ class LoadingManager {
 
 }
 
-const DefaultLoadingManager = new LoadingManager();
+const DefaultLoadingManager = /*@__PURE__*/ new LoadingManager();
 
 export { DefaultLoadingManager, LoadingManager };