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

@iak-extra/scene-composer-extra

v0.4.0

Published

Extra Libraries for IoT App Kit Scene Composer

Downloads

386

Readme

IoT App Kit Extra

>> README - 日本語版

This library extends the AWS IoT App Kit's Scene Composer.

  • Replaces TwinMaker tag objects to Three.js object (e.g. MMD, buttons, text, etc.)
  • Triggers a color change in TwinMaker tags to change the motion of the MMD and the content of the text.

Strongly dependent on IoT App Kit.

https://github.com/awslabs/iot-app-kit

Dynamic Sample

https://pub-5e7ce27e493044a6ad7b1d927d05320c.r2.dev/index.html

Document

https://shotaoki.github.io/iot-app-kit-extra/

Concept

Easily achieve a range of things that TwinMaker does not implement.

Requirements

Equivalent to IoT App Kit.

Language, Environment

  • Node.js
  • React 18.0 Later
  • Typescript
  • VSCode

Usage

Quick Start

Create new react application with iot-extra.

npx @iak-extra/cli create ${Application Name}

Installation

Already exists react project, you can install with NPM.

npm install @iak-extra/scene-composer-extra

Create Tag

Create tags in TwinMaker in advance.

You can name the tag anything you like. For example, you can name it "any-text-tag-name".

Use it

Simply write the following to replace the tag with the name "any-text-tag-name" with a ThreeMeshUi text object.

import { initialize } from "@iot-app-kit/source-iottwinmaker";
import { SceneViewer } from "@iot-app-kit/scene-composer";
import { useOverrideTags } from "@iak-extra/scene-composer-extra";

function App() {
  // Read TwinMaker Scene
  const twinmaker = initialize(/** Certificate */);
  const sceneLoader = twinmaker.s3SceneLoader(/** Scene Info */);

  /** Controller for TwinMaker */
  const controller = useOverrideTags({
    // Replace Tag to Text
    "any-text-tag-name": (replaceTag) =>
      replaceTag.toText?.create({
        content: "TextContents",
      }),
  });

  return (
    <div className="App">
      <SceneViewer
        sceneComposerId={controller.composerId}
        sceneLoader={sceneLoader}
      />
    </div>
  );
}

export default App;

Similarly, the tag is replaced by MMD when written as follows.

"any-mmd-tag-name": (replaceTag) => {
    replaceTag.toMMD?.create({
        // MMD Initialize Info
    })
}

The following will replace the tag with a button.

"any-button-tag-name": (replaceTag) => {
    replaceTag.toButton?.create({
        // Button Initialize Info
    })
    .onClickEvent(() => {
      console.log("clicked !!");
    }),
}

Development

Execute the following command to install the library.

# Execute Directory :: src/scene_composer_extra
npm install

Build the library with the following command.

# Execute Directory :: src/scene_composer_extra
npm run build

# Export To :: package/scene_composer_extra/dist

The following command will import the library into your development project.

npm install ${ProjectRoot}/package/scene_composer_extra

The following command pushes to NPM.

# Execute Directory :: package/scene_composer_extra
npm publish ./

License

The license of this source code is MIT.

The fonts, illustrations, and MMD models included in the resource are the property of their copyright holders and are subject to their licenses.