Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

three/examples/jsm/utils/SceneUtils does not work. #153

Closed
Kyohei-Ishihara opened this issue Jan 3, 2022 · 3 comments
Closed

three/examples/jsm/utils/SceneUtils does not work. #153

Kyohei-Ishihara opened this issue Jan 3, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@Kyohei-Ishihara
Copy link

SceneUtils is defined as namespace in SceneUtils.d.ts.
SceneUtils.js does not support it

@Kyohei-Ishihara Kyohei-Ishihara added the bug Something isn't working label Jan 3, 2022
@joshuaellis
Copy link
Member

Please provide more information with an perhaps a codesandbox example of the issue so we can correctly look into it.

@Kyohei-Ishihara
Copy link
Author

import { SceneUtils } from "three/examples/jsm/utils/SceneUtils";

const mesh = SceneUtils.createMultiMaterialObject(geoms[i], materials);

This code can be compiled, but it doesn't work. Error is that SceneUtils not found in three/examples/jsm/utils/SceneUtils (on Terminal). createMultiMaterialObject is not a function(on Console).
The reason is as follows.

  • createMultiMaterialObject is defined into namespace(SceneUtils) in SceneUtils.d.ts.
  • But createMultiMaterialObject is not defined into namespace(SceneUtils) on SceneUtils.js.

@b1616
Copy link

b1616 commented Jan 16, 2022

I believe it may have resulted from this change mrdoob/three.js#22284 which does as @Kyohei-Ishihara described, changing a handful of util functions that were previously defined in classes to being plain functions to facilitate tree shaking.

joshuaellis added a commit that referenced this issue Mar 1, 2022
* fix(WebXRManager): setAnimationLoop should accept null like WebGLRenderer (#158)

* fix: Missing Property in Raycaster (#160)

* Fix Missing Property in Raycaster

Adds uv2 to Intersection interface to more accurately reflect the original documentation.

See: (https://threejs.org/docs/#api/en/core/Raycaster.intersectObject)[https://threejs.org/docs/#api/en/core/Raycaster.intersectObject]
This has been submitted in response to Josh's request in (this PR)[DefinitelyTyped/DefinitelyTyped#58462]

* Add name to contributors

* r137 (#162)

* feat: autodetect sRGB compression

* feat: remove inline sRGB decode

* chore: remove roughness mipmapper

* feat: added constant SRGB8

* feat: WebGLCubeUVMaps: Add support for render targets

* chore: Remove RGBFormat (#159)

* change: Remove RGBFormat

See: mrdoob/three.js#23223
See: mrdoob/three.js#23228

* change: Remove .format from Material

See: mrdoob/three.js#23219

It will be replaced with .alphaWrite later

See: mrdoob/three.js#23166

* test: remove use of RGBFormat from a test case

* feat: add LDrawUtils

* chore: make ConvexGeometry points optional

* chore: remove RGBIntegerFormat

* feat: Box3 now supports computing minimal bounds for setFromObject

* feat(Material): Add a new property .alphaWrite (#161)

Since it's undocumented I could not fill the doc comment properly,,,

See: mrdoob/three.js#23166

* chore: remove UnsignedShort565Type

* chore: remove RoomEnvironment from OTHER_FILES

* chore: remove LDrawLoader from OTHER_FILES

* chore: fix linting

* chore: fix linting

Co-authored-by: 0b5vr <[email protected]>

* feat: add PackedPhongMaterial

* fix: Scene Utils are not in namespace

resolves #153

* r137

* change (Material): remove `alphaWrite`

See: mrdoob/three.js#23361

Co-authored-by: Cody Bennett <[email protected]>
Co-authored-by: Joe Tipping <[email protected]>
Co-authored-by: Josh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants