aboutsummaryrefslogtreecommitdiff
path: root/lib/components
diff options
context:
space:
mode:
authorRuben Beltran del Rio <git@r.bdr.sh>2024-05-07 22:37:27 +0200
committerRuben Beltran del Rio <git@r.bdr.sh>2024-05-07 22:37:27 +0200
commit362f91160b243453578633e3f9af67ce40179d8c (patch)
treea9ee95e2f8a9c59189ea904ce87bfe54ed5be107 /lib/components
parent5f6ef99eae91f53239f08143cead1249893fef81 (diff)
Make 3D
Diffstat (limited to 'lib/components')
-rw-r--r--lib/components/configuration.js9
-rw-r--r--lib/components/radius.js9
-rw-r--r--lib/components/triple_amplitude.js12
-rw-r--r--lib/components/triple_frequency.js6
-rw-r--r--lib/components/up.js12
5 files changed, 45 insertions, 3 deletions
diff --git a/lib/components/configuration.js b/lib/components/configuration.js
new file mode 100644
index 0000000..ddb4a27
--- /dev/null
+++ b/lib/components/configuration.js
@@ -0,0 +1,9 @@
+import { Component } from '@serpentity/serpentity';
+
+export default class Configuration extends Component {
+ constructor(config) {
+
+ super(config);
+ this.lineLength = this.lineLength || 1000;
+ }
+};
diff --git a/lib/components/radius.js b/lib/components/radius.js
new file mode 100644
index 0000000..2aa29a8
--- /dev/null
+++ b/lib/components/radius.js
@@ -0,0 +1,9 @@
+import { Component } from '@serpentity/serpentity';
+
+export default class Radius extends Component {
+ constructor(config) {
+
+ super(config);
+ this.radius = this.radius || 5;
+ }
+};
diff --git a/lib/components/triple_amplitude.js b/lib/components/triple_amplitude.js
new file mode 100644
index 0000000..376c321
--- /dev/null
+++ b/lib/components/triple_amplitude.js
@@ -0,0 +1,12 @@
+import { Component } from '@serpentity/serpentity';
+
+export default class TripleAmplitude extends Component {
+ constructor(config) {
+
+ super(config);
+
+ this.a = this.a || Math.random();
+ this.b = this.b || Math.random();
+ this.c = this.c || Math.random();
+ }
+};
diff --git a/lib/components/triple_frequency.js b/lib/components/triple_frequency.js
index aa768e3..1f118b9 100644
--- a/lib/components/triple_frequency.js
+++ b/lib/components/triple_frequency.js
@@ -5,8 +5,8 @@ export default class TripleFrequency extends Component {
super(config);
- this.a = Math.random();
- this.b = Math.random();
- this.c = Math.random();
+ this.a = this.a || Math.random();
+ this.b = this.b || Math.random();
+ this.c = this.c || Math.random();
}
};
diff --git a/lib/components/up.js b/lib/components/up.js
new file mode 100644
index 0000000..f28cc20
--- /dev/null
+++ b/lib/components/up.js
@@ -0,0 +1,12 @@
+import { Component } from '@serpentity/serpentity';
+
+export default class Up extends Component {
+ constructor(config) {
+
+ super(config);
+
+ this.x = this.x || 0;
+ this.y = this.y || 1;
+ this.z = this.z || 0;
+ }
+};