Skip to content
Mithi Sevilla edited this page Aug 31, 2020 · 11 revisions

A small package to transform declared 3d data (points, polygons, lines) to 2d data. The output is intended to be fed to a bare-minimum-2d plot.

But you can checkout a demo application in: https://mithi.github.io/hello-3d-world/

This is how you use it:

import BareMinimum2d from "@mithi/bare-minimum-2d"
import renderScene from "@mithi/bare-minimum-3d"

const { container, data } = renderScene(
        viewSettings,
        sceneSettings,
        sceneOptions,
        data3d
    )

<BareMinimum2d {...{container, data} />

These are the shape of viewSettings, sceneSettings and sceneOptions. Here is a concrete example. This is the example of the data you pass in (data3d). And finally, this is what the function renderScene spits out, which you are expected to feed to the BareMinimum2d component.

  • SceneOptions
  • SceneSettings
  • ViewSettings

Clone this wiki locally