### wx.reLaunch Source: https://developers.weixin.qq.com/miniprogram/dev/api Closes all pages and opens a specified page. This is used to reset the navigation stack and start from a clean slate. ```APIDOC ## wx.reLaunch ### Description Closes all pages currently open and then opens the specified page. This function is useful for resetting the navigation stack and returning the user to a defined starting point within the mini program. ### Method wx.reLaunch ### Endpoint N/A (Client-side API) ### Parameters None ### Request Example ```javascript wx.reLaunch({ url: '/page/index/index' }); ``` ### Response Success: None Error: None specified ``` -------------------------------- ### wx.joinVoIPChat Source: https://developers.weixin.qq.com/miniprogram/dev/api Joins (creates) a real-time voice chat. Refer to the Real-time Voice Guide for more information. ```APIDOC ## wx.joinVoIPChat ### Description Joins (creates) a real-time voice chat. Refer to the Real-time Voice Guide for more information. ### Method N/A ### Endpoint N/A ``` -------------------------------- ### PreDownloadSubpackageTask Source: https://developers.weixin.qq.com/miniprogram/dev/api The pre-download subpackage task instance, used to get the download status. ```APIDOC ## PreDownloadSubpackageTask ### Description The pre-download subpackage task instance, used to get the download status. ### Methods - **PreDownloadSubpackageTask.onProgressUpdate(callback)**: Listens for subpackage loading progress events. ### Endpoint N/A (Client-side API) ### Parameters - **callback** (function): A function to be called with progress updates. ``` -------------------------------- ### MapContext Source: https://developers.weixin.qq.com/miniprogram/dev/api Provides methods to interact with and control the map component, such as adding markers, getting the current region, and moving the map. ```APIDOC ## MapContext ### Description MapContext instances are obtained via `wx.createMapContext`. They provide methods to control and query the state of a map component. ### Methods * **addArc**: Adds an arc to the map. Either `points` or `angle` must be set. * **addCustomLayer**: Adds a custom layer to the map. * **addGroundOverlay**: Creates a custom image layer that scales with the map zoom. * **addMarkers**: Adds markers to the map. * **addVisualLayer**: Adds a visual layer to the map. * **eraseLines**: Erases or grays out lines added to the map. * **executeVisualLayerCommand**: Executes a command on a visual layer, used in conjunction with `MapContext.on('visualLayerEvent')`. * **fromScreenLocation**: Converts screen coordinates (origin: top-left) to latitude and longitude. * **getCenterLocation**: Gets the latitude and longitude of the map's center. * **getRegion**: Gets the current visible region of the map. * **getRotate**: Gets the current rotation angle of the map. * **getScale**: Gets the current zoom level of the map. * **getSkew**: Gets the current skew angle of the map. * **includePoints**: Adjusts the map's viewport to include all specified points. * **initMarkerCluster**: Initializes marker clustering configuration. * **moveAlong**: Moves a marker along a specified path, useful for trajectory playback. * **moveToLocation**: Moves the map center to the current location. * **on**: Listens for map events. * **openMapApp**: Opens the map app for navigation. * **removeArc**: Removes an arc from the map. * **removeCustomLayer**: Removes a custom layer from the map. * **removeGroundOverlay**: Removes a custom image layer from the map. * **removeMarkers**: Removes markers from the map. * **removeVisualLayer**: Removes a visual layer from the map. * **setBoundary**: Limits the map's display range. * **setCenterOffset**: Sets an offset for the map's center. * **setLocMarkerIcon**: Sets the icon for the location marker. * **toScreenLocation**: Converts latitude and longitude to screen coordinates (origin: top-left). * **translateMarker**: Translates a marker with animation. * **updateGroundOverlay**: Updates a custom image layer. ``` -------------------------------- ### wx.openOfficialAccountArticle Source: https://developers.weixin.qq.com/miniprogram/dev/api Opens an official account article within the mini program. This function requires a user interaction to be triggered successfully. ```APIDOC ## wx.openOfficialAccountArticle ### Description Opens an article from an official account within the mini program. This function must be called in response to a user interaction (e.g., a click event) to ensure successful execution. ### Method wx.openOfficialAccountArticle ### Endpoint N/A (Client-side API) ### Parameters None ### Request Example ```javascript wx.openOfficialAccountArticle({ url: 'https://mp.weixin.qq.com/s/article_id' }); ``` ### Response Success: None Error: None specified ``` -------------------------------- ### getWorldCenterOfMass Source: https://developers.weixin.qq.com/miniprogram/dev/api/xr-frame/classes/Rigidbody.html Gets the Rigidbody's center of mass in world coordinates. ```APIDOC ## getWorldCenterOfMass ### Description Gets the Rigidbody's center of mass in world coordinates. ### Method - **Signature**: `getWorldCenterOfMass(): Vector3` ``` -------------------------------- ### wx.navigateBackMiniProgram Source: https://developers.weixin.qq.com/miniprogram/dev/api Navigates back to the previous mini program. This is used when returning from a mini program that was opened using `wx.navigateToMiniProgram`. ```APIDOC ## wx.navigateBackMiniProgram ### Description Navigates back to the previous mini program. This function is typically used after a user has navigated to another mini program using `wx.navigateToMiniProgram` and wishes to return. ### Method wx.navigateBackMiniProgram ### Endpoint N/A (Client-side API) ### Parameters None ### Request Example ```javascript wx.navigateBackMiniProgram(); ``` ### Response Success: None Error: None specified ``` -------------------------------- ### getRelativePointVelocity Source: https://developers.weixin.qq.com/miniprogram/dev/api/xr-frame/classes/Rigidbody.html Gets the velocity of a specific point on the Rigidbody in its local coordinates. ```APIDOC ## getRelativePointVelocity ### Description Gets the velocity of a specific point on the Rigidbody in its local coordinates. ### Method - **Signature**: `getRelativePointVelocity(relativePoint: Vector3): Vector3` ### Parameters - **`relativePoint`** (Vector3) - Required - The local-space position of the point. ``` -------------------------------- ### getPointVelocity Source: https://developers.weixin.qq.com/miniprogram/dev/api/xr-frame/classes/Rigidbody.html Gets the velocity of a specific point on the Rigidbody in world coordinates. ```APIDOC ## getPointVelocity ### Description Gets the velocity of a specific point on the Rigidbody in world coordinates. ### Method - **Signature**: `getPointVelocity(worldPoint: Vector3): Vector3` ### Parameters - **`worldPoint`** (Vector3) - Required - The world-space position of the point. ``` -------------------------------- ### wx.preDownloadSubpackage Source: https://developers.weixin.qq.com/miniprogram/dev/api Triggers the pre-download of a subpackage. ```APIDOC ## wx.preDownloadSubpackage ### Description Triggers the pre-download of a subpackage. ### Method `wx.preDownloadSubpackage(options)` ### Endpoint N/A (Client-side API) ### Parameters - **options** (object): Configuration for the subpackage download. - **package name** (string): The name of the subpackage to download. - **success** (function): Callback for successful download. - **fail** (function): Callback for failed download. - **complete** (function): Callback when the operation completes. ### Response - **PreDownloadSubpackageTask** (object) - A task object for monitoring download progress. ``` -------------------------------- ### wx.openEmbeddedMiniProgram Source: https://developers.weixin.qq.com/miniprogram/dev/api Opens a mini program in an embedded, half-screen mode. This allows for a more integrated experience with other mini programs. ```APIDOC ## wx.openEmbeddedMiniProgram ### Description Opens another mini program in an embedded, half-screen view. This provides a seamless way to integrate and interact with other mini programs without fully leaving the current one. ### Method wx.openEmbeddedMiniProgram ### Endpoint N/A (Client-side API) ### Parameters None ### Request Example ```javascript wx.openEmbeddedMiniProgram({ appId: 'wx_embedded_app_id', path: 'page/index/index' }); ``` ### Response Success: None Error: None specified ``` -------------------------------- ### wx.navigateToMiniProgram Source: https://developers.weixin.qq.com/miniprogram/dev/api Opens another mini program. This function allows users to navigate from the current mini program to a different one. ```APIDOC ## wx.navigateToMiniProgram ### Description Opens another mini program. This function facilitates navigation from the current mini program to a different one, allowing for a connected user experience across multiple mini programs. ### Method wx.navigateToMiniProgram ### Endpoint N/A (Client-side API) ### Parameters None ### Request Example ```javascript wx.navigateToMiniProgram({ appId: 'wx_target_app_id', path: 'page/index/index', extraData: { foo: 'bar' } }); ``` ### Response Success: None Error: None specified ``` -------------------------------- ### Rigidbody Version Source: https://developers.weixin.qq.com/miniprogram/dev/api/xr-frame/classes/Rigidbody.html Get the current version of the Rigidbody. This number increments with data updates and can be used for synchronization purposes. ```APIDOC ## Rigidbody Version ### Description Get the current version of the Rigidbody. This number increments with data updates and can be used for synchronization purposes. ### Method - **Method**: `get` - **Signature**: `version(): number` ### Returns - `number`: The current version. ``` -------------------------------- ### Vector4 Static Creation Methods Source: https://developers.weixin.qq.com/miniprogram/dev/api/xr-frame/classes/Vector4.html Documentation for static methods used to create new Vector4 instances. ```APIDOC ## Static Methods ### createFromArray(array: number[]): Vector4 - **Description**: Creates a Vector4 from an array of numbers. - **Parameters**: - `array` (number[]) - An array containing the x, y, z, and w components. ``` ```APIDOC ### createFromNumber(value: number): Vector4 - **Description**: Creates a Vector4 where all components are set to the given number. - **Parameters**: - `value` (number) - The value to set for all components. ``` ```APIDOC ### createFromTypedArray(array: Float32Array, offset?: number): Vector4 - **Description**: Creates a Vector4 from a Float32Array. - **Parameters**: - `array` (Float32Array) - The data source. - `offset` (number, optional) - The starting offset in the array. Defaults to 0. ``` -------------------------------- ### wx.createMediaRecorder Source: https://developers.weixin.qq.com/miniprogram/dev/api Creates a WebGL screen recorder that can record frames rendered on WebGL and export them as video files. ```APIDOC ## wx.createMediaRecorder ### Description Creates a WebGL screen recorder that can record frames rendered on WebGL and export them as video files. ### Method N/A ### Endpoint N/A ``` -------------------------------- ### wx.getPerformance Source: https://developers.weixin.qq.com/miniprogram/dev/api Retrieves performance-related information for the current mini program. ```APIDOC ## wx.getPerformance ### Description Retrieves performance-related information for the current mini program. ### Method `wx.getPerformance()` ### Endpoint N/A (Client-side API) ### Parameters None ### Response - **Performance** (object) - A Performance object containing performance data. ``` -------------------------------- ### Rigidbody Velocity Source: https://developers.weixin.qq.com/miniprogram/dev/api/xr-frame/classes/Rigidbody.html Get or set the linear velocity of the Rigidbody. Modifying this directly can cause abrupt changes; consider using `addForce` for smoother adjustments. ```APIDOC ## Rigidbody Velocity ### Description Get or set the linear velocity of the Rigidbody. Modifying this directly can cause abrupt changes; consider using `addForce` for smoother adjustments. ### Get Velocity - **Method**: `get` - **Signature**: `velocity(): Vector3` ### Set Velocity - **Method**: `set` - **Signature**: `velocity(v: Vector3): void` - **Parameters**: - `v` (Vector3) - The new linear velocity. ``` -------------------------------- ### wx.preloadWebview Source: https://developers.weixin.qq.com/miniprogram/dev/api Preloads the WebView for the next page. ```APIDOC ## wx.preloadWebview ### Description Preloads the WebView for the next page. ### Method `wx.preloadWebview(url)` ### Endpoint N/A (Client-side API) ### Parameters - **url** (string): The URL of the next page. ``` -------------------------------- ### wx.openInquiriesTopic Source: https://developers.weixin.qq.com/miniprogram/dev/api Opens a specific topic within the 'Inquiries' feature of the mini program. ```APIDOC ## wx.openInquiriesTopic ### Description Opens a specific topic within the 'Inquiries' feature of the mini program. This allows users to access and engage with predefined topics. ### Method wx.openInquiriesTopic ### Endpoint N/A (Client-side API) ### Parameters None ### Request Example ```javascript wx.openInquiriesTopic({ topicId: 'topic_123' }); ``` ### Response Success: None Error: None specified ``` -------------------------------- ### wx.preloadSkylineView Source: https://developers.weixin.qq.com/miniprogram/dev/api Preloads the Skyline rendering environment for the next page. ```APIDOC ## wx.preloadSkylineView ### Description Preloads the Skyline rendering environment for the next page. ### Method `wx.preloadSkylineView()` ### Endpoint N/A (Client-side API) ### Parameters None ``` -------------------------------- ### Real-time Audio/Video API Source: https://developers.weixin.qq.com/miniprogram/dev/api Functions for creating contexts for live streaming pushers and players. ```APIDOC ## Real-time Audio/Video API ### Description Provides functions to create contexts for real-time audio and video streaming. ### Functions - `wx.createLivePusherContext()`: Creates a `LivePusherContext` object for live pushing. - `wx.createLivePlayerContext()`: Creates a `LivePlayerContext` object for live playing. ``` -------------------------------- ### wx.openChatTool Source: https://developers.weixin.qq.com/miniprogram/dev/api Enters the chat tool mode. This mode likely provides specialized functionalities for interacting with chat features. ```APIDOC ## wx.openChatTool ### Description Enters the chat tool mode. This mode likely provides specialized functionalities and UI elements for enhanced interaction with chat features within the mini program. ### Method wx.openChatTool ### Endpoint N/A (Client-side API) ### Parameters None ### Request Example ```javascript wx.openChatTool(); ``` ### Response Success: None Error: None specified ``` -------------------------------- ### wx.preloadAssets Source: https://developers.weixin.qq.com/miniprogram/dev/api Preloads media assets for the view layer. ```APIDOC ## wx.preloadAssets ### Description Preloads media assets for the view layer. Currently supports: font, image. ### Method `wx.preloadAssets(assets)` ### Endpoint N/A (Client-side API) ### Parameters - **assets** (Array): An array of asset objects to preload. - **type** (string): The type of asset (e.g., 'font', 'image'). - **url** (string): The URL of the asset. ``` -------------------------------- ### enable Source: https://developers.weixin.qq.com/miniprogram/dev/api/xr-frame/classes/Rigidbody.html Enables the Rigidbody, reactivating physics simulation for this object. ```APIDOC ## enable ### Description Enables the Rigidbody, reactivating physics simulation for this object. ### Method - **Signature**: `enable(): void` ``` -------------------------------- ### WebAudioContext Methods Source: https://developers.weixin.qq.com/miniprogram/dev/api Methods for creating and managing a WebAudioContext instance for advanced audio processing. ```APIDOC ## WebAudioContext Methods ### Description Provides methods to create and manage audio nodes and context for advanced audio processing, obtained via `wx.createWebAudioContext`. ### Methods - `close()`: Closes the WebAudioContext. - `createAnalyser()`: Creates an AnalyserNode. - `createBiquadFilter()`: Creates a BiquadFilterNode. - `createBuffer(buffer)`: Creates an AudioBuffer. - `createBufferSource()`: Creates a BufferSourceNode. - `createChannelMerger()`: Creates a ChannelMergerNode. - `createChannelSplitter()`: Creates a ChannelSplitterNode. - `createConstantSource()`: Creates a ConstantSourceNode. - `createDelay()`: Creates a DelayNode. - `createDynamicsCompressor()`: Creates a DynamicsCompressorNode. - `createGain()`: Creates a GainNode. - `createIIRFilter(filter)`: Creates an IIRFilterNode. - `createOscillator()`: Creates an OscillatorNode. - `createPanner()`: Creates a PannerNode. - `createPeriodicWave(real, imag)`: Creates a PeriodicWaveNode. - `createScriptProcessor(bufferSize, numberOfInputChannels, numberOfOutputChannels)`: Creates a ScriptProcessorNode. - `createWaveShaper()`: Creates a WaveShaperNode. - `decodeAudioData(arrayBuffer, success, fail)`: Asynchronously decodes audio data into an AudioBuffer. - `resume()`: Resumes a suspended WebAudioContext. - `suspend()`: Suspends the WebAudioContext. ``` -------------------------------- ### LivePlayerContext Methods Source: https://developers.weixin.qq.com/miniprogram/dev/api Methods for controlling and managing a LivePlayerContext instance. ```APIDOC ## LivePlayerContext Methods ### Description Provides methods to control and manage a `LivePlayerContext` instance obtained via `wx.createLivePlayerContext`. ### Methods - `exitBackgroundPlayback()`: Exits background picture-in-picture playback mode. - `exitCasting()`: Exits screen casting. - `exitFullScreen()`: Exits full-screen mode. - `exitPictureInPicture()`: Exits picture-in-picture mode (can be called from any page). - `mute()`: Mutes the audio. - `pause()`: Pauses playback. - `play()`: Resumes playback. - `reconnectCasting()`: Reconnects to the casting device. - `requestBackgroundPlayback()`: Enters background picture-in-picture playback mode. - `requestFullScreen()`: Enters full-screen mode. - `resume()`: Resumes playback. - `snapshot()`: Takes a snapshot. - `startCasting()`: Starts screen casting, initiating a half-screen device search. - `stop()`: Stops playback. - `switchCasting()`: Switches the casting device. ``` -------------------------------- ### Vector4 Methods Source: https://developers.weixin.qq.com/miniprogram/dev/api/xr-frame/classes/Vector4.html Documentation for the instance methods available on Vector4 objects. ```APIDOC ## Methods ### add(vector: Vector4): Vector4 - **Description**: Adds another Vector4 to this Vector4. - **Parameters**: - `vector` (Vector4) - The vector to add. - **Returns**: A new Vector4 representing the sum. ``` ```APIDOC ### clone(): Vector4 - **Description**: Creates a clone of this Vector4. - **Returns**: A new Vector4 that is a copy of this Vector4. ``` ```APIDOC ### dot(vector: Vector4): number - **Description**: Computes the dot product between this Vector4 and another Vector4. - **Parameters**: - `vector` (Vector4) - The vector to compute the dot product with. - **Returns**: The dot product as a number. ``` ```APIDOC ### equal(vector: Vector4): boolean - **Description**: Checks if this Vector4 is equal to another Vector4. - **Parameters**: - `vector` (Vector4) - The vector to compare with. - **Returns**: True if the vectors are equal, false otherwise. ``` ```APIDOC ### isZero(): boolean - **Description**: Checks if this Vector4 is the zero vector. - **Returns**: True if all components are zero, false otherwise. ``` ```APIDOC ### lerp(vector: Vector4, t: number): Vector4 - **Description**: Performs linear interpolation between this Vector4 and another Vector4. - **Parameters**: - `vector` (Vector4) - The target vector. - `t` (number) - The interpolation factor (0 to 1). - **Returns**: A new Vector4 representing the interpolated value. ``` ```APIDOC ### negate(): Vector4 - **Description**: Negates the components of this Vector4. - **Returns**: A new Vector4 with negated components. ``` ```APIDOC ### scale(scalar: number): Vector4 - **Description**: Scales this Vector4 by a scalar value. - **Parameters**: - `scalar` (number) - The scalar value to multiply by. - **Returns**: A new Vector4 with scaled components. ``` ```APIDOC ### set(x: number, y: number, z: number, w: number): void - **Description**: Sets the components of this Vector4. - **Parameters**: - `x` (number) - The value for the x component. - `y` (number) - The value for the y component. - `z` (number) - The value for the z component. - `w` (number) - The value for the w component. ``` ```APIDOC ### setArray(array: Float32Array, offset?: number): void - **Description**: Sets the components of this Vector4 from a Float32Array. - **Parameters**: - `array` (Float32Array) - The data source. - `offset` (number, optional) - The starting offset in the array. Defaults to 0. ``` ```APIDOC ### setValue(vector: Vector4): void - **Description**: Sets the components of this Vector4 to the values of another Vector4. - **Parameters**: - `vector` (Vector4) - The source Vector4. ``` ```APIDOC ### sub(vector: Vector4): Vector4 - **Description**: Subtracts another Vector4 from this Vector4. - **Parameters**: - `vector` (Vector4) - The vector to subtract. - **Returns**: A new Vector4 representing the difference. ``` ```APIDOC ### toArray(): number[] - **Description**: Converts this Vector4 to an array of numbers. - **Returns**: An array containing the x, y, z, and w components. ``` -------------------------------- ### wx.enterChatToolMode Source: https://developers.weixin.qq.com/miniprogram/dev/api Enters the open capabilities mode for chat tools. This likely enables specific chat-related functionalities. ```APIDOC ## wx.enterChatToolMode ### Description Enters the open capabilities mode for chat tools. This action likely enables specific chat-related functionalities and interfaces that are part of the chat tool ecosystem. ### Method wx.enterChatToolMode ### Endpoint N/A (Client-side API) ### Parameters None ### Request Example ```javascript wx.enterChatToolMode(); ``` ### Response Success: None Error: None specified ``` -------------------------------- ### wx.navigateTo Source: https://developers.weixin.qq.com/miniprogram/dev/api Preserves the current page and navigates to a new page. This allows users to go back to the previous page using the back button. ```APIDOC ## wx.navigateTo ### Description Preserves the current page and navigates to a new page within the application. This function allows users to return to the previous page using the standard back navigation. ### Method wx.navigateTo ### Endpoint N/A (Client-side API) ### Parameters None ### Request Example ```javascript wx.navigateTo({ url: '/page/detail/index?id=123' }); ``` ### Response Success: None Error: None specified ``` -------------------------------- ### wx.restartMiniProgram Source: https://developers.weixin.qq.com/miniprogram/dev/api Restarts the current mini program. This action effectively closes and reopens the mini program. ```APIDOC ## wx.restartMiniProgram ### Description Restarts the current mini program. This action is equivalent to closing the mini program and then reopening it. ### Method wx.restartMiniProgram ### Endpoint N/A (Client-side API) ### Parameters None ### Request Example ```javascript wx.restartMiniProgram(); ``` ### Response Success: None Error: None specified ``` -------------------------------- ### MediaRecorder Source: https://developers.weixin.qq.com/miniprogram/dev/api Represents a screen recorder created via wx.createMediaRecorder. ```APIDOC ## MediaRecorder ### Description Represents a screen recorder created via wx.createMediaRecorder. ### Methods - **destroy**(): Destroys the recorder. - **off**(): Cancels listening to recording events. - **on**(): Registers a callback function for listening to recording events. - **pause**(): Pauses recording. - **requestFrame**(): Requests the next frame for recording. The current frame is recorded after the frame rendering is completed in the callback. - **resume**(): Resumes recording. - **start**(): Starts recording. - **stop**(): Stops recording. ``` -------------------------------- ### wx.showShareImageMenu Source: https://developers.weixin.qq.com/miniprogram/dev/api Opens a share image pop-up window. Users can then choose to share the image to friends, moments, or save it. ```APIDOC ## wx.showShareImageMenu ### Description Opens a pop-up window for sharing an image. Users can select from options to share the image with friends, post it to their moments, or save it locally. ### Method wx.showShareImageMenu ### Endpoint N/A (Client-side API) ### Parameters None ### Request Example ```javascript wx.showShareImageMenu({ imageUrl: 'https://example.com/image.png' }); ``` ### Response Success: None Error: None specified ``` -------------------------------- ### MediaAudioPlayer Methods Source: https://developers.weixin.qq.com/miniprogram/dev/api Methods for managing a MediaAudioPlayer instance. ```APIDOC ## MediaAudioPlayer Methods ### Description Provides methods to manage an audio player instance obtained via `wx.createMediaAudioPlayer`. ### Methods - `addAudioSource(source)`: Adds an audio source to the player. - `destroy()`: Destroys the audio player instance. - `removeAudioSource(source)`: Removes an audio source from the player. - `start()`: Starts the audio player. - `stop()`: Stops the audio player. ``` -------------------------------- ### wx.reportPerformance Source: https://developers.weixin.qq.com/miniprogram/dev/api Reports performance data for the mini program. ```APIDOC ## wx.reportPerformance ### Description Reports performance data for the mini program. ### Method `wx.reportPerformance(data)` ### Endpoint N/A (Client-side API) ### Parameters - **data** (object): Performance data to report. ``` -------------------------------- ### wx.showShareMenu Source: https://developers.weixin.qq.com/miniprogram/dev/api Makes the share button in the top-right corner menu visible and available. This enables users to initiate sharing actions. ```APIDOC ## wx.showShareMenu ### Description Makes the share button in the top-right corner menu visible and available to the user. This function enables users to initiate sharing actions from the mini program's interface. ### Method wx.showShareMenu ### Endpoint N/A (Client-side API) ### Parameters None ### Request Example ```javascript wx.showShareMenu({ withShareTicket: true }); ``` ### Response Success: None Error: None specified ``` -------------------------------- ### wx.onCopyUrl Source: https://developers.weixin.qq.com/miniprogram/dev/api Listens for the event triggered when a user clicks the 'Copy Link' button in the top-right corner menu. ```APIDOC ## wx.onCopyUrl ### Description Listens for the event triggered when a user clicks the 'Copy Link' button in the top-right corner menu. This allows developers to track or react to link copying actions. ### Method wx.onCopyUrl ### Endpoint N/A (Client-side API) ### Parameters None ### Request Example ```javascript wx.onCopyUrl(function(res) { console.log('User copied the link.'); }); ``` ### Response Success: None Error: None specified ``` -------------------------------- ### BackgroundAudioManager Methods Source: https://developers.weixin.qq.com/miniprogram/dev/api Methods for controlling and listening to events on the global BackgroundAudioManager instance. ```APIDOC ## BackgroundAudioManager Methods ### Description Provides methods to manage background audio playback and listen to various playback events on the `BackgroundAudioManager` instance. ### Methods - `onCanplay(callback)`: Listens for the background audio entering a playable state. - `onEnded(callback)`: Listens for the background audio naturally ending. - `onError(callback)`: Listens for background audio playback errors. - `onNext(callback)`: Listens for the user clicking the next track button on the system music playback panel. - `onPause(callback)`: Listens for the background audio pause event. - `onPlay(callback)`: Listens for the background audio play event. - `onPrev(callback)`: Listens for the user clicking the previous track button on the system music playback panel. - `onSeeked(callback)`: Listens for the background audio seeked event. - `onSeeking(callback)`: Listens for the background audio seeking event. - `onStop(callback)`: Listens for the background audio stop event. - `onTimeUpdate(callback)`: Listens for background audio playback progress updates (only callbacks when the mini program is in the foreground). - `onWaiting(callback)`: Listens for the audio loading event. - `pause()`: Pauses the background music. - `play(options)`: Plays the background music. - `seek(position)`: Seeks to a specified position in the background audio. - `stop()`: Stops the background music. ``` -------------------------------- ### wx.exitMiniProgram Source: https://developers.weixin.qq.com/miniprogram/dev/api Exits the current mini program. This action closes the mini program and returns the user to the WeChat interface. ```APIDOC ## wx.exitMiniProgram ### Description Exits the current mini program. This action closes the mini program and returns the user to the WeChat application interface. ### Method wx.exitMiniProgram ### Endpoint N/A (Client-side API) ### Parameters None ### Request Example ```javascript wx.exitMiniProgram(); ``` ### Response Success: None Error: None specified ``` -------------------------------- ### wx.onEmbeddedMiniProgramHeightChange Source: https://developers.weixin.qq.com/miniprogram/dev/api Listens for changes in the visible height of an embedded mini program. This is useful for adjusting the layout of the parent mini program. ```APIDOC ## wx.onEmbeddedMiniProgramHeightChange ### Description Listens for events indicating a change in the visible height of an embedded mini program. This is useful for dynamically adjusting the layout or behavior of the parent mini program based on the embedded content's size. ### Method wx.onEmbeddedMiniProgramHeightChange ### Endpoint N/A (Client-side API) ### Parameters None ### Request Example ```javascript wx.onEmbeddedMiniProgramHeightChange(function(res) { console.log('Embedded mini program height changed:', res.height); }); ``` ### Response Success: None Error: None specified ``` -------------------------------- ### useParamsEaseFuncs Source: https://developers.weixin.qq.com/miniprogram/dev/api/xr-frame/modules.html A collection of easing functions that allow for custom parameter configuration. ```APIDOC ## useParamsEaseFuncs ### Description Easing functions that allow for custom parameter configuration. ### Type Declaration | Name | Type | |---------------|--------------------------------------------------| | `cubic-bezier`| (`times`: `number`[], `params`: `number`[]) => (`x`: `number`) => `number` | | `steps` | (`times`: `number`[], `params`: `number`[]) => (`x`: `number`) => `number` | ``` -------------------------------- ### Quaternion Constructors Source: https://developers.weixin.qq.com/miniprogram/dev/api/xr-frame/classes/Quaternion.html Details the available constructors for creating Quaternion objects. ```APIDOC ## Constructors ### Object() - **Description**: Creates a new Quaternion object. (Note: This appears to be a native JavaScript constructor and might not be directly callable in the intended way for creating specific Quaternion instances.) - **Usage**: `new Object()` ``` -------------------------------- ### wx.openOfficialAccountProfile Source: https://developers.weixin.qq.com/miniprogram/dev/api Opens the official account profile page within the mini program. This allows users to view details about a linked official account. ```APIDOC ## wx.openOfficialAccountProfile ### Description Opens the profile page of an official account within the mini program. This allows users to view information and interact with the official account. ### Method wx.openOfficialAccountProfile ### Endpoint N/A (Client-side API) ### Parameters None ### Request Example ```javascript wx.openOfficialAccountProfile({ username: 'gh_xxxxxxxxxxxx' }); ``` ### Response Success: None Error: None specified ``` -------------------------------- ### wx.openOfficialAccountChat Source: https://developers.weixin.qq.com/miniprogram/dev/api Opens the chat interface for an official account within the mini program. Users can then send messages to the official account. ```APIDOC ## wx.openOfficialAccountChat ### Description Opens the chat interface for a specific official account within the mini program. This allows users to initiate a conversation with the official account. ### Method wx.openOfficialAccountChat ### Endpoint N/A (Client-side API) ### Parameters None ### Request Example ```javascript wx.openOfficialAccountChat({ username: 'gh_xxxxxxxxxxxx' }); ``` ### Response Success: None Error: None specified ``` -------------------------------- ### wx.switchTab Source: https://developers.weixin.qq.com/miniprogram/dev/api Navigates to a tabBar page and closes all other non-tabBar pages. This is used for switching between the main navigation sections of the mini program. ```APIDOC ## wx.switchTab ### Description Navigates to a tabBar page, closing all other non-tabBar pages. This function is essential for switching between the primary navigation sections of the mini program. ### Method wx.switchTab ### Endpoint N/A (Client-side API) ### Parameters None ### Request Example ```javascript wx.switchTab({ url: '/page/tabbar/home/index' }); ``` ### Response Success: None Error: None specified ``` -------------------------------- ### wx.join1v1Chat Source: https://developers.weixin.qq.com/miniprogram/dev/api Joins (creates) a one-on-one voice chat. ```APIDOC ## wx.join1v1Chat ### Description Joins (creates) a one-on-one voice chat. ### Method N/A ### Endpoint N/A ``` -------------------------------- ### AudioContext Source: https://developers.weixin.qq.com/miniprogram/dev/api Provides methods to control audio playback, such as play, pause, seek, and set the audio source. ```APIDOC ## AudioContext ### Description An `AudioContext` instance, obtained via `wx.createAudioContext`, provides methods to control audio playback. ### Methods * **pause**: Pauses the audio playback. * **play**: Plays the audio. * **seek**: Seeks to a specified position in the audio. * **setSrc**: Sets the audio source URL. ``` -------------------------------- ### EntryList Source: https://developers.weixin.qq.com/miniprogram/dev/api Represents a list of performance entries. ```APIDOC ## EntryList ### Description Represents a list of performance entries. ### Methods - **EntryList.getEntries()**: Returns all performance data in the current list. - **EntryList.getEntriesByName(name, entryType)**: Gets all performance data in the current list with the specified name and type. - **EntryList.getEntriesByType(entryType)**: Gets all performance data in the current list of the specified type. ### Endpoint N/A (Client-side API) ### Parameters - **name** (string): The name of the performance entry. - **entryType** (string): The type of the performance entry. ``` -------------------------------- ### wx.shareToOfficialAccount Source: https://developers.weixin.qq.com/miniprogram/dev/api Allows users to post images and text as stickers to an official account. This function likely triggers a sticker posting interface. ```APIDOC ## wx.shareToOfficialAccount ### Description Supports launching a sticker posting page where users can publish images and text content as stickers to an official account. This function facilitates content creation and sharing to official accounts. ### Method wx.shareToOfficialAccount ### Endpoint N/A (Client-side API) ### Parameters None ### Request Example ```javascript wx.shareToOfficialAccount({ imageUrl: 'https://example.com/image.png', title: 'My sticker post' }); ``` ### Response Success: None Error: None specified ``` -------------------------------- ### wx.navigateBack Source: https://developers.weixin.qq.com/miniprogram/dev/api Closes the current page and returns to the previous page or a specified number of pages back in the history. ```APIDOC ## wx.navigateBack ### Description Closes the current page and navigates back to the previous page in the history stack. It can also navigate back a specified number of pages. ### Method wx.navigateBack ### Endpoint N/A (Client-side API) ### Parameters None ### Request Example ```javascript // Navigate back one page wx.navigateBack(); // Navigate back two pages wx.navigateBack({ delta: 2 }); ``` ### Response Success: None Error: None specified ``` -------------------------------- ### wx.redirectTo Source: https://developers.weixin.qq.com/miniprogram/dev/api Closes the current page and redirects to another page within the application. This is a direct navigation without preserving the previous page state. ```APIDOC ## wx.redirectTo ### Description Closes the current page and redirects the user to a specified page within the application. This is a direct navigation that does not keep the previous page in the history stack. ### Method wx.redirectTo ### Endpoint N/A (Client-side API) ### Parameters None ### Request Example ```javascript wx.redirectTo({ url: '/page/user/profile' }); ``` ### Response Success: None Error: None specified ``` -------------------------------- ### Audio APIs Source: https://developers.weixin.qq.com/miniprogram/dev/api APIs for playing, pausing, stopping, and managing audio playback. ```APIDOC ## Audio APIs ### Description APIs for managing audio playback, including creating audio contexts, setting options, and controlling playback for voice, inner audio, and web audio. ### Methods * **wx.stopVoice**: Stops playing voice. * **wx.setInnerAudioOption**: Sets playback options for `InnerAudioContext`. * **wx.playVoice**: Starts playing voice. * **wx.pauseVoice**: Pauses the currently playing voice. * **wx.getAvailableAudioSources**: Gets the currently supported audio input sources. * **wx.createWebAudioContext**: Creates a WebAudio context. * **wx.createMediaAudioPlayer**: Creates a `MediaAudioPlayer` object for playing audio decoded by `VideoDecoder`. * **wx.createInnerAudioContext**: Creates an `InnerAudioContext` object. * **wx.createAudioContext**: Creates an `AudioContext` object. ``` -------------------------------- ### VideoContext Source: https://developers.weixin.qq.com/miniprogram/dev/api Provides methods to control video playback, such as play, pause, seek, and manage fullscreen or background modes. ```APIDOC ## VideoContext ### Description VideoContext instances are obtained via `wx.createVideoContext`. They provide methods to control video playback, including fullscreen, background playback, and sending danmaku. ### Methods * **exitBackgroundPlayback**: Exits background picture-in-picture playback mode. * **exitCasting**: Exits screen casting. * **exitFullScreen**: Exits fullscreen mode. * **exitPictureInPicture**: Exits picture-in-picture mode. This method can be called on any page. * **hideStatusBar**: Hides the status bar, effective only in iOS fullscreen. * **pause**: Pauses the video playback. * **play**: Plays the video. * **playbackRate**: Sets the playback speed. * **reconnectCasting**: Reconnects to a casting device. * **requestBackgroundPlayback**: Enters background picture-in-picture playback mode. * **requestFullScreen**: Enters fullscreen mode. * **seek**: Seeks to a specified position in the video. * **sendDanmu**: Sends danmaku (bullet comments). * **showStatusBar**: Shows the status bar, effective only in iOS fullscreen. * **startCasting**: Starts screen casting, initiating a half-screen device search. * **stop**: Stops the video playback. * **switchCasting**: Switches the casting device. ``` -------------------------------- ### InnerAudioContext Methods Source: https://developers.weixin.qq.com/miniprogram/dev/api Methods for controlling and listening to events on an InnerAudioContext instance. ```APIDOC ## InnerAudioContext Methods ### Description Provides methods to manage audio playback events and control playback. ### Methods - `offPause()`: Removes the listener for the audio pause event. - `offPlay()`: Removes the listener for the audio play event. - `offSeeked()`: Removes the listener for the audio seeked event. - `offSeeking()`: Removes the listener for the audio seeking event. - `offStop()`: Removes the listener for the audio stop event. - `offTimeUpdate()`: Removes the listener for the audio time update event. - `offWaiting()`: Removes the listener for the audio waiting event. - `onCanplay()`: Listens for the audio entering a playable state. - `onEnded()`: Listens for the audio naturally playing to the end. - `onError()`: Listens for audio playback errors. - `onPause()`: Listens for the audio pause event. - `onPlay()`: Listens for the audio play event. - `onSeeked()`: Listens for the audio seeked event. - `onSeeking()`: Listens for the audio seeking event. - `onStop()`: Listens for the audio stop event. - `onTimeUpdate()`: Listens for the audio playback progress update event. - `onWaiting()`: Listens for the audio loading event. - `pause()`: Pauses the audio playback. - `play()`: Plays the audio. - `seek(position)`: Seeks to a specified position in the audio. - `stop()`: Stops the audio playback. ``` -------------------------------- ### wx.getUserCryptoManager Source: https://developers.weixin.qq.com/miniprogram/dev/api Retrieves the user crypto manager. ```APIDOC ## wx.getUserCryptoManager ### Description Retrieves the user crypto manager. ### Method `wx.getUserCryptoManager()` ### Endpoint N/A (Client-side API) ### Parameters None ### Response - **UserCryptoManager** (object) - An instance of the UserCryptoManager. ``` -------------------------------- ### wx.createVideoDecoder Source: https://developers.weixin.qq.com/miniprogram/dev/api Creates a video decoder that can obtain decoded data frame by frame. ```APIDOC ## wx.createVideoDecoder ### Description Creates a video decoder that can obtain decoded data frame by frame. ### Method N/A ### Endpoint N/A ``` -------------------------------- ### priority Source: https://developers.weixin.qq.com/miniprogram/dev/api/xr-frame/classes/PhysicsSystem.html Sets the priority for the physics system's update order. ```APIDOC ## priority ### Description Sets the priority for the physics system's update order. ### Type (Type not specified, likely number) ### Access (Access type not specified, likely read-write) ``` -------------------------------- ### wx.router Source: https://developers.weixin.qq.com/miniprogram/dev/api Provides access to the router object, which can be used to manage custom routing configurations. ```APIDOC ## wx.router ### Description Provides access to the router object, which is the entry point for managing custom routing configurations within the mini program. ### Method wx.router ### Endpoint N/A (Client-side API) ### Parameters None ### Request Example ```javascript const router = wx.router; ``` ### Response Returns the router object. ``` -------------------------------- ### wx.rewriteRoute Source: https://developers.weixin.qq.com/miniprogram/dev/api Rewrites the current routing event. This advanced feature allows for custom handling of navigation flows within the mini program. ```APIDOC ## wx.rewriteRoute ### Description Rewrites a routing event that is currently in progress. This provides advanced control over navigation flows, allowing developers to intercept and modify routing behavior. ### Method wx.rewriteRoute ### Endpoint N/A (Client-side API) ### Parameters Refer to the '路由重写' documentation for details on parameters. ### Request Example ```javascript // Example usage depends on the '路由重写' documentation wx.rewriteRoute(...); ``` ### Response Success: None Error: None specified ``` -------------------------------- ### applyData Source: https://developers.weixin.qq.com/miniprogram/dev/api/xr-frame/classes/Rigidbody.html Applies a complete set of Rigidbody data. ```APIDOC ## applyData ### Description Applies a complete set of Rigidbody data. ### Method - **Signature**: `applyData(data: IRigidbodyData): void` ### Parameters - **`data`** (IRigidbodyData) - Required - The Rigidbody data to apply. ```