material-designer-runtime 0.1.0 → 0.1.2
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 +79 -4
- package/dist/document.d.ts +1 -1
- package/dist/graph/bake-service.d.ts +6 -2
- package/dist/graph/channel-baker.d.ts +1 -1
- package/dist/graph/compiler.d.ts +35 -5
- package/dist/graph/material-textures.d.ts +3 -0
- package/dist/graph/mesh-material.d.ts +6 -0
- package/dist/graph/nodes/shader/shader-material.d.ts +2 -0
- package/dist/graph/nodes/vector/vector-rotate.d.ts +2 -0
- package/dist/graph/textured-surface.d.ts +18 -4
- package/dist/graph/types.d.ts +21 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1665 -917
- package/dist/runtime.d.ts +7 -5
- package/dist/tsl/tile.d.ts +2 -0
- package/dist/tsl/vector-rotate.d.ts +4 -0
- package/package.json +1 -1
package/dist/runtime.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import type * as THREE from "three";
|
|
2
|
+
import type { NodeMaterial, WebGPURenderer } from "three/webgpu";
|
|
2
3
|
import { MaterialGraphSession } from "./document";
|
|
3
4
|
import { MaterialBakeService } from "./graph/bake-service";
|
|
4
5
|
import { TexturedSurface } from "./graph/textured-surface";
|
|
5
|
-
import type {
|
|
6
|
+
import type { MaterialGraphDocument } from "./graph/types";
|
|
6
7
|
import { type NodeRegistry } from "./graph/registry";
|
|
7
8
|
export interface MaterialGraphRuntimeOptions {
|
|
8
9
|
document?: MaterialGraphDocument;
|
|
@@ -15,11 +16,12 @@ export declare class MaterialGraphRuntime {
|
|
|
15
16
|
readonly surface: TexturedSurface;
|
|
16
17
|
readonly service: MaterialBakeService;
|
|
17
18
|
constructor(options?: MaterialGraphRuntimeOptions);
|
|
18
|
-
|
|
19
|
+
getNodeMaterial(): NodeMaterial;
|
|
20
|
+
getMeshMaterial(): THREE.Material;
|
|
19
21
|
get lastError(): string | null;
|
|
22
|
+
get busy(): boolean;
|
|
23
|
+
whenIdle(): Promise<void>;
|
|
20
24
|
setRenderer(renderer: WebGPURenderer): this;
|
|
21
|
-
setBackend(backend: MaterialBackend): this;
|
|
22
|
-
getBackend(): MaterialBackend;
|
|
23
25
|
fromDocument(document: MaterialGraphDocument): this;
|
|
24
26
|
setDocument(document: MaterialGraphDocument): this;
|
|
25
27
|
getDocument(): MaterialGraphDocument;
|
package/dist/tsl/tile.d.ts
CHANGED
|
@@ -17,6 +17,8 @@ export interface TileUniforms {
|
|
|
17
17
|
export interface TileResult {
|
|
18
18
|
mask: V;
|
|
19
19
|
value: V;
|
|
20
|
+
cellCoord: V;
|
|
21
|
+
cellRandom: V;
|
|
20
22
|
}
|
|
21
23
|
export declare function tilePattern(coord: V, grid: TileGrid, u: TileUniforms): TileResult;
|
|
22
24
|
export declare function hexPattern(coord: V, columns: number, rows: number, gap: V, edge: V): TileResult;
|