Skip to content

Commit

Permalink
Update build docs tag (#13)
Browse files Browse the repository at this point in the history
* Updated build and docs

* 0.4.3
  • Loading branch information
ydaniv authored Feb 3, 2025
1 parent 99e5e0d commit 06fb5d6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
11 changes: 9 additions & 2 deletions dist/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,18 @@ function getController$1 (config) {
for (let scene of config.scenes) {
if (!scene.disabled) {
// get scene's progress
const x = +clamp(0, 1, scene.transform?.x(progress.x) || progress.x / config.rect.width).toPrecision(4);
const y = +clamp(0, 1, scene.transform?.y(progress.y) || progress.y / config.rect.height).toPrecision(4);
const normalizedX = scene.transform?.x(progress.x) || progress.x / config.rect.width;
const normalizedY = scene.transform?.y(progress.y) || progress.y / config.rect.height;

const x = +clamp(0, 1, normalizedX).toPrecision(4);
const y = +clamp(0, 1, normalizedY).toPrecision(4);

const velocity = {x: progress.vx, y: progress.vy};

if (config.allowActiveEvent && (normalizedX > 1 || normalizedY > 1 || normalizedX < 0 || normalizedY < 0)) {
progress.active = false;
}

// run effect
scene.effect(scene, {x, y}, velocity, progress.active);
}
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset='utf-8'>
<title>kuliso 0.4.1 | Documentation</title>
<title>kuliso 0.4.2 | Documentation</title>
<meta name='description' content='Tiny library for performant pointer-driven or gyroscope-driven effects'>
<meta name='viewport' content='width=device-width,initial-scale=1'>
<link href='assets/bass.css' rel='stylesheet'>
Expand All @@ -15,7 +15,7 @@
<div id='split-left' class='overflow-auto fs0 height-viewport-100'>
<div class='py1 px2'>
<h3 class='mb0 no-anchor'>kuliso</h3>
<div class='mb1'><code>0.4.1</code></div>
<div class='mb1'><code>0.4.2</code></div>
<input
placeholder='Filter'
id='filter-input'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kuliso",
"version": "0.4.2",
"version": "0.4.3",
"sideeffects": true,
"description": "Tiny library for performant pointer-driven or gyroscope-driven effects",
"main": "dist/index.cjs",
Expand Down

0 comments on commit 06fb5d6

Please sign in to comment.