Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.
/ regl-worldview Public archive

worldview extracted into a separate repo

License

Notifications You must be signed in to change notification settings

foxglove/regl-worldview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠️⚠️⚠️

This repository is no longer maintained. It was a fork of regl-worldview used by Foxglove Studio. Foxglove Studio now uses Three.js instead of Worldview.

⚠️⚠️⚠️

@foxglove/regl-worldview

Worldview is a React library for rendering 2D and 3D scenes using regl.

Visit the homepage to see more guides, examples and APIs.

Quick start

Add @foxglove/regl-worldview to your React project:

npm install --save @foxglove/regl-worldview

Then try rendering the basic example:

Image of the basic example

import React from "react";

import Worldview, { Cubes, Axes } from "@foxglove/regl-worldview";

function BasicExample() {
  const markers = [
    {
      pose: {
        orientation: { x: 0, y: 0, z: 0, w: 1 },
        position: { x: 0, y: 0, z: 0 },
      },
      scale: { x: 15, y: 15, z: 15 },
      color: { r: 1, g: 0, b: 1, a: 0.9 },
    },
  ];

  return (
    <Worldview>
      <Cubes>{markers}</Cubes>
      <Axes />
    </Worldview>
  );
}