jsulpis / realtime-planet-shader

Realtime planet shader in WebGL
https://jsulpis.github.io/realtime-planet-shader/earth/
GNU General Public License v3.0
343 stars 19 forks source link

Which Run Environement #4

Closed jpalmer78 closed 9 months ago

jpalmer78 commented 10 months ago

I'm new to typescript, but I believe I have it working properly. I have installed modules four and tweakpane, because they no longer error, but I am hitting an error using npx tsc:

src/earth/earth.ts:23:18 - error TS2322: Type '"nearestMipmapLinear"' is not assignable to type 'Filter'. 23 options: { minFilter: "nearestMipmapLinear" },

  node_modules/four/src/Sampler.ts:22:3
    22   minFilter: Filter
The expected type comes from property 'minFilter' which is declared here on type 'Partial<SamplerOptions>'

src/earth/earth.ts:32:18 - error TS2322: Type '"linearMipmapLinear"' is not assignable to type 'Filter'. 32 options: { minFilter: "linearMipmapLinear" },

  node_modules/four/src/Sampler.ts:22:3
    22   minFilter: Filter
The expected type comes from property 'minFilter' which is declared here on type 'Partial<SamplerOptions>'

Found 2 errors in the same file, starting at: src/earth/earth.ts:23

How best to deploy this? I started on typescript because I couldn't get any webserver to send the *.ts files. It complained about mime type issue. I am curious what you are using for development and testing as well. Thank you for your time

jsulpis commented 10 months ago

Hi, you have to use pnpm when installing the dependencies, because I patched the four package and the patch will only work with pnpm.

So you can:

jsulpis commented 9 months ago

I consider that the issue is fixed, feel free to reopen if you need more guidance