Catalog npm
Back to packageRELEASE DETAILS

1.0.7

npm

3dily

3DILY

viewer360 image viewer3d3d model viewer3dily
Published28 Jun 2022
Direct dependencies0
Transitive dependenciesNot calculated

README

Current package documentation

What is 3dily?

3dily is a library for the use of 3dily.com customers, with which you can display 3D models and 360 images on your site.

Installing

In the examples below, the Threedily object comes either from:

UMD

  • Threedily will be registered as a global variable:
<link href="./dist/3dily.css" rel="stylesheet" type="text/css">
<script src="./dist/3dily.min.js"></script>

ESM Module

<link href="./dist/3dily.css" rel="stylesheet" type="text/css">
<script type="module">
  import { Threedily } from "./dist/3dily.esm.min.js";
</script>

NPM

import { Threedily } from '3dily'
import '3dily/style.css'

Usage

<div id="3dily-viewer"></div>
<script>
    const opts = {
        containerId: '3dily-viewer',
        panelId: '6314455ed74d211b23946bbd',
        productCode: 'kamran',
    }
    const threedily = Threedily(opts)
</script>

React

App.js

import { useEffect, useRef } from "react";
import { Threedily } from "3dily";
import "3dily/style.css";

const App = () => {
  const threedily = useRef();

  useEffect(() => {
    threedily.current = Threedily({
      panelId: "6314455ed74d211b23946bbd",
      productCode: "kamran",
      containerId: "3dily-viewer",
    });
    return () => threedily.current?.remove();
  }, []);

  return (
    <div id="3dily-viewer" style={{ width: "500px", height: "500px" }}></div>
  );
};

export default App;

Options

NameDescriptionDefault Value
containerId (required)The container element that we render threedily tool on this element_
panelId (required)The panel id that you can access thier product. Steps to get panelId: Log in to your panel > Profile > API key_
productCode (required)Code of the product_
modewhich feature of threedily do you want to use for your product ? 360 or modelauto
shadowshadow use for adding shadow on the printed productfalse
variantsYou specify the default variants_
backgroundthe background of product that want to show#FFFFFF
autoARautomaticly in mobile must go to ar workspacefalse
arUrlthe url address of ar that we want to openCurrent page

Methods

NameParameterDescription
changeVariants({ layer: variant })You can change the variants using this method. The input parameter must be an object of layer code and variant code, for example: { leg: 'blue', feet: 'brown', ... }
changeBackground(color)The color value can be a string of hex, hsl, rgb and color name (color is required)
toggleShadow(value)The parameter is optional, if no value is given, it will be false if it is true and vice versa
getData()With this method, you can get scene data
remove()You can delete the scene with this method
on(eventName, cb)With this method, you can add a callback to the desired event
off(eventName, cb)With this method, you can remove a callback from the desired event

Events

nameArgumentsDescription
change-frame(frame)Event will fired on active frame change

Demos

Simple

React

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 0

Native requirements
0 direct targetsNot calculated transitive count
No declared dependencies in this collected response

Declarations describe requirements; they are not a resolved dependency graph.

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-8xXd753txqdiki5BzOyORlQRswZiwFk3nweuzXZkGAKvzvVEHpf6X53DYHLeN2jj0fE0nyNebnw/93Cvxq+/9Q==",
  "shasum": "780e9d0dd9831b000b9d8f0e49a52421b4c2e96d",
  "tarball": "https://registry.npmjs.org/3dily/-/3dily-1.0.7.tgz",
  "fileCount": 37,
  "unpackedSize": 126846,
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEQCIF7nUOvWtKUxhH/Cyn+/yvTnM4SnwQz1Z4UQKVP9oc5/AiAQEXH4VpW1/8ZNEZaPlx10DVyWXK+KyUKoXvSTe5Dd1g=="
    }
  ],
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiuxO2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqCvw/9F2OuLoZqSZayRNng7pBPf007TPSp/3Jw05W6g3Tfa/naSPjr\r\nkQxQdsBdkFWxPC5hinCaj9KwgTwbJxXltRwOVWL3+nx9D3vJFy3CtFT/PY6R\r\nrUt8uPZf6FPCWyTNDB+GZ2z+oZBhA4aQXAQY2qrnVdUXNq1iy0ocdcBp3bWL\r\n4ZwjLynFsIYTrnaqNpNf9yOb5nGngttrq7GaXQbNftSjF3PFjgi873w/UIvd\r\nFSqxeJgieZ4wsKb8bpbD6GU73qdD/yPBtHBLju4WXIjLfl0KPhZ9ccaMF2xO\r\nevRZc6iH6tHAWpH0p86YEg9abpSLnMBdJomfeFR4iz7dYjIxWZbDw9lFp1di\r\n9lqbYwwmwZrFmTz6qahw2A29fYm8e2EmJE6rzwDAro9qEEGIB72xrx1HsNBv\r\nQ5r6Kslfn6ZUqDlUUyGD8jdsDcU0T3rng+IEUq+vMb+JFheh57cmYzVS8N/X\r\nXlwDnX5RTDh3jzOf5o9xADp39316BBCOfFTFuElDQYMBwfwzoAQhfvNWhMmD\r\nIoi70f8bPYGBJqM+1+V6le4BwOp2ZVLRtS4fovj86kBQPGzCXd1wsxyfTjJ+\r\nPRqD17S2ZUA2TqDmEkbPgeOSx5G2xEQOavi98JhIv85Dz9xYmAD8mM+Nci58\r\n24BGXZUSuyUGiMeOwElzjZccF3dPNvnKfho=\r\n=YCEa\r\n-----END PGP SIGNATURE-----\r\n"
}

Repository

PENDING
3dily/3dily

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:39 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:6e8d8b6e91ca862b3fde4cf2b869bf16c123c3ce3f334bb4aea2eb8a943a1174

Other collected versions

1.1.3-beta19 Sept1.1.214 Sept1.1.114 Aug1.1.024 Jul1.0.924 Jul1.0.85 JulView all collected versions →