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

chore(deps): update dependency three to v0.166.1 #4646

Merged
merged 2 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@
"@types/react": "18.3.3",
"@types/react-dom": "18.3.0",
"@types/stats.js": "^0.17.0",
"@types/three": "^0.165.0",
"@types/three": "^0.166.0",
"css-loader": "^7.0.0",
"dotenv-webpack": "^8.0.0",
"html-webpack-plugin": "^5.5.0",
"prettier": "^3.0.0",
"three": "0.165.0",
"three": "0.166.1",
"ts-loader": "9.5.1",
"typescript": "^5.0.4",
"webpack": "^5.76.0",
Expand Down
105 changes: 16 additions & 89 deletions examples/yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"@types/random-seed": "^0.3.5",
"@types/skmeans": "^0.11.7",
"@types/stats": "^0.16.30",
"@types/three": "^0.165.0",
"@types/three": "^0.166.0",
"@types/tween.js": "^18.6.1",
"@typescript-eslint/eslint-plugin": "^7.7.1",
"@typescript-eslint/parser": "^7.7.1",
Expand Down Expand Up @@ -131,7 +131,7 @@
"resize-observer-polyfill": "^1.5.1",
"shx": "^0.3.4",
"stats.js": "^0.17.0",
"three": "0.165.0",
"three": "0.166.1",
"ts-jest": "^29.1.2",
"ts-loader": "^9.5.1",
"tsc-alias": "^1.8.8",
Expand All @@ -146,7 +146,7 @@
},
"peerDependencies": {
"@cognite/sdk": "^7.16.0 || ^8.0.0",
"three": "0.165.0"
"three": "0.166.1"
},
"glslify": {
"transform": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ export function makeOnBeforeRender(
node: IPointCloudTreeNode,
pcIndex: number
): (renderer: WebGLRenderer, scene: Scene, camera: Camera, bufferGeometry: BufferGeometry, material: Material) => void {
return (_renderer: WebGLRenderer, _scene: Scene, _camera: Camera, _geometry: BufferGeometry, material: Material) => {
return (renderer: WebGLRenderer, _scene: Scene, _camera: Camera, _geometry: BufferGeometry, material: Material) => {
const pointCloudMaterial = material as PointCloudMaterial;
pointCloudMaterial.onBeforeRender(renderer);
const materialUniforms = pointCloudMaterial.uniforms;

materialUniforms.level.value = node.level;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export class PointCloudMaterial extends RawShaderMaterial {
glslVersion: GLSL3
});

const tex = (this.visibleNodesTexture = generateDataTexture(2048, 1, COLOR_WHITE));
const tex = (this.visibleNodesTexture = generateDataTexture(2048, 1, COLOR_WHITE, 0x0));
tex.minFilter = NearestFilter;
tex.magFilter = NearestFilter;
this.setUniform('visibleNodes', tex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class PointCloudObjectAppearanceTexture {
private _annotationIdsToObjectId: Map<number, number> | undefined;

constructor(width: number, height: number) {
this._objectStyleTexture = generateDataTexture(width, height, new THREE.Color(0x01000000)); // Initialize with visibility bit set
this._objectStyleTexture = generateDataTexture(width, height, new THREE.Color(0x0), 0x01); // Initialize with visibility bit set

this._width = width;
this._height = height;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from 'three';
import { PointClassification, IGradient } from './types';

export function generateDataTexture(width: number, height: number, color: Color): DataTexture {
export function generateDataTexture(width: number, height: number, color: Color, alpha: number): DataTexture {
const size = width * height;
const data = new Uint8Array(4 * size);

Expand All @@ -26,6 +26,7 @@ export function generateDataTexture(width: number, height: number, color: Color)
data[i * 4] = r;
data[i * 4 + 1] = g;
data[i * 4 + 2] = b;
data[i * 4 + 3] = alpha;
}

const texture = new DataTexture(data, width, height, RGBAFormat);
Expand Down
26 changes: 13 additions & 13 deletions viewer/yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading