You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: Documentation/content/docs/develop_class.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,9 @@ title: Creating a new class in vtk.js
4
4
This guide illustrates how to add new classes to the vtk.js repository and the concepts behind the infrastructure we use.
5
5
6
6
First of all, vtk.js does not rely on the class definition that was brought in with the ES6 specification. Instead, vtk.js provides a closure based infrastructure which lets us compose methods into specific instances without any hierarchical constraint.
7
-
Due to our closure paradigm methods can be used outside of their instance context and can be directly be passed as callbacks. Therefore their usage does not require `this` to be referenced each time.
7
+
Due to our closure paradigm methods can be used outside of their instance context and can be directly be passed as callbacks. Therefore their usage does not require `this` to be referenced each time.
8
8
9
-
By convention, we create a directory for each of our class. The name of the directory must be the name of the class capitalized without its "vtk" prefix (although when importing a class, we will readd the "vtk" prefix). The definition of that class should be held in an "index.js" file within that directory.
9
+
By convention, we create a directory for each of our class. The name of the directory must be the name of the class capitalized without its "vtk" prefix (although when importing a class, we will add the "vtk" prefix). The definition of that class should be held in an "index.js" file within that directory.
@@ -41,8 +41,8 @@ For instance, vtk.js currently have the following set of **kits** in bold and *m
41
41
## Class definition
42
42
43
43
Here is an example of how to get started writing a new class for vtk.js.
44
-
The design inspiration originated from Douglas Crockford with functional inheritance but we went further in some way too and the [blog](https://medium.com/javascript-scene/functional-mixins-composing-software-ffb66d5e731c) provides a very good background on the technics we use and leverage inside vtk.js.
45
-
That other [blog](https://medium.com/@kentcdodds/classes-complexity-and-functional-programming-a8dd86903747) also explain why classes in JavaScript are not always the best choice.
44
+
The design inspiration originated from Douglas Crockford with functional inheritance, but we went further in some ways, too. This [blog](https://medium.com/javascript-scene/functional-mixins-composing-software-ffb66d5e731c) provides a very good background on the techniques we use and leverage inside vtk.js.
45
+
This [blog](https://medium.com/@kentcdodds/classes-complexity-and-functional-programming-a8dd86903747) also explains why classes in JavaScript are not always the best choice.
0 commit comments