Giter VIP home page Giter VIP logo

arc-ball's Introduction

arc-ball-logo

<arc-ball>

A small Web Component enables arcball 3D view for everything inside.

GitHub npm npm npm bundle size

Inspired by wonderful demos1 made by Bartosz Ciechanowski, and a great paper2 written by Ken Shoemake, this is a nice little tool for someone who like to create 3D models with CSS transform.

Demo

Go to the Home page.

arc-ball-demo-0 arc-ball-demo-3 arc-ball-demo-4 arc-ball-demo-2 arc-ball-demo-1 arc-ball-demo-5

Usage

Include via CDN(e.g. unpkg) or Download a copy

<script src="https://unpkg.com/@9am/arc-ball/dist/index.min.js"></script>

<arc-ball>
    <section>preserve-3d CSS transform elements or anything you want</section>
</arc-ball>
<arc-ball>
    <!-- built-in xyz axis indicator -->
    <arc-ball-axis></arc-ball-axis>
</arc-ball>
<arc-ball>
    <!-- this'll not include by the arcball -->
    <section slot="escape">escape the 3d control</section>
</arc-ball>
<arc-ball>
    <!-- built-in stl renderer -->
    <arc-ball-stl src="/* stl JSON */"></arc-ball-stl>
</arc-ball>
Or import the ESM version
<script type="module">
    import 'https://unpkg.com/@9am/arc-ball/dist/index.es.js';
</script>
Or install via npm
npm install @9am/arc-ball

Documentation

width height and perspective can be controlled by the style of the <arc-ball> element.

License

MIT

Footnotes

  1. Bartosz Ciechanowski Blog

  2. ARCBALL: A User Interface for Specifying Three-Dimensional Orientation Using a Mouse

arc-ball's People

Contributors

9am avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.