@luma.gl/shadertools
Advanced tools
Comparing version 9.0.14 to 9.0.15
@@ -0,4 +1,6 @@ | ||
/// <reference types="node" /> | ||
import { NumberArray } from '@math.gl/types'; | ||
import { UniformFormat } from "../../types.js"; | ||
import { PropType } from "../filters/prop-types.js"; | ||
import { Sampler, Texture } from '@luma.gl/core'; | ||
export type UniformValue = number | boolean | Readonly<NumberArray>; | ||
@@ -12,3 +14,3 @@ export type UniformInfo = { | ||
*/ | ||
export type ShaderModule<PropsT extends Record<string, unknown> = Record<string, unknown>, UniformsT extends Record<string, UniformValue> = Record<string, UniformValue>, BindingsT extends Record<string, unknown> = {}> = { | ||
export type ShaderModule<PropsT extends Record<string, unknown> = Record<string, unknown>, UniformsT extends Record<string, UniformValue> = Record<string, UniformValue>, BindingsT extends Record<string, Buffer | Texture | Sampler> = {}> = { | ||
/** Used for type inference not for values */ | ||
@@ -27,4 +29,4 @@ props?: Required<PropsT>; | ||
defaultUniforms?: Required<UniformsT>; | ||
/** Function that maps settings to uniforms */ | ||
getUniforms?: (settings?: any, prevUniforms?: any) => Record<string, UniformValue>; | ||
/** Function that maps props to uniforms & bindings */ | ||
getUniforms?: (props?: any, oldProps?: any) => Record<string, UniformValue>; | ||
/** uniform buffers, textures, samplers, storage, ... */ | ||
@@ -31,0 +33,0 @@ bindings?: Record<keyof BindingsT, { |
{ | ||
"name": "@luma.gl/shadertools", | ||
"version": "9.0.14", | ||
"version": "9.0.15", | ||
"description": "Shader module system for luma.gl", | ||
@@ -55,3 +55,3 @@ "type": "module", | ||
}, | ||
"gitHead": "0b466762e8255ed11b00c6bc518049d3b54c4009" | ||
"gitHead": "48b6e702cf6ad35748cfa88ffd249c17861ff2af" | ||
} |
@@ -8,2 +8,3 @@ // luma.gl | ||
import {PropType} from '../filters/prop-types'; | ||
import {Sampler, Texture} from '@luma.gl/core'; | ||
@@ -23,3 +24,3 @@ export type UniformValue = number | boolean | Readonly<NumberArray>; // Float32Array> | Readonly<Int32Array> | Readonly<Uint32Array> | Readonly<number[]>; | ||
UniformsT extends Record<string, UniformValue> = Record<string, UniformValue>, | ||
BindingsT extends Record<string, unknown> = {} | ||
BindingsT extends Record<string, Buffer | Texture | Sampler> = {} | ||
> = { | ||
@@ -42,5 +43,4 @@ /** Used for type inference not for values */ | ||
/** Function that maps settings to uniforms */ | ||
// getUniforms?: (settings?: Partial<SettingsT>, prevUniforms?: any /* UniformsT */) => UniformsT; | ||
getUniforms?: (settings?: any, prevUniforms?: any) => Record<string, UniformValue>; | ||
/** Function that maps props to uniforms & bindings */ | ||
getUniforms?: (props?: any, oldProps?: any) => Record<string, UniformValue>; | ||
@@ -47,0 +47,0 @@ /** uniform buffers, textures, samplers, storage, ... */ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2222903
43698