Fast & customizable 3D model viewer for everyone

Version typescript supports

Fast & customizable 3D model viewer for everyone

👉 Demo / API Document / Tutorial / Related Article 1,2

Features

  • A customizable 3D model viewer based on the three.js
  • Supports LOD, which can greatly decrease time before 3D model displays.
  • Supports WebXR & SceneViewer AR for Android & AR Quick Look for iOS
  • Supports multiple AR types
  • Fully documented API
  • Typescript-based

Install

npm i @egjs/view3d
# OR
yarn add @egjs/view3d

Getting Started

@egjs/view3d requires one canvas element to be initialized.

<!-- Wrapper element -->
<div id="some-wrapper">
  <!-- View3D needs one canvas element to render a 3d model -->
  <!-- You don't have to set width / height attribute of it, as View3D will manage that for you. -->
  <!-- Just set its size with CSS, then View3D will use it -->
  <canvas id="my-canvas"></canvas>
  <!-- Other UI elements of your choice here -->
</div>

<!-- Here's some sample CSS style for the reference -->
<style>
#some-wrapper {
  width: 100vw;
  height: 100vh;
}
#my-canvas {
  width: 100%;
  height: 100%;
}
</style>

Then you can use it like

import View3D from "@egjs/view3d";

const canvasEl = document.querySelector("#my-canvas");
const view3d = new View3D(canvasEl);
// or just
const view3d = new View3D("#my-canvas");

See more examples on our Demo / Tutorial

Browser Coverage

View3D is available for browsers support webgl.

See more details at https://caniuse.com/webgl

Augmented Reality(AR) Coverage

License

Copyright (c) 2020-present NAVER Corp.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Author: Shantun Parmar

Leave a Reply

Your email address will not be published.