excalibur 0.32.0-alpha.1563 → 0.32.0-alpha.1564
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/CHANGELOG.md +2 -0
- package/build/dist/Graphics/Context/material.d.ts +2 -0
- package/build/dist/excalibur.development.js +57 -6
- package/build/dist/excalibur.js +57 -6
- package/build/dist/excalibur.min.development.js +46 -46
- package/build/dist/excalibur.min.js +46 -46
- package/build/esm/excalibur.development.js +57 -6
- package/build/esm/excalibur.js +57 -6
- package/build/esm/excalibur.min.development.js +1669 -1640
- package/build/esm/excalibur.min.js +1669 -1640
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -38,6 +38,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
38
38
|
|
|
39
39
|
### Fixed
|
|
40
40
|
|
|
41
|
+
- Fixed issue where overriding built in uniforms and graphics no longer worked as v0.30.x
|
|
41
42
|
- Fixed issue where clearSchedule during a scheduled callback could cause a cb to be skipped
|
|
42
43
|
- Fixed issue where the Loader could run twice even if already loaded when included in the scene loader.
|
|
43
44
|
- Fixed issue where pixel ratio was accidentally doubled during load if the loader was included in the scene loader.
|
|
@@ -48,6 +49,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
48
49
|
|
|
49
50
|
### Updates
|
|
50
51
|
|
|
52
|
+
- When overriding a built-in uniform/graphic there is now a warning in dev excalibur builds
|
|
51
53
|
- Camera zoom and move now support new easing functions form
|
|
52
54
|
- MoveTo/MoveBy actions now support new easing function form
|
|
53
55
|
- Transitions now support new easing functions form
|
|
@@ -75,6 +75,7 @@ export interface MaterialImageOptions {
|
|
|
75
75
|
filtering?: ImageFiltering;
|
|
76
76
|
}
|
|
77
77
|
export declare class Material {
|
|
78
|
+
static BuiltInUniforms: string[];
|
|
78
79
|
private _logger;
|
|
79
80
|
private _name;
|
|
80
81
|
private _shader;
|
|
@@ -92,6 +93,7 @@ export declare class Material {
|
|
|
92
93
|
set color(c: Color);
|
|
93
94
|
get name(): string;
|
|
94
95
|
get isUsingScreenTexture(): boolean;
|
|
96
|
+
get isOverridingGraphic(): boolean;
|
|
95
97
|
update(callback: (shader: Shader) => any): void;
|
|
96
98
|
getShader(): Shader | null;
|
|
97
99
|
addImageSource(samplerName: string, image: ImageSource): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! excalibur - 0.32.0-alpha.
|
|
1
|
+
/*! excalibur - 0.32.0-alpha.1564+00e394f - 2025-11-24
|
|
2
2
|
https://github.com/excaliburjs/Excalibur
|
|
3
3
|
Copyright (c) 2025 Excalibur.js <https://github.com/excaliburjs/Excalibur/graphs/contributors>
|
|
4
4
|
Licensed BSD-2-Clause
|
|
@@ -14358,7 +14358,7 @@ void main() {
|
|
|
14358
14358
|
v_screenuv = a_screenuv;
|
|
14359
14359
|
}
|
|
14360
14360
|
`;
|
|
14361
|
-
class
|
|
14361
|
+
const _Material = class _Material2 {
|
|
14362
14362
|
constructor(options) {
|
|
14363
14363
|
this._logger = Logger.getInstance();
|
|
14364
14364
|
this._color = Color.Transparent;
|
|
@@ -14380,6 +14380,25 @@ void main() {
|
|
|
14380
14380
|
} else {
|
|
14381
14381
|
this._logger.warn(`Material ${name} was created in 2D Canvas mode, currently only WebGL is supported`);
|
|
14382
14382
|
}
|
|
14383
|
+
{
|
|
14384
|
+
if (this.images.u_graphic) {
|
|
14385
|
+
this._logger.warn(
|
|
14386
|
+
`Material named "${this.name}" is overriding built in image u_graphic, is this on purpose? If so ignore this warning.`
|
|
14387
|
+
);
|
|
14388
|
+
}
|
|
14389
|
+
if (this.images.u_screen_texture) {
|
|
14390
|
+
this._logger.warn(
|
|
14391
|
+
`Material named "${this.name}" is overriding built in image u_screen_texture, is this on purpose? If so ignore this warning.`
|
|
14392
|
+
);
|
|
14393
|
+
}
|
|
14394
|
+
for (const uniform of Object.keys(this._uniforms)) {
|
|
14395
|
+
if (_Material2.BuiltInUniforms.includes(uniform)) {
|
|
14396
|
+
this._logger.warn(
|
|
14397
|
+
`Material named "${this.name}" is overriding built in uniform ${uniform}, is this on purpose? If so ignore this warning.`
|
|
14398
|
+
);
|
|
14399
|
+
}
|
|
14400
|
+
}
|
|
14401
|
+
}
|
|
14383
14402
|
}
|
|
14384
14403
|
_initialize(graphicsContextWebGL) {
|
|
14385
14404
|
if (this._initialized) {
|
|
@@ -14416,6 +14435,9 @@ void main() {
|
|
|
14416
14435
|
get isUsingScreenTexture() {
|
|
14417
14436
|
return this._fragmentSource.includes("u_screen_texture");
|
|
14418
14437
|
}
|
|
14438
|
+
get isOverridingGraphic() {
|
|
14439
|
+
return !!this._images.u_graphic;
|
|
14440
|
+
}
|
|
14419
14441
|
update(callback) {
|
|
14420
14442
|
if (this._shader) {
|
|
14421
14443
|
this._shader.use();
|
|
@@ -14427,6 +14449,18 @@ void main() {
|
|
|
14427
14449
|
}
|
|
14428
14450
|
addImageSource(samplerName, image) {
|
|
14429
14451
|
this._shader.addImageSource(samplerName, image);
|
|
14452
|
+
{
|
|
14453
|
+
if (this.images.u_graphic) {
|
|
14454
|
+
this._logger.warn(
|
|
14455
|
+
`Material named "${this.name}" is overriding built in image u_graphic, is this on purpose? If so ignore this warning.`
|
|
14456
|
+
);
|
|
14457
|
+
}
|
|
14458
|
+
if (this.images.u_screen_texture) {
|
|
14459
|
+
this._logger.warn(
|
|
14460
|
+
`Material named "${this.name}" is overriding built in image u_screen_texture, is this on purpose? If so ignore this warning.`
|
|
14461
|
+
);
|
|
14462
|
+
}
|
|
14463
|
+
}
|
|
14430
14464
|
}
|
|
14431
14465
|
removeImageSource(samplerName) {
|
|
14432
14466
|
this._shader.removeImageSource(samplerName);
|
|
@@ -14439,7 +14473,19 @@ void main() {
|
|
|
14439
14473
|
throw Error(`Material ${this.name} not yet initialized, use the ExcaliburGraphicsContext.createMaterial() to work around this.`);
|
|
14440
14474
|
}
|
|
14441
14475
|
}
|
|
14442
|
-
}
|
|
14476
|
+
};
|
|
14477
|
+
_Material.BuiltInUniforms = [
|
|
14478
|
+
"u_time_ms",
|
|
14479
|
+
"u_opacity",
|
|
14480
|
+
"u_resolution",
|
|
14481
|
+
"u_graphic_resolution",
|
|
14482
|
+
"u_size",
|
|
14483
|
+
"u_matrix",
|
|
14484
|
+
"u_transform",
|
|
14485
|
+
"u_graphic",
|
|
14486
|
+
"u_screen_texture"
|
|
14487
|
+
];
|
|
14488
|
+
let Material = _Material;
|
|
14443
14489
|
const _Debug = class _Debug2 {
|
|
14444
14490
|
static registerGraphicsContext(ctx) {
|
|
14445
14491
|
_Debug2._ctx = ctx;
|
|
@@ -15555,7 +15601,7 @@ void main() {
|
|
|
15555
15601
|
this._gl = null;
|
|
15556
15602
|
}
|
|
15557
15603
|
draw(image, sx, sy, swidth, sheight, dx, dy, dwidth, dheight) {
|
|
15558
|
-
var _a, _b, _c, _d;
|
|
15604
|
+
var _a, _b, _c, _d, _e;
|
|
15559
15605
|
const gl = this._gl;
|
|
15560
15606
|
const material = this._context.material;
|
|
15561
15607
|
if (!material) {
|
|
@@ -15620,7 +15666,7 @@ void main() {
|
|
|
15620
15666
|
vertexBuffer[vertexIndex++] = uvy1;
|
|
15621
15667
|
vertexBuffer[vertexIndex++] = screenUVX1;
|
|
15622
15668
|
vertexBuffer[vertexIndex++] = screenUVY1;
|
|
15623
|
-
|
|
15669
|
+
let texture = this._addImageAsTexture(image);
|
|
15624
15670
|
material.use();
|
|
15625
15671
|
this._layout.shader = shader;
|
|
15626
15672
|
this._layout.use(true);
|
|
@@ -15631,6 +15677,11 @@ void main() {
|
|
|
15631
15677
|
shader.trySetUniformFloatVector("u_size", vec(sw, sh));
|
|
15632
15678
|
shader.trySetUniformMatrix("u_matrix", this._context.ortho);
|
|
15633
15679
|
shader.trySetUniformMatrix("u_transform", transform.to4x4());
|
|
15680
|
+
if (material.isOverridingGraphic) {
|
|
15681
|
+
if ((_e = material.images.u_graphic) == null ? void 0 : _e.image) {
|
|
15682
|
+
texture = this._addImageAsTexture(material.images.u_graphic.image);
|
|
15683
|
+
}
|
|
15684
|
+
}
|
|
15634
15685
|
gl.activeTexture(gl.TEXTURE0 + 0);
|
|
15635
15686
|
gl.bindTexture(gl.TEXTURE_2D, texture);
|
|
15636
15687
|
shader.trySetUniformInt("u_graphic", 0);
|
|
@@ -33043,7 +33094,7 @@ Read more about this issue at https://excaliburjs.com/docs/performance`
|
|
|
33043
33094
|
this._count += count;
|
|
33044
33095
|
}
|
|
33045
33096
|
}
|
|
33046
|
-
const EX_VERSION = "0.32.0-alpha.
|
|
33097
|
+
const EX_VERSION = "0.32.0-alpha.1564+00e394f";
|
|
33047
33098
|
polyfill();
|
|
33048
33099
|
exports2.ActionCompleteEvent = ActionCompleteEvent;
|
|
33049
33100
|
exports2.ActionContext = ActionContext;
|
package/build/dist/excalibur.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! excalibur - 0.32.0-alpha.
|
|
1
|
+
/*! excalibur - 0.32.0-alpha.1564+00e394f - 2025-11-24
|
|
2
2
|
https://github.com/excaliburjs/Excalibur
|
|
3
3
|
Copyright (c) 2025 Excalibur.js <https://github.com/excaliburjs/Excalibur/graphs/contributors>
|
|
4
4
|
Licensed BSD-2-Clause
|
|
@@ -14358,7 +14358,7 @@ void main() {
|
|
|
14358
14358
|
v_screenuv = a_screenuv;
|
|
14359
14359
|
}
|
|
14360
14360
|
`;
|
|
14361
|
-
class
|
|
14361
|
+
const _Material = class _Material2 {
|
|
14362
14362
|
constructor(options) {
|
|
14363
14363
|
this._logger = Logger.getInstance();
|
|
14364
14364
|
this._color = Color.Transparent;
|
|
@@ -14380,6 +14380,25 @@ void main() {
|
|
|
14380
14380
|
} else {
|
|
14381
14381
|
this._logger.warn(`Material ${name} was created in 2D Canvas mode, currently only WebGL is supported`);
|
|
14382
14382
|
}
|
|
14383
|
+
{
|
|
14384
|
+
if (this.images.u_graphic) {
|
|
14385
|
+
this._logger.warn(
|
|
14386
|
+
`Material named "${this.name}" is overriding built in image u_graphic, is this on purpose? If so ignore this warning.`
|
|
14387
|
+
);
|
|
14388
|
+
}
|
|
14389
|
+
if (this.images.u_screen_texture) {
|
|
14390
|
+
this._logger.warn(
|
|
14391
|
+
`Material named "${this.name}" is overriding built in image u_screen_texture, is this on purpose? If so ignore this warning.`
|
|
14392
|
+
);
|
|
14393
|
+
}
|
|
14394
|
+
for (const uniform of Object.keys(this._uniforms)) {
|
|
14395
|
+
if (_Material2.BuiltInUniforms.includes(uniform)) {
|
|
14396
|
+
this._logger.warn(
|
|
14397
|
+
`Material named "${this.name}" is overriding built in uniform ${uniform}, is this on purpose? If so ignore this warning.`
|
|
14398
|
+
);
|
|
14399
|
+
}
|
|
14400
|
+
}
|
|
14401
|
+
}
|
|
14383
14402
|
}
|
|
14384
14403
|
_initialize(graphicsContextWebGL) {
|
|
14385
14404
|
if (this._initialized) {
|
|
@@ -14416,6 +14435,9 @@ void main() {
|
|
|
14416
14435
|
get isUsingScreenTexture() {
|
|
14417
14436
|
return this._fragmentSource.includes("u_screen_texture");
|
|
14418
14437
|
}
|
|
14438
|
+
get isOverridingGraphic() {
|
|
14439
|
+
return !!this._images.u_graphic;
|
|
14440
|
+
}
|
|
14419
14441
|
update(callback) {
|
|
14420
14442
|
if (this._shader) {
|
|
14421
14443
|
this._shader.use();
|
|
@@ -14427,6 +14449,18 @@ void main() {
|
|
|
14427
14449
|
}
|
|
14428
14450
|
addImageSource(samplerName, image) {
|
|
14429
14451
|
this._shader.addImageSource(samplerName, image);
|
|
14452
|
+
{
|
|
14453
|
+
if (this.images.u_graphic) {
|
|
14454
|
+
this._logger.warn(
|
|
14455
|
+
`Material named "${this.name}" is overriding built in image u_graphic, is this on purpose? If so ignore this warning.`
|
|
14456
|
+
);
|
|
14457
|
+
}
|
|
14458
|
+
if (this.images.u_screen_texture) {
|
|
14459
|
+
this._logger.warn(
|
|
14460
|
+
`Material named "${this.name}" is overriding built in image u_screen_texture, is this on purpose? If so ignore this warning.`
|
|
14461
|
+
);
|
|
14462
|
+
}
|
|
14463
|
+
}
|
|
14430
14464
|
}
|
|
14431
14465
|
removeImageSource(samplerName) {
|
|
14432
14466
|
this._shader.removeImageSource(samplerName);
|
|
@@ -14439,7 +14473,19 @@ void main() {
|
|
|
14439
14473
|
throw Error(`Material ${this.name} not yet initialized, use the ExcaliburGraphicsContext.createMaterial() to work around this.`);
|
|
14440
14474
|
}
|
|
14441
14475
|
}
|
|
14442
|
-
}
|
|
14476
|
+
};
|
|
14477
|
+
_Material.BuiltInUniforms = [
|
|
14478
|
+
"u_time_ms",
|
|
14479
|
+
"u_opacity",
|
|
14480
|
+
"u_resolution",
|
|
14481
|
+
"u_graphic_resolution",
|
|
14482
|
+
"u_size",
|
|
14483
|
+
"u_matrix",
|
|
14484
|
+
"u_transform",
|
|
14485
|
+
"u_graphic",
|
|
14486
|
+
"u_screen_texture"
|
|
14487
|
+
];
|
|
14488
|
+
let Material = _Material;
|
|
14443
14489
|
const _Debug = class _Debug2 {
|
|
14444
14490
|
static registerGraphicsContext(ctx) {
|
|
14445
14491
|
_Debug2._ctx = ctx;
|
|
@@ -15555,7 +15601,7 @@ void main() {
|
|
|
15555
15601
|
this._gl = null;
|
|
15556
15602
|
}
|
|
15557
15603
|
draw(image, sx, sy, swidth, sheight, dx, dy, dwidth, dheight) {
|
|
15558
|
-
var _a, _b, _c, _d;
|
|
15604
|
+
var _a, _b, _c, _d, _e;
|
|
15559
15605
|
const gl = this._gl;
|
|
15560
15606
|
const material = this._context.material;
|
|
15561
15607
|
if (!material) {
|
|
@@ -15620,7 +15666,7 @@ void main() {
|
|
|
15620
15666
|
vertexBuffer[vertexIndex++] = uvy1;
|
|
15621
15667
|
vertexBuffer[vertexIndex++] = screenUVX1;
|
|
15622
15668
|
vertexBuffer[vertexIndex++] = screenUVY1;
|
|
15623
|
-
|
|
15669
|
+
let texture = this._addImageAsTexture(image);
|
|
15624
15670
|
material.use();
|
|
15625
15671
|
this._layout.shader = shader;
|
|
15626
15672
|
this._layout.use(true);
|
|
@@ -15631,6 +15677,11 @@ void main() {
|
|
|
15631
15677
|
shader.trySetUniformFloatVector("u_size", vec(sw, sh));
|
|
15632
15678
|
shader.trySetUniformMatrix("u_matrix", this._context.ortho);
|
|
15633
15679
|
shader.trySetUniformMatrix("u_transform", transform.to4x4());
|
|
15680
|
+
if (material.isOverridingGraphic) {
|
|
15681
|
+
if ((_e = material.images.u_graphic) == null ? void 0 : _e.image) {
|
|
15682
|
+
texture = this._addImageAsTexture(material.images.u_graphic.image);
|
|
15683
|
+
}
|
|
15684
|
+
}
|
|
15634
15685
|
gl.activeTexture(gl.TEXTURE0 + 0);
|
|
15635
15686
|
gl.bindTexture(gl.TEXTURE_2D, texture);
|
|
15636
15687
|
shader.trySetUniformInt("u_graphic", 0);
|
|
@@ -33043,7 +33094,7 @@ Read more about this issue at https://excaliburjs.com/docs/performance`
|
|
|
33043
33094
|
this._count += count;
|
|
33044
33095
|
}
|
|
33045
33096
|
}
|
|
33046
|
-
const EX_VERSION = "0.32.0-alpha.
|
|
33097
|
+
const EX_VERSION = "0.32.0-alpha.1564+00e394f";
|
|
33047
33098
|
polyfill();
|
|
33048
33099
|
exports2.ActionCompleteEvent = ActionCompleteEvent;
|
|
33049
33100
|
exports2.ActionContext = ActionContext;
|