Skip to content

Commit 4b6d6ec

Browse files
committed
build v1.0.5
1 parent 363f566 commit 4b6d6ec

14 files changed

+208
-107
lines changed

dist/planck-with-testbed.d.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,7 +1391,7 @@ declare class Contact {
13911391
flagForFiltering(): void;
13921392
/**
13931393
* Override the default friction mixture. You can call this in
1394-
* ContactListener.preSolve. This value persists until set or reset.
1394+
* "pre-solve" callback. This value persists until set or reset.
13951395
*/
13961396
setFriction(friction: number): void;
13971397
/**
@@ -1404,7 +1404,7 @@ declare class Contact {
14041404
resetFriction(): void;
14051405
/**
14061406
* Override the default restitution mixture. You can call this in
1407-
* ContactListener.preSolve. The value persists until you set or reset.
1407+
* "pre-solve" callback. The value persists until you set or reset.
14081408
*/
14091409
setRestitution(restitution: number): void;
14101410
/**
@@ -2104,8 +2104,8 @@ declare class World {
21042104
* provided so that you can detect changes. Note: this is called only for awake
21052105
* bodies. Note: this is called even when the number of contact points is zero.
21062106
* Note: this is not called for sensors. Note: if you set the number of contact
2107-
* points to zero, you will not get an endContact callback. However, you may get
2108-
* a beginContact callback the next step.
2107+
* points to zero, you will not get an end-contact callback. However, you may get
2108+
* a begin-contact callback the next step.
21092109
*
21102110
* Warning: You cannot create/destroy world entities inside these callbacks.
21112111
*/
@@ -5715,7 +5715,7 @@ declare namespace planck {
57155715
flagForFiltering(): void;
57165716
/**
57175717
* Override the default friction mixture. You can call this in
5718-
* ContactListener.preSolve. This value persists until set or reset.
5718+
* "pre-solve" callback. This value persists until set or reset.
57195719
*/
57205720
setFriction(friction: number): void;
57215721
/**
@@ -5728,7 +5728,7 @@ declare namespace planck {
57285728
resetFriction(): void;
57295729
/**
57305730
* Override the default restitution mixture. You can call this in
5731-
* ContactListener.preSolve. The value persists until you set or reset.
5731+
* "pre-solve" callback. The value persists until you set or reset.
57325732
*/
57335733
setRestitution(restitution: number): void;
57345734
/**
@@ -6449,8 +6449,8 @@ declare namespace planck {
64496449
* provided so that you can detect changes. Note: this is called only for awake
64506450
* bodies. Note: this is called even when the number of contact points is zero.
64516451
* Note: this is not called for sensors. Note: if you set the number of contact
6452-
* points to zero, you will not get an endContact callback. However, you may get
6453-
* a beginContact callback the next step.
6452+
* points to zero, you will not get an end-contact callback. However, you may get
6453+
* a begin-contact callback the next step.
64546454
*
64556455
* Warning: You cannot create/destroy world entities inside these callbacks.
64566456
*/

dist/planck-with-testbed.js

Lines changed: 76 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Planck.js v1.0.4
2+
* Planck.js v1.0.5
33
* @license The MIT license
44
* @copyright Copyright (c) 2023 Erin Catto, Ali Shakiba
55
*
@@ -7310,7 +7310,7 @@
73107310
};
73117311
/**
73127312
* Override the default friction mixture. You can call this in
7313-
* ContactListener.preSolve. This value persists until set or reset.
7313+
* "pre-solve" callback. This value persists until set or reset.
73147314
*/
73157315
Contact.prototype.setFriction = function (friction) {
73167316
this.m_friction = friction;
@@ -7333,7 +7333,7 @@
73337333
};
73347334
/**
73357335
* Override the default restitution mixture. You can call this in
7336-
* ContactListener.preSolve. The value persists until you set or reset.
7336+
* "pre-solve" callback. The value persists until you set or reset.
73377337
*/
73387338
Contact.prototype.setRestitution = function (restitution) {
73397339
this.m_restitution = restitution;
@@ -16116,6 +16116,30 @@
1611616116
stats: stats$1
1611716117
};
1611816118

16119+
/**
16120+
* Stage.js 1.0.0-alpha.3
16121+
*
16122+
* @copyright Copyright (c) 2024 Ali Shakiba
16123+
* @license The MIT License (MIT)
16124+
*
16125+
* Permission is hereby granted, free of charge, to any person obtaining a copy
16126+
* of this software and associated documentation files (the "Software"), to deal
16127+
* in the Software without restriction, including without limitation the rights
16128+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16129+
* copies of the Software, and to permit persons to whom the Software is
16130+
* furnished to do so, subject to the following conditions:
16131+
*
16132+
* The above copyright notice and this permission notice shall be included in all
16133+
* copies or substantial portions of the Software.
16134+
*
16135+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16136+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16137+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16138+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16139+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16140+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16141+
* SOFTWARE.
16142+
*/
1611916143
const math_random = Math.random;
1612016144
const math_sqrt$1 = Math.sqrt;
1612116145
function random(min, max) {
@@ -16679,7 +16703,7 @@
1667916703
const NO_SELECTION = new TextureSelection(NO_TEXTURE);
1668016704
const ATLAS_MEMO_BY_NAME = {};
1668116705
const ATLAS_ARRAY = [];
16682-
const atlas = async function(def) {
16706+
async function atlas(def) {
1668316707
let atlas2;
1668416708
if (def instanceof Atlas) {
1668516709
atlas2 = def;
@@ -16692,8 +16716,8 @@
1669216716
ATLAS_ARRAY.push(atlas2);
1669316717
await atlas2.load();
1669416718
return atlas2;
16695-
};
16696-
const texture = function(query) {
16719+
}
16720+
function texture(query) {
1669716721
if ("string" !== typeof query) {
1669816722
return new TextureSelection(query);
1669916723
}
@@ -16720,7 +16744,7 @@
1672016744
result = NO_SELECTION;
1672116745
}
1672216746
return result;
16723-
};
16747+
}
1672416748
class ResizableTexture extends Texture {
1672516749
constructor(source, mode) {
1672616750
super();
@@ -17625,30 +17649,30 @@
1762517649
}
1762617650
throw "Invalid node: " + obj;
1762717651
}
17628-
const create = function() {
17652+
function create() {
1762917653
return layout();
17630-
};
17631-
const layer = function() {
17654+
}
17655+
function layer() {
1763217656
return maximize();
17633-
};
17634-
const box = function() {
17657+
}
17658+
function box() {
1763517659
return minimize();
17636-
};
17637-
const layout = function() {
17660+
}
17661+
function layout() {
1763817662
return new Node();
17639-
};
17640-
const row = function(align) {
17663+
}
17664+
function row(align) {
1764117665
return layout().row(align).label("Row");
17642-
};
17643-
const column = function(align) {
17666+
}
17667+
function column(align) {
1764417668
return layout().column(align).label("Column");
17645-
};
17646-
const minimize = function() {
17669+
}
17670+
function minimize() {
1764717671
return layout().minimize().label("Minimize");
17648-
};
17649-
const maximize = function() {
17672+
}
17673+
function maximize() {
1765017674
return layout().maximize().label("Maximize");
17651-
};
17675+
}
1765217676
class Node {
1765317677
constructor() {
1765417678
this.uid = "node:" + uid();
@@ -18482,14 +18506,16 @@
1848218506
return this;
1848318507
}
1848418508
}
18485-
const sprite = function(frame) {
18509+
function sprite(frame) {
1848618510
const sprite2 = new Sprite();
1848718511
frame && sprite2.texture(frame);
1848818512
return sprite2;
18489-
};
18513+
}
1849018514
class Sprite extends Node {
1849118515
constructor() {
1849218516
super();
18517+
this._tiled = false;
18518+
this._stretched = false;
1849318519
this.prerenderContext = {};
1849418520
this.label("Sprite");
1849518521
this._textures = [];
@@ -18500,7 +18526,13 @@
1850018526
if (this._image) {
1850118527
this.pin("width", this._image.getWidth());
1850218528
this.pin("height", this._image.getHeight());
18503-
this._textures[0] = new PipeTexture(this._image);
18529+
if (this._tiled) {
18530+
this._textures[0] = new ResizableTexture(this._image, "tile");
18531+
} else if (this._stretched) {
18532+
this._textures[0] = new ResizableTexture(this._image, "stretch");
18533+
} else {
18534+
this._textures[0] = new PipeTexture(this._image);
18535+
}
1850418536
this._textures.length = 1;
1850518537
} else {
1850618538
this.pin("width", 0);
@@ -18514,11 +18546,13 @@
1851418546
return this.texture(frame);
1851518547
}
1851618548
tile(inner = false) {
18549+
this._tiled = true;
1851718550
const texture2 = new ResizableTexture(this._image, "tile");
1851818551
this._textures[0] = texture2;
1851918552
return this;
1852018553
}
1852118554
stretch(inner = false) {
18555+
this._stretched = true;
1852218556
const texture2 = new ResizableTexture(this._image, "stretch");
1852318557
this._textures[0] = texture2;
1852418558
return this;
@@ -18886,22 +18920,22 @@
1888618920
CANCEL: "touchcancel mousecancel"
1888718921
};
1888818922
const ROOTS = [];
18889-
const pause = function() {
18923+
function pause() {
1889018924
for (let i = ROOTS.length - 1; i >= 0; i--) {
1889118925
ROOTS[i].pause();
1889218926
}
18893-
};
18894-
const resume = function() {
18927+
}
18928+
function resume() {
1889518929
for (let i = ROOTS.length - 1; i >= 0; i--) {
1889618930
ROOTS[i].resume();
1889718931
}
18898-
};
18899-
const mount = function(configs = {}) {
18932+
}
18933+
function mount(configs = {}) {
1890018934
const root = new Root();
1890118935
root.mount(configs);
1890218936
root.pointer = new Pointer().mount(root, root.dom);
1890318937
return root;
18904-
};
18938+
}
1890518939
class Root extends Node {
1890618940
constructor() {
1890718941
super();
@@ -19145,12 +19179,12 @@
1914519179
return this;
1914619180
}
1914719181
}
19148-
const anim = function(frames, fps) {
19182+
function anim(frames, fps) {
1914919183
const anim2 = new Anim();
1915019184
anim2.frames(frames).gotoFrame(0);
1915119185
fps && anim2.fps(fps);
1915219186
return anim2;
19153-
};
19187+
}
1915419188
const FPS = 15;
1915519189
class Anim extends Node {
1915619190
constructor() {
@@ -19247,10 +19281,10 @@
1924719281
return this;
1924819282
}
1924919283
}
19250-
const string = function(chars) {
19251-
return new Str().frames(chars);
19252-
};
19253-
class Str extends Node {
19284+
function monotype(chars) {
19285+
return new Monotype().frames(chars);
19286+
}
19287+
class Monotype extends Node {
1925419288
constructor() {
1925519289
super();
1925619290
this.label("String");
@@ -19310,6 +19344,8 @@
1931019344
return this;
1931119345
}
1931219346
}
19347+
const string = monotype;
19348+
const Str = Monotype;
1931319349
const Stage = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1931419350
__proto__: null,
1931519351
Anim,
@@ -19319,6 +19355,7 @@
1931919355
ImageTexture,
1932019356
Math: math,
1932119357
Matrix,
19358+
Monotype,
1932219359
Mouse,
1932319360
Node,
1932419361
POINTER_CANCEL,
@@ -19352,6 +19389,7 @@
1935219389
maximize,
1935319390
memoizeDraw,
1935419391
minimize,
19392+
monotype,
1935519393
mount,
1935619394
pause,
1935719395
random,

dist/planck-with-testbed.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/planck-with-testbed.min.js

Lines changed: 27 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/planck-with-testbed.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)