webgl-fluid-enhanced
Advanced tools
Comparing version
{ | ||
"name": "webgl-fluid-enhanced", | ||
"version": "0.5.2", | ||
"version": "0.6.0", | ||
"description": "WebGL Fluid Simulation for modern webpages (works even on mobile)", | ||
"author": "Michael Brusegard", | ||
"license": "MIT", | ||
"main": "./dist/webgl-fluid-enhanced.umd.js", | ||
"module": "./dist/webgl-fluid-enhanced.mjs", | ||
"types": "./dist/webgl-fluid-enhanced.d.ts", | ||
"type": "module", | ||
"main": "./build/index.js", | ||
"module": "./build/index.js", | ||
"types": "./build/index.d.ts", | ||
"files": [ | ||
"./build" | ||
], | ||
"exports": { | ||
".": { | ||
"import": "./dist/webgl-fluid-enhanced.mjs", | ||
"require": "./dist/webgl-fluid-enhanced.umd.js" | ||
"types": "./build/index.d.ts", | ||
"import": "./build/index.js" | ||
} | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"prepare": "mkdir -p dist && cp src/index.d.ts dist/webgl-fluid-enhanced.d.ts", | ||
"build": "vite build", | ||
"dev": "vite" | ||
"build": "tsc --project tsconfig.build.json && bun build ./src/index.ts --outdir ./build --minify", | ||
"dev": "bun run --hot server.ts", | ||
"watch": "tsc --watch --project tsconfig.build.json --emitDeclarationOnly false", | ||
"lint": "eslint --ext '**/*.ts}" | ||
}, | ||
@@ -31,8 +33,17 @@ "repository": { | ||
}, | ||
"homepage": "https://github.com/michaelbrusegard/WebGL-Fluid-Enhanced#readme", | ||
"homepage": "https://michaelbrusegard.github.io/WebGL-Fluid-Enhanced/", | ||
"devDependencies": { | ||
"@semantic-release/changelog": "^6.0.3", | ||
"@semantic-release/git": "^10.0.1", | ||
"semantic-release": "^21.0.7", | ||
"vite": "^4.4.9" | ||
"@types/eslint": "^8.56.2", | ||
"@types/three": "^0.160.0", | ||
"@typescript-eslint/eslint-plugin": "^6.19.1", | ||
"@typescript-eslint/parser": "^6.19.1", | ||
"eslint": "^8.56.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-prettier": "^5.1.3", | ||
"hono": "^3.12.8", | ||
"prettier": "^3.2.4", | ||
"semantic-release": "^23.0.0", | ||
"typescript": "^5.3.3" | ||
}, | ||
@@ -51,3 +62,4 @@ "release": { | ||
] | ||
} | ||
}, | ||
"packageManager": "bun@1.0.25" | ||
} |
@@ -9,3 +9,3 @@ # [WebGL Fluid Enhanced](https://www.npmjs.com/package/webgl-fluid-enhanced) | ||
I wanted to use PavelDoGreat's [WebGL Fluid Simulation](https://github.com/PavelDoGreat/WebGL-Fluid-Simulation) for [my personal website](https://www.michaelbrusegard.com) ([see code](https://github.com/michaelbrusegard/personal-website)), but I couldn't find a way to use it with Next.js. So I decided to add ES Module Support. I also added some extra config options so I can personally customise it how I like and I removed the config GUI and other boilerplate. I hope you find it useful! | ||
I wanted to use Pavel Dobryakov's [WebGL Fluid Simulation](https://github.com/PavelDoGreat/WebGL-Fluid-Simulation) for [my personal website](https://www.michaelbrusegard.com) ([see code](https://github.com/michaelbrusegard/personal-website)), but I couldn't find a way to use it with Next.js. So I decided to add ES Module Support. I also added some extra config options so I can personally customise it how I like and I removed the config GUI and other boilerplate. I hope you find it useful! | ||
@@ -15,4 +15,6 @@ #### [Preview here!](https://michaelbrusegard.github.io/WebGL-Fluid-Enhanced/) | ||
## Screenshots | ||
 | ||
 | ||
 | ||
 | ||
@@ -39,2 +41,3 @@ | ||
- Method to splat at specific coordinates | ||
- TypeScript support | ||
@@ -121,3 +124,3 @@ ## Config options | ||
// This parameter is optional. If not provided, colors from the palette or then a random color may be used. | ||
color | ||
color, | ||
); | ||
@@ -152,9 +155,13 @@ ``` | ||
```html | ||
<!DOCTYPE html> | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
</head> | ||
<body> | ||
<canvas style="width: 100vw; height: 100vh;"></canvas> | ||
<script type="importmap"> | ||
{ | ||
"imports": { | ||
"webgl-fluid-enhanced": "https://unpkg.com/webgl-fluid-enhanced@latest" | ||
} | ||
} | ||
</script> | ||
<script type="module"> | ||
@@ -266,3 +273,5 @@ import webGLFluidEnhanced from 'webgl-fluid-simulation'; | ||
selector: 'app-root', | ||
template: ` <canvas #canvasRef style="width: 100vw; height: 100vh;"></canvas> `, | ||
template: ` | ||
<canvas #canvasRef style="width: 100vw; height: 100vh;"></canvas> | ||
`, | ||
}) | ||
@@ -269,0 +278,0 @@ export class AppComponent implements OnInit { |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
319
2.9%Yes
NaN53961
-46.06%13
225%5
-16.67%521
-66.56%2
100%1
Infinity%