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
4 changes: 2 additions & 2 deletions editor/js/libs/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const APP = {

const scriptWrapResult = JSON.stringify( scriptWrapResultObj ).replace( /\"/g, '' );

for ( let uuid in json.scripts ) {
for ( const uuid in json.scripts ) {

const object = scene.getObjectByProperty( 'uuid', uuid, true );

Expand All @@ -99,7 +99,7 @@ const APP = {

const functions = ( new Function( scriptWrapParams, script.source + '\nreturn ' + scriptWrapResult + ';' ).bind( object ) )( this, renderer, scene, camera );

for ( let name in functions ) {
for ( const name in functions ) {

if ( functions[ name ] === undefined ) continue;

Expand Down
9 changes: 8 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@ export default [
ignores: [
'**/node_modules/**',
'**/build/**',
'**/libs/**',
'examples/jsm/libs/**',
'editor/js/libs/acorn/**',
'editor/js/libs/codemirror/**',
'editor/js/libs/tern-threejs/**',
'editor/js/libs/ternjs/**',
'editor/js/libs/esprima.js',
'editor/js/libs/jsonlint.js',
'editor/js/libs/signals.min.js',
'**/ifc/**',
'**/prettify.js',
'**/prettify/**',
Expand Down
8 changes: 4 additions & 4 deletions src/animation/PropertyMixer.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,31 +88,31 @@ class PropertyMixer {
this._addIndex = 4;

/**
* TODO
* Accumulated weight of the property binding.
*
* @type {number}
* @default 0
*/
this.cumulativeWeight = 0;

/**
* TODO
* Accumulated additive weight of the property binding.
*
* @type {number}
* @default 0
*/
this.cumulativeWeightAdditive = 0;

/**
* TODO
* Number of active keyframe tracks currently using this property binding.
*
* @type {number}
* @default 0
*/
this.useCount = 0;

/**
* TODO
* Number of keyframe tracks referencing this property binding.
*
* @type {number}
* @default 0
Expand Down
24 changes: 0 additions & 24 deletions src/helpers/PointLightHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,30 +57,6 @@ class PointLightHelper extends Mesh {

this.update();


/*
// TODO: delete this comment?
const distanceGeometry = new THREE.IcosahedronGeometry( 1, 2 );
const distanceMaterial = new THREE.MeshBasicMaterial( { color: hexColor, fog: false, wireframe: true, opacity: 0.1, transparent: true } );

this.lightSphere = new THREE.Mesh( bulbGeometry, bulbMaterial );
this.lightDistance = new THREE.Mesh( distanceGeometry, distanceMaterial );

const d = light.distance;

if ( d === 0.0 ) {

this.lightDistance.visible = false;

} else {

this.lightDistance.scale.set( d, d, d );

}

this.add( this.lightDistance );
*/

}

/**
Expand Down
3 changes: 2 additions & 1 deletion src/lights/webgpu/IESSpotLight.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ class IESSpotLight extends SpotLight {
super( color, intensity, distance, angle, penumbra, decay );

/**
* TODO
* The IES map. It's a lookup table that stores normalized attenuation factors
* (0.0 to 1.0) that represent the light's intensity at a specific angle.
*
* @type {?Texture}
* @default null
Expand Down
8 changes: 5 additions & 3 deletions src/nodes/accessors/Texture3DNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,12 @@ class Texture3DNode extends TextureNode {
}

/**
* TODO.
* Computes the normal for the given uv. These texture coordiantes represent a
* certain point inside the 3D texture. Unlike geometric normals, this normal
* represents a slope or gradient of scalar data inside the 3D texture.
*
* @param {Node<vec3>} uvNode - The uv node .
* @return {Node<vec3>} TODO.
* @param {Node<vec3>} uvNode - The uv node that defines a points in the 3D texture.
* @return {Node<vec3>} The normal representing the slope/gradient in the data.
*/
normal( uvNode ) {

Expand Down
8 changes: 5 additions & 3 deletions src/renderers/common/TimestampQueryPool.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class TimestampQueryPool {
this.isDisposed = false;

/**
* TODO
* The total frame duration until the next update.
*
* @type {number}
* @default 0
Expand All @@ -69,9 +69,11 @@ class TimestampQueryPool {
this.frames = [];

/**
* TODO
* This property is used to avoid multiple concurrent resolve operations.
* The WebGL backend uses it as a boolean flag. In context of WebGPU, it holds
* the promise of the current resolve operation.
*
* @type {boolean}
* @type {boolean|Promise<number>}
* @default false
*/
this.pendingResolve = false;
Expand Down
10 changes: 0 additions & 10 deletions src/renderers/webgpu/utils/WebGPUTexturePassUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,6 @@ fn main_cube( Varys: VarysStruct ) -> @location( 0 ) vec4<f32> {

return textureSample( imgCube, imgSampler, faceMat[ Varys.vBaseArrayLayer ] * vec3f( fract( Varys.vTex ), 1 ) );

}

@group( 0 ) @binding( 1 )
var imgCubeArray : texture_cube_array<f32>;

@fragment
fn main_cube_array( Varys: VarysStruct ) -> @location( 0 ) vec4<f32> {

return textureSample( imgCubeArray, imgSampler, faceMat[ Varys.vBaseArrayLayer % 6 ] * vec3f( fract( Varys.vTex ), 1 ), Varys.vBaseArrayLayer );

}
`;

Expand Down