From 3501af46ebbae79419fbd7819e198f5a4f5390be Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Wed, 9 Sep 2020 14:18:53 +0200 Subject: [PATCH] get CSG to work --- package-lock.json | 5 +++ package.json | 1 + src/App.vue | 2 +- src/components/objects/Project.vue | 71 +++++++++++++++++++++--------- 4 files changed, 56 insertions(+), 23 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9e03a68..1aad114 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13904,6 +13904,11 @@ "resolved": "https://registry.npmjs.org/three/-/three-0.77.0.tgz", "integrity": "sha1-iwsbAAR2ic6qAg1IClYspg2H/zc=" }, + "three-js-csg-es6": { + "version": "73.0.0", + "resolved": "https://registry.npmjs.org/three-js-csg-es6/-/three-js-csg-es6-73.0.0.tgz", + "integrity": "sha512-eeXGyvRVKlfsfqUxuc8V1rIynDkXgEHXqFxQvdyOY2XVOT0ZdoSwQQEzNXUJrLiOUSXC3UaHqhA3P3bfDGL1Qw==" + }, "three.js": { "version": "0.77.1", "resolved": "https://registry.npmjs.org/three.js/-/three.js-0.77.1.tgz", diff --git a/package.json b/package.json index 7db5d65..a7a7c9b 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "axios": "^0.18.1", "dat.gui": "^0.7.7", "oimo": "^1.0.9", + "three-js-csg-es6": "^73.0.0", "three.js": "^0.77.1", "vue": "^2.6.11", "vue-meta": "^1.6.0", diff --git a/src/App.vue b/src/App.vue index c6d2f9e..972af59 100644 --- a/src/App.vue +++ b/src/App.vue @@ -188,7 +188,7 @@ export default { // cam_controls: null, init_cam_pos: { x: 0, y: 10, z: 100 }, // init_cam_pos: { x: 0, y: 150, z: 0 }, - // init_cam_rot: { x: this.deg2rad(180), y: 0, z: 0 }, + init_cam_rot: { x: this.deg2rad(180), y: 0, z: 0 }, raycaster: new THREE.Raycaster(), interactive_objects_names: ['Project', 'Content'], interactive_objects: [], diff --git a/src/components/objects/Project.vue b/src/components/objects/Project.vue index 31b2143..fc64bfb 100644 --- a/src/components/objects/Project.vue +++ b/src/components/objects/Project.vue @@ -1,11 +1,6 @@