Doodle3D-Slicer/simpleExample/index.js
2017-11-12 00:11:05 +01:00

12 lines
398 B
JavaScript

import React from 'react';
import * as THREE from 'three';
import { Interface } from 'doodle3d-slicer';
import fileURL from '!url-loader!./models/shape.json';
import { render } from 'react-dom';
// import fileSaver from 'file-saver';
const jsonLoader = new THREE.JSONLoader();
jsonLoader.load(fileURL, geometry => {
render(<Interface geometry={geometry} />, document.getElementById('app'));
});