Skip to content

Commit

Permalink
Update declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
Methuselah96 committed Jan 26, 2025
1 parent 6728b86 commit dcabd3e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
14 changes: 8 additions & 6 deletions types/three/src/renderers/common/XRManager.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ export interface XRManagerEventMap {
* manage XR sessions with `WebGPURenderer`.
*
* XR is currently only supported with a WebGL 2 backend.
*
* @augments EventDispatcher
*/
declare class XRManager extends EventDispatcher<XRManagerEventMap> {
enabled: boolean;
Expand Down Expand Up @@ -97,17 +99,17 @@ declare class XRManager extends EventDispatcher<XRManagerEventMap> {
*/
setFoveation(foveation: number): void;
/**
* Returns the frammebuffer scale factor.
* Returns the framebuffer scale factor.
*
* @return {Number} The frammebuffer scale factor.
* @return {Number} The framebuffer scale factor.
*/
getFramebufferScaleFactor(): number;
/**
* Sets the frammebuffer scale factor.
* Sets the framebuffer scale factor.
*
* This method can not be used during a XR session.
*
* @param {Number} factor - The frammebuffer scale factor.
* @param {Number} factor - The framebuffer scale factor.
*/
setFramebufferScaleFactor(factor: number): void;
/**
Expand Down Expand Up @@ -145,7 +147,7 @@ declare class XRManager extends EventDispatcher<XRManagerEventMap> {
/**
* Returns the environment blend mode from the current XR session.
*
* @return {'opaque'|'additive'|'alpha-blend'} The environment blend mode.
* @return {('opaque'|'additive'|'alpha-blend')?} The environment blend mode. Returns `null` when used outside of a XR session.
*/
getEnvironmentBlendMode(): XREnvironmentBlendMode | undefined;
/**
Expand All @@ -172,7 +174,7 @@ declare class XRManager extends EventDispatcher<XRManagerEventMap> {
setSession(session: XRSession): Promise<void>;
/**
* This method is called by the renderer per frame and updates the XR camera
* and it sub cameras based on the given camera. The given camera is the "normal"
* and it sub cameras based on the given camera. The given camera is the "user"
* camera created on application level and used for non-XR rendering.
*
* @param {PerspectiveCamera} camera - The camera.
Expand Down
6 changes: 3 additions & 3 deletions types/three/src/renderers/common/nodes/NodeBuilderState.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ declare class NodeBuilderState {
updateNodes: Node[];
updateBeforeNodes: Node[];
updateAfterNodes: Node[];
monitor: NodeMaterialObserver;
observer: NodeMaterialObserver;
usedTimes: number;
/**
* Constructs a new node builder state.
Expand All @@ -34,7 +34,7 @@ declare class NodeBuilderState {
* @param {Array<Node>} updateNodes - An array of nodes that implement their `update()` method.
* @param {Array<Node>} updateBeforeNodes - An array of nodes that implement their `updateBefore()` method.
* @param {Array<Node>} updateAfterNodes - An array of nodes that implement their `updateAfter()` method.
* @param {NodeMaterialObserver} monitor - A node material observer.
* @param {NodeMaterialObserver} observer - A node material observer.
* @param {Array<Object>} transforms - An array with transform attribute objects. Only relevant when using compute shaders with WebGL 2.
*/
constructor(
Expand All @@ -46,7 +46,7 @@ declare class NodeBuilderState {
updateNodes: Node[],
updateBeforeNodes: Node[],
updateAfterNodes: Node[],
monitor: NodeMaterialObserver,
observer: NodeMaterialObserver,
transforms?: never[],
);
/**
Expand Down

0 comments on commit dcabd3e

Please sign in to comment.