UNPKG

gpu-curtains

Version:

gpu-curtains is a 3D WebGPU rendering engine. It can be used as a standalone 3D engine, but also includes extra classes focused on mapping 3d objects to DOM elements; It allows users to synchronize values such as position, sizing, or scale between them.

13 lines (12 loc) 300 B
//#region src/core/shaders/chunks/utils/constants.ts /** * Constants to use in shadings. */ const constants = ` const PI = ${Math.PI}; const PI2 = ${Math.PI * 2}; const RECIPROCAL_PI = ${1 / Math.PI}; const RECIPROCAL_PI2 = ${.5 / Math.PI}; const EPSILON = 1e-6;`; //#endregion export { constants };