### High Performance Setup Example Source: https://threepipe.org/docs/classes/SSAOPlugin.html Illustrates how to create and add an SSAOPlugin with specific performance-oriented settings, such as a smaller size multiplier. ```APIDOC ## High Performance Setup ```javascript const ssaoPlugin = new SSAOPlugin( UnsignedByteType, // Buffer type 0.5, // Size multiplier for better performance true, // Enabled 1 // Packing mode ) viewer.addPlugin(ssaoPlugin) ``` ``` -------------------------------- ### start Source: https://threepipe.org/docs/classes/EntityComponentPlugin.html Starts the plugin's operations. ```APIDOC ## start ### Description Starts the plugin's operations. ### Method ### Returns void ``` -------------------------------- ### start Source: https://threepipe.org/docs/classes/SampleBodyComponent.html Starts the component's operation. ```APIDOC ## start ### Description Starts the component's operation. ### Method start() ### Returns void ``` -------------------------------- ### start Source: https://threepipe.org/docs/classes/EntityComponentPlugin.html Starts the EntityComponentPlugin, enabling its core functionality and update loops. ```APIDOC ## start ### Description Starts the EntityComponentPlugin, enabling its core functionality and update loops. ``` -------------------------------- ### startListening Source: https://threepipe.org/docs/classes/ViewHelper2.html Starts listening for input events on the view helper. ```APIDOC ## startListening ### Description Initiates event listeners for user interactions with the view helper. ### Returns void ``` -------------------------------- ### Get UI Config Example Source: https://threepipe.org/docs/interfaces/MaterialExtension.html Defines a function to return the UI configuration for a material extension. This is called once when the extension is registered. ```typescript getUiConfig?: ( material: IMaterial, refreshUi?: ( deep?: boolean, mode?: TUiRefreshModes | "immediate", delay?: number, ) => void, ) => undefined | UiObjectConfig ``` -------------------------------- ### Basic Usage Example Source: https://threepipe.org/docs/classes/SSAOPlugin.html Shows how to initialize the ThreeViewer with the SSAOPlugin and configure its basic settings like intensity and radius. ```APIDOC ## Basic Usage ```javascript import {ThreeViewer, SSAOPlugin} from 'threepipe' const viewer = new ThreeViewer({ plugins: [new SSAOPlugin()] }) // Access the plugin and configure settings const ssaoPlugin = viewer.getPlugin(SSAOPlugin)! ssaoPlugin.pass.intensity = 1.2 ssaoPlugin.pass.radius = 0.5 ``` ``` -------------------------------- ### Setting up GLTFExporter2 with a Viewer Source: https://threepipe.org/docs/classes/GLTFExporter2.html The `setup` method initializes the exporter with a `ThreeViewer` instance and optionally accepts an array of extra extensions to register. ```typescript exporter.setup( viewer ); // With extra extensions exporter.setup( viewer, [ ( writer ) => new MyExtension( writer ) ] ); ``` -------------------------------- ### begin Source: https://threepipe.org/docs/classes/GLStatsJS.html Starts the statistics collection process. This should be called at the beginning of a frame or update cycle. ```APIDOC ## begin(): void ### Description Starts the statistics collection process. ### Returns void ``` -------------------------------- ### High Performance SSAO Setup Source: https://threepipe.org/docs/classes/SSAOPlugin.html Configures the SSAOPlugin for high performance by specifying buffer type, size multiplier, and packing mode during initialization. ```typescript const ssaoPlugin = new SSAOPlugin( UnsignedByteType, // Buffer type 0.5, // Size multiplier for better performance true, // Enabled 1 // Packing mode ) viewer.addPlugin(ssaoPlugin) ``` -------------------------------- ### Is Compatible Example Source: https://threepipe.org/docs/interfaces/MaterialExtension.html A function to check if the material extension is compatible with a given material. If not compatible, the extension will not be registered. ```typescript isCompatible?: (material: IMaterial) => undefined | boolean ``` -------------------------------- ### GLTFMeshOptDecodePlugin Constructor Source: https://threepipe.org/docs/classes/GLTFMeshOptDecodePlugin.html Initializes a new instance of the GLTFMeshOptDecodePlugin. It can optionally start the initialization process immediately and specify a root node for script injection. ```APIDOC ## new GLTFMeshOptDecodePlugin(initialize?, rootNode?) ### Description Initializes a new instance of the GLTFMeshOptDecodePlugin. It can optionally start the initialization process immediately and specify a root node for script injection. ### Parameters #### Parameters - **initialize** (boolean) - Optional - Defaults to `true`. Determines if the plugin should initialize immediately upon creation. - **rootNode** (HTMLHeadElement) - Optional - Defaults to `document.head`. The HTML element where the decoder script will be injected. ### Returns - GLTFMeshOptDecodePlugin - A new instance of the plugin. ``` -------------------------------- ### SimplifyModifier Example (three.js addon) Source: https://threepipe.org/docs/classes/MeshOptSimplifyModifierPlugin.html Demonstrates how to use the SimplifyModifier from three.js addons for geometry simplification. This is a sample for the internal _simplify method. ```typescript import {SimplifyModifier} from 'three/examples/jsm/modifiers/SimplifyModifier' protected _simplify(geometry: IGeometry, count: number): IGeometry { const modifier = new SimplifyModifier() return modifier.modify(geometry, count) as IGeometry } ``` -------------------------------- ### setupComponent Source: https://threepipe.org/docs/functions/setupComponent.html Initializes a 3D component with the provided context. This function is essential for setting up components before they are used in the 3D scene. ```APIDOC ## Function setupComponent ### Description Initializes a 3D component with the provided context. This function is essential for setting up components before they are used in the 3D scene. ### Signature `setupComponent(comp: Object3DComponent, ctx: ComponentCtx): void` ### Parameters #### Path Parameters * **comp** (Object3DComponent) - Description of the component to be set up. * **ctx** (ComponentCtx) - The context in which the component is being set up. ### Returns `void` - This function does not return any value. ``` -------------------------------- ### setupUiConfigButton Source: https://threepipe.org/docs/classes/AnimationObjectPlugin.html Sets up a UI configuration button for a given object. This method allows for the association of UI configurations with 3D objects, potentially for interactive elements or editors. ```APIDOC ## setupUiConfigButton ### Description Sets up a UI configuration button for a given object. This method allows for the association of UI configurations with 3D objects, potentially for interactive elements or editors. ### Method (Implicitly a method call within a class context) ### Parameters #### Path Parameters (None explicitly defined as path parameters) #### Query Parameters (None explicitly defined as query parameters) #### Request Body * **obj** (IMaterial | IObject3D) - Required - The object to configure. This can be a material or a 3D object with specific geometry and material properties. * **config** (UiObjectConfig) - Required - The UI configuration object to apply. * **path** (string) - Optional - A string representing a path, possibly for hierarchical configuration. ``` -------------------------------- ### isNonRelativeUrl Source: https://threepipe.org/docs/functions/isNonRelativeUrl.html Checks if a URL is non-relative. A non-relative URL is one that is absolute (e.g., starts with a protocol like http:// or https://) or a protocol-relative URL (e.g., starts with //). ```APIDOC ## isNonRelativeUrl ### Description Checks if a given URL string is a non-relative URL. This means it is an absolute URL or a protocol-relative URL. ### Method `isNonRelativeUrl(url: string): boolean` ### Parameters #### Path Parameters - **url** (string) - Required - The URL string to check. ### Returns - **boolean** - Returns `true` if the URL is non-relative, `false` otherwise. ``` -------------------------------- ### DRACOLoader2 Static SetDecoderJsString Example Source: https://threepipe.org/docs/classes/DRACOLoader2.html Example of how to bundle the DRACO decoder JavaScript file with your application source using Vite. This method allows you to provide the decoder's content as a string. ```typescript import draco_decoder from './libs/draco_decoder.1.5.6.js?raw' // vite will load this as a string // console.log(draco_decoder) // this should be a string with js content DRACOLoader2.SetDecoderJsString(draco_decoder) ``` -------------------------------- ### GLTFExporter2.setup Source: https://threepipe.org/docs/classes/GLTFExporter2.html Sets up the GLTFExporter2 with a ThreeViewer and optional extra extensions. ```APIDOC ## setup(viewer: ThreeViewer, extraExtensions?: ((writer: GLTFWriter2) => GLTFExporterPlugin)[]): this ### Description Configures the GLTFExporter2 with a ThreeViewer instance and an optional array of additional exporter extensions. ### Parameters - **viewer** (ThreeViewer) - The ThreeViewer instance to use for setup. - **extraExtensions** (Optional `((writer: GLTFWriter2) => GLTFExporterPlugin)[]`) - An array of additional exporter plugins to register. ### Returns - this: The GLTFExporter2 instance for chaining. ``` -------------------------------- ### CSMFrustum.vertices Source: https://threepipe.org/docs/classes/CSMFrustum.html Gets the vertices of the frustum. ```APIDOC ## vertices ### Description Gets the vertices of the frustum. ### Returns FrustumVertices ``` -------------------------------- ### material Source: https://threepipe.org/docs/classes/MeshLineSegments.html Gets or sets the material of the MeshLineSegments. ```APIDOC ## material ### Description Gets or sets the material applied to the MeshLineSegments. ### Type TMaterial ``` -------------------------------- ### trackTarget Source: https://threepipe.org/docs/classes/RenderManager.html Starts tracking a render target with the manager. ```APIDOC ## trackTarget ### Description Starts tracking a render target with the manager. ### Method (Not specified, likely a method call) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters - **target** (IRenderTarget) - Description: The render target to track. ### Returns void ``` -------------------------------- ### ViewerUiConfigPlugin Constructor Source: https://threepipe.org/docs/classes/ViewerUiConfigPlugin.html Initializes a new instance of the ViewerUiConfigPlugin. ```APIDOC ## new ViewerUiConfigPlugin() ### Description Initializes a new instance of the ViewerUiConfigPlugin. ### Returns ViewerUiConfigPlugin ``` -------------------------------- ### totalFrameCount Source: https://threepipe.org/docs/classes/ViewerRenderManager.html Gets the total number of frames rendered. ```APIDOC ## totalFrameCount ### Description Gets the total number of frames that have been rendered. ### Method GET ### Endpoint `/totalFrameCount` ### Returns - **number**: The total frame count. ``` -------------------------------- ### TypeSystem.GetClassType Source: https://threepipe.org/docs/classes/TypeSystem.html Gets the string identifier for a class constructor. ```APIDOC ## GetClassType(ctor: Class) ### Description Gets the string identifier for a class constructor. ### Method Static ### Parameters #### Parameters - **ctor** (Class) - The class constructor. ### Returns undefined | string ``` -------------------------------- ### FullScreenPlugin Constructors Source: https://threepipe.org/docs/classes/FullScreenPlugin.html Initializes a new instance of the FullScreenPlugin. ```APIDOC ## constructor ### constructor * new FullScreenPlugin(): FullScreenPlugin #### Returns FullScreenPlugin ``` -------------------------------- ### parent Source: https://threepipe.org/docs/classes/MeshLineSegments.html Gets the parent object in the scene graph. ```APIDOC ## parent ### Description Retrieves the parent object of this object within the scene graph. An object can have at most one parent. ### Type | null | IObject3D, undefined | IMaterial | IMaterial[]> ### Default Value `null` ``` -------------------------------- ### Basic SSAOPlugin Usage Source: https://threepipe.org/docs/classes/SSAOPlugin.html Demonstrates how to initialize the SSAOPlugin and configure its intensity and radius settings. ```typescript import {ThreeViewer, SSAOPlugin} from 'threepipe' const viewer = new ThreeViewer({ plugins: [new SSAOPlugin()] }) // Access the plugin and configure settings const ssaoPlugin = viewer.getPlugin(SSAOPlugin)! ssaoPlugin.pass.intensity = 1.2 ssaoPlugin.pass.radius = 0.5 ``` -------------------------------- ### materials Source: https://threepipe.org/docs/classes/MeshLineSegments.html Gets an array of all materials applied to the MeshLineSegments. ```APIDOC ## materials ### Description Returns an array of all materials applied to the MeshLineSegments. This is equivalent to the `material` property but always returns an array. To set materials, use the `material` property. ### Type IMaterial[] ``` -------------------------------- ### Initialize Viewer with CascadedShadowsPlugin Source: https://threepipe.org/docs/classes/CascadedShadowsPlugin.html Demonstrates how to initialize the ThreeViewer with the CascadedShadowsPlugin and configure its light parameters. Ensure the plugin is added to the viewer's plugins array and then retrieve it to set light-specific properties like cascades, shadow map size, and light margin. ```typescript const viewer = new ThreeViewer({ plugins: [new CascadedShadowsPlugin()] }) const light = new DirectionalLight2(0xffffff, 1.5) viewer.scene.addObject(light) const csmPlugin = viewer.getPlugin(CascadedShadowsPlugin)! csmPlugin.setLightParams({ cascades: 4, shadowMapSize: 1024, lightMargin: 100 }, light) ``` -------------------------------- ### show Source: https://threepipe.org/docs/classes/LoadingScreenPlugin.html Shows the loading screen. ```APIDOC ## show ### Description Shows the loading screen. ### Method Not specified ### Endpoint Not specified ### Parameters None ### Response #### Success Response (void) This method does not return a value. ``` -------------------------------- ### Dropzone.inputEl Source: https://threepipe.org/docs/classes/Dropzone.html Gets the HTMLInputElement associated with the Dropzone instance. ```APIDOC ## inputEl ### Description Gets the HTMLInputElement associated with the Dropzone instance. ### Returns undefined | HTMLInputElement - The associated input element or undefined if not set. ``` -------------------------------- ### Dropzone.el Source: https://threepipe.org/docs/classes/Dropzone.html Gets the HTMLElement that the Dropzone instance is watching. ```APIDOC ## el ### Description Gets the HTMLElement that the Dropzone instance is watching. ### Returns undefined | HTMLElement - The observed HTMLElement or undefined if not set. ``` -------------------------------- ### DropzonePlugin.promptForFile Source: https://threepipe.org/docs/classes/DropzonePlugin.html Opens a file dialog to allow the user to select a file for import. ```APIDOC ## DropzonePlugin.promptForFile(): void ### Description Opens the browser's file selection dialog, allowing the user to choose a file to import. ### Returns * void ``` -------------------------------- ### ObjectClipboard Constructor Source: https://threepipe.org/docs/classes/ObjectClipboard.html Initializes a new instance of the ObjectClipboard class. ```APIDOC ## new ObjectClipboard() ### Description Initializes a new instance of the ObjectClipboard class. ### Returns - ObjectClipboard: A new instance of the ObjectClipboard. ``` -------------------------------- ### ViewHelper2 Constructor Source: https://threepipe.org/docs/classes/ViewHelper2.html Initializes a new instance of the ViewHelper2 class. It requires a camera and a canvas element, with optional parameters for placement, size, and pixel ratio. ```APIDOC ## new ViewHelper2 ### Description Initializes a new instance of the ViewHelper2 class. ### Parameters * **camera**: PerspectiveCamera | OrthographicCamera - The camera to be used for rendering. * **canvas**: HTMLCanvasElement - The canvas element to render the view helper on. * **placement**: DomPlacement = 'bottom-right' - The placement of the view helper within the DOM. * **size**: number = 128 - The size of the view helper. * **pixelRatio**: number = 2 - The pixel ratio for rendering. ### Returns ViewHelper2 - The newly created ViewHelper2 instance. ``` -------------------------------- ### animate Source: https://threepipe.org/docs/classes/AnimationObject.html Starts an animation with optional delay and completion control. ```APIDOC ## animate ### Description Starts an animation with optional delay and completion control. ### Method `animate(delay?: number, canComplete?: boolean): AnimationResult` ### Parameters #### Path Parameters * `delay` (number) - Optional - The delay before the animation starts. Defaults to 0. * `canComplete` (boolean) - Optional - Indicates if the animation can complete. Defaults to true. ### Returns AnimationResult ``` -------------------------------- ### Type Property Example Source: https://threepipe.org/docs/interfaces/ISerializedConfig.html Defines the general type of the configuration. ```typescript type: string ``` -------------------------------- ### ObjectClipboard.state Accessor Source: https://threepipe.org/docs/classes/ObjectClipboard.html Gets the current state of the object clipboard. ```APIDOC ## state ### Description Gets the current state of the object clipboard. ### Returns - null | ClipboardState: The current clipboard state, or null if not applicable. ``` -------------------------------- ### initMaterial Source: https://threepipe.org/docs/variables/iObjectCommons.html Initializes the material for the IObject3D. ```APIDOC ## initMaterial ### Description Initializes the material for the IObject3D, preparing it for use. ### Method (Implicitly a method of IObject3D) ``` -------------------------------- ### Get All Materials from IObject3D Source: https://threepipe.org/docs/variables/iObjectCommons.html Retrieves all materials associated with an IObject3D instance. ```typescript getMaterials: (this: IObject3D) => IMaterial[]; ``` -------------------------------- ### enable Source: https://threepipe.org/docs/classes/RenderTargetPreviewPlugin.html Enables a specific render target preview based on its key. Optionally, this can trigger a UI update. ```APIDOC ## enable ### Description Enables a specific render target preview based on its key. Optionally, this can trigger a UI update. ### Parameters #### Parameters - **key**: any - The key identifying the render target to enable. - **setDirty** (boolean) - Optional - Defaults to true. If true, marks the plugin as dirty to trigger a UI update. ### Returns - void ``` -------------------------------- ### CameraHelper2 Static Methods Source: https://threepipe.org/docs/classes/CameraHelper2.html Provides static methods for checking camera properties and creating CameraHelper2 instances. ```APIDOC ## Static Methods ### Check * **Check**(camera: Object3D): any * **Parameters**: * camera: Object3D * **Returns**: any ### Create * **Create**(camera: Object3D): CameraHelper2 * **Parameters**: * camera: Object3D * **Returns**: CameraHelper2 ``` -------------------------------- ### Get Geometry from IObject3D Source: https://threepipe.org/docs/variables/iObjectCommons.html Retrieves the geometry associated with an IObject3D instance. ```typescript getGeometry: ( this: IObject3D< IObject3DEventMap, undefined | IGeometry, undefined | IMaterial | IMaterial[], > & Mesh< BufferGeometry, Material | Material[], Object3DEventMap, >, ) => undefined | IGeometry; ``` -------------------------------- ### getView Source: https://threepipe.org/docs/classes/CameraViewPlugin.html Gets a camera view, optionally in world space coordinates. ```APIDOC ## getView ### Description Gets a camera view, optionally in world space coordinates. ### Method (Implicitly GET or similar, as it retrieves data) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body * **camera** (ICamera) - Optional. The camera to get the view from. Defaults to the default camera. * **worldSpace** (boolean) - Optional. If true, returns the view in world space coordinates. Defaults to true. * **view** (CameraView) - Optional. A specific view object to retrieve information from. ### Request Example ```json { "camera": "cameraObject", "worldSpace": false, "view": "specificViewObject" } ``` ### Response #### Success Response (200) * **CameraView** - The requested camera view. ``` -------------------------------- ### KTX2Loader2 Constructor Source: https://threepipe.org/docs/classes/KTX2Loader2.html Initializes a new instance of the KTX2Loader2 class. An optional LoadingManager can be provided. ```APIDOC ## new KTX2Loader2 ### Description Initializes a new instance of the KTX2Loader2 class. An optional LoadingManager can be provided. ### Parameters * `manager` (LoadingManager) - Optional - The LoadingManager to use for loading. ### Returns KTX2Loader2 - A new instance of KTX2Loader2. ``` -------------------------------- ### Get Material from IObject3D Source: https://threepipe.org/docs/variables/iObjectCommons.html Retrieves the primary material associated with an IObject3D instance. ```typescript getMaterial: ( this: IObject3D, ) => | undefined | IMaterial | IMaterial[]; ``` -------------------------------- ### KTX2LoadPlugin Methods Source: https://threepipe.org/docs/classes/KTX2LoadPlugin.html Documentation for the methods available in the KTX2LoadPlugin class. ```APIDOC ## Methods ### dispose * dispose(): void #### Returns void ### onAdded * onAdded(viewer: ThreeViewer): void #### Parameters * viewer: ThreeViewer #### Returns void ### onRemove * onRemove(viewer: ThreeViewer): void #### Parameters * viewer: ThreeViewer #### Returns void ``` -------------------------------- ### ViewerTimeline Accessors Source: https://threepipe.org/docs/classes/ViewerTimeline.html Provides accessors for getting and setting the current time of the timeline. ```APIDOC ## Accessors ### `time` - **get time()**: number - Gets the current time in seconds. - **set time(value: number)**: void - Sets the current time and steps a frame. ``` -------------------------------- ### ViewerUiConfigPlugin Methods Source: https://threepipe.org/docs/classes/ViewerUiConfigPlugin.html Core methods for managing the plugin's lifecycle, state, and interaction with the viewer. ```APIDOC ## Methods ### `Protected` _onViewerEvent - **Description**: Handles viewer events internally. - **Parameters**: - **e** (IViewerEvent) - The viewer event object. - **Returns**: IViewerEvent ``` ```APIDOC ### `Protected` _storeKey - **Description**: Generates a key for internal storage, optionally with a prefix. - **Parameters**: - **`Optional` prefix** (string) - A prefix for the storage key. - **Returns**: string ``` ```APIDOC ### disable - **Description**: Disables a specific UI configuration key, optionally marking the plugin as dirty. - **Parameters**: - **key** (any) - The identifier of the UI configuration to disable. - **setDirty** (boolean) - If true, marks the plugin as dirty. Defaults to true. - **Returns**: void ``` ```APIDOC ### dispose - **Description**: Cleans up resources and removes event listeners when the plugin is no longer needed. - **Returns**: void ``` ```APIDOC ### enable - **Description**: Enables a specific UI configuration key, optionally marking the plugin as dirty. - **Parameters**: - **key** (any) - The identifier of the UI configuration to enable. - **setDirty** (boolean) - If true, marks the plugin as dirty. Defaults to true. - **Returns**: void ``` ```APIDOC ### exportState - **Description**: Exports the current state of the plugin, suitable for serialization. - **Returns**: ISerializedConfig | Record ``` ```APIDOC ### fromJSON - **Description**: Populates the plugin's state from serialized data. - **Parameters**: - **data** (ISerializedConfig) - The serialized configuration data. - **`Optional` meta** (SerializationMetaType) - Metadata for serialization. - **Returns**: null | ViewerUiConfigPlugin | Promise ``` ```APIDOC ### importState - **Description**: Imports state into the plugin, potentially asynchronously. - **Parameters**: - **state** (any) - The state data to import. - **Returns**: Promise ``` ```APIDOC ### isDisabled - **Description**: Checks if the plugin is currently disabled. - **Returns**: boolean ``` ```APIDOC ### onAdded - **Description**: Lifecycle method called when the plugin is added to the viewer. - **Parameters**: - **viewer** (ThreeViewer) - The viewer instance the plugin was added to. - **Returns**: void ``` ```APIDOC ### onRemove - **Description**: Lifecycle method called when the plugin is removed from the viewer. - **Parameters**: - **viewer** (ThreeViewer) - The viewer instance the plugin was removed from. - **Returns**: void ``` ```APIDOC ### `Optional` setDirty - **Description**: Marks the plugin as dirty, indicating a change in its state. - **Parameters**: - **...args** (any[]) - Arguments passed to the underlying dirty state management. - **Returns**: any ``` ```APIDOC ### toJSON - **Description**: Serializes the plugin's current state into a JSON-compatible format. - **Parameters**: - **`Optional` meta** (SerializationMetaType) - Metadata for serialization. - **Returns**: ISerializedConfig ``` -------------------------------- ### cascades Source: https://threepipe.org/docs/classes/CascadedShadowsPlugin.html Accessor to get the total number of cascades currently configured for the plugin. ```APIDOC ## cascades: number ### Description Gets the total number of shadow cascades that the plugin is currently using. This value is typically set via `setLightParams` or during initialization. ### Returns * **number** - The current number of cascades. ``` -------------------------------- ### SpotLight2 Constructor Source: https://threepipe.org/docs/classes/SpotLight2.html Initializes a new instance of the SpotLight2 class. This constructor allows for the optional configuration of color, intensity, distance, angle, penumbra, and decay. ```APIDOC ## new SpotLight2 ### Description Initializes a new instance of the SpotLight2 class with optional parameters for light properties. ### Parameters * `color` (ColorRepresentation) - Optional. The color of the light. * `intensity` (number) - Optional. The intensity of the light. * `distance` (number) - Optional. The distance at which the light falls to zero intensity. * `angle` (number) - Optional. The maximum extent of the spotlight in radians. * `penumbra` (number) - Optional. The penumbra of the spotlight. * `decay` (number) - Optional. The amount the light dims along the distance. ### Returns * SpotLight2 - A new instance of the SpotLight2 class. ``` -------------------------------- ### assetType Property Example Source: https://threepipe.org/docs/interfaces/ISerializedConfig.html Specifies the asset type as 'config'. This is a fixed value for this interface. ```typescript assetType: "config" ``` -------------------------------- ### DropzonePlugin.promptForUrl Source: https://threepipe.org/docs/classes/DropzonePlugin.html Opens a prompt to allow the user to enter a URL for asset import. ```APIDOC ## DropzonePlugin.promptForUrl(): Promise ### Description Prompts the user to enter a URL for importing assets. ### Returns * Promise - A promise that resolves when the user has entered a URL. ``` -------------------------------- ### TextSVGOptions Constructor Source: https://threepipe.org/docs/classes/TextSVGOptions.html Initializes a new instance of the TextSVGOptions class. ```APIDOC ## Constructors ### constructor * new TextSVGOptions(): TextSVGOptions #### Returns TextSVGOptions ``` -------------------------------- ### Get Texture Maps from IObject3D Source: https://threepipe.org/docs/variables/iObjectCommons.html Retrieves all texture maps associated with an IObject3D instance. ```typescript getMapsForObject3D: ( this: IObject3D, ) => Map>; ``` -------------------------------- ### OBJLoader2 Constructor Source: https://threepipe.org/docs/classes/OBJLoader2.html Initializes a new instance of the OBJLoader2 class. ```APIDOC ## new OBJLoader2 ### Description Initializes a new instance of the OBJLoader2 class. ### Parameters * **manager** (any) - The loading manager to use. ### Returns * OBJLoader2 - An instance of OBJLoader2. ``` -------------------------------- ### renderCamera Source: https://threepipe.org/docs/classes/RootScene.html Accessor for the camera currently being used for rendering. Allows getting and setting this camera. ```APIDOC ## renderCamera ### Description Represents the camera that is actively rendering the scene. ### Getter * `get renderCamera(): ICamera` * Returns the camera currently used for rendering. ### Setter * `set renderCamera(camera: ICamera): void` * Sets the camera that will be used for rendering. * **Parameters**: * `camera` (ICamera): The camera to set for rendering. ``` -------------------------------- ### GLTFLightExtrasExtension Constructor Source: https://threepipe.org/docs/classes/GLTFLightExtrasExtension.html Initializes a new instance of the GLTFLightExtrasExtension class. ```APIDOC ## Constructor GLTFLightExtrasExtension ### Description Initializes a new instance of the GLTFLightExtrasExtension class. ### Returns GLTFLightExtrasExtension - A new instance of GLTFLightExtrasExtension. ``` -------------------------------- ### mainCamera Source: https://threepipe.org/docs/classes/RootScene.html Accessor for the main camera controlled by the user. Allows getting and setting this camera. ```APIDOC ## mainCamera ### Description Represents the primary camera that the user interacts with and controls. ### Getter * `get mainCamera(): ICamera` * Returns the main user-controlled camera. ### Setter * `set mainCamera(camera: undefined | ICamera): void` * Sets the main camera. * **Parameters**: * `camera` (undefined | ICamera): The camera to be set as the main camera. ``` -------------------------------- ### GetComponent Source: https://threepipe.org/docs/classes/EntityComponentPlugin.html A static method to get the first component of a specific type from a given object. ```APIDOC ## GetComponent ### Description A static method to get the first component of a specific type from a given object. ### Method (static method) ### Type Parameters * **T** extends typeof Object3DComponent = typeof Object3DComponent ### Parameters * **obj** (IObject3D) - The object to search within. * **type** (string | T) - The component type (string or class). ### Returns null | InstanceType ``` -------------------------------- ### CameraHelper2 Constructor Source: https://threepipe.org/docs/classes/CameraHelper2.html Initializes a new instance of CameraHelper2. This helper visualizes the frustum, line of sight, and up vectors of a given camera. ```APIDOC ## new CameraHelper2(camera) ### Description Initializes a new instance of CameraHelper2. This helper visualizes the frustum, line of sight, and up vectors of a given camera. ### Parameters #### Parameters - **camera** (PerspectiveCamera | OrthographicCamera) - The camera to visualize. ### Returns - CameraHelper2 - A new instance of CameraHelper2. ``` -------------------------------- ### getCurrentCameraView Source: https://threepipe.org/docs/classes/CameraViewPlugin.html Gets the current camera view. Deprecated: use `getView` or `ICamera.getView` instead. ```APIDOC ## getCurrentCameraView ### Description Gets the current camera view. Deprecated: use `getView` or `ICamera.getView` instead. ### Method (Implicitly GET or similar, as it retrieves data) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body * **camera** (ICamera) - Optional. The camera to get the view from. Defaults to the default camera. * **worldSpace** (boolean) - Optional. If true, returns the view in world space coordinates. Defaults to true. ### Request Example ```json { "camera": "cameraObject", "worldSpace": false } ``` ### Response #### Success Response (200) * **CameraView** - The current camera view. ``` -------------------------------- ### SpotLightHelper2 Constructor Source: https://threepipe.org/docs/classes/SpotLightHelper2.html Initializes a new instance of the SpotLightHelper2 class. This constructor is used to create a helper for visualizing a spotlight in the scene. ```APIDOC ## new SpotLightHelper2(light, size, color) ### Description Initializes a new instance of the SpotLightHelper2 class. ### Parameters * **light** (SpotLight) - The SpotLight object to visualize. * **size** (number) - Optional. The size of the helper. * **color** (ColorRepresentation) - Optional. The color of the helper. ### Returns * **SpotLightHelper2** - A new instance of the SpotLightHelper2 class. ``` -------------------------------- ### dirty Source: https://threepipe.org/docs/classes/CascadedShadowsPlugin.html Accessor to get and set the dirty state of the plugin, indicating if an update is needed. ```APIDOC ## dirty: boolean ### Description Gets or sets the internal dirty flag of the plugin. When true, it signifies that the plugin's state requires an update, such as recalculating shadow maps or frustums. ### Getter Returns * **boolean** - The current state of the dirty flag. ### Setter Parameters * **value** (boolean) - Required - The new value for the dirty flag. ``` -------------------------------- ### Initialize Material Source: https://threepipe.org/docs/variables/iObjectCommons.html Initializes the material for an IObject3D instance. ```typescript initMaterial: (this: IObject3D) => void; ``` -------------------------------- ### USDZLoadPlugin Constructors Source: https://threepipe.org/docs/classes/USDZLoadPlugin.html Provides information about the constructors available for the USDZLoadPlugin class. ```APIDOC ## Constructors ### constructor * new USDZLoadPlugin(): USDZLoadPlugin #### Returns USDZLoadPlugin ``` -------------------------------- ### lerpNumber Source: https://threepipe.org/docs/functions/lerpNumber.html Linearly interpolates between a start value and an end value based on the progress of an animation time. ```APIDOC ## Function lerpNumber ### Description Linearly interpolates between a start value (`val`) and an end value (`end`) based on the progress of an animation time (`time`). ### Signature `lerpNumber(time: AnimateTime & { from?: number }, val: number, end: number): number` ### Parameters #### Path Parameters * `time` (AnimateTime & { from?: number }) - An object representing the animation's current state, potentially including a starting point. * `val` (number) - The starting numerical value for the interpolation. * `end` (number) - The ending numerical value for the interpolation. ### Returns * `number` - The interpolated numerical value. ``` -------------------------------- ### InteractionPromptPlugin Animation Control Methods Source: https://threepipe.org/docs/classes/InteractionPromptPlugin.html Methods to manually start and stop the pointer icon animation. ```APIDOC ## InteractionPromptPlugin Animation Control Methods ### startAnimation * **Description**: Manually starts the pointer icon animation. * **Returns**: void ### stopAnimation * **Description**: Manually stops the pointer icon animation. * **Returns**: void ``` -------------------------------- ### selectAll Source: https://threepipe.org/docs/classes/PickingPlugin.html Selects all available objects within the scene or context. ```APIDOC ## selectAll ### Description Selects all objects currently available in the scene or context. ### Method void ``` -------------------------------- ### Updaters Example Source: https://threepipe.org/docs/interfaces/MaterialExtension.html Provides an array of IShaderPropertiesUpdater or a function that returns them. These updaters can modify shader properties. ```typescript updaters?: IShaderPropertiesUpdater[] | (() => IShaderPropertiesUpdater[]) ``` -------------------------------- ### activeCamera Source: https://threepipe.org/docs/classes/RootScene.html Accessor for the currently active camera. Allows getting the active camera and setting it (deprecated). ```APIDOC ## activeCamera ### Description Represents the camera that is currently active in the scene. ### Getter * `get activeCamera(): ICamera` * Returns the active camera object. ### Setter (Deprecated) * `set activeCamera(camera: undefined | ICamera): void` * Sets the active camera. This method is deprecated. * **Parameters**: * `camera` (undefined | ICamera): The camera to set as active. ``` -------------------------------- ### SwitchNodeBasePlugin Constructors Source: https://threepipe.org/docs/classes/SwitchNodeBasePlugin.html Initializes a new instance of the SwitchNodeBasePlugin. ```APIDOC ## constructor * new SwitchNodeBasePlugin(): SwitchNodeBasePlugin ### Returns SwitchNodeBasePlugin ``` -------------------------------- ### backgroundColorUi Source: https://threepipe.org/docs/classes/RootScene.html Accessor for the UI background color. Allows getting and setting the background color as a string. ```APIDOC ## _backgroundColorUi ### Description Manages the background color of the UI. ### Getter * `get _backgroundColorUi(): string` * Returns the current background color as a string. ### Setter * `set _backgroundColorUi(v: string): void` * Sets the background color. * **Parameters**: * `v` (string): The new background color value. ``` -------------------------------- ### USDZLoadPlugin Methods Source: https://threepipe.org/docs/classes/USDZLoadPlugin.html Details the methods available for the USDZLoadPlugin class. ```APIDOC ## Methods ### dispose * dispose(): void #### Returns void ### onAdded * onAdded(viewer: ThreeViewer): void #### Parameters * viewer: ThreeViewer #### Returns void ### onRemove * onRemove(viewer: ThreeViewer): void #### Parameters * viewer: ThreeViewer #### Returns void ``` -------------------------------- ### animateAsync Method Source: https://threepipe.org/docs/classes/PopmotionPlugin.html Starts an animation asynchronously and returns a promise that resolves with a string identifier upon completion. ```APIDOC ## animateAsync ### Description Starts an animation asynchronously. This method is useful for performing animations that do not require immediate interaction and can be awaited. ### Method animateAsync ### Type Parameters * V ### Parameters * **options**: AnimationOptions & { key?: string; target?: any } - Configuration for the animation, including target values and an optional key. * **animations**: AnimationResult[] - Optional. An array of existing animation results to potentially chain or manage. ### Returns Promise - A promise that resolves with a string, typically an identifier for the completed animation. ```