@shaderfrog/core 1.0.10 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/plugins/three/threngine.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Shaderfrog Core
|
|
2
2
|
|
|
3
3
|
🚨 This library is experimental! 🚨
|
|
4
|
+
|
|
4
5
|
🚨 The API can change at any time! 🚨
|
|
5
6
|
|
|
6
7
|
The core graph API that powers Shaderfrog. This API, built on top of the
|
|
@@ -8,6 +9,12 @@ The core graph API that powers Shaderfrog. This API, built on top of the
|
|
|
8
9
|
Shaderfrog graphs into an intermediate result, which you then pass off to an
|
|
9
10
|
_engine_ (aka a plugin), to create a running GLSL shader.
|
|
10
11
|
|
|
12
|
+
### Examples
|
|
13
|
+
|
|
14
|
+
See examples of using Core in your own projects [on Github](https://github.com/ShaderFrog/examples).
|
|
15
|
+
|
|
16
|
+
- **Three.js:** [Live](https://codesandbox.io/s/great-hertz-sjh425?file=/src/index.js) - [Source](https://github.com/ShaderFrog/examples/tree/main/three)
|
|
17
|
+
|
|
11
18
|
### Graph
|
|
12
19
|
|
|
13
20
|
```typescript
|
|
@@ -71,7 +71,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
71
71
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
72
72
|
};
|
|
73
73
|
var _a, _b;
|
|
74
|
-
import { ShaderLib, RawShaderMaterial, Vector2, Vector3, Vector4, Color, } from 'three';
|
|
74
|
+
import { ShaderLib, RawShaderMaterial, Vector2, Vector3, Vector4, Color, GLSL3, } from 'three';
|
|
75
75
|
import { NodeType } from '../../graph/graph-types';
|
|
76
76
|
import { prepopulatePropertyInputs, mangleMainFn } from '../../graph/graph';
|
|
77
77
|
import importers from './importers';
|
|
@@ -503,7 +503,7 @@ export var createMaterial = function (compileResult, ctx) {
|
|
|
503
503
|
transparent: true,
|
|
504
504
|
opacity: 1.0,
|
|
505
505
|
// See https://github.com/mrdoob/three.js/pull/26809
|
|
506
|
-
glslVersion:
|
|
506
|
+
glslVersion: GLSL3,
|
|
507
507
|
vertexShader: compileResult === null || compileResult === void 0 ? void 0 : compileResult.vertexResult.replace('#version 300 es', ''),
|
|
508
508
|
fragmentShader: compileResult === null || compileResult === void 0 ? void 0 : compileResult.fragmentResult.replace('#version 300 es', ''),
|
|
509
509
|
};
|