mathbox-react
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

Mathbox React

React bindings for Mathbox.

Example

import React from "react"
import { ContainedMathbox, Axis, Grid, Cartesian } from "mathbox-react"
import { OrbitControls } from "three/examples/jsm/controls/OrbitControls"

const SimpleExample: React.FC = () => (
  <ContainedMathbox
    options={{
      plugins: ["core", "controls", "cursor"],
      controls: { klass: OrbitControls },
    }}
    containerStyle={{ height: "100vh" }}
  >
    <Cartesian>
      <Axis axis="x" color="orange" />
      <Axis axis="y" color="blue" />
      <Axis axis="z" color="green" />
      <Grid axes="xz" />
    </Cartesian>
  </ContainedMathbox>
)

export default SimpleExample

Readme

Keywords

none

Package Sidebar

Install

npm i mathbox-react

Weekly Downloads

38

Version

0.3.0

License

ISC

Unpacked Size

273 kB

Total Files

122

Last publish

Collaborators

  • cchudzicki