typegpu
Version:
A thin layer between JS and WebGPU/WGSL that improves development experience and allows for faster iteration.
17 lines (16 loc) • 509 B
JavaScript
import { $gpuValueOf, $internal, $providing, $soul } from "../../shared/symbols.js";
export function isSlot(value) {
return value?.resourceType === 'slot';
}
export function isLazy(value) {
return value?.resourceType === 'lazy';
}
export function isProviding(value) {
return value?.[$providing] !== undefined;
}
export function isAccessor(value) {
return value?.resourceType === 'accessor';
}
export function isMutableAccessor(value) {
return value?.resourceType === 'mutable-accessor';
}