Skip to content
This repository was archived by the owner on May 5, 2024. It is now read-only.

Commit 783efe7

Browse files
committed
Work around types.
1 parent bf8d8c2 commit 783efe7

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

src/subjects/MaterialSubject.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -253,17 +253,18 @@ export class MaterialSubject extends Subject<MaterialDef, Material> {
253253
}
254254

255255
// KHR_materials_anisotropy
256+
// TODO(cleanup): Remove 'any' after https://github.com/three-types/three-ts-types/pull/472.
256257
const anisotropy = def.getExtension<Anisotropy>('KHR_materials_anisotropy');
257258
if (anisotropy) {
258-
if (anisotropy.getAnisotropyStrength() !== target.anisotropy) {
259-
if (target.anisotropy === 0) target.needsUpdate = true;
260-
target.anisotropy = anisotropy.getAnisotropyStrength();
259+
if (anisotropy.getAnisotropyStrength() !== (target as any).anisotropy) {
260+
if ((target as any).anisotropy === 0) target.needsUpdate = true;
261+
(target as any).anisotropy = anisotropy.getAnisotropyStrength();
261262
}
262-
if (anisotropy.getAnisotropyRotation() !== target.anisotropyRotation) {
263-
target.anisotropyRotation = anisotropy.getAnisotropyRotation();
263+
if (anisotropy.getAnisotropyRotation() !== (target as any).anisotropyRotation) {
264+
(target as any).anisotropyRotation = anisotropy.getAnisotropyRotation();
264265
}
265266
} else {
266-
target.anisotropy = 0;
267+
(target as any).anisotropy = 0;
267268
}
268269

269270
// KHR_materials_clearcoat

0 commit comments

Comments
 (0)