diff --git a/main/extensions/penPlus/blocks/shaderBlocks/drawTriSquare.svg b/main/extensions/penPlus/blocks/shaderBlocks/drawTriSquare.svg new file mode 100644 index 0000000..ba7b0bc --- /dev/null +++ b/main/extensions/penPlus/blocks/shaderBlocks/drawTriSquare.svg @@ -0,0 +1,14 @@ +none yet001010100draw triangle usingbetween,andnone yetdraw square using \ No newline at end of file diff --git a/main/extensions/penPlus/blocks/shaderBlocks/getShaders.svg b/main/extensions/penPlus/blocks/shaderBlocks/getShaders.svg new file mode 100644 index 0000000..15777c8 --- /dev/null +++ b/main/extensions/penPlus/blocks/shaderBlocks/getShaders.svg @@ -0,0 +1,14 @@ +shaders in project \ No newline at end of file diff --git a/main/extensions/penPlus/blocks/shaderBlocks/setArray.svg b/main/extensions/penPlus/blocks/shaderBlocks/setArray.svg new file mode 100644 index 0000000..f367169 --- /dev/null +++ b/main/extensions/penPlus/blocks/shaderBlocks/setArray.svg @@ -0,0 +1,14 @@ +1Uniformnone yet0set itemin number arrayinto1Uniformnone yet00set itemin vector 2 arrayinto1Uniformnone yet000set itemin vector 3 arrayinto1Uniformnone yet0000set itemin vector 4 arrayinto \ No newline at end of file diff --git a/main/extensions/penPlus/blocks/shaderBlocks/setAttribute.svg b/main/extensions/penPlus/blocks/shaderBlocks/setAttribute.svg new file mode 100644 index 0000000..2a35f73 --- /dev/null +++ b/main/extensions/penPlus/blocks/shaderBlocks/setAttribute.svg @@ -0,0 +1,14 @@ +attribute1none yet1set number attributeof pointintoattribute1none yet11set vector 2 attributeof pointintoattribute1none yet111set vector 3 attributeof pointintoattribute1none yet1111set vector 4 attributeof pointinto \ No newline at end of file diff --git a/main/extensions/penPlus/blocks/shaderBlocks/setUniforms.svg b/main/extensions/penPlus/blocks/shaderBlocks/setUniforms.svg new file mode 100644 index 0000000..1189928 --- /dev/null +++ b/main/extensions/penPlus/blocks/shaderBlocks/setUniforms.svg @@ -0,0 +1,14 @@ +Uniformnone yetcostume1set textureintoUniformnone yet0set numberintoUniformnone yet00set vector 2intoUniformnone yet000set vector 3intoUniformnone yet0000set vector 4intoUniformnone yet set matrixintoUniformnone yet[0,0,0,0]set matrixintoUniformnone yetNo cubemaps yet!set cubemapinto \ No newline at end of file diff --git a/main/extensions/penPlus/images/shaderEditorButton.png b/main/extensions/penPlus/images/shaderEditorButton.png new file mode 100644 index 0000000..9599886 Binary files /dev/null and b/main/extensions/penPlus/images/shaderEditorButton.png differ diff --git a/main/extensions/penPlus/images/shaderEditorOpen.png b/main/extensions/penPlus/images/shaderEditorOpen.png new file mode 100644 index 0000000..89b47b0 Binary files /dev/null and b/main/extensions/penPlus/images/shaderEditorOpen.png differ diff --git a/main/extensions/penPlus/images/temp.tmp b/main/extensions/penPlus/images/temp.tmp deleted file mode 100644 index a9a5aec..0000000 --- a/main/extensions/penPlus/images/temp.tmp +++ /dev/null @@ -1 +0,0 @@ -tmp diff --git a/main/extensions/penPlus/images/topBar_Buttons.png b/main/extensions/penPlus/images/topBar_Buttons.png new file mode 100644 index 0000000..5cbb31b Binary files /dev/null and b/main/extensions/penPlus/images/topBar_Buttons.png differ diff --git a/main/extensions/penPlus/images/topBar_Mode.png b/main/extensions/penPlus/images/topBar_Mode.png new file mode 100644 index 0000000..239ef80 Binary files /dev/null and b/main/extensions/penPlus/images/topBar_Mode.png differ diff --git a/main/extensions/penPlus/main.html b/main/extensions/penPlus/main.html index 6ee4bf3..ec7c37f 100644 --- a/main/extensions/penPlus/main.html +++ b/main/extensions/penPlus/main.html @@ -33,8 +33,9 @@

  • Main Triangle Blocks
  • Color Blocks
  • Image Blocks
  • -
  • Shaders Blocks
  • +
  • Shader Blocks
  • Cubemap Blocks
  • List Blocks
  • +
  • Render Textures
  • Extra Blocks
  • diff --git a/main/extensions/penPlus/shaderBlocks.html b/main/extensions/penPlus/shaderBlocks.html new file mode 100644 index 0000000..22a3a9c --- /dev/null +++ b/main/extensions/penPlus/shaderBlocks.html @@ -0,0 +1,119 @@ +Shader Blocks + +

    Shader Blocks

    +This requires some basic knowledge of the shader editor and different variable types! +

    + Into the meat and potatoes of the version 7 update.
    + These blocks help the user interact with the shaders they made in the pen+ shader editor.
    + The blocks are extremely powerful but harder to use, so you might want to read a tutorial. +

    + +

    Basic UI navigation

    +

    Opening the editor

    +

    + Opening the editor is as simple as hitting the "Shader Editor" button under Advanced -> Custom Shaders.

    + +

    +

    + Upon opening the shader editor you will be greeted with another version of scratch!
    + Though this version of scratch has some unique differences.

    + +

    +

    The top bar.

    +

    + First things first the top bar should be elaborated upon.
    + + The buttons on the left side of the screen will be used the most, so make sure to pay attention to this part.

    + + +


    + + On the other side of the top bar is a mode switcher. This allows you to switch between the Scratch and GLSL editors.

    + +

    + +

    Back to actual scratch!

    +

    + "shaders in project" +

    + +

    + Returns an array that contains a list of the project's shaders.
    + An example would be ["Shader 1", "Shader 2"] +

    +
    + +

    + "Draw triangle and square" +

    + +

    + Acts the exact same as the draw triangle, and stamp pen square blocks. Except for the fact that is uses your custom shader. +

    +
    + +Shader variables are shader dependant. So multiple shaders can have the same variable names but different values! +

    + "Set uniform to value" +

    + +

    + These blocks are lumped together due to the simple fact that they have a similar function but have different inputs.
    + They can be broken down based upon type. +

    + Of course these blocks have accompanying get uniform blocks. +

    +
    + +

    + "Set array item" +

    + +

    + Sets the item in the desired array to the desired value! It has a similar typing system to the uniform blocks. +

    +
    + +

    + "Set attribute of point" +

    + +

    + An attribute is a variable localized to one point of a triangle (sorry square users), these have a similar typing system to uniform blocks. +

    +
    \ No newline at end of file