Skip to content

Commit

Permalink
Use official OrbitControls from examples inside three instead of sepa…
Browse files Browse the repository at this point in the history
…rate three-orbitcontrols package and bundle it
  • Loading branch information
remcoder committed Sep 21, 2022
1 parent 3628ad2 commit 9279cff
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 1,247 deletions.
1,180 changes: 0 additions & 1,180 deletions demo/OrbitControls.js

This file was deleted.

2 changes: 1 addition & 1 deletion demo/dist/gcode-preview.js

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,13 @@ <h4>experimental</h4>
</section>
</div>
</div>


<script src="three.min.js"></script>
<script src="OrbitControls.js"></script>
<script src="canvas2image.js"></script>
<script src="dist/gcode-preview.js"></script>
<script src="demo.js"></script>
<script>
const gcodeDemo = initDemo();
loadGCodeFromServer('benchy.gcode');

</script>
</body>
2 changes: 1 addition & 1 deletion demo/three.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/gcode-preview.es.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/gcode-preview.js

Large diffs are not rendered by default.

62 changes: 32 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"types": "dist/gcode-preview.d.ts",
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/three": "^0.132.0",
"@types/three": "^0.144.0",
"@typescript-eslint/eslint-plugin": "^5.38.0",
"@typescript-eslint/parser": "^5.38.0",
"copyfiles": "^2.4.1",
Expand Down Expand Up @@ -49,7 +49,6 @@
"deploy": "firebase deploy --only hosting"
},
"dependencies": {
"three": "^0.140.2",
"three-orbitcontrols": "^2.110.3"
"three": "^0.144.0"
}
}
3 changes: 1 addition & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ export default {
format: 'umd',
name: 'GCodePreview', // the global which can be used in a browser
globals: {
'three': 'THREE',
'three-orbitcontrols': "THREE.OrbitControls"
'three': 'THREE'
}
}
],
Expand Down
2 changes: 1 addition & 1 deletion src/webgl-preview.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Parser, MoveCommand, Layer } from './gcode-parser';
import * as THREE from 'three';
import * as OrbitControls from 'three-orbitcontrols';
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';
import { LineMaterial } from './three-line2/LineMaterial';
import { LineGeometry } from './three-line2/LineGeometry';
import { LineSegments2 } from './three-line2/LineSegments2';
Expand Down
30 changes: 6 additions & 24 deletions vue-demo/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9279cff

Please sign in to comment.