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

#865-upgrade-three-js #1002

Closed
wants to merge 28 commits into from
Closed

Commits on Mar 17, 2024

  1. Geometry removed

    Only BufferGeometry is supported.
    Every BufferGeometry helper (e.g. BoxBufferGeometry) has
    been renamed to shorter name (e.g. BoxGeometry)
    ppillot committed Mar 17, 2024
    Configuration menu
    Copy the full SHA
    0f1d1d4 View commit details
    Browse the repository at this point in the history
  2. remove ply parser for now

    As it leverages many deprecated methods
    ppillot committed Mar 17, 2024
    Configuration menu
    Copy the full SHA
    417345b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3295839 View commit details
    Browse the repository at this point in the history
  4. .getInverse() removed

    replace with copy() + invert()
    ppillot committed Mar 17, 2024
    Configuration menu
    Copy the full SHA
    e5378d1 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    65f4686 View commit details
    Browse the repository at this point in the history
  6. typings

    ppillot committed Mar 17, 2024
    Configuration menu
    Copy the full SHA
    24c0886 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    82a77d9 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    71d6d4b View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    f919994 View commit details
    Browse the repository at this point in the history
  10. r155 useLegacyLights

    ppillot committed Mar 17, 2024
    Configuration menu
    Copy the full SHA
    baf2422 View commit details
    Browse the repository at this point in the history
  11. update three.js to latest

    ppillot committed Mar 17, 2024
    Configuration menu
    Copy the full SHA
    26bee39 View commit details
    Browse the repository at this point in the history
  12. upgrade dev dependencies to pass npm audit

    critical and high vulnerabilities were caused by dependencies
    related with Jest
    ppillot committed Mar 17, 2024
    Configuration menu
    Copy the full SHA
    dd7507d View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    8219f6c View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    1355891 View commit details
    Browse the repository at this point in the history
  15. revert 356d957: delete Volume._position in setData()

    Previous code was setting `_position` to an empty array.
    This was causing some bugs where the _position array was not filled
    with the proper values and remained empty.
    ppillot committed Mar 17, 2024
    Configuration menu
    Copy the full SHA
    d24ea77 View commit details
    Browse the repository at this point in the history
  16. r132 ALPHATEST --> USE_ALPHATEST

    `ALPHATEST` was previously used as a flag and a value in three.js `alphatest_fragment` chunk.
    It was superseded by the `USE_ALPHATEST` flag and the `alphaTest` value passed as a uniform.
    The declaration of the `alphaTest` uniform is made in the `alphatest_pars_fragment` chunk.
    ppillot committed Mar 17, 2024
    Configuration menu
    Copy the full SHA
    e173521 View commit details
    Browse the repository at this point in the history
  17. SpotLight --> DirectionalLight

    A SpotLight must have its distance set in real world coordinates.
    This was resulting in very dark scenes, where the position of the light or its intensity must take into account the bounding box.
    Directional Lights do not require this settings. They light the scene in a uniform manner from afar.
    ppillot committed Mar 17, 2024
    Configuration menu
    Copy the full SHA
    f9802b2 View commit details
    Browse the repository at this point in the history
  18. Adjust default light intensity

    3.14 is the value recommanded in Three.js documentation when converting colorspaces
    Ambient intensity of 1 is the default.
    ppillot committed Mar 17, 2024
    Configuration menu
    Copy the full SHA
    f35f574 View commit details
    Browse the repository at this point in the history
  19. set colorspace to three.js defaults

    By default the outputColorSpace is set to rgb.
    Internal colors are set to linear rgb space.
    `compositeMaterial` derives from custom ShaderMaterial. Correct color depends on the `colorspace_fragment` chunk beign executed in the corresponding fragment shader.
    ppillot committed Mar 17, 2024
    Configuration menu
    Copy the full SHA
    3843e91 View commit details
    Browse the repository at this point in the history
  20. adjust ambient light level

    original value was 0.2.
    Recommended multiplicator is PI and 0.63 seems to give comparable results with the previous version.
    ppillot committed Mar 17, 2024
    Configuration menu
    Copy the full SHA
    16c7e47 View commit details
    Browse the repository at this point in the history
  21. convert fog color to linear colorspace

    The pattern here is that when a color is set as a string or an hex number, it requires conversion from RGB to linear.
    On contrary, if a color is set via a Color object, it is assumed that this one is already encoded in linear color space.
    ppillot committed Mar 17, 2024
    Configuration menu
    Copy the full SHA
    4921bab View commit details
    Browse the repository at this point in the history
  22. Remove unused colorspace properties

    Because we are now using Three.js defaults
    ppillot committed Mar 17, 2024
    Configuration menu
    Copy the full SHA
    d67eb50 View commit details
    Browse the repository at this point in the history
  23. convert color when appending to uniforms array

    ColorMakers are called when creating BufferArrays to populate the `color` uniform.
    4 methods can be applied (atomColorToArray, bondColorToArray, volumeColorToArray, positionColorToArray).
    Each of these, calls a related method (e.g. `atomColor`) to get a color that is defined in RGB Colorspace, encoded as an integer between 0 and 2**24.
    This color is then converted to a tuple of 3 values which are passed along all the other vertices colors to the shaders codes as a uniform.
    Prior code was using a decorator to convert the output color of each coloring function, to linear space and then to hex.
    This hex value was then later processed to be split and normalized in the array buffer.
    The change here makes the linearization at the last step, after the normalization which should avoid clamping due to the double conversion that was happening previously
    ppillot committed Mar 17, 2024
    Configuration menu
    Copy the full SHA
    e3ad21a View commit details
    Browse the repository at this point in the history
  24. Fix banding appearing after antialiasing

    A banding effect was due to a loss of precision when copying the texture between render targets as linear encoding requires more precision.
    ppillot committed Mar 17, 2024
    Configuration menu
    Copy the full SHA
    3772790 View commit details
    Browse the repository at this point in the history
  25. Fog planes tweaking

    It seems the relative units might have changed between the camera and the point of focus.
    Pushing the fog near plane further back, seems to visually match with previous version results.
    ppillot committed Mar 17, 2024
    Configuration menu
    Copy the full SHA
    48c0db6 View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2024

  1. More color space conversions

    ppillot committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    b5a3523 View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2024

  1. update three.js to latest

    ppillot committed Apr 9, 2024
    Configuration menu
    Copy the full SHA
    d018310 View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2024

  1. r163 drop WebGL1 support

    ppillot committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    b09d478 View commit details
    Browse the repository at this point in the history