Installation

Getting Started - RhinoArtisan Web 3D

This guide will help you integrate RhinoArtisan Web 3D into your project in minutes.

Table of Contents

  • Installation

  • First Use

  • Basic Configuration

  • Key Concepts

  • Next Steps

Installation

<!DOCTYPE html>
<html lang="es">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>My 3D Viewer</title>
    <style>
      body {
        margin: 0;
        font-family: Arial, sans-serif;
      }
      #viewer {
        width: 100vw;
        height: 100vh;
      }
    </style>
  </head>
  <body>
    <rhinoartisan-web-experience id="viewer"></rhinoartisan-web-experience>

    <!-- Load the component -->
    <script
      type="module"
      src="https://tu-cdn.com/rhinoartisan-web-3d.js"
    ></script>

    <script>
      // Wait for DOM to be ready
      document.addEventListener("DOMContentLoaded", () => {
        const viewer = document.getElementById("viewer");

        // Configure the viewer
        viewer.options = {
          model: {
            url: "https://caj.fra1.cdn.digitaloceanspaces.com/viewer/TestJoan.glb",
          },
          environmentFile:
            "https://caj.fra1.cdn.digitaloceanspaces.com/viewer/hdr/defaultmetal.hdr",
        };
      });
    </script>
  </body>
</html>

Option 2: NPM/Yarn (For projects with bundler)

First Use

Basic HTML

React

Vue 3

Angular

Basic Configuration

Minimal Structure

Complete Basic Configuration

Key Concepts

1. Web Component

RhinoArtisan Web 3D is a Web Component, which means:

  • Works with any framework (React, Vue, Angular, Svelte, etc.)

  • Used as a normal HTML tag

  • Has its own encapsulated shadow DOM

2. Options vs API

There are two ways to control the viewer:

Options (Initial configuration):

API (Programmatic control):

3. UUIDs and Materials

3D objects are identified by their UUID (unique name in the model):

4. Events

The viewer emits events to notify changes:

5. Async Loading

The model loads asynchronously:

Common Examples

Example 1: Simple Viewer

Example 2: Control Buttons

Next Steps

Now that you have your viewer working, you can explore:

  1. API Reference - All available methods

  2. Configuration - Detailed configuration options

  3. Materials - Complete materials catalog

  4. Examples - More examples and use cases

  5. Presets - Predefined configurations

Common Troubleshooting

Model doesn't show

Materials don't change

Slow performance

Support

Need help? Contact us:

Last updated

Was this helpful?