From 46f9b19a37e5e26cf91571f5fd4378aeda1d1fe8 Mon Sep 17 00:00:00 2001 From: Marcel Wiessler Date: Tue, 28 Jan 2025 09:58:46 +0100 Subject: [PATCH] Vanilla: add script --- vanilla/script.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 vanilla/script.js diff --git a/vanilla/script.js b/vanilla/script.js new file mode 100644 index 00000000..195b67d5 --- /dev/null +++ b/vanilla/script.js @@ -0,0 +1,12 @@ +import { + onStart, + BloomEffect, + } from 'https://cdn.jsdelivr.net/npm/@needle-tools/engine/dist/needle-engine.min.js'; + + // Scripting docs: https://engine.needle.tools/docs/scripting.html + + onStart((ctx) => { + const bloom = ctx.scene.addComponent(BloomEffect); + bloom.threshold.value = .5; + bloom.intensity.value = 3; + }); \ No newline at end of file