diff --git a/package-lock.json b/package-lock.json index 43e5aaf..842423f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,8 @@ "dependencies": { "@fontsource/fira-mono": "^4.5.0", "@lukeed/uuid": "^2.0.0", + "@types/cannon": "^0.1.8", + "cannon-es": "^0.19.0", "cookie": "^0.4.1", "gsap": "^3.9.1", "lil-gui": "^0.16.1", @@ -303,6 +305,11 @@ } } }, + "node_modules/@types/cannon": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/@types/cannon/-/cannon-0.1.8.tgz", + "integrity": "sha512-aabgPL9ho1Qov3mMnBJCTG+vTWhFrhRi/5INwsZCPhf3BwabRWz53ryffCDzRSlV4T0f4eQS0OQo5Y/RCZsngQ==" + }, "node_modules/@types/cookie": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz", @@ -696,6 +703,11 @@ "node": ">=6" } }, + "node_modules/cannon-es": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/cannon-es/-/cannon-es-0.19.0.tgz", + "integrity": "sha512-fu9UXrjFmAQXq3JyBVPbtyc53suX+QHzikZEJykxroVNnIx1xHq0jZenK8qwhdwbBAtDL9n/47TyPELuSQwZuA==" + }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -1968,9 +1980,9 @@ } }, "node_modules/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, "node_modules/mkdirp": { @@ -3457,6 +3469,11 @@ "svelte-hmr": "^0.14.9" } }, + "@types/cannon": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/@types/cannon/-/cannon-0.1.8.tgz", + "integrity": "sha512-aabgPL9ho1Qov3mMnBJCTG+vTWhFrhRi/5INwsZCPhf3BwabRWz53ryffCDzRSlV4T0f4eQS0OQo5Y/RCZsngQ==" + }, "@types/cookie": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz", @@ -3719,6 +3736,11 @@ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, + "cannon-es": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/cannon-es/-/cannon-es-0.19.0.tgz", + "integrity": "sha512-fu9UXrjFmAQXq3JyBVPbtyc53suX+QHzikZEJykxroVNnIx1xHq0jZenK8qwhdwbBAtDL9n/47TyPELuSQwZuA==" + }, "chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -4633,9 +4655,9 @@ } }, "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, "mkdirp": { diff --git a/package.json b/package.json index fcb303a..63a244e 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,8 @@ "dependencies": { "@fontsource/fira-mono": "^4.5.0", "@lukeed/uuid": "^2.0.0", + "@types/cannon": "^0.1.8", + "cannon-es": "^0.19.0", "cookie": "^0.4.1", "gsap": "^3.9.1", "lil-gui": "^0.16.1", diff --git a/src/lib/molecules/header/Header.svelte b/src/lib/molecules/header/Header.svelte index df397ca..065354c 100644 --- a/src/lib/molecules/header/Header.svelte +++ b/src/lib/molecules/header/Header.svelte @@ -38,6 +38,9 @@
  • Scroll
  • +
  • + Physics +
  • Todos
  • diff --git a/src/lib/organism/Physics.svelte b/src/lib/organism/Physics.svelte new file mode 100644 index 0000000..11702d4 --- /dev/null +++ b/src/lib/organism/Physics.svelte @@ -0,0 +1,308 @@ + + +
    +

    Click on control's parameters to rain balls and boxes!

    + +
    + + diff --git a/src/routes/physics.svelte b/src/routes/physics.svelte new file mode 100644 index 0000000..7e6fc09 --- /dev/null +++ b/src/routes/physics.svelte @@ -0,0 +1,11 @@ + + + + Physics + + +

    Three.js x Sveltekit - Physics

    + + diff --git a/static/sounds/hit.mp3 b/static/sounds/hit.mp3 new file mode 100644 index 0000000..fb90b35 Binary files /dev/null and b/static/sounds/hit.mp3 differ