diff --git a/examples/jsm/renderers/nodes/functions/MathFunctions.js b/examples/jsm/renderers/nodes/functions/MathFunctions.js index 9a1cccd02581ba8fb65b1ee2af583d26fe71f4f7..c9faaa03765061b058ca5c768e96b338fd33a7f7 100644 --- a/examples/jsm/renderers/nodes/functions/MathFunctions.js +++ b/examples/jsm/renderers/nodes/functions/MathFunctions.js @@ -23,13 +23,13 @@ vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { }` ); -export const pow2 = new FunctionNode( `float pow2( const in float x ) { return x*x; }` ); -export const pow3 = new FunctionNode( `float pow3( const in float x ) { return x*x*x; }` ); -export const pow4 = new FunctionNode( `float pow4( const in float x ) { float x2 = x*x; return x2*x2; }` ); +export const pow2 = new FunctionNode( 'float pow2( const in float x ) { return x*x; }' ); +export const pow3 = new FunctionNode( 'float pow3( const in float x ) { return x*x*x; }' ); +export const pow4 = new FunctionNode( 'float pow4( const in float x ) { float x2 = x*x; return x2*x2; }' ); -export const average = new FunctionNode( `float average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }` ); +export const average = new FunctionNode( 'float average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }' ); -export const max3 = new FunctionNode( `float max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }` ); +export const max3 = new FunctionNode( 'float max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }' ); // expects values in the range of [0,1]x[0,1], returns values in the [0,1] range. // do not collapse into a single function per: http://byteblacksmith.com/improvements-to-the-canonical-one-liner-glsl-rand-for-opengl-es-2-0/ @@ -44,4 +44,4 @@ highp float rand( const in vec2 uv ) { }` ).setIncludes( [ PI ] ); -export const precisionSafeLength = new FunctionNode( `float precisionSafeLength( vec3 v ) { return length( v ); }` ); +export const precisionSafeLength = new FunctionNode( 'float precisionSafeLength( vec3 v ) { return length( v ); }' ); diff --git a/examples/jsm/renderers/nodes/lights/LightContextNode.js b/examples/jsm/renderers/nodes/lights/LightContextNode.js index ea17025ab82e7391e6927fa7197dd2ac7c5bc4b8..275c816f3b6ea97ea60aa1cba339ae3a229f05b8 100644 --- a/examples/jsm/renderers/nodes/lights/LightContextNode.js +++ b/examples/jsm/renderers/nodes/lights/LightContextNode.js @@ -38,8 +38,8 @@ class LightContextNode extends ContextNode { } - const resetTotalLight = `Irradiance = vec3( 0.0 ); ReflectedLightDirectDiffuse = vec3( 0.0 ); ReflectedLightDirectSpecular = vec3( 0.0 );`; - const resultTotalLight = `ReflectedLightDirectDiffuse + ReflectedLightDirectSpecular`; + const resetTotalLight = 'Irradiance = vec3( 0.0 ); ReflectedLightDirectDiffuse = vec3( 0.0 ); ReflectedLightDirectSpecular = vec3( 0.0 );'; + const resultTotalLight = 'ReflectedLightDirectDiffuse + ReflectedLightDirectSpecular'; // include keywords diff --git a/examples/jsm/renderers/nodes/lights/LightNode.js b/examples/jsm/renderers/nodes/lights/LightNode.js index 5cff6a08a24c152957f82ad4179f165bbae050e8..ea447f7dfe24c671f0455abd5ab63ff04595214a 100644 --- a/examples/jsm/renderers/nodes/lights/LightNode.js +++ b/examples/jsm/renderers/nodes/lights/LightNode.js @@ -44,7 +44,7 @@ class LightNode extends Node { } - update( frame ) { + update( /* frame */ ) { this.color.value.copy( this.light.color ).multiplyScalar( this.light.intensity ); this.lightCutoffDistance.value = this.light.distance; diff --git a/examples/jsm/renderers/nodes/lights/LightsNode.js b/examples/jsm/renderers/nodes/lights/LightsNode.js index 7ddd52866949f383663ded5e1904c7a0ae43707e..acb377158eb6550f88a81da8e63d24e198a175c0 100644 --- a/examples/jsm/renderers/nodes/lights/LightsNode.js +++ b/examples/jsm/renderers/nodes/lights/LightsNode.js @@ -21,7 +21,7 @@ class LightsNode extends Node { } - return builder.format( 'vec3( 0.0 )', this.getType( builder ), output ); + return builder.format( 'vec3( 0.0 )', this.getType( builder ), output ); } diff --git a/examples/webgpu_instance_uniform.html b/examples/webgpu_instance_uniform.html index 82b02b8671922ed332ca9dfe067689f09e55be6d..aad7c836db511240cf28b4ab600fba9512b1add0 100644 --- a/examples/webgpu_instance_uniform.html +++ b/examples/webgpu_instance_uniform.html @@ -8,7 +8,7 @@
- three.js - WebGPU Instance Uniform
(Chrome Canary with flag: --enable-unsafe-webgpu) + three.js - WebGPU - Instance Uniform
(Chrome Canary with flag: --enable-unsafe-webgpu)