Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1650e5f

Browse files
committed
add docs for glslFunc
1 parent 828739b commit 1650e5f

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

‎docs/.vuepress/config.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ module.exports = {
5959
title: 'Composition',
6060
children: [
6161
'/references-js/geometries/shape',
62+
'/references-js/geometries/glslFunc',
6263
]
6364
},
6465

‎docs/references-js/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Shader Park provides a set of built in functions to help you create your sculptu
1717
[expand](/references-js/operations/expand.html), [shell](/references-js/operations/shell.html), [setSDF](/references-js/operations/setSDF.html)
1818

1919
### Composition
20-
[shape](/references-js/geometries/shape.html)
20+
[shape](/references-js/geometries/shape.html), [glslFunc](/references-js/geometries/glslFunc.html)
2121

2222
------
2323

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
### glslFunc()
2+
3+
### Example
4+
5+
<iframe width="100%" height="450px" src="https://shaderpark.netlify.com/sculpture/-N01zT0sQ9alzTaxVDgG?example=true&embed=true" frameborder="0"></iframe>
6+
7+
---
8+
9+
10+
### Description
11+
Creates a javascript function from a GLSL function. This enables the ability to use if statements(branching),work with integers and even create your own raymarcher. Note this will not work with GL ES3. To use GL ES3 look at glslFuncES3 (note, the error handeling of the glsl is not nearly as good as the glslFunc).
12+
13+
### Syntax
14+
```js
15+
glslFunc(func);
16+
```
17+
18+
### Parameters
19+
**func** String: a String containing a GLSL function.
20+
21+
### Returns
22+
Function: An encapsulated version of func. Any arguments given to this function will be forwarded as arguments to the provided glsl function.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /