Skip to content

fix(uikit): resolve Three.js r185+ deprecation warnings - #271

Merged
bbohlender merged 1 commit into
pmndrs:mainfrom
dli7319:fix/three-r185-deprecations
Oct 15, 2026
Merged

bbohlender merged 1 commit into
pmndrs:mainfrom
dli7319:fix/three-r185-deprecations

Conversation

@dli7319

@dli7319 dli7319 commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Resolves deprecation warnings logged when using @pmndrs/uikit with Three.js r185+ while preserving backward compatibility with older Three.js versions (>=0.162):

  • SVGLoader.createShapes() (packages/uikit/src/components/svg.ts):
    In Three.js r185 (mrdoob/three.js#33503), SVGLoader.createShapes()'s scanline/fill-rule implementation was moved into ShapePath.prototype.toShapes() and SVGLoader.createShapes() was deprecated. We now check Number.parseInt(REVISION, 10) >= 185 to call path.toShapes() on r185+ and SVGLoader.createShapes(path) on < 185.
  • Matrix3.translate() & Matrix3.scale() (packages/uikit/src/components/image.ts):
    In Three.js r185 (mrdoob/three.js#33757), Matrix3.translate() and Matrix3.scale() were deprecated in favor of .makeTranslation() and .makeScale(). Replaced texture.matrix.translate(...).scale(...) calls with .premultiply(helperMatrix.makeTranslation(...)).premultiply(helperMatrix.makeScale(...)), which is supported across all three >= 0.162 versions.

Fixes #276

@bbohlender
bbohlender merged commit 099f6f7 into pmndrs:main Oct 15, 2026
1 check passed
@dli7319
dli7319 deleted the fix/three-r185-deprecations branch October 15, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Three.js r185+ deprecation warnings: Matrix3.translate/scale and SVGLoader.createShapes

2 participants