-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish to NPM? #1
Comments
How to import this InfiniteGridHelper to my three scene? |
Hey @ZinMinn-Resonest, not sure if you figured it out but you can treat this like any other 3d object. Heres how I used it in my project:
|
@jrj2211 Any idea of how to implement this in react-three-fiber? |
@tresabhi Sorry, I do not |
I'm pretty new to react and three, but I think I can do it. Let's give it a try, I would love to see this as a NPM package. |
I got it to work! I know the license says that I can re-distribute without permission, however, I think it is ethical for me to ask you before I do it. Can I make this an NPM package (with significantly refactored code and support for typescript and react-three-fiber)? |
Sorry no, i'm already preparing the update with a NPM package. However @tresabhi you could provide the base for react-fiber and typescript if you like, the update has a larger amount of changes i need to adapt then. ES6 Module and backwards compatibility comes as well. |
Edit: Get the latest iteration hereOriginal responseinterface IInfiniteGridHelper {
size1?: number;
size2?: number;
color?: THREE.Color;
distance?: number;
axes?: string;
}
const InfiniteGridHelper: FC<IInfiniteGridHelper> = ({ size1 = 10, size2 = 100, color = new THREE.Color('white'), distance = 8000, axes = 'xzy' }) => {
const planeAxes = axes.substr(0, 2);
return (
<mesh>
<shaderMaterial
args={[
{
side: THREE.DoubleSide,
uniforms: {
uSize1: { value: size1 },
uSize2: { value: size2 },
uColor: { value: color },
uDistance: { value: distance },
},
extensions: { derivatives: true },
transparent: true,
vertexShader: `// vertex shader here`,
fragmentShader: `// fragment shader here`,
},
]}
/>
<planeBufferGeometry />
{/* <cylinderGeometry /> */}
</mesh>
);
}; |
Hi all, just discovered this awesome package. Has there been any progress on publishing it on NPM and/or making it work with |
Hi, since there's no news about the NPM publishing, please @tresabhi could you share privately the package? Thank you |
@berry4u My app has it implemented as a component: https://github.com/TresAbhi/Stellar/blob/main/src/components/InfiniteGridHelper.tsx |
I found this fork from @dkaraush https://github.com/dkaraush/THREE.InfiniteGridHelper , He creates a typescript for port, you can |
This is awesome work! Would be great if it was added to NPM
The text was updated successfully, but these errors were encountered: