npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

atft

v1.6.5

Published

Ready-to-use Angular components for Three.js, see https://makimenko.github.io/angular-template-for-threejs/.

Downloads

349

Readme

GitHub repo CI build status Known Vulnerabilities Code coverage by codecov.io npm version Storybook link

Angular Template For Three.js (atft)

Leverage Three.js in your Angular app using simple components:

<atft-orbit-controls [rotateSpeed]=1 [zoomSpeed]=1.2>
  <atft-renderer-canvas>
    <atft-perspective-camera
      [fov]=60 [near]=1 [far]=1100
      positionX=20 [positionY]=50 [positionZ]=50>
    </atft-perspective-camera>
    <atft-scene>
      <atft-axes-helper [size]=200></atft-axes-helper>
      <atft-grid-helper [size]=100 [divisions]=10></atft-grid-helper>
    </atft-scene>
  </atft-renderer-canvas>
</atft-orbit-controls>

Storybook

Explore provided Angular components in isolation!

Click below to see the demo in a web browser:

Goals of this repo

  • Implement npm atft library
    • Bindings for Three.js
    • SceneComponent with basic usage of scene, camera, lights, helpers, renderer
    • Integrated Three.js examples as components (e.g. OrbitControls, OBJLoader, ObjectLoader)
  • Develop and test library components in isolation via Storybook

Usage in your Angular project

  1. Set up an Angular project and install dependencies:

    npm i three dagre atft yaml --save
    npm i @types/dagre @types/three --save-dev
  2. Import library into your module:

    import { AtftModule } from 'atft';
    ...
      imports: [
        ...
        AtftModule
      ]
     ...
  3. Use atft library components in src/app.component.html:

    <atft-orbit-controls [rotateSpeed]=1 [zoomSpeed]=1.2>
      <atft-renderer-canvas #mainRenderer>
        <atft-perspective-camera
          [fov]=60 [near]=1 [far]=1100
          [positionX]=20 [positionY]=50 [positionZ]=50>
        </atft-perspective-camera>
        <atft-scene>
          <atft-axes-helper [size]=200></atft-axes-helper>
          <atft-grid-helper [size]=100 [divisions]=10></atft-grid-helper>
        </atft-scene>
      </atft-renderer-canvas>
    </atft-orbit-controls>
  4. (optionally) if you want to fit 3D scene canvas into entire screen (horizontally and vertically):

    in src/styles.css:

     html, body {
         height: 100%;
         margin: 0;
     }  

    in src/app/app.component.css:

     :host {
         height: 100%;
         display: flex;
     } 

Used by

Sample vect project, which is based on atft library:

Development

Build Library

  1. git clone https://github.com/makimenko/angular-template-for-threejs.git
  2. npm install
  3. ng build atft

Run Tests

  • npm test

Run Storybook

Run and watch locally: npm run storybook

Our storybook config is in ./storybook and our stories in ./src/stories. See the official Storybook.js documentation for more information.

API Documentation

For mode details see API documentation

Release and Changelog

To automatically generate changelog and bump atft version:

npm run release

Contributors

Feel free to join us! Just submit your ideas via pull-requests :)