Buckets:

imerfanrajabee's picture
download
raw
560 Bytes
import { nodeObject } from '../tsl/TSLBase.js';
/**
* Packs a direction vector into a color value.
*
* @tsl
* @function
* @param {Node<vec3>} node - The direction to pack.
* @return {Node<vec3>} The color.
*/
export const directionToColor = ( node ) => nodeObject( node ).mul( 0.5 ).add( 0.5 );
/**
* Unpacks a color value into a direction vector.
*
* @tsl
* @function
* @param {Node<vec3>} node - The color to unpack.
* @return {Node<vec3>} The direction.
*/
export const colorToDirection = ( node ) => nodeObject( node ).mul( 2.0 ).sub( 1 );

Xet Storage Details

Size:
560 Bytes
·
Xet hash:
bbaadfd8244357c0d89844161d43fc9ed577d0b7eda24da220ebbc8b8403c6b5

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.