Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@oasis-engine/ark

Package Overview
Dependencies
Maintainers
9
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@oasis-engine/ark

  • 0.0.20-beta.0
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
9
Weekly downloads
 
Created
Source

Avatar Component

This is a virtual avatar component. We support ArkComponent, which can quickly generate virtual avatar, edit avatar, and interact with each other.

Usage

1. Create component manually

import { ArkComponent } from "@oasis-engine/ark";

const arkComponent = entity.addComponent(ArkComponent);

// init avatar
arkComponent.replaceModel("***").then(() => {
  // play animation, actions can be bone-mapped
  const animationList = arkComponent.animationNameList;
  const clipName1 = animationList[0];
  const duration = arkComponent.getAnimationDuration(clipName1);
  arkComponent.animator.play(clipName1);

  // Edit blendShape by name.
  const bsNameList = arkComponent.blendShapeNameList;
  arkComponent.editBlendShape("bs1", 0.5);
  arkComponent.getBlendShapeValue("bs1"); // 0.5

  // Use some ark materials
  arkComponent.useSSSMaterial();

  // ... reference to typescript in ArkComponent ...
});

2. Use low code mode to edit the products exported by the Ark platform

import { ArkComponent } from "@oasis-engine/ark";

const handleSceneLoaded = (oasis) => {
  const rootEntity = oasis.engine.sceneManager.activeScene.getRootEntity();
  const avatarEntity = rootEntity.findByName("avatar");
  const avatar = avatarEntity.getComponent(ArkComponent);

  // use avatar capabilities in ArkComponent.
  avatar.onReady.then(()=>{
    avatar.***();
    avatar.***();
  })
};

npm

The ark component is published on npm with full typing support. To install, use:

npm install @oasis-engine/ark -S

This will allow you to import ark component entirely using:

import { ArkComponent } from "@oasis-engine/ark";

API

You can download ArkComponent by following the steps above, and then operate according to the typescript

FAQs

Package last updated on 02 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc