Doodle3D-Slicer/simpleExample/index.js

12 lines
398 B
JavaScript
Raw Normal View History

2017-11-11 20:23:45 +01:00
import React from 'react';
2017-07-20 12:12:25 +02:00
import * as THREE from 'three';
2017-11-11 20:23:45 +01:00
import { Interface } from 'doodle3d-slicer';
2017-11-12 00:11:05 +01:00
import fileURL from '!url-loader!./models/shape.json';
2017-11-11 20:23:45 +01:00
import { render } from 'react-dom';
// import fileSaver from 'file-saver';
2017-07-07 18:10:29 +02:00
2017-08-17 16:13:30 +02:00
const jsonLoader = new THREE.JSONLoader();
jsonLoader.load(fileURL, geometry => {
2017-11-12 00:11:05 +01:00
render(<Interface geometry={geometry} />, document.getElementById('app'));
2017-07-28 10:48:46 +02:00
});