This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Pristine Grid" | |
{ | |
Properties | |
{ | |
[Toggle] _WorldUV ("Use World Space UV", Float) = 1.0 | |
_GridScale ("Grid Scale", Float) = 1.0 | |
_LineWidthX ("Line Width X", Range(0,1.0)) = 0.01 | |
_LineWidthY ("Line Width Y", Range(0,1.0)) = 0.01 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// This is the Node.js script used to precompute the bvh and store it in a GLTF file. | |
// | |
import { Accessor, Extension, ExtensionProperty, NodeIO, PropertyType, ReaderContext, VertexLayout, WriterContext } from '@gltf-transform/core'; | |
import { PropertyGraph } from '@gltf-transform/core/dist/properties'; | |
import { KHRONOS_EXTENSIONS } from '@gltf-transform/extensions'; | |
import { join, normalize, resolve } from 'path'; | |
import { Box3, BufferGeometry, Float32BufferAttribute } from 'three'; | |
import { MeshBVH } from 'three-mesh-bvh'; | |
import yargs from 'yargs'; |