diff --git a/src/geometries/rename.bat b/src/geometries/rename.bat deleted file mode 100644 index e86381c..0000000 --- a/src/geometries/rename.bat +++ /dev/null @@ -1,2 +0,0 @@ -ren *.js *.ts -pause diff --git a/src/meshes/Box.js b/src/meshes/Box.js deleted file mode 100644 index 9b72f52..0000000 --- a/src/meshes/Box.js +++ /dev/null @@ -1,4 +0,0 @@ -import { meshComponent } from './Mesh.js'; -import { props, createGeometry } from '../geometries/BoxGeometry.js'; - -export default meshComponent('Box', props, createGeometry); diff --git a/src/meshes/Box.ts b/src/meshes/Box.ts new file mode 100644 index 0000000..e0ad5d1 --- /dev/null +++ b/src/meshes/Box.ts @@ -0,0 +1,4 @@ +import { meshComponent } from './Mesh' +import { props, createGeometry } from '../geometries/BoxGeometry.js' + +export default meshComponent('Box', props, createGeometry) diff --git a/src/meshes/Circle.js b/src/meshes/Circle.js deleted file mode 100644 index 8baceb2..0000000 --- a/src/meshes/Circle.js +++ /dev/null @@ -1,4 +0,0 @@ -import { meshComponent } from './Mesh.js'; -import { props, createGeometry } from '../geometries/CircleGeometry.js'; - -export default meshComponent('Circle', props, createGeometry); diff --git a/src/meshes/Circle.ts b/src/meshes/Circle.ts new file mode 100644 index 0000000..e1ef7ad --- /dev/null +++ b/src/meshes/Circle.ts @@ -0,0 +1,4 @@ +import { meshComponent } from './Mesh' +import { props, createGeometry } from '../geometries/CircleGeometry.js' + +export default meshComponent('Circle', props, createGeometry) diff --git a/src/meshes/Cone.js b/src/meshes/Cone.js deleted file mode 100644 index 8919e86..0000000 --- a/src/meshes/Cone.js +++ /dev/null @@ -1,4 +0,0 @@ -import { meshComponent } from './Mesh.js'; -import { props, createGeometry } from '../geometries/ConeGeometry.js'; - -export default meshComponent('Cone', props, createGeometry); diff --git a/src/meshes/Cone.ts b/src/meshes/Cone.ts new file mode 100644 index 0000000..742d0d4 --- /dev/null +++ b/src/meshes/Cone.ts @@ -0,0 +1,4 @@ +import { meshComponent } from './Mesh' +import { props, createGeometry } from '../geometries/ConeGeometry.js' + +export default meshComponent('Cone', props, createGeometry) diff --git a/src/meshes/Cylinder.js b/src/meshes/Cylinder.js deleted file mode 100644 index 762a545..0000000 --- a/src/meshes/Cylinder.js +++ /dev/null @@ -1,4 +0,0 @@ -import { meshComponent } from './Mesh.js'; -import { props, createGeometry } from '../geometries/CylinderGeometry.js'; - -export default meshComponent('Cylinder', props, createGeometry); diff --git a/src/meshes/Cylinder.ts b/src/meshes/Cylinder.ts new file mode 100644 index 0000000..8c6c3d7 --- /dev/null +++ b/src/meshes/Cylinder.ts @@ -0,0 +1,4 @@ +import { meshComponent } from './Mesh' +import { props, createGeometry } from '../geometries/CylinderGeometry.js' + +export default meshComponent('Cylinder', props, createGeometry) diff --git a/src/meshes/Dodecahedron.js b/src/meshes/Dodecahedron.ts similarity index 67% rename from src/meshes/Dodecahedron.js rename to src/meshes/Dodecahedron.ts index 1ad3e6a..31d5a66 100644 --- a/src/meshes/Dodecahedron.js +++ b/src/meshes/Dodecahedron.ts @@ -1,4 +1,4 @@ -import { meshComponent } from './Mesh.js'; -import { props, createGeometry } from '../geometries/DodecahedronGeometry.js'; +import { meshComponent } from './Mesh' +import { props, createGeometry } from '../geometries/DodecahedronGeometry.js' -export default meshComponent('Dodecahedron', props, createGeometry); +export default meshComponent('Dodecahedron', props, createGeometry) diff --git a/src/meshes/Icosahedron.js b/src/meshes/Icosahedron.ts similarity index 67% rename from src/meshes/Icosahedron.js rename to src/meshes/Icosahedron.ts index e687b67..9a6d427 100644 --- a/src/meshes/Icosahedron.js +++ b/src/meshes/Icosahedron.ts @@ -1,4 +1,4 @@ -import { meshComponent } from './Mesh.js'; -import { props, createGeometry } from '../geometries/IcosahedronGeometry.js'; +import { meshComponent } from './Mesh' +import { props, createGeometry } from '../geometries/IcosahedronGeometry.js' -export default meshComponent('Icosahedron', props, createGeometry); +export default meshComponent('Icosahedron', props, createGeometry) diff --git a/src/meshes/Lathe.js b/src/meshes/Lathe.js deleted file mode 100644 index b54e38e..0000000 --- a/src/meshes/Lathe.js +++ /dev/null @@ -1,4 +0,0 @@ -import { meshComponent } from './Mesh.js'; -import { props, createGeometry } from '../geometries/LatheGeometry.js'; - -export default meshComponent('Lathe', props, createGeometry); diff --git a/src/meshes/Lathe.ts b/src/meshes/Lathe.ts new file mode 100644 index 0000000..90e65d9 --- /dev/null +++ b/src/meshes/Lathe.ts @@ -0,0 +1,4 @@ +import { meshComponent } from './Mesh' +import { props, createGeometry } from '../geometries/LatheGeometry.js' + +export default meshComponent('Lathe', props, createGeometry) diff --git a/src/meshes/Octahedron.js b/src/meshes/Octahedron.ts similarity index 68% rename from src/meshes/Octahedron.js rename to src/meshes/Octahedron.ts index 7354120..623fa11 100644 --- a/src/meshes/Octahedron.js +++ b/src/meshes/Octahedron.ts @@ -1,4 +1,4 @@ -import { meshComponent } from './Mesh.js'; -import { props, createGeometry } from '../geometries/OctahedronGeometry.js'; +import { meshComponent } from './Mesh' +import { props, createGeometry } from '../geometries/OctahedronGeometry.js' -export default meshComponent('Octahedron', props, createGeometry); +export default meshComponent('Octahedron', props, createGeometry) diff --git a/src/meshes/Plane.js b/src/meshes/Plane.js deleted file mode 100644 index 286cfc7..0000000 --- a/src/meshes/Plane.js +++ /dev/null @@ -1,4 +0,0 @@ -import { meshComponent } from './Mesh.js'; -import { props, createGeometry } from '../geometries/PlaneGeometry.js'; - -export default meshComponent('Plane', props, createGeometry); diff --git a/src/meshes/Plane.ts b/src/meshes/Plane.ts new file mode 100644 index 0000000..006f182 --- /dev/null +++ b/src/meshes/Plane.ts @@ -0,0 +1,4 @@ +import { meshComponent } from './Mesh' +import { props, createGeometry } from '../geometries/PlaneGeometry.js' + +export default meshComponent('Plane', props, createGeometry) diff --git a/src/meshes/Polyhedron.js b/src/meshes/Polyhedron.ts similarity index 68% rename from src/meshes/Polyhedron.js rename to src/meshes/Polyhedron.ts index d8bed07..d5728ba 100644 --- a/src/meshes/Polyhedron.js +++ b/src/meshes/Polyhedron.ts @@ -1,4 +1,4 @@ -import { meshComponent } from './Mesh.js'; -import { props, createGeometry } from '../geometries/PolyhedronGeometry.js'; +import { meshComponent } from './Mesh' +import { props, createGeometry } from '../geometries/PolyhedronGeometry.js' -export default meshComponent('Polyhedron', props, createGeometry); +export default meshComponent('Polyhedron', props, createGeometry) diff --git a/src/meshes/Ring.js b/src/meshes/Ring.js deleted file mode 100644 index 7358c89..0000000 --- a/src/meshes/Ring.js +++ /dev/null @@ -1,4 +0,0 @@ -import { meshComponent } from './Mesh.js'; -import { props, createGeometry } from '../geometries/RingGeometry.js'; - -export default meshComponent('Ring', props, createGeometry); diff --git a/src/meshes/Ring.ts b/src/meshes/Ring.ts new file mode 100644 index 0000000..4facd92 --- /dev/null +++ b/src/meshes/Ring.ts @@ -0,0 +1,4 @@ +import { meshComponent } from './Mesh' +import { props, createGeometry } from '../geometries/RingGeometry.js' + +export default meshComponent('Ring', props, createGeometry) diff --git a/src/meshes/Sphere.js b/src/meshes/Sphere.js deleted file mode 100644 index 2fcd0d5..0000000 --- a/src/meshes/Sphere.js +++ /dev/null @@ -1,4 +0,0 @@ -import { meshComponent } from './Mesh.js'; -import { props, createGeometry } from '../geometries/SphereGeometry.js'; - -export default meshComponent('Sphere', props, createGeometry); diff --git a/src/meshes/Sphere.ts b/src/meshes/Sphere.ts new file mode 100644 index 0000000..7be44cc --- /dev/null +++ b/src/meshes/Sphere.ts @@ -0,0 +1,4 @@ +import { meshComponent } from './Mesh' +import { props, createGeometry } from '../geometries/SphereGeometry.js' + +export default meshComponent('Sphere', props, createGeometry) diff --git a/src/meshes/Tetrahedron.js b/src/meshes/Tetrahedron.ts similarity index 67% rename from src/meshes/Tetrahedron.js rename to src/meshes/Tetrahedron.ts index 08b9ad5..f8f8fe5 100644 --- a/src/meshes/Tetrahedron.js +++ b/src/meshes/Tetrahedron.ts @@ -1,4 +1,4 @@ -import { meshComponent } from './Mesh.js'; -import { props, createGeometry } from '../geometries/TetrahedronGeometry.js'; +import { meshComponent } from './Mesh' +import { props, createGeometry } from '../geometries/TetrahedronGeometry.js' -export default meshComponent('Tetrahedron', props, createGeometry); +export default meshComponent('Tetrahedron', props, createGeometry) diff --git a/src/meshes/Torus.js b/src/meshes/Torus.js deleted file mode 100644 index 6178f40..0000000 --- a/src/meshes/Torus.js +++ /dev/null @@ -1,4 +0,0 @@ -import { meshComponent } from './Mesh.js'; -import { props, createGeometry } from '../geometries/TorusGeometry.js'; - -export default meshComponent('Torus', props, createGeometry); diff --git a/src/meshes/Torus.ts b/src/meshes/Torus.ts new file mode 100644 index 0000000..fbfc1de --- /dev/null +++ b/src/meshes/Torus.ts @@ -0,0 +1,4 @@ +import { meshComponent } from './Mesh' +import { props, createGeometry } from '../geometries/TorusGeometry.js' + +export default meshComponent('Torus', props, createGeometry) diff --git a/src/meshes/TorusKnot.js b/src/meshes/TorusKnot.ts similarity index 69% rename from src/meshes/TorusKnot.js rename to src/meshes/TorusKnot.ts index 0611c16..012ecf2 100644 --- a/src/meshes/TorusKnot.js +++ b/src/meshes/TorusKnot.ts @@ -1,4 +1,4 @@ -import { meshComponent } from './Mesh.js'; -import { props, createGeometry } from '../geometries/TorusKnotGeometry.js'; +import { meshComponent } from './Mesh' +import { props, createGeometry } from '../geometries/TorusKnotGeometry.js' -export default meshComponent('TorusKnot', props, createGeometry); +export default meshComponent('TorusKnot', props, createGeometry) diff --git a/src/meshes/Tube.js b/src/meshes/Tube.ts similarity index 52% rename from src/meshes/Tube.js rename to src/meshes/Tube.ts index b93d757..cee61f7 100644 --- a/src/meshes/Tube.js +++ b/src/meshes/Tube.ts @@ -1,22 +1,22 @@ -import { defineComponent } from 'vue'; -import Mesh from './Mesh.js'; -import { props, createGeometry, updateTubeGeometryPoints } from '../geometries/TubeGeometry.js'; +import { defineComponent } from 'vue' +import Mesh from './Mesh' +import { props, createGeometry, updateTubeGeometryPoints } from '../geometries/TubeGeometry.js' export default defineComponent({ extends: Mesh, props, created() { - this.createGeometry(); - this.addGeometryWatchers(props); + this.createGeometry() + this.addGeometryWatchers(props) }, methods: { createGeometry() { - this.geometry = createGeometry(this); + this.geometry = createGeometry(this) }, // update curve points (without using prop, faster) updatePoints(points) { - updateTubeGeometryPoints(this.geometry, points); + updateTubeGeometryPoints(this.geometry, points) }, }, __hmrId: 'Tube', -}); +}) diff --git a/src/meshes/index.js b/src/meshes/index.js index 323110b..b96d1a0 100644 --- a/src/meshes/index.js +++ b/src/meshes/index.js @@ -1,23 +1,23 @@ -export { default as Mesh } from './Mesh.js'; +export { default as Mesh } from './Mesh' -export { default as Box } from './Box.js'; -export { default as Circle } from './Circle.js'; -export { default as Cone } from './Cone.js'; -export { default as Cylinder } from './Cylinder.js'; -export { default as Dodecahedron } from './Dodecahedron.js'; -export { default as Icosahedron } from './Icosahedron.js'; -export { default as Lathe } from './Lathe.js'; -export { default as Octahedron } from './Octahedron.js'; -export { default as Plane } from './Plane.js'; -export { default as Polyhedron } from './Polyhedron.js'; -export { default as Ring } from './Ring.js'; -export { default as Sphere } from './Sphere.js'; -export { default as Tetrahedron } from './Tetrahedron.js'; -export { default as Text } from './Text.js'; -export { default as Torus } from './Torus.js'; -export { default as TorusKnot } from './TorusKnot.js'; -export { default as Tube } from './Tube.js'; +export { default as Box } from './Box' +export { default as Circle } from './Circle' +export { default as Cone } from './Cone' +export { default as Cylinder } from './Cylinder' +export { default as Dodecahedron } from './Dodecahedron' +export { default as Icosahedron } from './Icosahedron' +export { default as Lathe } from './Lathe' +export { default as Octahedron } from './Octahedron' +export { default as Plane } from './Plane' +export { default as Polyhedron } from './Polyhedron' +export { default as Ring } from './Ring' +export { default as Sphere } from './Sphere' +export { default as Tetrahedron } from './Tetrahedron' +export { default as Text } from './Text' +export { default as Torus } from './Torus' +export { default as TorusKnot } from './TorusKnot' +export { default as Tube } from './Tube' -export { default as Image } from './Image.js'; -export { default as InstancedMesh } from './InstancedMesh.js'; -export { default as Sprite } from './Sprite.js'; +export { default as Image } from './Image' +export { default as InstancedMesh } from './InstancedMesh' +export { default as Sprite } from './Sprite'