Skip to content

Commit

Permalink
Upgraded PixiJS to v7
Browse files Browse the repository at this point in the history
  • Loading branch information
rsimon committed Mar 22, 2024
1 parent 31a63ee commit e0e5a52
Show file tree
Hide file tree
Showing 9 changed files with 294 additions and 346 deletions.
606 changes: 277 additions & 329 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@annotorious/monorepo",
"version": "3.0.0-rc.19",
"version": "3.0.0-rc.20",
"description": "Annotorious v3 monorepo",
"author": "Rainer Simon",
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions packages/annotorious-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@annotorious/core",
"version": "3.0.0-rc.19",
"version": "3.0.0-rc.20",
"description": "Annotorious core types and functions",
"author": "Rainer Simon",
"license": "BSD-3-Clause",
Expand Down Expand Up @@ -31,7 +31,7 @@
"@types/uuid": "^9.0.8",
"svelte": "^4.2.12",
"svelte-preprocess": "^5.1.3",
"typescript": "^5.4.3",
"typescript": "^5.3.3",
"vite": "^5.2.2",
"vite-plugin-dts": "^3.7.3",
"vitest": "^1.4.0"
Expand Down
6 changes: 3 additions & 3 deletions packages/annotorious-openseadragon/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@annotorious/openseadragon",
"version": "3.0.0-rc.19",
"version": "3.0.0-rc.20",
"description": "Annotorious for OpenSeadragon",
"author": "Rainer Simon",
"license": "BSD-3-Clause",
Expand Down Expand Up @@ -41,7 +41,7 @@
"@types/uuid": "^9.0.8",
"svelte": "^4.2.12",
"svelte-preprocess": "^5.1.3",
"typescript": "^5.4.3",
"typescript": "^5.3.3",
"vite": "^5.2.2",
"vite-plugin-dts": "^3.7.3"
},
Expand All @@ -51,7 +51,7 @@
"dependencies": {
"@annotorious/core": "*",
"@annotorious/annotorious": "*",
"pixi.js": "^6.5.10",
"pixi.js": "^7.4.2",
"uuid": "^9.0.1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ interface AnnotationShape {

const getGraphicsStyle = (style?: DrawingStyle) => {
const fillStyle = {
tint: style?.fill ? PIXI.utils.string2hex(style.fill) : DEFAULT_FILL,
tint: style?.fill ? new PIXI.Color(style.fill).toNumber() : DEFAULT_FILL,
alpha: style?.fillOpacity === undefined ? DEFAULT_ALPHA : Math.min(style.fillOpacity, 1)
};

const strokeStyle = {
tint: style?.stroke && PIXI.utils.string2hex(style.stroke),
tint: style?.stroke && new PIXI.Color(style.stroke).toNumber(),
alpha: style?.strokeOpacity === undefined ? (style?.stroke ? 1 : 0) : Math.min(style.strokeOpacity, 1),
lineWidth: style?.stroke ? style?.strokeWidth || 1 : 0
}
Expand Down Expand Up @@ -89,7 +89,7 @@ const redrawStage = (
viewer: OpenSeadragon.Viewer,
graphics: PIXI.Graphics,
shapes: Map<String, AnnotationShape>,
renderer: PIXI.AbstractRenderer
renderer: PIXI.IRenderer<PIXI.ICanvas>
) => () => {
const viewportBounds = viewer.viewport.viewportToImageRectangle(viewer.viewport.getBounds(true));
const scale = getCurrentScale(viewer);
Expand Down
4 changes: 2 additions & 2 deletions packages/annotorious-react-manifold/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@annotorious/react-manifold",
"version": "3.0.0-rc.19",
"version": "3.0.0-rc.20",
"description": "A utility to manage multiple parallel Annotorious instances more efficiently",
"author": "Rainer Simon",
"license": "BSD-3-Clause",
Expand Down Expand Up @@ -33,7 +33,7 @@
"@types/react": "^18.2.67",
"@types/react-dom": "^18.2.22",
"@vitejs/plugin-react": "^4.2.1",
"typescript": "^5.4.3",
"typescript": "^5.3.3",
"vite": "^5.2.2",
"vite-plugin-dts": "^3.7.3",
"vite-tsconfig-paths": "^4.3.2"
Expand Down
4 changes: 2 additions & 2 deletions packages/annotorious-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@annotorious/react",
"version": "3.0.0-rc.19",
"version": "3.0.0-rc.20",
"description": "Annotorious React bindings",
"author": "Rainer Simon",
"license": "BSD-3-Clause",
Expand All @@ -27,7 +27,7 @@
"@types/react": "^18.2.67",
"@types/react-dom": "^18.2.22",
"@vitejs/plugin-react": "^4.2.1",
"typescript": "^5.4.3",
"typescript": "^5.3.3",
"vite": "^5.2.2",
"vite-plugin-dts": "^3.7.3",
"vite-tsconfig-paths": "^4.3.2"
Expand Down
4 changes: 2 additions & 2 deletions packages/annotorious-svelte/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@annotorious/svelte",
"version": "3.0.0-rc.19",
"version": "3.0.0-rc.20",
"description": "Annotorious Svelte bindings",
"author": "Rainer Simon",
"license": "BSD-3-Clause",
Expand All @@ -22,7 +22,7 @@
"svelte-check": "^3.6.8",
"svelte-preprocess": "^5.1.3",
"tslib": "^2.6.2",
"typescript": "^5.4.3",
"typescript": "^5.3.3",
"vite": "^5.2.2",
"vite-plugin-dts": "^3.7.3"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/annotorious/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@annotorious/annotorious",
"version": "3.0.0-rc.19",
"version": "3.0.0-rc.20",
"description": "Add image annotation functionality to any web page with a few lines of JavaScript",
"author": "Rainer Simon",
"license": "BSD-3-Clause",
Expand Down Expand Up @@ -42,7 +42,7 @@
"jsdom": "^24.0.0",
"svelte": "^4.2.12",
"svelte-preprocess": "^5.1.3",
"typescript": "^5.4.3",
"typescript": "^5.3.3",
"vite": "^5.2.2",
"vite-plugin-dts": "^3.7.3",
"vitest": "^1.4.0"
Expand Down

0 comments on commit e0e5a52

Please sign in to comment.