Skip to content

Fix API exposing threejs properties#4502

Merged
diegoteran merged 8 commits intomasterfrom
fixApi
Oct 6, 2023
Merged

Fix API exposing threejs properties#4502
diegoteran merged 8 commits intomasterfrom
fixApi

Conversation

@diegoteran
Copy link
Collaborator

Removes ThreeJS' TextureFilter leak in our API

@diegoteran diegoteran requested a review from elalish October 6, 2023 20:40
Filter.LinearMipmapLinear,
Filter.NearestMipmapLinear,
Filter.LinearMipmapLinear
const minFilterValues: Array<MinificationTextureFilter> = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you just use minificationToMinFilter instead of creating this extra list?

const magFilterValues: Array<MagFilter> = [Filter.Nearest, Filter.Linear];
return (value: unknown): value is MagFilter =>
magFilterValues.indexOf(value as MagFilter) > -1;
const magFilterValues: Array<MagnificationTextureFilter> =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

likewise.

@@ -1,5 +1,3 @@
import {TextureFilter} from 'three';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@diegoteran diegoteran requested a review from elalish October 6, 2023 21:18
Copy link
Contributor

@elalish elalish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@diegoteran diegoteran merged commit 87794cc into master Oct 6, 2023
@diegoteran diegoteran deleted the fixApi branch October 6, 2023 22:26
JL-Vidinoti pushed a commit to vidinoti/model-viewer that referenced this pull request Apr 22, 2024
* Add fix for Wrapping exposed

* Add example

* Fix sampler updating

* Added WrapMode comment

* Remove TextureFilter from gltf-2.0

We should not expose threejs from our public api.

* clean

* Clean and reused maps.
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.

2 participants