Nefarious Pomegranate Magnate
    Wondering what’s next for npm?Check out our public roadmap! »

    @egjs/view3d
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.1 • Public • Published

    Version typescript supports

    Fast & customizable 3D model viewer for everyone

    👉 Demo / API Document / Tutorial

    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.

    IE Chrome Firefox Safari iOS Android
    11+ Latest Latest Latest 8+ 5+

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

    Augmented Reality(AR) Coverage

    Android
    (WebXR)
    Android
    (Google SceneViewer)
    iOS
    (AR QuickLook)
    Chrome All browsers Safari Chrome
    Android 7.0+, Chromium 81+ Android 7.0+ iOS 11+

    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.
    

    Install

    npm i @egjs/view3d

    DownloadsWeekly Downloads

    7

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    5.32 MB

    Total Files

    161

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar