Skip to content

Commit

Permalink
fix pixi marker anchors
Browse files Browse the repository at this point in the history
  • Loading branch information
TurtIeSocks committed Jan 16, 2023
1 parent d3c2d73 commit 707f271
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "koji",
"version": "0.3.3",
"version": "0.3.4",
"description": "Tool to make RDM routes",
"main": "server/dist/index.js",
"author": "TurtIeSocks <[email protected]>",
Expand Down
3 changes: 1 addition & 2 deletions client/src/hooks/usePixi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,13 @@ export default function usePixi(markers: PixiMarker[]) {
}
const markerTexture =
PIXILoader.resources[`marker_${resolvedIconId}`].texture
// const markerTexture = new PIXI.Texture.fromImage(url);
if (markerTexture) {
const markerSprite = PIXI.Sprite.from(markerTexture)
markerSprite.anchor.set(0.5, 0.5)
const markerCoords = project(p)
markerSprite.x = markerCoords.x
markerSprite.y = markerCoords.y
markerSprite.scale.set(1 / scale)

container.addChild(markerSprite)
}
})
Expand Down
2 changes: 1 addition & 1 deletion server/Cargo.lock

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

2 changes: 1 addition & 1 deletion server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "koji"
version = "0.3.3"
version = "0.3.4"
edition = "2021"

[workspace]
Expand Down

0 comments on commit 707f271

Please sign in to comment.