Skip to content

Commit

Permalink
upgrade more deps
Browse files Browse the repository at this point in the history
  • Loading branch information
spearwolf committed Sep 29, 2024
1 parent 96bdb1d commit b6fc573
Show file tree
Hide file tree
Showing 11 changed files with 443 additions and 565 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ export class QuadTreeVisualization {
this.ctx.lineTo(chunk.originX, bottom);
this.ctx.stroke();

chunk.nodes.northWest && this.renderChunkFrame(chunk.nodes.northWest, left, top, chunk.originX, chunk.originY, stats);
chunk.nodes.northEast && this.renderChunkFrame(chunk.nodes.northEast, chunk.originX, top, right, chunk.originY, stats);
chunk.nodes.southWest && this.renderChunkFrame(chunk.nodes.southWest, left, chunk.originY, chunk.originX, bottom, stats);
chunk.nodes.southEast && this.renderChunkFrame(chunk.nodes.southEast, chunk.originX, chunk.originY, right, bottom, stats);
if (chunk.nodes.northWest) this.renderChunkFrame(chunk.nodes.northWest, left, top, chunk.originX, chunk.originY, stats);
if (chunk.nodes.northEast) this.renderChunkFrame(chunk.nodes.northEast, chunk.originX, top, right, chunk.originY, stats);
if (chunk.nodes.southWest) this.renderChunkFrame(chunk.nodes.southWest, left, chunk.originY, chunk.originX, bottom, stats);
if (chunk.nodes.southEast) this.renderChunkFrame(chunk.nodes.southEast, chunk.originX, chunk.originY, right, bottom, stats);
}
}

Expand Down
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@
"publishNpmPkg": "pnpm nx run-many -t publishNpmPkg",
"update": "pnpm dlx npm-check --update",
"cbt": "pnpm run-s -sn clean build test:ci",
"test:all": "pnpm run-s -sn lint clean build test:ci test:playwright",
"lookbook": "pnpm nx dev lookbook",
"landing-page": "pnpm nx dev landing-page",
"ci": "pnpm run-s -sn build lint test:ci",
"playwright:install": "pnpm exec playwright install",
"ci:install": "pnpm run-s -sn playwright:install ci"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.15.3",
"@arethetypeswrong/cli": "^0.16.4",
"@nx/eslint-plugin": "^19.8.2",
"@nx/jest": "^19.8.2",
"@nx/js": "^19.8.2",
Expand All @@ -43,8 +44,8 @@
"@types/react": "^18.3.10",
"@types/sinon": "^17.0.3",
"@types/three": "~0.165.0",
"@typescript-eslint/eslint-plugin": "^7.13.0",
"@typescript-eslint/parser": "^7.13.0",
"@typescript-eslint/eslint-plugin": "^8.7.0",
"@typescript-eslint/parser": "^8.7.0",
"@vitejs/plugin-react": "^4.3.1",
"canvas": "^2.11.2",
"esbuild": "^0.24.0",
Expand All @@ -57,7 +58,7 @@
"eslint-plugin-react": "^7.37.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-require-extensions": "^0.1.3",
"happy-dom": "^14.12.0",
"happy-dom": "^15.7.4",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"npm-run-all": "^4.1.5",
Expand All @@ -66,17 +67,17 @@
"prettier": "^3.3.3",
"prettier-plugin-astro": "^0.14.1",
"react": "^18.3.1",
"rimraf": "^5.0.7",
"rimraf": "^6.0.1",
"rollup": "^4.22.5",
"sinon": "^18.0.0",
"sinon": "^19.0.2",
"three": "~0.165.0",
"ts-jest": "^29.2.5",
"ts-node": "10.9.2",
"tslib": "^2.7.0",
"tsup": "^8.3.0",
"typescript": "^5.6.2",
"use-asset": "^1.0.4",
"vitest": "^1.6.0",
"vitest": "^2.1.1",
"zustand": "^4.5.5"
}
}
4 changes: 2 additions & 2 deletions packages/twopoint5d-elements/src/utils/SignalMap.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {batch, createSignal, SignalObject} from '@spearwolf/signalize';

export class SignalMap {
static fromProps<T extends Object>(o: T, propKeys: (keyof T)[]): SignalMap {
static fromProps<T extends object>(o: T, propKeys: (keyof T)[]): SignalMap {
const sm = new SignalMap();
for (const key of propKeys) {
sm.#signals.set(
Expand All @@ -28,7 +28,7 @@ export class SignalMap {
}
}

updateFromProps<T extends Object>(o: T, propKeys: (keyof T)[]): void {
updateFromProps<T extends object>(o: T, propKeys: (keyof T)[]): void {
batch(() => {
for (const key of propKeys) {
this.#signals.get(key)?.set(o[key]);
Expand Down
2 changes: 1 addition & 1 deletion packages/twopoint5d-r3f/src/utils/pick.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const pick = <T extends Object>(o: T, ...keys: (keyof T)[]): Partial<T> | undefined =>
export const pick = <T extends object>(o: T, ...keys: (keyof T)[]): Partial<T> | undefined =>
o ? (Object.fromEntries(Object.entries(o).filter(([key]) => keys.includes(key as keyof T))) as Partial<T>) : undefined;
2 changes: 1 addition & 1 deletion packages/twopoint5d/src/controls/readOption.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const readOption = <OptionsType extends Object, ValueType>(
export const readOption = <OptionsType extends object, ValueType>(
options: OptionsType | null | undefined,
propName: keyof OptionsType,
defValue: ValueType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import {
type WebGLProgramParametersWithUniforms,
} from 'three';

export interface CustomChunksShaderMaterialParameters extends ShaderMaterialParameters {}
// export interface CustomChunksShaderMaterialParameters extends ShaderMaterialParameters {}
export type CustomChunksShaderMaterialParameters = ShaderMaterialParameters;

export interface CustomShaderChunks {
[chunkName: string]: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/twopoint5d/src/utils/Dependencies.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {describe, expect, test} from 'vitest';

import {Dependencies} from './Dependencies.js';

type Ref = {current: Object};
type Ref = {current: object};

const refEquals = (a: Ref, b: Ref) => a?.current === b?.current;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ export class VertexObjectDescriptor {
readonly attributes: Map<string, VertexAttributeDescriptor>;
readonly bufferNames: Set<string>;

readonly basePrototype?: Object | null | undefined;
readonly methods?: Object | null | undefined;
readonly basePrototype?: object | null | undefined;
readonly methods?: object | null | undefined;

voPrototype: Object; // lazy initialization!!
voPrototype: object; // lazy initialization!!
// is initialized by the first VertexObjectBuffer that uses this descriptor => createVertexObjectPrototype()

constructor(description: VertexObjectDescription) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const makeAttributeValueSetter = (
};
};

export function createVertexObjectPrototype(voBuffer: VertexObjectBuffer): Object {
export function createVertexObjectPrototype(voBuffer: VertexObjectBuffer): object {
const {descriptor} = voBuffer;
const {methods} = descriptor;

Expand Down
4 changes: 2 additions & 2 deletions packages/twopoint5d/src/vertex-objects/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ export interface VertexObjectDescription {
indices?: number[];
meshCount?: number;
attributes: VertexAttributesType;
basePrototype?: Object | null | undefined;
methods?: Object | null | undefined;
basePrototype?: object | null | undefined;
methods?: object | null | undefined;
}

export interface VO {
Expand Down
Loading

0 comments on commit b6fc573

Please sign in to comment.