tutorials:advanced:create-module-lib
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| tutorials:advanced:create-module-lib [2025/04/02 16:09] – gaetan | tutorials:advanced:create-module-lib [2025/04/02 16:26] (current) – gaetan | ||
|---|---|---|---|
| Line 68: | Line 68: | ||
| Then, restart GroIMP to load the library. | Then, restart GroIMP to load the library. | ||
| + | |||
| + | Now let's open a new project ('' | ||
| ==== Type ==== | ==== Type ==== | ||
| + | |||
| + | The types from the module library can be imported in the project like any other classes: | ||
| + | '' | ||
| + | |||
| + | The pattern is: '' | ||
| + | |||
| + | Notice that the name of the file is required in the import. GroIMP implicitly create classes with the name of the files to wrap all types defined in .rgg classes. | ||
| + | |||
| + | **Note:** in the '' | ||
| + | |||
| + | The Node An.A have the shader from their original project, i.e. the one with the image. | ||
| + | |||
| ==== Resources ==== | ==== Resources ==== | ||
| + | Resources from module lib can also be used without classes. You can use the shader '' | ||
| + | |||
| + | <code java> | ||
| + | module A(float len) extends Sphere(0.1) | ||
| + | { | ||
| + | {setShader(shader(" | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | The Shader reference use the path: '' | ||
tutorials/advanced/create-module-lib.1743602945.txt.gz · Last modified: 2025/04/02 16:09 by gaetan
