diff --git a/.gitignore b/.gitignore
index e42754a..e608232 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,3 @@
node_modules
.DS_Store
-dist
*.local
\ No newline at end of file
diff --git a/index.html b/index.html
index d49c18c..fa8f956 100644
--- a/index.html
+++ b/index.html
@@ -4,6 +4,7 @@
+
Vite App
diff --git a/package.json b/package.json
index 0d06ebf..d472372 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
{
- "name": "test-vite",
+ "name": "trois",
"version": "0.0.0",
"scripts": {
"dev": "vite",
@@ -20,6 +20,7 @@
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"eslint-plugin-vue": "^6.2.2",
- "vite": "^1.0.0-rc.1"
+ "sass": "^1.26.10",
+ "vite": "^1.0.0-rc.4"
}
}
diff --git a/src/App.vue b/src/App.vue
index 3710e9c..2d4d6ab 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,14 +1,46 @@
-
+
+
+
diff --git a/src/components/Test1.vue b/src/components/Test1.vue
new file mode 100644
index 0000000..e8f413e
--- /dev/null
+++ b/src/components/Test1.vue
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/Test.vue b/src/components/Test2.vue
similarity index 56%
rename from src/components/Test.vue
rename to src/components/Test2.vue
index f1a38fd..ba416e9 100644
--- a/src/components/Test.vue
+++ b/src/components/Test2.vue
@@ -1,15 +1,12 @@
-
+
-
-
+
-
-
+
@@ -22,8 +19,7 @@ import { Object3D, MathUtils } from 'three';
import {
Renderer, PerspectiveCamera, Scene,
PointLight,
- Box, Sphere,
- LambertMaterial, PhongMaterial,
+ PhongMaterial,
InstancedMesh, BoxGeometry,
} from '../index.js';
@@ -31,28 +27,25 @@ export default {
components: {
Renderer, PerspectiveCamera, Scene,
PointLight,
- Box, Sphere,
- LambertMaterial, PhongMaterial,
+ PhongMaterial,
InstancedMesh, BoxGeometry,
},
mounted() {
const renderer = this.$refs.renderer;
- // const box = this.$refs.box.mesh;
const { randFloat: rnd, randFloatSpread: rndFS } = MathUtils;
- const iMesh = this.$refs.iMesh.mesh;
+ const imesh = this.$refs.imesh.mesh;
const dummy = new Object3D();
for (let i = 0; i < 1000; i++) {
dummy.position.set(rndFS(100), rndFS(100), rndFS(100));
dummy.rotation.set(rndFS(1), rndFS(1), rndFS(1));
// dummy.scale.set(rnd(0.1, 1), rnd(0.1, 1), rnd(0.1, 1));
dummy.updateMatrix();
- iMesh.setMatrixAt(i, dummy.matrix);
+ imesh.setMatrixAt(i, dummy.matrix);
}
- iMesh.instanceMatrix.needsUpdate = true;
+ imesh.instanceMatrix.needsUpdate = true;
renderer.onBeforeRender(() => {
- // box.rotation.x += 0.01;
});
},
};
diff --git a/src/core/index.js b/src/core/index.js
index 6d8b046..7231343 100644
--- a/src/core/index.js
+++ b/src/core/index.js
@@ -1,3 +1,4 @@
export { default as Renderer } from './Renderer.vue';
export { default as PerspectiveCamera } from './PerspectiveCamera.js';
+export { default as Camera } from './PerspectiveCamera.js';
export { default as Scene } from './Scene.js';
diff --git a/src/index.css b/src/index.css
index 9845495..0374d80 100644
--- a/src/index.css
+++ b/src/index.css
@@ -1,6 +1,4 @@
body {
margin: 0;
-}
-
-#app {
+ font-family: 'Montserrat', sans-serif;
}