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

The punycode module is deprecated with Node.js 21.x #1316

Open
microaaron opened this issue Dec 9, 2023 · 5 comments
Open

The punycode module is deprecated with Node.js 21.x #1316

microaaron opened this issue Dec 9, 2023 · 5 comments

Comments

@microaaron
Copy link
Contributor

>npm run build

> x3dom@1.8.4-dev build
> node ./build/src-builder.js

> Recreate dist folder ...
> Concat files ...
> Minify x3dom.js ...
> Minify x3dom-full.js ...
> Minify x3dom-physics.js ...
> Write x3dom.debug.js ...
> Write x3dom.js ...
> Write x3dom-full.debug.js ...
> Write x3dom-full.js ...
> Write x3dom-physics.debug.js ...
> Write x3dom-physics.js ...
> Write VERSION ...
> Copy additional files ...
> Build documentation ...
(node:31800) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
> Build archive ...
@andreasplesch
Copy link
Contributor

Thanks. Do you know of an alternative ?

@microaaron
Copy link
Contributor Author

Thanks. Do you know of an alternative ?

I have no idea.

@microaaron
Copy link
Contributor Author

@andreasplesch By the way, a question.

x3dom/src/gfx_webgl.js

Lines 703 to 705 in a0601f8

for ( q = 0; q < shape._webgl.positions.length; q++ )
{
q6 = 6 * q;

Why q6 = 6 * q; ? What if q>0? The state after the for loop seems a little weird.
x3d

x3dom/src/gfx_webgl.js

Lines 842 to 846 in a0601f8

gl.vertexAttribPointer( sp.binormal,
geoNode._mesh._numBinormalComponents,
shape._webgl.binormalType, false,
shape._binormalStrideOffset[ 0 ], shape._binormalStrideOffset[ 1 ] );
gl.enableVertexAttribArray( sp.tangent );

And, does it should be gl.enableVertexAttribArray( sp.binormal); ?

@andreasplesch
Copy link
Contributor

Great graphics !

@andreasplesch By the way, a question.

x3dom/src/gfx_webgl.js

Lines 703 to 705 in a0601f8

for ( q = 0; q < shape._webgl.positions.length; q++ )
{
q6 = 6 * q;

Why q6 = 6 * q; ? What if q>0? The state after the for loop seems a little weird.
x3d

I think q>0 was intended for large meshes > maxIndexableCoords:

x3dom.Utils.maxIndexableCoords = 65535;

x3dom.Utils.maxIndexableCoords = 4294967295;

But with webGL2 this probably now rarely happens.

It is possible that tangent and binormalBuffer were added relatively late, without considering the case of q>0 but I do not know.

BITANGENT : 7,

x3dom/src/gfx_webgl.js

Lines 842 to 846 in a0601f8

gl.vertexAttribPointer( sp.binormal,
geoNode._mesh._numBinormalComponents,
shape._webgl.binormalType, false,
shape._binormalStrideOffset[ 0 ], shape._binormalStrideOffset[ 1 ] );
gl.enableVertexAttribArray( sp.tangent );

And, does it should be gl.enableVertexAttribArray( sp.binormal); ?

I agree, it probably should be sp.binormal. Looks like a copy and paste oversight. But I do not know how to generate a test case (IFS with binormals).

@microaaron
Copy link
Contributor Author

x3dom.Utils.maxIndexableCoords = 4294967295;

But with webGL2 this probably now rarely happens.

Yes, this is also the limit of Array. https://262.ecma-international.org/5.1/#sec-15.4.2.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants