Skip to content

Latest commit

History

37 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

@vived/component-ABB6700

ABB 6700 — VIVED Smart Component

A reusable 3D robot arm component for VIVED slide apps. Provides domain logic (entities, presentation managers) and a Babylon.js view for a 6-DOF robot arm with independently controllable joint angles (J1–J6).

Installation

npm install @vived/component-abb-6700

Peer dependencies:

  • @babylonjs/core ^9.0.0
  • @babylonjs/loaders ^9.0.0
  • @vived/app ^6.2.0
  • @vived/core ^2.0.0

Usage

ABB6700Facade is the recommended Host integration surface. Its constructor is headless (domain only); load() attaches the Babylon view.

import{ABB6700Facade}from"@vived/component-abb-6700";import{Angle,makeAppObjectRepo,makeDomainFactoryRepo}from"@vived/core";import{makeABB6700FeatureFactory}from"@vived/component-abb-6700";// Register the component's domain factory once per appconstappObjects=makeAppObjectRepo();constdomainFactoryRepo=makeDomainFactoryRepo(appObjects);makeABB6700FeatureFactory(appObjects);domainFactoryRepo.setupDomain();// Create an instance and attach the 3D viewconstrobot=newABB6700Facade("arm-1",appObjects);awaitrobot.load();// Control jointsrobot.setJointAngle("j1",Angle.FromDegrees(45));robot.setPose({j1: Angle.FromDegrees(45),j2: Angle.FromDegrees(90),j3: Angle.FromDegrees(0),j4: Angle.FromDegrees(0),j5: Angle.FromDegrees(0),j6: Angle.FromDegrees(0),});// Serializable state (six joints, in degrees)constsnapshot=robot.getState();robot.applyState(snapshot);

If you need a fully-wired AppObject plus Babylon view in one call without the facade, use createBabylonABB6700:

import{createBabylonABB6700}from"@vived/component-abb-6700";constappObject=awaitcreateBabylonABB6700("arm-1",appObjects);

See COMPONENT_KNOWLEDGE.md for the full API reference, recipes, and the host-owned highlight/pointer integration contract.

Development

npm install
npm run dev # Vite dev server with 3D playground
npm run dev:watch # Watch mode library rebuild
npm run test# Run unit tests
npm run lint # ESLint
npm run build # Production build

Asset Upload Script

A reusable CLI script for uploading asset files (GLB models, textures, etc.) to the VIVED Asset System.

Prerequisites

  • Node.js 18+
  • A VIVED account with API access

Commands

Create a new asset:

npm run upload-asset -- create <filePath>

Uploads the file and creates a new asset record. Prints the new asset ID to stdout.

Update an existing asset's file:

npm run upload-asset -- update <assetId><filePath>

Uploads the file and updates the asset record to point to the new file.

Examples

# Upload the ABB6700 GLB as a new asset
npm run upload-asset -- create public/abb_6700.glb
# Update an existing asset with a new version of the file
npm run upload-asset -- update <asset-uuid> public/abb_6700.glb

After uploading

After creating a new asset, add the returned asset ID to src/component.config.ts:

assets: [{id: "<asset-id>",file: "abb_6700.glb"},],

How it works

  1. Reads the owner ID from package.jsonname field
  2. Derives the asset name from the filename (e.g. ABB6700.glbABB6700)
  3. Prompts interactively for VIVED credentials (email + password)
  4. Authenticates via AWS Cognito
  5. Uploads the file to VIVED storage via a signed URL
  6. Creates or updates the asset metadata record via the VIVED API

Progress and status messages are printed to stderr. The asset ID (on create) is printed to stdout, making it easy to capture in scripts:

ASSET_ID=$(npm run upload-asset -- create public/abb_6700.glb 2>/dev/null)

About

ABB 6700 — VIVED Smart Component. A reusable 3D robot arm component for VIVED slide apps.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages