Skip to content

Conversation

@CodyJasonBennett
Copy link
Contributor

@CodyJasonBennett CodyJasonBennett commented Jan 23, 2022

Why

WebXRManager#setAnimationLoop is called internally by WebGLRenderer#setAnimationLoop to update camera and controller internals with the viewer's pose. Although they are passed the same callback, only WebGLRenderer's signature will accept null for a callback. There, a falsy value will stop the internal animation used to drive the animation loop. WebXRManager will only start/stop when sessions init/end but will respect WebGLRenderer's signature as it is called internally.

What

I've updated WebXRManager's signature to match.

Checklist

  • Added myself to contributors table
  • Ready to be merged

@joshuaellis joshuaellis merged commit 8879303 into three-types:master Jan 27, 2022
@CodyJasonBennett CodyJasonBennett deleted the fix/webxrmanager-setanimationloop branch January 27, 2022 09:06
joshuaellis added a commit that referenced this pull request 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 <0b5vr@0b5vr.com>

* 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 <hi@codyb.co>
Co-authored-by: Joe Tipping <39060404+Gallahron@users.noreply.github.com>
Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
MykhailoStrelnykov pushed a commit to Chronos-Samples/three-ts-types that referenced this pull request Dec 22, 2025
MykhailoStrelnykov pushed a commit to Chronos-Samples/three-ts-types that referenced this pull request Dec 22, 2025
* fix(WebXRManager): setAnimationLoop should accept null like WebGLRenderer (three-types#158)

* fix: Missing Property in Raycaster (three-types#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 (three-types#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 (three-types#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 (three-types#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 <0b5vr@0b5vr.com>

* feat: add PackedPhongMaterial

* fix: Scene Utils are not in namespace

resolves three-types#153

* r137

* change (Material): remove `alphaWrite`

See: mrdoob/three.js#23361

Co-authored-by: Cody Bennett <hi@codyb.co>
Co-authored-by: Joe Tipping <39060404+Gallahron@users.noreply.github.com>
Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
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