Skip to content

Commit

Permalink
file case
Browse files Browse the repository at this point in the history
  • Loading branch information
pandrr committed Jan 30, 2024
1 parent 0a73411 commit 8f1452f
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions md/5_writing_ops/dev_attachments/dev_attachments.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Creating Attachments

Attachments are files that can be created and read as a string in the op they are attached to.
Attachments are files that can be created and read as a string in the op they are attached to.

An attachment file can be created by clicking on an op and then clicking the create button

Expand Down Expand Up @@ -40,4 +40,4 @@ The attachment can now be accessed inside of your op, select the op and press 'e



![output_attachment_img](img/output_attachment.PNG)
![output_attachment_img](img/output_attachment.png)
8 changes: 4 additions & 4 deletions md/5_writing_ops/dev_callbacks/dev_callbacks.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ When you inspect existing ops by pressing the `View Code` button in the op param
op init is done asynchronously and most of the time it's better to just initalize outside of callbacks and handle port-value-changes in
the corresponding `onChange`;

Please be aware that this function will be called twice on patch load. If you need to initialize a variable global to the op,
Please be aware that this function will be called twice on patch load. If you need to initialize a variable global to the op,
you might be better off doing that outside of any callback. If you do this in `init`, create a variable, set them null and check for that.

```javascript
Expand All @@ -82,8 +82,8 @@ op.init = function()

### onLoaded

Gets called when the whole patch is loaded / all ops are linked / all external libraries loaded etc.
You normally won't need this, as op-specific init-code can just be put in your op-code without a callback.
Gets called when the whole patch is loaded / all ops are linked / all external libraries loaded etc.
You normally won't need this, as op-specific init-code can just be put in your op-code without a callback.
`op.onLoaded` is **not** called when the op has just been added to the patch, only when the patch is loaded.

```javascript
Expand Down Expand Up @@ -117,7 +117,7 @@ The number in the last part of the function defines what kind of error is shown
1 - warning / orange color
2 - error / red color / this will also place a red dot on the right hand side of the op
<br>
![Button](img/dev_callbacks_error_UI_example.png)
![Button](img/dev_callbacks_error_ui_example.png)
<br>
example code to show an error:
```javascript
Expand Down
4 changes: 2 additions & 2 deletions md/5_writing_ops/dev_hello_op/dev_hello_op.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ In this example we will just forward the input value to an out-port. So let’s
const myOutPort = op.outNumber("Output");
```

In the top of the editor window click on `Save` the new code will then be executed, now reload the patch (the browser window) by pressing `cmd + r`.
In the top of the editor window click on `Save` the new code will then be executed, now reload the patch (the browser window) by pressing `cmd + r`.
Now click on `Op` —> `Add` (or use the `Esc`-Shortcut) on the very top of the window, enter the name of the op you just created – `HelloOp` and press Enter.

You now see your newly created op with one input- and one output-port:
Expand Down Expand Up @@ -100,7 +100,7 @@ const multiplyValueIn = op.inFloat("Multiply amount");
This creates a second port and a new part on the object pane which allows us to set the multiplication amount.
Your op should now look like this

![](img/b-port_in_multiply_amount.PNG)
![](img/b-port_in_multiply_amount.png)


Your code should look like this
Expand Down
Binary file not shown.
File renamed without changes
4 changes: 2 additions & 2 deletions md/faq/webgl_differences/webgl_differences.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ Fortunately, cables allows you to resize a texture to the closest power of two w

If you open the file browser and click on the texture you desire to resize, the following options will appear:

![resize_start](img/resize_POT.png)
![resize_start](img/resize_pot.png)

If you look at the bottom of the screenshot, you can see marked in yellow the current size of your image. At the bottom right of your dimensions, there are a few buttons that allow you to process your image through cables. The relevant button to resize to the next power of two is marked in bright green.

After clicking it, a dialogue appears and asks you if you want to resize the texture. If you do that, the following dialogue will appear:

![resize_start](img/resized_POT.png)
![resize_start](img/resized_pot.png)

Your texture is now resized to the next power of two and usable for mipmapping in WebGL1.

Expand Down

0 comments on commit 8f1452f

Please sign in to comment.