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

rtn-threed-renderer

v0.0.1

Published

Renders a 3d model

Downloads

1

Readme

RTNThreedRenderer

RTNThreedRenderer is a React Native library for rendering glTF models on Android. This library provides a simple way to incorporate 3D models into your React Native applications, allowing you to enhance user experiences with 3D graphics.

Features

  • Render glTF 2.0 models in your React Native application.
  • Support for textures, animations, and more.

Getting Started

RTNThreedRenderer currently supports glb models for android and usdz models for iOS. It's essential to provide the filename with its extension, as the library caches the file upon the initial download. If you update the URL, make sure to also update the 'fileNameWithExtension' prop accordingly.

Installation

npm install rtnthreedrenderer
# or
yarn add rtnthreedrenderer

Android:

  1. Add kotlin in your android folder

    Go to android folder => build.gradle

    ext {
        .....
        kotlinVersion = '1.8.20'
        }
    dependencies {
        ....
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
    }

    Go to android => app => build.gradle At the top of the file add

    apply plugin: 'kotlin-android'

    then go to the bottom and in dependencies

    dependencies {
     .....
     implementation "org.jetbrains.kotlin:kotlin-stdlib:1.8.20"
    }
  2. To use, import the lib import RTNThreedRenderer from 'rtn-threed-renderer/js/RTNThreedRendererNativeComponent';

    <RTNThreedRenderer
      fileNameWithExtension="filename.glb"
      url="my_netowrk_url_where_glb_model_is_located"
      animationCount={0}
      style={{width: '100%', height: '100%'}}
    />

iOS:

  1. Add ModelIO & SceneKit to your ios project

Open your ios porject in xcode. Go to general tab and scroll down to Frameworks, Libraries and Embedded content Add ModelIO.framework and SceneKit.framework

  1. To use, import the lib import RTNThreedRenderer from 'rtn-threed-renderer/js/RTNThreedRendererNativeComponent';

    <RTNThreedRenderer
      fileNameWithExtension="filename.usdz"
      url="my_network_url_where_usdz_model_is_located"
      style={{width: '100%', height: '100%'}}
    />