1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-24 04:12:02 +08:00
This commit is contained in:
Kevin Levron 2021-03-09 18:25:02 +01:00
parent 6cfefd9761
commit 9884606a9a
11 changed files with 28 additions and 25 deletions

View File

@ -2077,9 +2077,9 @@ var Tube = {
this$1.refreshGeometry(); this$1.refreshGeometry();
}); });
}); });
// watch(() => this.points, () => { vue.watch(function () { return this$1.points; }, function () {
// this.updatePoints(); updateTubeGeometryPoints(this$1.geometry, this$1.points);
// }); });
}, },
methods: { methods: {
createGeometry: function createGeometry() { createGeometry: function createGeometry() {
@ -2093,8 +2093,9 @@ var Tube = {
} }
this.geometry = new three.TubeGeometry(curve, this.tubularSegments, this.radius, this.radialSegments, this.closed); this.geometry = new three.TubeGeometry(curve, this.tubularSegments, this.radius, this.radialSegments, this.closed);
}, },
updateCurve: function updateCurve() { // update curve points (without using prop, faster)
updateTubeGeometryPoints(this.geometry, this.points); updateCurve: function updateCurve(points) {
updateTubeGeometryPoints(this.geometry, points);
}, },
}, },
__hmrId: 'Tube', __hmrId: 'Tube',

View File

@ -2073,9 +2073,9 @@ var Tube = {
this$1.refreshGeometry(); this$1.refreshGeometry();
}); });
}); });
// watch(() => this.points, () => { watch(function () { return this$1.points; }, function () {
// this.updatePoints(); updateTubeGeometryPoints(this$1.geometry, this$1.points);
// }); });
}, },
methods: { methods: {
createGeometry: function createGeometry() { createGeometry: function createGeometry() {
@ -2089,8 +2089,9 @@ var Tube = {
} }
this.geometry = new TubeGeometry$1(curve, this.tubularSegments, this.radius, this.radialSegments, this.closed); this.geometry = new TubeGeometry$1(curve, this.tubularSegments, this.radius, this.radialSegments, this.closed);
}, },
updateCurve: function updateCurve() { // update curve points (without using prop, faster)
updateTubeGeometryPoints(this.geometry, this.points); updateCurve: function updateCurve(points) {
updateTubeGeometryPoints(this.geometry, points);
}, },
}, },
__hmrId: 'Tube', __hmrId: 'Tube',

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2073,9 +2073,9 @@ var Tube = {
this$1.refreshGeometry(); this$1.refreshGeometry();
}); });
}); });
// watch(() => this.points, () => { watch(function () { return this$1.points; }, function () {
// this.updatePoints(); updateTubeGeometryPoints(this$1.geometry, this$1.points);
// }); });
}, },
methods: { methods: {
createGeometry: function createGeometry() { createGeometry: function createGeometry() {
@ -2089,8 +2089,9 @@ var Tube = {
} }
this.geometry = new TubeGeometry$1(curve, this.tubularSegments, this.radius, this.radialSegments, this.closed); this.geometry = new TubeGeometry$1(curve, this.tubularSegments, this.radius, this.radialSegments, this.closed);
}, },
updateCurve: function updateCurve() { // update curve points (without using prop, faster)
updateTubeGeometryPoints(this.geometry, this.points); updateCurve: function updateCurve(points) {
updateTubeGeometryPoints(this.geometry, points);
}, },
}, },
__hmrId: 'Tube', __hmrId: 'Tube',

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{ {
"name": "troisjs", "name": "troisjs",
"version": "0.1.12", "version": "0.1.13",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "vite build", "build": "vite build",

View File

@ -20,9 +20,9 @@ export default {
this.refreshGeometry(); this.refreshGeometry();
}); });
}); });
// watch(() => this.points, () => { watch(() => this.points, () => {
// this.updatePoints(); updateTubeGeometryPoints(this.geometry, this.points);
// }); });
}, },
methods: { methods: {
createGeometry() { createGeometry() {