Closed rev111 closed 3 months ago
hello @rev111 I will point you to please refer to section DEMOS in README https://prozi.github.io/detect-collisions/#md:demos especially
the simplest way to go is from here -> https://stackblitz.com/edit/detect-collisions?file=src%2FApp.js (quick start reactjs + detect-collisions library)
also, you don't have to webpack
this is your example fixed:
index.html
<script src="./detect.js" type="module"></script>
detect.js
const { System } = require("detect-collisions");
console.log("detect!");
const system = new System();
const box1 = system.createBox(100,100, 100, 100, {});
system.update();
or replace first line with
import { System } from "detect-collisions";
javascript
🙈 detect.js
you don't have any reference to System
dist/index.js
node_modules
Dear Prozi, thanks for the extensive reply! I think I did not explain my question well: I'm talking about even more basic javascript in the browser - as in manually creating a html file with Githubissues.
Would like to do a little testing in the browser before trying it in a node backend. My attempts are unsuccessful.
detect.js:
console output:
I guess I have to webpack it first - how?