@rosalana/sandbox 0.2.0 → 0.2.1
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/dist/globals.d.ts +0 -5
- package/dist/index.cjs.js +21 -21
- package/dist/index.es.js +326 -319
- package/dist/tools/compilable.d.ts +2 -1
- package/dist/tools/web_gl.d.ts +6 -0
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ShaderFunction, ShaderUniform, WebGLVersion } from "../types";
|
|
2
2
|
import Parser from "./parser";
|
|
3
|
+
import type ModuleRegistry from "./module_registry";
|
|
3
4
|
export default class Compilable {
|
|
4
5
|
/** Flag to track if the shader has been compiled */
|
|
5
6
|
protected isCompiled: boolean;
|
|
@@ -29,7 +30,7 @@ export default class Compilable {
|
|
|
29
30
|
/**
|
|
30
31
|
* Compile the shader source, resolving all imports
|
|
31
32
|
*/
|
|
32
|
-
compile(): string;
|
|
33
|
+
compile(runtimeModules?: ModuleRegistry): string;
|
|
33
34
|
/**
|
|
34
35
|
* Process all #import directives
|
|
35
36
|
*/
|
package/dist/tools/web_gl.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { AnyUniformValue, ResolvedSandboxOptions, TextureOptions, TextureSc
|
|
|
2
2
|
import Clock from "./clock";
|
|
3
3
|
import Hooks from "./hooks";
|
|
4
4
|
import Shader from "./shader";
|
|
5
|
+
import ModuleRegistry from "./module_registry";
|
|
5
6
|
/**
|
|
6
7
|
* Main WebGL orchestrator.
|
|
7
8
|
* Manages context, program, geometry, uniforms, and rendering loop.
|
|
@@ -20,6 +21,7 @@ export default class WebGL {
|
|
|
20
21
|
private _resolution;
|
|
21
22
|
private _mouse;
|
|
22
23
|
private _version;
|
|
24
|
+
private _runtimeModules;
|
|
23
25
|
playing: boolean;
|
|
24
26
|
private constructor();
|
|
25
27
|
/**
|
|
@@ -93,6 +95,10 @@ export default class WebGL {
|
|
|
93
95
|
* Get WebGL context.
|
|
94
96
|
*/
|
|
95
97
|
getContext(): WebGLContext;
|
|
98
|
+
/**
|
|
99
|
+
* Get registered runtime modules.
|
|
100
|
+
*/
|
|
101
|
+
getUsingModules(): ModuleRegistry;
|
|
96
102
|
/**
|
|
97
103
|
* Get detected WebGL version.
|
|
98
104
|
*/
|