@blorkfield/overlay-core 0.8.7 → 0.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +169 -5
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -148,7 +148,7 @@ interface DespawnEffectConfig {
|
|
|
148
148
|
* Unified configuration for spawning scene objects.
|
|
149
149
|
* Objects are configured via tags that define their behavior:
|
|
150
150
|
* - 'falling': Object is dynamic and affected by gravity (without this tag, object is static)
|
|
151
|
-
* - '
|
|
151
|
+
* - 'window_follow': Object follows mouse position when grounded within the canvas window
|
|
152
152
|
* - 'grabable': Object can be dragged via mouse constraint
|
|
153
153
|
*/
|
|
154
154
|
interface ObjectConfig {
|
|
@@ -625,8 +625,8 @@ declare class OverlayScene {
|
|
|
625
625
|
* Spawn an object synchronously.
|
|
626
626
|
* Object behavior is determined by tags:
|
|
627
627
|
* - 'falling': Object is dynamic (affected by gravity)
|
|
628
|
-
* - '
|
|
629
|
-
* - 'grabable': Object can be
|
|
628
|
+
* - 'window_follow': Object follows mouse when grounded (walks toward mouse)
|
|
629
|
+
* - 'grabable': Object can be grabbed and moved with mouse
|
|
630
630
|
* Without 'falling' tag, object is static.
|
|
631
631
|
*/
|
|
632
632
|
spawnObject(config: ObjectConfig): string;
|
package/dist/index.d.ts
CHANGED
|
@@ -148,7 +148,7 @@ interface DespawnEffectConfig {
|
|
|
148
148
|
* Unified configuration for spawning scene objects.
|
|
149
149
|
* Objects are configured via tags that define their behavior:
|
|
150
150
|
* - 'falling': Object is dynamic and affected by gravity (without this tag, object is static)
|
|
151
|
-
* - '
|
|
151
|
+
* - 'window_follow': Object follows mouse position when grounded within the canvas window
|
|
152
152
|
* - 'grabable': Object can be dragged via mouse constraint
|
|
153
153
|
*/
|
|
154
154
|
interface ObjectConfig {
|
|
@@ -625,8 +625,8 @@ declare class OverlayScene {
|
|
|
625
625
|
* Spawn an object synchronously.
|
|
626
626
|
* Object behavior is determined by tags:
|
|
627
627
|
* - 'falling': Object is dynamic (affected by gravity)
|
|
628
|
-
* - '
|
|
629
|
-
* - 'grabable': Object can be
|
|
628
|
+
* - 'window_follow': Object follows mouse when grounded (walks toward mouse)
|
|
629
|
+
* - 'grabable': Object can be grabbed and moved with mouse
|
|
630
630
|
* Without 'falling' tag, object is static.
|
|
631
631
|
*/
|
|
632
632
|
spawnObject(config: ObjectConfig): string;
|
package/dist/index.js
CHANGED
|
@@ -1502,7 +1502,7 @@ var OverlayScene = class {
|
|
|
1502
1502
|
const isDragging = this.grabbedObjectId === entry.id;
|
|
1503
1503
|
if (!isDragging) {
|
|
1504
1504
|
for (const tag of entry.tags) {
|
|
1505
|
-
const key = tag === "
|
|
1505
|
+
const key = tag === "window_follow" ? "mouse" : tag.startsWith("follow-") ? tag.slice(7) : null;
|
|
1506
1506
|
if (key) {
|
|
1507
1507
|
const target = this.followTargets.get(key);
|
|
1508
1508
|
if (target) {
|
|
@@ -2037,8 +2037,8 @@ var OverlayScene = class {
|
|
|
2037
2037
|
* Spawn an object synchronously.
|
|
2038
2038
|
* Object behavior is determined by tags:
|
|
2039
2039
|
* - 'falling': Object is dynamic (affected by gravity)
|
|
2040
|
-
* - '
|
|
2041
|
-
* - 'grabable': Object can be
|
|
2040
|
+
* - 'window_follow': Object follows mouse when grounded (walks toward mouse)
|
|
2041
|
+
* - 'grabable': Object can be grabbed and moved with mouse
|
|
2042
2042
|
* Without 'falling' tag, object is static.
|
|
2043
2043
|
*/
|
|
2044
2044
|
spawnObject(config) {
|