Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Commit

Permalink
Bump three and @types/three (#5182)
Browse files Browse the repository at this point in the history
Bumps [three](https://github.com/mrdoob/three.js) and
[@types/three](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/three).
These dependencies needed to be updated together.
Updates `three` from 0.140.2 to 0.148.0
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/mrdoob/three.js/commits">compare view</a></li>
</ul>
</details>
<br />

Updates `@types/three` from 0.140.0 to 0.148.0
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/three">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jacob Bandes-Storch <jacob@foxglove.dev>
  • Loading branch information
dependabot[bot] and jtbandes committed Jan 23, 2023
1 parent 561a26a commit 5ce667b
Show file tree
Hide file tree
Showing 7 changed files with 116 additions and 324 deletions.
4 changes: 2 additions & 2 deletions packages/studio-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"@types/shallowequal": "1.1.1",
"@types/string-hash": "1.1.1",
"@types/text-metrics": "workspace:*",
"@types/three": "^0.140.0",
"@types/three": "^0.148.0",
"@types/tinycolor2": "1.4.3",
"@types/url-search-params": "1.1.0",
"@types/uuid": "9.0.0",
Expand Down Expand Up @@ -180,7 +180,7 @@
"string-replace-loader": "3.1.0",
"style-loader": "3.3.1",
"text-metrics": "3.0.0",
"three": "patch:three@0.140.2#../../patches/three.patch",
"three": "patch:three@0.148.0#../../patches/three.patch",
"tinycolor2": "1.4.2",
"ts-essentials": "9.3.0",
"ts-key-enum": "2.0.12",
Expand Down
4 changes: 2 additions & 2 deletions packages/studio-base/src/panels/ThreeDeeRender/ModelCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

import { MeshoptDecoder } from "meshoptimizer";
import * as THREE from "three";
import dracoDecoderWasmUrl from "three/examples/jsm/../js/libs/draco/draco_decoder.wasm";
import dracoWasmWrapperJs from "three/examples/jsm/../js/libs/draco/draco_wasm_wrapper.js?raw";
import dracoDecoderWasmUrl from "three/examples/jsm/libs/draco/draco_decoder.wasm";
import dracoWasmWrapperJs from "three/examples/jsm/libs/draco/draco_wasm_wrapper.js?raw";
import { ColladaLoader } from "three/examples/jsm/loaders/ColladaLoader";
import { DRACOLoader } from "three/examples/jsm/loaders/DRACOLoader";
import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,7 @@ class LaserScanRenderable extends PointsHistoryRenderable<LaserScanUserData> {
for (let i = 0; i < ranges.length; i++) {
const colorValue = colorField === "range" ? ranges[i]! : intensities[i] ?? 0;
colorConverter(tempColor, colorValue);
colorAttribute.setXYZW(
i,
(tempColor.r * 255) | 0,
(tempColor.g * 255) | 0,
(tempColor.b * 255) | 0,
(tempColor.a * 255) | 0,
);
colorAttribute.setXYZW(i, tempColor.r, tempColor.g, tempColor.b, tempColor.a);
}

rangeAttribute.needsUpdate = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,10 +480,10 @@ export class PointCloudRenderable extends PointsHistoryRenderable<PointCloudUser
const pointOffset = i * pointStep;
colorAttribute.setXYZW(
i,
(redReader(view, pointOffset) * 255) | 0,
(greenReader(view, pointOffset) * 255) | 0,
(blueReader(view, pointOffset) * 255) | 0,
(alphaReader(view, pointOffset) * 255) | 0,
redReader(view, pointOffset),
greenReader(view, pointOffset),
blueReader(view, pointOffset),
alphaReader(view, pointOffset),
);
}
} else {
Expand All @@ -509,13 +509,7 @@ export class PointCloudRenderable extends PointsHistoryRenderable<PointCloudUser
const pointOffset = i * pointStep;
const colorValue = packedColorReader(view, pointOffset);
colorConverter(tempColor, colorValue);
colorAttribute.setXYZW(
i,
(tempColor.r * 255) | 0,
(tempColor.g * 255) | 0,
(tempColor.b * 255) | 0,
(tempColor.a * 255) | 0,
);
colorAttribute.setXYZW(i, tempColor.r, tempColor.g, tempColor.b, tempColor.a);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ export class RenderableTriangles extends RenderablePrimitive {
`Entity: ${this.userData.entity?.id}.triangles[${triMeshIdx}](1st index) - Colors array should be same size as points array, showing #00ff00 instead`,
);
}
const r = (SRGBToLinear(color.r) * 255) | 0;
const g = (SRGBToLinear(color.g) * 255) | 0;
const b = (SRGBToLinear(color.b) * 255) | 0;
const a = (color.a * 255) | 0;
const r = SRGBToLinear(color.r);
const g = SRGBToLinear(color.g);
const b = SRGBToLinear(color.b);
const a = color.a;
colorChanged =
colorChanged ||
colors.getX(i) !== r ||
Expand Down Expand Up @@ -242,7 +242,7 @@ function makeTriangleMesh(): TriangleMesh {
metalness: 0,
roughness: 1,
flatShading: true,
side: THREE.DoubleSide,
side: THREE.TwoPassDoubleSide,
}),
);
}
Expand Down

0 comments on commit 5ce667b

Please sign in to comment.