zimjs 16.4.4 → 16.4.5
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/package.json +1 -1
- package/src/zim.js +13 -8
package/package.json
CHANGED
package/src/zim.js
CHANGED
|
@@ -908,7 +908,7 @@ END EXAMPLE
|
|
|
908
908
|
|
|
909
909
|
EXAMPLE
|
|
910
910
|
// Remember the seed for a user with localStorage (like a cookie)
|
|
911
|
-
|
|
911
|
+
let seed = rand(100000000);
|
|
912
912
|
if (localStorage) {
|
|
913
913
|
if (localStorage.seed) seed = localStorage.seed;
|
|
914
914
|
else localStorage.seed = seed;
|
|
@@ -925,7 +925,7 @@ new Circle(100, [red, green, blue]).center().mov(0,300);
|
|
|
925
925
|
|
|
926
926
|
seedRandom(); // clears the seed
|
|
927
927
|
// below will be a random color each time
|
|
928
|
-
new Circle(100, [red, green, blue]).center().mov(
|
|
928
|
+
new Circle(100, [red, green, blue]).center().mov(200,300);
|
|
929
929
|
END EXAMPLE
|
|
930
930
|
|
|
931
931
|
PARAMETERS
|
|
@@ -10020,12 +10020,14 @@ zim.Bitmap = function(image, width, height, left, top, scale, style, group, inhe
|
|
|
10020
10020
|
displayCheck = true;
|
|
10021
10021
|
var cached = image.cacheCanvas;
|
|
10022
10022
|
var original = image;
|
|
10023
|
+
var bOriginal = original.getBounds();
|
|
10023
10024
|
image.cache(left,top,width,height,scale); // do not chain on end as might be createjs image
|
|
10024
10025
|
this.z_bc = image = image.cacheCanvas; // what we will pass to bitmap
|
|
10025
10026
|
}
|
|
10026
10027
|
}
|
|
10027
10028
|
this.cjsBitmap_constructor(image);
|
|
10028
10029
|
if (original && !cached) original.uncache();
|
|
10030
|
+
if (bOriginal) original.setBounds(bOriginal.x, bOriginal.y, bOriginal.width, bOriginal.height);
|
|
10029
10031
|
|
|
10030
10032
|
var that = this;
|
|
10031
10033
|
this.type = "Bitmap";
|
|
@@ -29648,7 +29650,7 @@ corner - (default 0) the corner radius if there is a backdropColor provided
|
|
|
29648
29650
|
can also be an array of [topLeft, topRight, bottomRight, bottomLeft]
|
|
29649
29651
|
indicatorType - (default "dot" or "circle") can also be "box" or "square", "heart", "star"
|
|
29650
29652
|
or pass in a ZIM Emoji and Indicator will fade alpha to backgroundAlpha parameter setting for unselected emojis
|
|
29651
|
-
|
|
29653
|
+
or pass any display object and the this will be used
|
|
29652
29654
|
fill - (default false) set to true to fill in lights to the left of the selectedIndex
|
|
29653
29655
|
scale - (default 1) for all the lights including spacing
|
|
29654
29656
|
lightScale - (default 1) scale for each light - keeping the spacing unchanged
|
|
@@ -29656,8 +29658,8 @@ interactive - (default false) set to true to make lights clickable
|
|
|
29656
29658
|
clicking on first light when first light is only light on, will toggle light
|
|
29657
29659
|
shadowColor - (default rgba(0,0,0,.3)) set to -1 for no shadow
|
|
29658
29660
|
shadowBlur - (default 5) the shadow blur if shadow is set
|
|
29659
|
-
selectedIndex - (default 0) - set the selectedIndex at start
|
|
29660
|
-
backgroundAlpha - (default 1 or .2 if indicatorType is Emoji) - affects only Emoji indicatorType
|
|
29661
|
+
selectedIndex - (default 0) - set the selectedIndex at start. Use -1 for no indicator at start.
|
|
29662
|
+
backgroundAlpha - (default 1 or .2 if indicatorType is Emoji) - affects only Emoji and custom DisplayObject indicatorType
|
|
29661
29663
|
style - (default true) set to false to ignore styles set with the STYLE - will receive original parameter defaults
|
|
29662
29664
|
group - (default null) set to String (or comma delimited String) so STYLE can set default styles to the group(s) (like a CSS class)
|
|
29663
29665
|
inherit - (default null) used internally but can receive an {} of styles directly
|
|
@@ -46746,6 +46748,8 @@ Chainable function that sets the object's cursor to the type provided - same as
|
|
|
46746
46748
|
|
|
46747
46749
|
NOTE: if using drag(), it will set its own cursor, so use the dragCursor parameter in that case.
|
|
46748
46750
|
|
|
46751
|
+
NOTE: there are also custom cursors as the cursors property of Frame.
|
|
46752
|
+
|
|
46749
46753
|
EXAMPLE
|
|
46750
46754
|
const circle = new Circle(10, red).center().cur(); // "pointer"
|
|
46751
46755
|
circle.on("click", ()=>{zog("yes");});
|
|
@@ -57318,7 +57322,7 @@ EXAMPLE
|
|
|
57318
57322
|
// setting TIMECHECK to true will test for any time over 10 as that may be ms
|
|
57319
57323
|
|
|
57320
57324
|
TIMECHECK = true;
|
|
57321
|
-
new Circle().center().wiggle("x", 100,200, 2000, 4000); // will give warning in console about time not being in
|
|
57325
|
+
new Circle().center().wiggle("x", 100,200, 2000, 4000); // will give warning in console about time not being in ms
|
|
57322
57326
|
END EXAMPLE
|
|
57323
57327
|
--*///+29.45
|
|
57324
57328
|
zim.TIMECHECK = false;
|
|
@@ -58391,6 +58395,7 @@ you can define multiple pages objects add and remove pages objects as needed
|
|
|
58391
58395
|
|
|
58392
58396
|
var swipeEvent = this.swipe.on("swipe", function(e) {
|
|
58393
58397
|
if (!that.active) return;
|
|
58398
|
+
if (!that.parent) return;
|
|
58394
58399
|
var direction = e.currentTarget.direction;
|
|
58395
58400
|
if (direction == "none") return;
|
|
58396
58401
|
// swap direction (swipe up means move down)
|
|
@@ -90133,8 +90138,8 @@ const ask = new CamAsk().show(yes=>{
|
|
|
90133
90138
|
const camMotion = new CamMotion({
|
|
90134
90139
|
visualizerColor:[green,orange,yellow,red,blue,purple,pink],
|
|
90135
90140
|
visualizerBaseColor:clear,
|
|
90136
|
-
visualizerScale:
|
|
90137
|
-
visualizerBaseScale:
|
|
90141
|
+
visualizerScale:6,
|
|
90142
|
+
visualizerBaseScale:1
|
|
90138
90143
|
}).center();
|
|
90139
90144
|
|
|
90140
90145
|
// Optionally adjust the circles
|