### Quick Start AR Tutorial
Source: https://docs.threedy.io/3.11.6/tutorials/user_tutorials/tools/snapshots
A quick start guide for setting up and using Augmented Reality (AR) features within Threedy. This tutorial covers the initial steps for AR integration.
```JavaScript
// Placeholder for Quick Start AR initialization code
console.log('Starting Quick Start AR tutorial...');
// Example: Initialize AR session
// ARSession.start();
```
--------------------------------
### Quick Start AR Tutorial
Source: https://docs.threedy.io/3.11.6/doc/webvis/interfaces/ContextRemovedListenerOptions
A quick start guide for setting up and using Augmented Reality (AR) features within Threedy. This tutorial covers the initial steps for AR integration.
```JavaScript
// Placeholder for Quick Start AR initialization code
console.log('Starting Quick Start AR tutorial...');
// Example: Initialize AR session
// ARSession.start();
```
--------------------------------
### webvis API Initialization
Source: https://docs.threedy.io/3.11.6/tutorials/index_dev
This section likely covers the initial setup and configuration required to start using the webvis API. It may involve importing necessary modules or calling specific initialization functions.
```javascript
import { initializeViewer } from 'webvis';
const viewer = initializeViewer('#viewer-container', {
// configuration options
});
```
--------------------------------
### Install License Server (CentOS Example)
Source: https://docs.threedy.io/3.11.6/doc/integration/LICENSE_SERVER
Downloads and installs the License Server package for CentOS systems.
```bash
instant3Dhub-licenseServer-CentOS-Linux-7-x64*.rpm
systemctl start instant3Dhub-licenseServer.service
```
--------------------------------
### Basic webvis Setup with HTML
Source: https://docs.threedy.io/3.11.6/tutorials/dev_tutorials/tutorials/webvis
This snippet demonstrates the minimal HTML required to set up a webvis instance. It involves embedding the 'webvis-full' Web Component in the HTML body, which initializes the visualization environment. Basic CSS is also included for styling.
```HTML
webvis Example
```
--------------------------------
### InstanceGraphAPI Quick Start
Source: https://docs.threedy.io/3.11.6/doc/webvis/interfaces/InstanceGraphAPI_highlight=metadata
Demonstrates how to get the webvis context, add a new node to the InstanceGraph, register a custom property, and then get and set properties on that node. It shows retrieving both predefined properties like LABEL and custom properties.
```JavaScript
const context = webvis.getContext();
const nodeId = context.add({
dataURI:"urn:x-i3d:shape:box",
label:"My node",
initialProperties: { enabled:true }
});
context.registerCustomProperty("myCustomProperty", 0);
await context.setProperty(nodeId, "myCustomProperty", 42);
const [label, customProp] = await context.getProperties(nodeId, [webvis.Property.LABEL, "myCustomProperty"]);
console.log(label, customProp); // My node 42
```
--------------------------------
### webvis API Get Context
Source: https://docs.threedy.io/3.11.6/tutorials/index_dev
Provides an example of how to retrieve a specific context object using its unique identifier.
```javascript
const context = getContext('context-abc');
if (context) {
console.log('Retrieved context:', context);
}
```
--------------------------------
### webvis API Initialization
Source: https://docs.threedy.io/3.11.6/tutorials/user_tutorials/basics/shortcuts
This section details the initialization process for the webvis API, a core component for visualizing 3D data within Threedy. It covers the necessary steps and configurations to get the webvis environment up and running.
```javascript
/**
* Initializes the webvis API.
* @param {object} options - Configuration options for webvis.
* @param {string} options.containerId - The ID of the HTML element to render webvis in.
* @param {object} [options.theme] - Optional theme settings.
*/
function initializeWebvis(options) {
// ... initialization logic ...
console.log('webvis initialized with options:', options);
}
```
--------------------------------
### Get Contexts in threedy.io
Source: https://docs.threedy.io/3.11.6/doc/webvis-ui/classes
Provides an example of retrieving all available contexts. This function is useful for managing multiple contexts within the application.
```JavaScript
const allContexts = getContexts();
```
--------------------------------
### webvis API Initialization
Source: https://docs.threedy.io/3.11.6/doc/webvis/enums/RenderSetup
This section details the initialization process for the webvis API, a core component for visualizing 3D data within Threedy. It covers the necessary steps and configurations to get the webvis environment up and running.
```javascript
/**
* Initializes the webvis API.
* @param {object} options - Configuration options for webvis.
* @param {string} options.containerId - The ID of the HTML element to render webvis in.
* @param {object} [options.theme] - Optional theme settings.
*/
function initializeWebvis(options) {
// ... initialization logic ...
console.log('webvis initialized with options:', options);
}
```
--------------------------------
### Get Static UI Element in threedy.io
Source: https://docs.threedy.io/3.11.6/doc/webvis-ui/classes
Provides an example of retrieving a static UI element by its ID. This is useful for interacting with predefined UI components.
```JavaScript
const element = getStaticUIElement("mainPanel");
```
--------------------------------
### webvis API Initialization
Source: https://docs.threedy.io/3.11.6/doc/webvis-ui/functions/getSetting
This section details the initialization process for the webvis API, a core component for visualizing 3D data within Threedy. It covers the necessary steps and configurations to get the webvis environment up and running.
```javascript
/**
* Initializes the webvis API.
* @param {object} options - Configuration options for webvis.
* @param {string} options.containerId - The ID of the HTML element to render webvis in.
* @param {object} [options.theme] - Optional theme settings.
*/
function initializeWebvis(options) {
// ... initialization logic ...
console.log('webvis initialized with options:', options);
}
```
--------------------------------
### Get Statistics
Source: https://docs.threedy.io/3.11.6/doc/webvis/interfaces/InstanceGraphAPI_highlight=metadata
Traverses a subtree starting from a specified node ID and collects statistics, primarily for AUX nodes. It allows filtering by node type and specifying whether the traversal should be recursive.
```typescript
getStatistics(nodeType?: NodeType, nodeID?: number, recursive?: boolean): Promise
```
--------------------------------
### webvis API Initialization
Source: https://docs.threedy.io/3.11.6/tutorials/user_tutorials/basics/ui_overview
This section details the initialization process for the webvis API, a core component for visualizing 3D data within Threedy. It covers the necessary steps and configurations to get the webvis environment up and running.
```javascript
/**
* Initializes the webvis API.
* @param {object} options - Configuration options for webvis.
* @param {string} options.containerId - The ID of the HTML element to render webvis in.
* @param {object} [options.theme] - Optional theme settings.
*/
function initializeWebvis(options) {
// ... initialization logic ...
console.log('webvis initialized with options:', options);
}
```
--------------------------------
### Get Statistics
Source: https://docs.threedy.io/3.11.6/doc/webvis/interfaces/InstanceGraphAPI
Traverses a subtree starting from a specified node ID and collects statistics, primarily for AUX nodes. It allows filtering by node type and specifying whether the traversal should be recursive.
```typescript
getStatistics(nodeType?: NodeType, nodeID?: number, recursive?: boolean): Promise
```
--------------------------------
### webvis API Initialization
Source: https://docs.threedy.io/3.11.6/tutorials/user_tutorials/tools/capping
This section details the initialization process for the webvis API, a core component for visualizing 3D data within Threedy. It covers the necessary steps and configurations to get the webvis environment up and running.
```javascript
/**
* Initializes the webvis API.
* @param {object} options - Configuration options for webvis.
* @param {string} options.containerId - The ID of the HTML element to render webvis in.
* @param {object} [options.theme] - Optional theme settings.
*/
function initializeWebvis(options) {
// ... initialization logic ...
console.log('webvis initialized with options:', options);
}
```
--------------------------------
### React Tab Switching with Webvis Viewer
Source: https://docs.threedy.io/3.11.6/tutorials/dev_tutorials/tutorials/initialization
This React example demonstrates switching between a 3D view using `` and an information tab. It highlights the default viewer creation and the potential issue of re-rendering when switching back to the 3D view, suggesting the use of named viewers for caching.
```javascript
import React from'react';
import{ BrowserRouter as Router, Switch, Route, Link } from'react-router-dom';
function WebvisTab() {
// This is not the most performant way for illustration purposes:
return ;
}
function InfoTab() {
return
Additional information
;
}
function App() {
return (
);
}
```
--------------------------------
### Get Enabled Auxiliary Nodes
Source: https://docs.threedy.io/3.11.6/doc/webvis/interfaces/InstanceGraphAPI_highlight=metadata
Asynchronously retrieves an array of enabled auxiliary node IDs by traversing the subtree starting from a given node ID. This function is deprecated and users should migrate to QueryAPI.
```typescript
getEnabledAuxNodes(nodeID: number): Promise
```
--------------------------------
### Get Enabled Auxiliary Nodes
Source: https://docs.threedy.io/3.11.6/doc/webvis/interfaces/InstanceGraphAPI
Asynchronously retrieves an array of enabled auxiliary node IDs by traversing the subtree starting from a given node ID. This function is deprecated and users should migrate to QueryAPI.
```typescript
getEnabledAuxNodes(nodeID: number): Promise
```
--------------------------------
### webvis API Initialization
Source: https://docs.threedy.io/3.11.6/tutorials/user_tutorials/tools/ar_doc/object_tracking
This section details the initialization process for the webvis API, a core component for visualizing 3D data within Threedy. It covers the necessary steps and configurations to get the webvis environment up and running.
```javascript
/**
* Initializes the webvis API.
* @param {object} options - Configuration options for webvis.
* @param {string} options.containerId - The ID of the HTML element to render webvis in.
* @param {object} [options.theme] - Optional theme settings.
*/
function initializeWebvis(options) {
// ... initialization logic ...
console.log('webvis initialized with options:', options);
}
```
--------------------------------
### webvis API Initialization
Source: https://docs.threedy.io/3.11.6/doc/webvis/interfaces/XRPlaybackProperties
This section details the initialization process for the webvis API, a core component for visualizing 3D data within Threedy. It covers the necessary steps and configurations to get the webvis environment up and running.
```javascript
/**
* Initializes the webvis API.
* @param {object} options - Configuration options for webvis.
* @param {string} options.containerId - The ID of the HTML element to render webvis in.
* @param {object} [options.theme] - Optional theme settings.
*/
function initializeWebvis(options) {
// ... initialization logic ...
console.log('webvis initialized with options:', options);
}
```
--------------------------------
### Get XR Playback Properties
Source: https://docs.threedy.io/3.11.6/doc/webvis/interfaces/ContextAPI
Retrieves static information related to an XR playback sequence. This experimental function provides configuration details about the playback, aiding in understanding the setup of recorded or streamed XR content.
```typescript
getXRPlaybackProperties(): XRPlaybackProperties
```
--------------------------------
### webvis API Initialization
Source: https://docs.threedy.io/3.11.6/doc/webvis/interfaces/XRImageSourceConfigPlayback
This section details the initialization process for the webvis API, a core component for visualizing 3D data within Threedy. It covers the necessary steps and configurations to get the webvis environment up and running.
```javascript
/**
* Initializes the webvis API.
* @param {object} options - Configuration options for webvis.
* @param {string} options.containerId - The ID of the HTML element to render webvis in.
* @param {object} [options.theme] - Optional theme settings.
*/
function initializeWebvis(options) {
// ... initialization logic ...
console.log('webvis initialized with options:', options);
}
```
--------------------------------
### InstanceGraphAPI Quick Start
Source: https://docs.threedy.io/3.11.6/doc/webvis/interfaces/InstanceGraphAPI
Demonstrates how to get the webvis context, add a new node to the InstanceGraph, register a custom property, and get/set properties on a node. It shows the basic usage of InstanceGraphAPI for scene graph manipulation.
```JavaScript
constcontext = webvis.getContext();
constnodeId = context.add({
dataURI:"urn:x-i3d:shape:box",
label:"My node",
initialProperties: { enabled:true }
});
context.registerCustomProperty("myCustomProperty", 0);
awaitcontext.setProperty(nodeId, "myCustomProperty", 42);
const [label, customProp] = awaitcontext.getProperties(nodeId, [webvis.Property.LABEL, "myCustomProperty"]);
console.log(label, customProp); // My node 42
```
--------------------------------
### webvis API Initialization
Source: https://docs.threedy.io/3.11.6/doc/webvis/interfaces/SnapshotCreationOptions
This section details the initialization process for the webvis API, a core component for visualizing 3D data within Threedy. It covers the necessary steps and configurations to get the webvis environment up and running.
```javascript
/**
* Initializes the webvis API.
* @param {object} options - Configuration options for webvis.
* @param {string} options.containerId - The ID of the HTML element to render webvis in.
* @param {object} [options.theme] - Optional theme settings.
*/
function initializeWebvis(options) {
// ... initialization logic ...
console.log('webvis initialized with options:', options);
}
```
--------------------------------
### JavaScript: Add and Configure Heatmap Data
Source: https://docs.threedy.io/3.11.6/doc/webvis/interfaces/ViewerHeatmapAPI
This example demonstrates how to get instances of ContextAPI and ViewerAPI, add a model, create heatmap data with specified positions, and configure the heatmap's color scheme and maximum value.
```JavaScript
constcontext = webvis.getContext();
constviewer = context.getViewer();
// add the model
constmodel = context.add({ dataURI:MODEL, initialProperties: { enabled:true } });
// add matching heatmap data
constheatmapPositions = [
0, 1, 0, // first point
0, 1, 1, // second point
0, 0, 2, // third point
];
constheatmapDataId = viewer.createHeatmap({ position:heatmapPositions });
// configure the heatmap
viewer.configureHeatmap({
// set a color scheme
colorScheme:"Blackbody",
// calculated density is normalized, upper end of color scheme is mapped to maxValue
maxValue:100,
}
```
--------------------------------
### webvis API Initialization
Source: https://docs.threedy.io/3.11.6/doc/integration/LICENSE_SERVER_USAGE
This section details the initialization process for the webvis API, a core component for visualizing 3D data within Threedy. It covers the necessary steps and configurations to get the webvis environment up and running.
```javascript
/**
* Initializes the webvis API.
* @param {object} options - Configuration options for webvis.
* @param {string} options.containerId - The ID of the HTML element to render webvis in.
* @param {object} [options.theme] - Optional theme settings.
*/
function initializeWebvis(options) {
// ... initialization logic ...
console.log('webvis initialized with options:', options);
}
```
--------------------------------
### webvis Initialization
Source: https://docs.threedy.io/3.11.6/tutorials/user_tutorials/tools/snapshots
This section details how to initialize the webvis component, a core part of the Threedy platform for 3D visualization. It covers the necessary steps and configurations for setting up webvis within your application.
```JavaScript
/**
* Initializes the webvis component.
* @param {object} options - Configuration options for webvis.
* @param {string} options.containerId - The ID of the HTML element to render webvis in.
* @param {object} [options.initialView] - Optional initial camera and scene settings.
*/
function initializeWebvis(options) {
// Implementation details for initializing webvis...
console.log('Initializing webvis with options:', options);
}
```
--------------------------------
### ViewerMagnifierAPI - Enable and Configure Magnifier
Source: https://docs.threedy.io/3.11.6/doc/webvis/interfaces/ViewerMagnifierAPI
This example demonstrates how to get an instance of the ContextAPI, retrieve the default viewer, and then enable and configure the magnifier. It shows how to set properties like roundness, position, size, and zoom level, either individually or all at once.
```JavaScript
const myContext = webvis.getContext( "example" );
const viewer = myContext.getViewer();
// Enable magnifier
viewer.changeMagnifier({enabled:true});
// Change magnifier properties
viewer.changeMagnifier({roundness:50, position: [1000,720], size: [500,300], zoomLevel:2});
// Alternatively, enable and set all properties in one call
viewer.changeMagnifier({roundness:50, enabled:true, position: [1000,720], size: [500,300], zoomLevel:2});
```
--------------------------------
### instant3Dhub Configuration Example
Source: https://docs.threedy.io/3.11.6/doc/integration/INSTALL_PROXY_GUIDE
This snippet shows a minimal configuration for instant3Dhub deployments, focusing on the 'entrypoints' variable. This variable must be set to the external address under which the installation will run, ensuring internal components correctly generate URLs for the web frontend.
```Configuration
entrypoints: https://example-proxy-server/extra/path/
```
--------------------------------
### webvis API Initialization
Source: https://docs.threedy.io/3.11.6/doc/webvis/interfaces/XRPlaybackState
This section details the initialization process for the webvis API, a core component for visualizing 3D data within Threedy. It covers the necessary steps and configurations to get the webvis environment up and running.
```javascript
/**
* Initializes the webvis API.
* @param {object} options - Configuration options for webvis.
* @param {string} options.containerId - The ID of the HTML element to render webvis in.
* @param {object} [options.theme] - Optional theme settings.
*/
function initializeWebvis(options) {
// ... initialization logic ...
console.log('webvis initialized with options:', options);
}
```
--------------------------------
### Load 3D Content via URL Parameters
Source: https://docs.threedy.io/3.11.6/tutorials/dev_tutorials/tutorials/webvis
Configure webvis by providing URL query parameters. Use the 'initData' parameter to specify a 3D resource for loading at startup, and include 'autoplay' to enable it.
```URL
http://somehost/some-page.html?initData=urn:x-i3d:shape:key&autoplay
```
--------------------------------
### Get Statistics
Source: https://docs.threedy.io/3.11.6/doc/webvis/interfaces/ContextAPI
Traverses a subtree starting from a given node ID and collects statistics, primarily for AUX nodes. It accepts optional parameters for node type, node ID, and recursion. Returns a Promise resolving to an object of type/count pairs.
```TypeScript
getStatistics(
nodeType?: NodeType,
nodeID?: number,
recursive?: boolean,
): Promise
```
--------------------------------
### webvis API Initialization
Source: https://docs.threedy.io/3.11.6/doc/webvis/classes/BackgroundClickedEvent
This section details the initialization process for the webvis API, a core component for visualizing 3D data within Threedy. It covers the necessary steps and configurations to get the webvis environment up and running.
```javascript
/**
* Initializes the webvis API.
* @param {object} options - Configuration options for webvis.
* @param {string} options.containerId - The ID of the HTML element to render webvis in.
* @param {object} [options.theme] - Optional theme settings.
*/
function initializeWebvis(options) {
// ... initialization logic ...
console.log('webvis initialized with options:', options);
}
```
--------------------------------
### Get Enabled Auxiliary Nodes
Source: https://docs.threedy.io/3.11.6/doc/webvis/interfaces/ContextAPI
Traverses a subtree starting from a given node ID to collect all enabled auxiliary nodes. This function is deprecated and users are advised to use the QueryAPI instead. It returns a Promise that resolves to an array of node IDs.
```javascript
getEnabledAuxNodes(nodeID: number): Promise
```
--------------------------------
### Request Supported Render Setups
Source: https://docs.threedy.io/3.11.6/doc/webvis/interfaces/ContextAPI
Retrieves all supported render setups, if any are available. Each setup is returned as a name-value pair, where the value can be used with ViewerSettingStrings.RENDER_SETUP. Inherited from HubAPI.
```typescript
requestSupportedRenderSetups(): Promise<{ name: string; value: string }[]>
```
--------------------------------
### webvis API Initialization
Source: https://docs.threedy.io/3.11.6/doc/webvis-ui/functions/exportUserSettings
This section details the initialization process for the webvis API, a core component for visualizing 3D data within Threedy. It covers the necessary steps and configurations to get the webvis environment up and running.
```javascript
/**
* Initializes the webvis API.
* @param {object} options - Configuration options for webvis.
* @param {string} options.containerId - The ID of the HTML element to render webvis in.
* @param {object} [options.theme] - Optional theme settings.
*/
function initializeWebvis(options) {
// ... initialization logic ...
console.log('webvis initialized with options:', options);
}
```
--------------------------------
### Install Ansible on CentOS 7
Source: https://docs.threedy.io/3.11.6/doc/integration/TOOLS_ANSIBLE
This snippet shows the command to update the package cache on CentOS 7, a prerequisite for installing Ansible. It also includes a command to check the installed Ansible version.
```bash
sudo yum update -y
```
```bash
ansible --version
```
--------------------------------
### webvis API Initialization
Source: https://docs.threedy.io/3.11.6/doc/webvis-ui/enums/UISetting
This section details the initialization process for the webvis API, a core component for visualizing 3D data within Threedy. It covers the necessary steps and configurations to get the webvis environment up and running.
```javascript
/**
* Initializes the webvis API.
* @param {object} options - Configuration options for webvis.
* @param {string} options.containerId - The ID of the HTML element to render webvis in.
* @param {object} [options.theme] - Optional theme settings.
*/
function initializeWebvis(options) {
// ... initialization logic ...
console.log('webvis initialized with options:', options);
}
```
--------------------------------
### Request Supported Render Setups
Source: https://docs.threedy.io/3.11.6/doc/webvis/interfaces/HubAPI
Requests all available render setups from the backend. Each setup is a key-value pair used for viewer settings. The function returns a Promise resolving to an array of objects with 'name' and 'value' properties.
```typescript
requestSupportedRenderSetups(): Promise<{ name: string; value: string }[]>
```
--------------------------------
### webvis API Initialization
Source: https://docs.threedy.io/3.11.6/doc/integration/SYSTEM_OVERVIEW
This section details the initialization process for the webvis API, a core component for visualizing 3D data within Threedy. It covers the necessary steps and configurations to get the webvis environment up and running.
```javascript
/**
* Initializes the webvis API.
* @param {object} options - Configuration options for webvis.
* @param {string} options.containerId - The ID of the HTML element to render webvis in.
* @param {object} [options.theme] - Optional theme settings.
*/
function initializeWebvis(options) {
// ... initialization logic ...
console.log('webvis initialized with options:', options);
}
```
--------------------------------
### Example: ContentType ID
Source: https://docs.threedy.io/3.11.6/doc/webvis/interfaces/ContentType
Provides an example of a content type identifier, such as 'x3d-xml'.
```JavaScript
const contentTypeId = "x3d-xml";
```
--------------------------------
### webvis API Initialization
Source: https://docs.threedy.io/3.11.6/doc/integration/TROUBLESHOOTER_ADMIN_UI
This section details the initialization process for the webvis API, a core component for visualizing 3D data within Threedy. It covers the necessary steps and configurations to get the webvis environment up and running.
```javascript
/**
* Initializes the webvis API.
* @param {object} options - Configuration options for webvis.
* @param {string} options.containerId - The ID of the HTML element to render webvis in.
* @param {object} [options.theme] - Optional theme settings.
*/
function initializeWebvis(options) {
// ... initialization logic ...
console.log('webvis initialized with options:', options);
}
```
--------------------------------
### webvis API Initialization
Source: https://docs.threedy.io/3.11.6/doc/integration/AUTHENTICATION
This section details the initialization process for the webvis API, a core component for visualizing 3D data within Threedy. It covers the necessary steps and configurations to get the webvis environment up and running.
```javascript
/**
* Initializes the webvis API.
* @param {object} options - Configuration options for webvis.
* @param {string} options.containerId - The ID of the HTML element to render webvis in.
* @param {object} [options.theme] - Optional theme settings.
*/
function initializeWebvis(options) {
// ... initialization logic ...
console.log('webvis initialized with options:', options);
}
```
--------------------------------
### Set Render Setup
Source: https://docs.threedy.io/3.11.6/doc/webvis/enums/ViewerSettingStrings
Specifies the render setup configuration for the viewer. The default is RenderSetup.LOCAL.
```javascript
RenderSetup.LOCAL
```
--------------------------------
### webvis API Initialization
Source: https://docs.threedy.io/3.11.6/doc/webvis/interfaces/ContextCreatedListenerOptions
This section details the initialization process for the webvis API, a core component for interacting with 3D data within the Threedy platform. It covers the necessary steps and configurations to get the webvis environment up and running.
```JavaScript
/**
* Initializes the webvis API.
* @param {object} options - Configuration options for initialization.
* @param {string} options.containerId - The ID of the HTML element to render the webvis instance.
* @param {object} options.viewerConfig - Configuration for the 3D viewer.
* @returns {Promise