@shaderfrog/core 1.0.9 → 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 +5 -3
- package/package.json +3 -3
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';
|
|
@@ -502,8 +502,10 @@ export var createMaterial = function (compileResult, ctx) {
|
|
|
502
502
|
uniforms: __assign({}, finalUniforms),
|
|
503
503
|
transparent: true,
|
|
504
504
|
opacity: 1.0,
|
|
505
|
-
|
|
506
|
-
|
|
505
|
+
// See https://github.com/mrdoob/three.js/pull/26809
|
|
506
|
+
glslVersion: GLSL3,
|
|
507
|
+
vertexShader: compileResult === null || compileResult === void 0 ? void 0 : compileResult.vertexResult.replace('#version 300 es', ''),
|
|
508
|
+
fragmentShader: compileResult === null || compileResult === void 0 ? void 0 : compileResult.fragmentResult.replace('#version 300 es', ''),
|
|
507
509
|
};
|
|
508
510
|
var additionalProperties = Object.entries(__assign({}, engineMaterial))
|
|
509
511
|
.filter(function (_a) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shaderfrog/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"description": "Shaderfrog core",
|
|
5
5
|
"module": "./dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
"@babel/preset-typescript": "^7.21.5",
|
|
29
29
|
"@types/jest": "^29.5.1",
|
|
30
30
|
"@types/lodash.groupby": "^4.6.7",
|
|
31
|
-
"@types/three": "^0.
|
|
31
|
+
"@types/three": "^0.156.1",
|
|
32
32
|
"babel-jest": "^29.5.0",
|
|
33
33
|
"babylonjs": "^6.2.0",
|
|
34
34
|
"jest": "^29.5.0",
|
|
35
35
|
"prettier": "^2.8.8",
|
|
36
|
-
"three": "^0.
|
|
36
|
+
"three": "^0.156.1",
|
|
37
37
|
"typescript": "^5.0.4"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|