@neo-ui-kit/react 1.3.4 → 1.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -25,7 +25,7 @@ import "@neo-ui-kit/react/styles.css";
25
25
  To test repository changes before publishing, run `npm run package` from the repository root and install the resulting archive in a separate application:
26
26
 
27
27
  ```bash
28
- npm install /path/to/adui/release/neo-ui-kit-react-1.3.4.tgz
28
+ npm install /path/to/adui/release/neo-ui-kit-react-1.3.5.tgz
29
29
  ```
30
30
 
31
31
  Maintainers publish new versions from `Pro100Dimka/adui` using the `release.yml` GitHub Actions workflow, a matching `v<version>` tag, and the `npm-publication` environment. npm trusts its OIDC identity; no `NPM_TOKEN` is required. The workflow checks the project and packed consumer before publishing the tested archive. Published `1.0.0` cannot be overwritten: code and README changes in npm require a new package version. See the [repository release instructions](https://github.com/Pro100Dimka/adui#npm-пакет).
package/dist/index.js CHANGED
@@ -3839,15 +3839,15 @@ var planet = {
3839
3839
  const pixel = (y * width + x) * 4;
3840
3840
  if (radial > 1.12) continue;
3841
3841
  const light = clamp01(0.48 - dx * 0.8 - dy * 0.3, 0.08, 1.2);
3842
- if (radial > 1) {
3843
- const alpha = Math.exp(-(radial - 1) * 88) * 0.58 * light;
3842
+ if (edge <= -0.5) {
3843
+ const alpha2 = Math.exp(-(radial - 1) * 88) * 0.58 * light;
3844
3844
  image.data[pixel] = 255;
3845
3845
  image.data[pixel + 1] = 40;
3846
3846
  image.data[pixel + 2] = 82;
3847
- image.data[pixel + 3] = 255 * alpha;
3847
+ image.data[pixel + 3] = 255 * alpha2;
3848
3848
  continue;
3849
3849
  }
3850
- const z = Math.sqrt(1 - dx * dx - dy * dy);
3850
+ const z = Math.sqrt(Math.max(0, 1 - dx * dx - dy * dy));
3851
3851
  const terrainNoise = fbm(dx * 18 + z * 7, dy * 21 + z * 5, 6);
3852
3852
  const crust = Math.pow(
3853
3853
  1 - Math.abs(
@@ -3860,10 +3860,14 @@ var planet = {
3860
3860
  const bloom = Math.exp(-Math.max(0, edge) / (15 * scale)) * light;
3861
3861
  const shade = clamp01(0.48 - dx * 0.78 - z * 0.55, 0.07, 0.95);
3862
3862
  const terrain = (10 + 61 * ridge + 26 * terrainNoise) * shade;
3863
- image.data[pixel] = terrain + rim * 239 + bloom * 75;
3864
- image.data[pixel + 1] = terrain * 0.14 + rim * 165 + bloom * 8;
3865
- image.data[pixel + 2] = terrain * 0.34 + rim * 183 + bloom * 25;
3866
- image.data[pixel + 3] = 255;
3863
+ const coverage = clamp01(edge + 0.5);
3864
+ const alpha = coverage === 1 ? 1 : coverage + (1 - coverage) * Math.exp(-Math.max(0, radial - 1) * 88) * 0.58 * light;
3865
+ const surface = coverage / alpha;
3866
+ const atmosphere = 1 - surface;
3867
+ image.data[pixel] = (terrain + rim * 239 + bloom * 75) * surface + 255 * atmosphere;
3868
+ image.data[pixel + 1] = (terrain * 0.14 + rim * 165 + bloom * 8) * surface + 40 * atmosphere;
3869
+ image.data[pixel + 2] = (terrain * 0.34 + rim * 183 + bloom * 25) * surface + 82 * atmosphere;
3870
+ image.data[pixel + 3] = 255 * alpha;
3867
3871
  }
3868
3872
  }
3869
3873
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neo-ui-kit/react",
3
- "version": "1.3.4",
3
+ "version": "1.3.5",
4
4
  "description": "NEO UI — React component library",
5
5
  "type": "module",
6
6
  "license": "MIT",