modern-canvas 0.9.4 → 0.9.6
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/dist/index.cjs +697 -511
- package/dist/index.d.cts +53 -27
- package/dist/index.d.mts +53 -27
- package/dist/index.d.ts +53 -27
- package/dist/index.js +42 -42
- package/dist/index.mjs +697 -511
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const modernIdoc = require('modern-idoc');
|
|
4
|
+
const modernFont = require('modern-font');
|
|
4
5
|
const colord = require('colord');
|
|
5
6
|
const namesPlugin = require('colord/plugins/names');
|
|
6
7
|
const modernPath2d = require('modern-path2d');
|
|
@@ -871,6 +872,10 @@ class Input extends modernIdoc.Observable {
|
|
|
871
872
|
this.setCursor(this.event.cursor);
|
|
872
873
|
}
|
|
873
874
|
};
|
|
875
|
+
destroy() {
|
|
876
|
+
this.removeEventListeners();
|
|
877
|
+
super.destroy();
|
|
878
|
+
}
|
|
874
879
|
}
|
|
875
880
|
|
|
876
881
|
let IID = 0;
|
|
@@ -2092,13 +2097,13 @@ class Vector3 extends Vector {
|
|
|
2092
2097
|
}
|
|
2093
2098
|
}
|
|
2094
2099
|
|
|
2095
|
-
var __defProp$
|
|
2096
|
-
var __decorateClass
|
|
2100
|
+
var __defProp$T = Object.defineProperty;
|
|
2101
|
+
var __decorateClass$$ = (decorators, target, key, kind) => {
|
|
2097
2102
|
var result = void 0 ;
|
|
2098
2103
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
2099
2104
|
if (decorator = decorators[i])
|
|
2100
2105
|
result = (decorator(target, key, result) ) || result;
|
|
2101
|
-
if (result) __defProp$
|
|
2106
|
+
if (result) __defProp$T(target, key, result);
|
|
2102
2107
|
return result;
|
|
2103
2108
|
};
|
|
2104
2109
|
class MainLoop extends CoreObject {
|
|
@@ -2111,9 +2116,10 @@ class MainLoop extends CoreObject {
|
|
|
2111
2116
|
get spf() {
|
|
2112
2117
|
return this.fps ? Math.floor(1e3 / this.fps) : 0;
|
|
2113
2118
|
}
|
|
2114
|
-
constructor() {
|
|
2119
|
+
constructor(properties) {
|
|
2115
2120
|
super();
|
|
2116
|
-
this.
|
|
2121
|
+
this._onTicker = this._onTicker.bind(this);
|
|
2122
|
+
this.setProperties(properties);
|
|
2117
2123
|
}
|
|
2118
2124
|
start(process) {
|
|
2119
2125
|
if (!this._starting) {
|
|
@@ -2123,16 +2129,16 @@ class MainLoop extends CoreObject {
|
|
|
2123
2129
|
}
|
|
2124
2130
|
this._startedProcess = process;
|
|
2125
2131
|
this.on("process", process);
|
|
2126
|
-
Ticker.on(this.
|
|
2132
|
+
Ticker.on(this._onTicker, { sort: 0 });
|
|
2127
2133
|
}
|
|
2128
2134
|
}
|
|
2129
2135
|
stop() {
|
|
2130
2136
|
if (this._starting) {
|
|
2131
2137
|
this._starting = false;
|
|
2132
|
-
Ticker.off(this.
|
|
2138
|
+
Ticker.off(this._onTicker, { sort: 0 });
|
|
2133
2139
|
}
|
|
2134
2140
|
}
|
|
2135
|
-
|
|
2141
|
+
_onTicker() {
|
|
2136
2142
|
const elapsed = Ticker.elapsed * this.speed;
|
|
2137
2143
|
const time = this._nextDeltaTime -= elapsed;
|
|
2138
2144
|
if (time <= 0) {
|
|
@@ -2141,22 +2147,40 @@ class MainLoop extends CoreObject {
|
|
|
2141
2147
|
}
|
|
2142
2148
|
}
|
|
2143
2149
|
destroy() {
|
|
2144
|
-
super.destroy();
|
|
2145
2150
|
this.stop();
|
|
2151
|
+
super.destroy();
|
|
2146
2152
|
}
|
|
2147
2153
|
}
|
|
2148
|
-
__decorateClass
|
|
2154
|
+
__decorateClass$$([
|
|
2149
2155
|
modernIdoc.property({ fallback: 60 })
|
|
2150
2156
|
], MainLoop.prototype, "fps");
|
|
2151
|
-
__decorateClass
|
|
2157
|
+
__decorateClass$$([
|
|
2152
2158
|
modernIdoc.property({ fallback: 1 })
|
|
2153
2159
|
], MainLoop.prototype, "speed");
|
|
2154
2160
|
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2161
|
+
var __defProp$S = Object.defineProperty;
|
|
2162
|
+
var __decorateClass$_ = (decorators, target, key, kind) => {
|
|
2163
|
+
var result = void 0 ;
|
|
2164
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
2165
|
+
if (decorator = decorators[i])
|
|
2166
|
+
result = (decorator(target, key, result) ) || result;
|
|
2167
|
+
if (result) __defProp$S(target, key, result);
|
|
2168
|
+
return result;
|
|
2169
|
+
};
|
|
2170
|
+
class Renderer extends modernIdoc.Reactivable {
|
|
2158
2171
|
screen = { x: 0, y: 0, width: 0, height: 0 };
|
|
2159
2172
|
related = new RawWeakMap();
|
|
2173
|
+
_updateProperty(key, newValue, oldValue) {
|
|
2174
|
+
super._updateProperty(key, newValue, oldValue);
|
|
2175
|
+
switch (key) {
|
|
2176
|
+
case "view":
|
|
2177
|
+
case "pixelRatio":
|
|
2178
|
+
if (this.view) {
|
|
2179
|
+
this.view.dataset.pixelRatio = String(this.pixelRatio);
|
|
2180
|
+
}
|
|
2181
|
+
break;
|
|
2182
|
+
}
|
|
2183
|
+
}
|
|
2160
2184
|
getRelated(source, createFn) {
|
|
2161
2185
|
let related = this.related.get(source);
|
|
2162
2186
|
if (related)
|
|
@@ -2180,7 +2204,16 @@ class Renderer {
|
|
|
2180
2204
|
this.view.style.height = `${height}px`;
|
|
2181
2205
|
}
|
|
2182
2206
|
}
|
|
2207
|
+
destroy() {
|
|
2208
|
+
super.destroy();
|
|
2209
|
+
}
|
|
2183
2210
|
}
|
|
2211
|
+
__decorateClass$_([
|
|
2212
|
+
modernIdoc.property({ fallback: DEVICE_PIXEL_RATIO })
|
|
2213
|
+
], Renderer.prototype, "pixelRatio");
|
|
2214
|
+
__decorateClass$_([
|
|
2215
|
+
modernIdoc.property({ internal: true })
|
|
2216
|
+
], Renderer.prototype, "view");
|
|
2184
2217
|
|
|
2185
2218
|
var WebGLBlendMode = /* @__PURE__ */ ((WebGLBlendMode2) => {
|
|
2186
2219
|
WebGLBlendMode2["NORMAL"] = "normal";
|
|
@@ -2887,8 +2920,7 @@ class WebGLFramebufferModule extends WebGLModule {
|
|
|
2887
2920
|
throw new Error("Unable to create framebuffer");
|
|
2888
2921
|
}
|
|
2889
2922
|
if (options) {
|
|
2890
|
-
this.
|
|
2891
|
-
this.update(options);
|
|
2923
|
+
this.update(framebuffer, options);
|
|
2892
2924
|
}
|
|
2893
2925
|
return framebuffer;
|
|
2894
2926
|
}
|
|
@@ -2898,11 +2930,15 @@ class WebGLFramebufferModule extends WebGLModule {
|
|
|
2898
2930
|
width: 0,
|
|
2899
2931
|
height: 0,
|
|
2900
2932
|
mipLevel: 0,
|
|
2933
|
+
msaa: false,
|
|
2901
2934
|
stencil: false,
|
|
2902
2935
|
depth: false,
|
|
2903
2936
|
depthTexture: null,
|
|
2904
2937
|
colorTextures: [],
|
|
2905
|
-
multisample:
|
|
2938
|
+
multisample: 4,
|
|
2939
|
+
stencilBuffer: null,
|
|
2940
|
+
msaaRenderBuffers: [],
|
|
2941
|
+
framebuffer: null
|
|
2906
2942
|
};
|
|
2907
2943
|
});
|
|
2908
2944
|
}
|
|
@@ -2922,6 +2958,7 @@ class WebGLFramebufferModule extends WebGLModule {
|
|
|
2922
2958
|
if (!("drawBuffers" in gl)) {
|
|
2923
2959
|
count = Math.min(count, 1);
|
|
2924
2960
|
}
|
|
2961
|
+
gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);
|
|
2925
2962
|
for (let i = 0; i < count; i++) {
|
|
2926
2963
|
const texture = meta.colorTextures[i];
|
|
2927
2964
|
this._renderer.texture.bind({
|
|
@@ -2944,6 +2981,36 @@ class WebGLFramebufferModule extends WebGLModule {
|
|
|
2944
2981
|
meta.colorTextures.map((_, i) => gl.COLOR_ATTACHMENT0 + i)
|
|
2945
2982
|
);
|
|
2946
2983
|
}
|
|
2984
|
+
if (meta.msaa) {
|
|
2985
|
+
if (!meta.framebuffer) {
|
|
2986
|
+
const gl2 = this._renderer.gl;
|
|
2987
|
+
meta.framebuffer = gl2.createFramebuffer();
|
|
2988
|
+
gl2.bindFramebuffer(gl2.FRAMEBUFFER, meta.framebuffer);
|
|
2989
|
+
meta.colorTextures.forEach((_, i) => {
|
|
2990
|
+
meta.msaaRenderBuffers[i] = gl2.createRenderbuffer();
|
|
2991
|
+
});
|
|
2992
|
+
}
|
|
2993
|
+
gl.bindFramebuffer(gl.FRAMEBUFFER, meta.framebuffer);
|
|
2994
|
+
meta.colorTextures.forEach((texture, i) => {
|
|
2995
|
+
this._renderer.texture.bind({ value: texture, location: 0 });
|
|
2996
|
+
const msaaRenderBuffer = meta.msaaRenderBuffers[i];
|
|
2997
|
+
gl.bindRenderbuffer(gl.RENDERBUFFER, msaaRenderBuffer);
|
|
2998
|
+
gl.renderbufferStorageMultisample(
|
|
2999
|
+
gl.RENDERBUFFER,
|
|
3000
|
+
4,
|
|
3001
|
+
gl.RGBA8,
|
|
3002
|
+
// TODO
|
|
3003
|
+
meta.width * this._renderer.pixelRatio,
|
|
3004
|
+
meta.height * this._renderer.pixelRatio
|
|
3005
|
+
);
|
|
3006
|
+
gl.framebufferRenderbuffer(
|
|
3007
|
+
gl.FRAMEBUFFER,
|
|
3008
|
+
gl.COLOR_ATTACHMENT0 + i,
|
|
3009
|
+
gl.RENDERBUFFER,
|
|
3010
|
+
msaaRenderBuffer
|
|
3011
|
+
);
|
|
3012
|
+
});
|
|
3013
|
+
}
|
|
2947
3014
|
if (meta.depthTexture && (this._renderer.version > 1 || this._renderer.extensions.depthTexture)) {
|
|
2948
3015
|
this._renderer.texture.bind({
|
|
2949
3016
|
location: 0,
|
|
@@ -2964,7 +3031,7 @@ class WebGLFramebufferModule extends WebGLModule {
|
|
|
2964
3031
|
meta.stencilBuffer ??= gl.createRenderbuffer();
|
|
2965
3032
|
gl.bindRenderbuffer(gl.RENDERBUFFER, meta.stencilBuffer);
|
|
2966
3033
|
const { attachment, format } = this._getAttachmentAndFormat(meta);
|
|
2967
|
-
if (meta.
|
|
3034
|
+
if (meta.msaa) {
|
|
2968
3035
|
gl.renderbufferStorageMultisample(
|
|
2969
3036
|
gl.RENDERBUFFER,
|
|
2970
3037
|
meta.multisample,
|
|
@@ -3012,7 +3079,7 @@ class WebGLFramebufferModule extends WebGLModule {
|
|
|
3012
3079
|
if (meta.stencil) {
|
|
3013
3080
|
const { format } = this._getAttachmentAndFormat(meta);
|
|
3014
3081
|
gl.bindRenderbuffer(gl.RENDERBUFFER, meta.stencil);
|
|
3015
|
-
if (meta.
|
|
3082
|
+
if (meta.msaa) {
|
|
3016
3083
|
gl.renderbufferStorageMultisample(
|
|
3017
3084
|
gl.RENDERBUFFER,
|
|
3018
3085
|
meta.multisample,
|
|
@@ -3024,30 +3091,6 @@ class WebGLFramebufferModule extends WebGLModule {
|
|
|
3024
3091
|
gl.renderbufferStorage(gl.RENDERBUFFER, format, meta.width, meta.height);
|
|
3025
3092
|
}
|
|
3026
3093
|
}
|
|
3027
|
-
let count = meta.colorTextures.length;
|
|
3028
|
-
if (!gl.drawBuffers) {
|
|
3029
|
-
count = Math.min(count, 1);
|
|
3030
|
-
}
|
|
3031
|
-
for (let i = 0; i < count; i++) {
|
|
3032
|
-
const texture = meta.colorTextures[i];
|
|
3033
|
-
this._renderer.texture.update(texture, {
|
|
3034
|
-
value: {
|
|
3035
|
-
pixels: null,
|
|
3036
|
-
width: meta.width,
|
|
3037
|
-
height: meta.height
|
|
3038
|
-
}
|
|
3039
|
-
});
|
|
3040
|
-
if (i === 0 && meta.msaaBuffer) {
|
|
3041
|
-
gl.bindRenderbuffer(gl.RENDERBUFFER, meta.msaaBuffer);
|
|
3042
|
-
gl.renderbufferStorageMultisample(
|
|
3043
|
-
gl.RENDERBUFFER,
|
|
3044
|
-
meta.multisample,
|
|
3045
|
-
gl.RGBA,
|
|
3046
|
-
meta.width,
|
|
3047
|
-
meta.height
|
|
3048
|
-
);
|
|
3049
|
-
}
|
|
3050
|
-
}
|
|
3051
3094
|
if (meta.depthTexture) {
|
|
3052
3095
|
this._renderer.texture.update(meta.depthTexture, {
|
|
3053
3096
|
value: {
|
|
@@ -3058,19 +3101,65 @@ class WebGLFramebufferModule extends WebGLModule {
|
|
|
3058
3101
|
});
|
|
3059
3102
|
}
|
|
3060
3103
|
}
|
|
3104
|
+
finishRenderPass(framebuffer) {
|
|
3105
|
+
const meta = this.getMeta(framebuffer);
|
|
3106
|
+
if (!meta.msaa || !meta.framebuffer)
|
|
3107
|
+
return;
|
|
3108
|
+
const gl = this._renderer.gl;
|
|
3109
|
+
gl.bindFramebuffer(gl.DRAW_FRAMEBUFFER, framebuffer);
|
|
3110
|
+
gl.bindFramebuffer(gl.READ_FRAMEBUFFER, meta.framebuffer);
|
|
3111
|
+
const width = meta.width * this._renderer.pixelRatio;
|
|
3112
|
+
const height = meta.height * this._renderer.pixelRatio;
|
|
3113
|
+
gl.blitFramebuffer(
|
|
3114
|
+
0,
|
|
3115
|
+
0,
|
|
3116
|
+
width,
|
|
3117
|
+
height,
|
|
3118
|
+
0,
|
|
3119
|
+
0,
|
|
3120
|
+
width,
|
|
3121
|
+
height,
|
|
3122
|
+
gl.COLOR_BUFFER_BIT,
|
|
3123
|
+
gl.NEAREST
|
|
3124
|
+
);
|
|
3125
|
+
gl.bindFramebuffer(gl.FRAMEBUFFER, meta.framebuffer);
|
|
3126
|
+
}
|
|
3127
|
+
copyToTexture(framebuffer, texture) {
|
|
3128
|
+
const gl = this._renderer.gl;
|
|
3129
|
+
const meta = this.getMeta(framebuffer);
|
|
3130
|
+
this.finishRenderPass(framebuffer);
|
|
3131
|
+
gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);
|
|
3132
|
+
this._renderer.texture.bind({
|
|
3133
|
+
value: texture,
|
|
3134
|
+
location: 0
|
|
3135
|
+
});
|
|
3136
|
+
gl.copyTexSubImage2D(
|
|
3137
|
+
gl.TEXTURE_2D,
|
|
3138
|
+
0,
|
|
3139
|
+
0,
|
|
3140
|
+
0,
|
|
3141
|
+
0,
|
|
3142
|
+
0,
|
|
3143
|
+
meta.width,
|
|
3144
|
+
meta.height
|
|
3145
|
+
);
|
|
3146
|
+
}
|
|
3061
3147
|
bind(framebuffer) {
|
|
3062
3148
|
const gl = this._renderer.gl;
|
|
3149
|
+
const meta = framebuffer ? this.getMeta(framebuffer) : void 0;
|
|
3063
3150
|
const value = framebuffer;
|
|
3064
3151
|
const oldValue = this.boundFramebuffer;
|
|
3065
3152
|
const changed = {
|
|
3066
3153
|
value: oldValue !== value
|
|
3067
3154
|
};
|
|
3068
3155
|
if (changed.value) {
|
|
3069
|
-
gl.bindFramebuffer(
|
|
3156
|
+
gl.bindFramebuffer(
|
|
3157
|
+
gl.FRAMEBUFFER,
|
|
3158
|
+
meta?.msaa && meta.framebuffer ? meta.framebuffer : value
|
|
3159
|
+
);
|
|
3070
3160
|
this.boundFramebuffer = value;
|
|
3071
3161
|
}
|
|
3072
|
-
if (
|
|
3073
|
-
const meta = this.getMeta(value);
|
|
3162
|
+
if (meta) {
|
|
3074
3163
|
for (let i = 0; i < meta.colorTextures.length; i++) {
|
|
3075
3164
|
this._renderer.texture.unbind(meta.colorTextures[i]);
|
|
3076
3165
|
}
|
|
@@ -3118,7 +3207,7 @@ class WebGLFramebufferModule extends WebGLModule {
|
|
|
3118
3207
|
attachment = gl.STENCIL_ATTACHMENT;
|
|
3119
3208
|
format = gl.STENCIL_INDEX8;
|
|
3120
3209
|
}
|
|
3121
|
-
if (meta.
|
|
3210
|
+
if (meta.msaa) {
|
|
3122
3211
|
gl.renderbufferStorageMultisample(
|
|
3123
3212
|
gl.RENDERBUFFER,
|
|
3124
3213
|
meta.multisample,
|
|
@@ -4197,6 +4286,7 @@ class WebGLRenderer extends Renderer {
|
|
|
4197
4286
|
this.view?.removeEventListener("webglcontextlost", this._onContextLost, false);
|
|
4198
4287
|
this.view?.removeEventListener("webglcontextrestored", this._onContextRestored, false);
|
|
4199
4288
|
this.extensions.loseContext?.loseContext();
|
|
4289
|
+
super.destroy();
|
|
4200
4290
|
}
|
|
4201
4291
|
toPixels(x = 0, y = 0, width = this.gl.drawingBufferWidth, height = this.gl.drawingBufferHeight) {
|
|
4202
4292
|
const length = width * height * 4;
|
|
@@ -4321,13 +4411,13 @@ class Geometry extends Resource {
|
|
|
4321
4411
|
}
|
|
4322
4412
|
}
|
|
4323
4413
|
|
|
4324
|
-
var __defProp$
|
|
4325
|
-
var __decorateClass$
|
|
4414
|
+
var __defProp$R = Object.defineProperty;
|
|
4415
|
+
var __decorateClass$Z = (decorators, target, key, kind) => {
|
|
4326
4416
|
var result = void 0 ;
|
|
4327
4417
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
4328
4418
|
if (decorator = decorators[i])
|
|
4329
4419
|
result = (decorator(target, key, result) ) || result;
|
|
4330
|
-
if (result) __defProp$
|
|
4420
|
+
if (result) __defProp$R(target, key, result);
|
|
4331
4421
|
return result;
|
|
4332
4422
|
};
|
|
4333
4423
|
class IndexBuffer extends Resource {
|
|
@@ -4371,20 +4461,20 @@ class IndexBuffer extends Resource {
|
|
|
4371
4461
|
return result;
|
|
4372
4462
|
}
|
|
4373
4463
|
}
|
|
4374
|
-
__decorateClass$
|
|
4464
|
+
__decorateClass$Z([
|
|
4375
4465
|
modernIdoc.property({ internal: true, fallback: null })
|
|
4376
4466
|
], IndexBuffer.prototype, "data");
|
|
4377
|
-
__decorateClass$
|
|
4467
|
+
__decorateClass$Z([
|
|
4378
4468
|
modernIdoc.property({ internal: true, fallback: false })
|
|
4379
4469
|
], IndexBuffer.prototype, "dynamic");
|
|
4380
4470
|
|
|
4381
|
-
var __defProp$
|
|
4382
|
-
var __decorateClass$
|
|
4471
|
+
var __defProp$Q = Object.defineProperty;
|
|
4472
|
+
var __decorateClass$Y = (decorators, target, key, kind) => {
|
|
4383
4473
|
var result = void 0 ;
|
|
4384
4474
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
4385
4475
|
if (decorator = decorators[i])
|
|
4386
4476
|
result = (decorator(target, key, result) ) || result;
|
|
4387
|
-
if (result) __defProp$
|
|
4477
|
+
if (result) __defProp$Q(target, key, result);
|
|
4388
4478
|
return result;
|
|
4389
4479
|
};
|
|
4390
4480
|
class VertexBuffer extends Resource {
|
|
@@ -4428,20 +4518,20 @@ class VertexBuffer extends Resource {
|
|
|
4428
4518
|
return result;
|
|
4429
4519
|
}
|
|
4430
4520
|
}
|
|
4431
|
-
__decorateClass$
|
|
4521
|
+
__decorateClass$Y([
|
|
4432
4522
|
modernIdoc.property({ internal: true, default: null })
|
|
4433
4523
|
], VertexBuffer.prototype, "data");
|
|
4434
|
-
__decorateClass$
|
|
4524
|
+
__decorateClass$Y([
|
|
4435
4525
|
modernIdoc.property({ internal: true, fallback: false })
|
|
4436
4526
|
], VertexBuffer.prototype, "dynamic");
|
|
4437
4527
|
|
|
4438
|
-
var __defProp$
|
|
4439
|
-
var __decorateClass$
|
|
4528
|
+
var __defProp$P = Object.defineProperty;
|
|
4529
|
+
var __decorateClass$X = (decorators, target, key, kind) => {
|
|
4440
4530
|
var result = void 0 ;
|
|
4441
4531
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
4442
4532
|
if (decorator = decorators[i])
|
|
4443
4533
|
result = (decorator(target, key, result) ) || result;
|
|
4444
|
-
if (result) __defProp$
|
|
4534
|
+
if (result) __defProp$P(target, key, result);
|
|
4445
4535
|
return result;
|
|
4446
4536
|
};
|
|
4447
4537
|
class VertexAttribute extends Resource {
|
|
@@ -4475,25 +4565,25 @@ class VertexAttribute extends Resource {
|
|
|
4475
4565
|
return result;
|
|
4476
4566
|
}
|
|
4477
4567
|
}
|
|
4478
|
-
__decorateClass$
|
|
4568
|
+
__decorateClass$X([
|
|
4479
4569
|
modernIdoc.property({ internal: true })
|
|
4480
4570
|
], VertexAttribute.prototype, "buffer");
|
|
4481
|
-
__decorateClass$
|
|
4571
|
+
__decorateClass$X([
|
|
4482
4572
|
modernIdoc.property({ fallback: 0 })
|
|
4483
4573
|
], VertexAttribute.prototype, "size");
|
|
4484
|
-
__decorateClass$
|
|
4574
|
+
__decorateClass$X([
|
|
4485
4575
|
modernIdoc.property({ fallback: false })
|
|
4486
4576
|
], VertexAttribute.prototype, "normalized");
|
|
4487
|
-
__decorateClass$
|
|
4577
|
+
__decorateClass$X([
|
|
4488
4578
|
modernIdoc.property({ fallback: "float" })
|
|
4489
4579
|
], VertexAttribute.prototype, "type");
|
|
4490
|
-
__decorateClass$
|
|
4580
|
+
__decorateClass$X([
|
|
4491
4581
|
modernIdoc.property()
|
|
4492
4582
|
], VertexAttribute.prototype, "stride");
|
|
4493
|
-
__decorateClass$
|
|
4583
|
+
__decorateClass$X([
|
|
4494
4584
|
modernIdoc.property()
|
|
4495
4585
|
], VertexAttribute.prototype, "offset");
|
|
4496
|
-
__decorateClass$
|
|
4586
|
+
__decorateClass$X([
|
|
4497
4587
|
modernIdoc.property()
|
|
4498
4588
|
], VertexAttribute.prototype, "divisor");
|
|
4499
4589
|
|
|
@@ -4737,13 +4827,13 @@ class UvGeometry extends Geometry {
|
|
|
4737
4827
|
}
|
|
4738
4828
|
}
|
|
4739
4829
|
|
|
4740
|
-
var __defProp$
|
|
4741
|
-
var __decorateClass$
|
|
4830
|
+
var __defProp$O = Object.defineProperty;
|
|
4831
|
+
var __decorateClass$W = (decorators, target, key, kind) => {
|
|
4742
4832
|
var result = void 0 ;
|
|
4743
4833
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
4744
4834
|
if (decorator = decorators[i])
|
|
4745
4835
|
result = (decorator(target, key, result) ) || result;
|
|
4746
|
-
if (result) __defProp$
|
|
4836
|
+
if (result) __defProp$O(target, key, result);
|
|
4747
4837
|
return result;
|
|
4748
4838
|
};
|
|
4749
4839
|
class Texture2D extends Resource {
|
|
@@ -4799,7 +4889,9 @@ class Texture2D extends Resource {
|
|
|
4799
4889
|
/** @internal */
|
|
4800
4890
|
_glTexture(renderer, options) {
|
|
4801
4891
|
return renderer.getRelated(this, () => {
|
|
4802
|
-
return renderer.texture.create(
|
|
4892
|
+
return renderer.texture.create(
|
|
4893
|
+
this._glTextureOptions(renderer, options)
|
|
4894
|
+
);
|
|
4803
4895
|
});
|
|
4804
4896
|
}
|
|
4805
4897
|
_updateProperty(key, value, oldValue) {
|
|
@@ -4869,27 +4961,31 @@ class Texture2D extends Resource {
|
|
|
4869
4961
|
}
|
|
4870
4962
|
}
|
|
4871
4963
|
}
|
|
4872
|
-
__decorateClass$
|
|
4964
|
+
__decorateClass$W([
|
|
4873
4965
|
modernIdoc.property({ internal: true })
|
|
4874
4966
|
], Texture2D.prototype, "source");
|
|
4875
|
-
__decorateClass$
|
|
4967
|
+
__decorateClass$W([
|
|
4876
4968
|
modernIdoc.property({ fallback: 0 })
|
|
4877
4969
|
], Texture2D.prototype, "width");
|
|
4878
|
-
__decorateClass$
|
|
4970
|
+
__decorateClass$W([
|
|
4879
4971
|
modernIdoc.property({ fallback: 0 })
|
|
4880
4972
|
], Texture2D.prototype, "height");
|
|
4881
|
-
__decorateClass$
|
|
4973
|
+
__decorateClass$W([
|
|
4882
4974
|
modernIdoc.property({ fallback: "linear" })
|
|
4883
4975
|
], Texture2D.prototype, "filterMode");
|
|
4884
|
-
__decorateClass$
|
|
4976
|
+
__decorateClass$W([
|
|
4885
4977
|
modernIdoc.property({ fallback: "clamp_to_edge" })
|
|
4886
4978
|
], Texture2D.prototype, "wrapMode");
|
|
4887
|
-
__decorateClass$
|
|
4979
|
+
__decorateClass$W([
|
|
4888
4980
|
modernIdoc.property({ fallback: 1 })
|
|
4889
4981
|
], Texture2D.prototype, "pixelRatio");
|
|
4890
4982
|
|
|
4891
4983
|
class AnimatedTexture extends Resource {
|
|
4892
4984
|
frames;
|
|
4985
|
+
frameIndex = 0;
|
|
4986
|
+
get currentFrame() {
|
|
4987
|
+
return this.frames[this.frameIndex];
|
|
4988
|
+
}
|
|
4893
4989
|
constructor(source) {
|
|
4894
4990
|
super();
|
|
4895
4991
|
let frames;
|
|
@@ -4914,13 +5010,13 @@ class AnimatedTexture extends Resource {
|
|
|
4914
5010
|
}
|
|
4915
5011
|
}
|
|
4916
5012
|
|
|
4917
|
-
var __defProp$
|
|
4918
|
-
var __decorateClass$
|
|
5013
|
+
var __defProp$N = Object.defineProperty;
|
|
5014
|
+
var __decorateClass$V = (decorators, target, key, kind) => {
|
|
4919
5015
|
var result = void 0 ;
|
|
4920
5016
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
4921
5017
|
if (decorator = decorators[i])
|
|
4922
5018
|
result = (decorator(target, key, result) ) || result;
|
|
4923
|
-
if (result) __defProp$
|
|
5019
|
+
if (result) __defProp$N(target, key, result);
|
|
4924
5020
|
return result;
|
|
4925
5021
|
};
|
|
4926
5022
|
class CanvasTexture extends Texture2D {
|
|
@@ -4939,7 +5035,7 @@ class CanvasTexture extends Texture2D {
|
|
|
4939
5035
|
super._updateProperty(key, value, oldValue);
|
|
4940
5036
|
}
|
|
4941
5037
|
}
|
|
4942
|
-
__decorateClass$
|
|
5038
|
+
__decorateClass$V([
|
|
4943
5039
|
modernIdoc.property({ fallback: 2 })
|
|
4944
5040
|
], CanvasTexture.prototype, "pixelRatio");
|
|
4945
5041
|
|
|
@@ -5161,13 +5257,13 @@ class PixelsTexture extends Texture2D {
|
|
|
5161
5257
|
}
|
|
5162
5258
|
}
|
|
5163
5259
|
|
|
5164
|
-
var __defProp$
|
|
5165
|
-
var __decorateClass$
|
|
5260
|
+
var __defProp$M = Object.defineProperty;
|
|
5261
|
+
var __decorateClass$U = (decorators, target, key, kind) => {
|
|
5166
5262
|
var result = void 0 ;
|
|
5167
5263
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
5168
5264
|
if (decorator = decorators[i])
|
|
5169
5265
|
result = (decorator(target, key, result) ) || result;
|
|
5170
|
-
if (result) __defProp$
|
|
5266
|
+
if (result) __defProp$M(target, key, result);
|
|
5171
5267
|
return result;
|
|
5172
5268
|
};
|
|
5173
5269
|
function resolveOptions(options) {
|
|
@@ -5411,10 +5507,10 @@ const _VideoTexture = class _VideoTexture extends Texture2D {
|
|
|
5411
5507
|
}
|
|
5412
5508
|
}
|
|
5413
5509
|
};
|
|
5414
|
-
__decorateClass$
|
|
5510
|
+
__decorateClass$U([
|
|
5415
5511
|
modernIdoc.property({ internal: true, fallback: true })
|
|
5416
5512
|
], _VideoTexture.prototype, "autoUpdate");
|
|
5417
|
-
__decorateClass$
|
|
5513
|
+
__decorateClass$U([
|
|
5418
5514
|
modernIdoc.property({ internal: true, fallback: 0 })
|
|
5419
5515
|
], _VideoTexture.prototype, "fps");
|
|
5420
5516
|
let VideoTexture = _VideoTexture;
|
|
@@ -5663,14 +5759,14 @@ class Children {
|
|
|
5663
5759
|
}
|
|
5664
5760
|
}
|
|
5665
5761
|
|
|
5666
|
-
var __defProp$
|
|
5762
|
+
var __defProp$L = Object.defineProperty;
|
|
5667
5763
|
var __getOwnPropDesc$J = Object.getOwnPropertyDescriptor;
|
|
5668
|
-
var __decorateClass$
|
|
5764
|
+
var __decorateClass$T = (decorators, target, key, kind) => {
|
|
5669
5765
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$J(target, key) : target;
|
|
5670
5766
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
5671
5767
|
if (decorator = decorators[i])
|
|
5672
5768
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
5673
|
-
if (kind && result) __defProp$
|
|
5769
|
+
if (kind && result) __defProp$L(target, key, result);
|
|
5674
5770
|
return result;
|
|
5675
5771
|
};
|
|
5676
5772
|
const iidMap = {};
|
|
@@ -6179,45 +6275,45 @@ exports.Node = class Node extends CoreObject {
|
|
|
6179
6275
|
return node;
|
|
6180
6276
|
}
|
|
6181
6277
|
};
|
|
6182
|
-
__decorateClass$
|
|
6278
|
+
__decorateClass$T([
|
|
6183
6279
|
modernIdoc.property({ fallback: modernIdoc.idGenerator() })
|
|
6184
6280
|
], exports.Node.prototype, "id", 2);
|
|
6185
|
-
__decorateClass$
|
|
6281
|
+
__decorateClass$T([
|
|
6186
6282
|
modernIdoc.property({ fallback: modernIdoc.idGenerator() })
|
|
6187
6283
|
], exports.Node.prototype, "name", 2);
|
|
6188
|
-
__decorateClass$
|
|
6284
|
+
__decorateClass$T([
|
|
6189
6285
|
modernIdoc.property({ default: () => ({}) })
|
|
6190
6286
|
], exports.Node.prototype, "meta", 2);
|
|
6191
|
-
__decorateClass$
|
|
6287
|
+
__decorateClass$T([
|
|
6192
6288
|
modernIdoc.property({ internal: true, fallback: "inherit" })
|
|
6193
6289
|
], exports.Node.prototype, "processMode", 2);
|
|
6194
|
-
__decorateClass$
|
|
6290
|
+
__decorateClass$T([
|
|
6195
6291
|
modernIdoc.property({ internal: true, fallback: "default" })
|
|
6196
6292
|
], exports.Node.prototype, "processSortMode", 2);
|
|
6197
|
-
__decorateClass$
|
|
6293
|
+
__decorateClass$T([
|
|
6198
6294
|
modernIdoc.property({ internal: true, fallback: "inherit" })
|
|
6199
6295
|
], exports.Node.prototype, "renderMode", 2);
|
|
6200
|
-
__decorateClass$
|
|
6296
|
+
__decorateClass$T([
|
|
6201
6297
|
modernIdoc.property({ internal: true, fallback: "inherit" })
|
|
6202
6298
|
], exports.Node.prototype, "inputMode", 2);
|
|
6203
|
-
__decorateClass$
|
|
6299
|
+
__decorateClass$T([
|
|
6204
6300
|
modernIdoc.property({ internal: true, fallback: "default" })
|
|
6205
6301
|
], exports.Node.prototype, "internalMode", 2);
|
|
6206
|
-
__decorateClass$
|
|
6302
|
+
__decorateClass$T([
|
|
6207
6303
|
modernIdoc.property({ internal: true })
|
|
6208
6304
|
], exports.Node.prototype, "mask", 2);
|
|
6209
|
-
exports.Node = __decorateClass$
|
|
6305
|
+
exports.Node = __decorateClass$T([
|
|
6210
6306
|
customNode("Node")
|
|
6211
6307
|
], exports.Node);
|
|
6212
6308
|
|
|
6213
|
-
var __defProp$
|
|
6309
|
+
var __defProp$K = Object.defineProperty;
|
|
6214
6310
|
var __getOwnPropDesc$I = Object.getOwnPropertyDescriptor;
|
|
6215
|
-
var __decorateClass$
|
|
6311
|
+
var __decorateClass$S = (decorators, target, key, kind) => {
|
|
6216
6312
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$I(target, key) : target;
|
|
6217
6313
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6218
6314
|
if (decorator = decorators[i])
|
|
6219
6315
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6220
|
-
if (kind && result) __defProp$
|
|
6316
|
+
if (kind && result) __defProp$K(target, key, result);
|
|
6221
6317
|
return result;
|
|
6222
6318
|
};
|
|
6223
6319
|
exports.TimelineNode = class TimelineNode extends exports.Node {
|
|
@@ -6277,30 +6373,30 @@ exports.TimelineNode = class TimelineNode extends exports.Node {
|
|
|
6277
6373
|
this._updateCurrentTime();
|
|
6278
6374
|
}
|
|
6279
6375
|
};
|
|
6280
|
-
__decorateClass$
|
|
6376
|
+
__decorateClass$S([
|
|
6281
6377
|
modernIdoc.property({ fallback: 0 })
|
|
6282
6378
|
], exports.TimelineNode.prototype, "delay", 2);
|
|
6283
|
-
__decorateClass$
|
|
6379
|
+
__decorateClass$S([
|
|
6284
6380
|
modernIdoc.property({ fallback: 0 })
|
|
6285
6381
|
], exports.TimelineNode.prototype, "duration", 2);
|
|
6286
|
-
__decorateClass$
|
|
6382
|
+
__decorateClass$S([
|
|
6287
6383
|
modernIdoc.property({ fallback: false })
|
|
6288
6384
|
], exports.TimelineNode.prototype, "paused", 2);
|
|
6289
|
-
__decorateClass$
|
|
6385
|
+
__decorateClass$S([
|
|
6290
6386
|
modernIdoc.property({ internal: true, fallback: false })
|
|
6291
6387
|
], exports.TimelineNode.prototype, "insideTimeRange", 2);
|
|
6292
|
-
exports.TimelineNode = __decorateClass$
|
|
6388
|
+
exports.TimelineNode = __decorateClass$S([
|
|
6293
6389
|
customNode("TimelineNode")
|
|
6294
6390
|
], exports.TimelineNode);
|
|
6295
6391
|
|
|
6296
|
-
var __defProp$
|
|
6392
|
+
var __defProp$J = Object.defineProperty;
|
|
6297
6393
|
var __getOwnPropDesc$H = Object.getOwnPropertyDescriptor;
|
|
6298
|
-
var __decorateClass$
|
|
6394
|
+
var __decorateClass$R = (decorators, target, key, kind) => {
|
|
6299
6395
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$H(target, key) : target;
|
|
6300
6396
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6301
6397
|
if (decorator = decorators[i])
|
|
6302
6398
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6303
|
-
if (kind && result) __defProp$
|
|
6399
|
+
if (kind && result) __defProp$J(target, key, result);
|
|
6304
6400
|
return result;
|
|
6305
6401
|
};
|
|
6306
6402
|
exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
|
|
@@ -6394,10 +6490,11 @@ exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
|
|
|
6394
6490
|
}
|
|
6395
6491
|
_repaint(batchables) {
|
|
6396
6492
|
this.log(this.name, "painting");
|
|
6493
|
+
const globalOpacity = this.globalOpacity;
|
|
6397
6494
|
return batchables.map((batchable) => {
|
|
6398
6495
|
return {
|
|
6399
6496
|
...batchable,
|
|
6400
|
-
modulate: this._modulate.toInt8Array(),
|
|
6497
|
+
modulate: this._modulate.toInt8Array().map((v) => v * globalOpacity),
|
|
6401
6498
|
blendMode: this.blendMode
|
|
6402
6499
|
};
|
|
6403
6500
|
});
|
|
@@ -6452,30 +6549,30 @@ exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
|
|
|
6452
6549
|
super._render(renderer);
|
|
6453
6550
|
}
|
|
6454
6551
|
};
|
|
6455
|
-
__decorateClass$
|
|
6552
|
+
__decorateClass$R([
|
|
6456
6553
|
modernIdoc.property()
|
|
6457
6554
|
], exports.CanvasItem.prototype, "modulate", 2);
|
|
6458
|
-
__decorateClass$
|
|
6555
|
+
__decorateClass$R([
|
|
6459
6556
|
modernIdoc.property()
|
|
6460
6557
|
], exports.CanvasItem.prototype, "blendMode", 2);
|
|
6461
|
-
__decorateClass$
|
|
6558
|
+
__decorateClass$R([
|
|
6462
6559
|
modernIdoc.property({ internal: true, fallback: true })
|
|
6463
6560
|
], exports.CanvasItem.prototype, "visible", 2);
|
|
6464
|
-
__decorateClass$
|
|
6561
|
+
__decorateClass$R([
|
|
6465
6562
|
modernIdoc.property({ internal: true, fallback: 1 })
|
|
6466
6563
|
], exports.CanvasItem.prototype, "opacity", 2);
|
|
6467
|
-
exports.CanvasItem = __decorateClass$
|
|
6564
|
+
exports.CanvasItem = __decorateClass$R([
|
|
6468
6565
|
customNode("CanvasItem")
|
|
6469
6566
|
], exports.CanvasItem);
|
|
6470
6567
|
|
|
6471
|
-
var __defProp$
|
|
6568
|
+
var __defProp$I = Object.defineProperty;
|
|
6472
6569
|
var __getOwnPropDesc$G = Object.getOwnPropertyDescriptor;
|
|
6473
|
-
var __decorateClass$
|
|
6570
|
+
var __decorateClass$Q = (decorators, target, key, kind) => {
|
|
6474
6571
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$G(target, key) : target;
|
|
6475
6572
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6476
6573
|
if (decorator = decorators[i])
|
|
6477
6574
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6478
|
-
if (kind && result) __defProp$
|
|
6575
|
+
if (kind && result) __defProp$I(target, key, result);
|
|
6479
6576
|
return result;
|
|
6480
6577
|
};
|
|
6481
6578
|
exports.Viewport = class Viewport extends exports.Node {
|
|
@@ -6517,6 +6614,7 @@ exports.Viewport = class Viewport extends exports.Node {
|
|
|
6517
6614
|
return {
|
|
6518
6615
|
width,
|
|
6519
6616
|
height,
|
|
6617
|
+
msaa: this.msaa,
|
|
6520
6618
|
colorTextures: [this.texture._glTexture(renderer)]
|
|
6521
6619
|
};
|
|
6522
6620
|
}
|
|
@@ -6543,6 +6641,9 @@ exports.Viewport = class Viewport extends exports.Node {
|
|
|
6543
6641
|
this.projection.resize(this.width, this.height);
|
|
6544
6642
|
this.emit("updateRect");
|
|
6545
6643
|
break;
|
|
6644
|
+
case "msaa":
|
|
6645
|
+
this.requestUpload();
|
|
6646
|
+
break;
|
|
6546
6647
|
}
|
|
6547
6648
|
}
|
|
6548
6649
|
requestUpload() {
|
|
@@ -6622,30 +6723,33 @@ exports.Viewport = class Viewport extends exports.Node {
|
|
|
6622
6723
|
return this.canvasTransform.apply(globalPos, newPos);
|
|
6623
6724
|
}
|
|
6624
6725
|
};
|
|
6625
|
-
__decorateClass$
|
|
6726
|
+
__decorateClass$Q([
|
|
6626
6727
|
modernIdoc.property({ fallback: 0 })
|
|
6627
6728
|
], exports.Viewport.prototype, "x", 2);
|
|
6628
|
-
__decorateClass$
|
|
6729
|
+
__decorateClass$Q([
|
|
6629
6730
|
modernIdoc.property({ fallback: 0 })
|
|
6630
6731
|
], exports.Viewport.prototype, "y", 2);
|
|
6631
|
-
__decorateClass$
|
|
6732
|
+
__decorateClass$Q([
|
|
6632
6733
|
modernIdoc.property({ fallback: 0 })
|
|
6633
6734
|
], exports.Viewport.prototype, "width", 2);
|
|
6634
|
-
__decorateClass$
|
|
6735
|
+
__decorateClass$Q([
|
|
6635
6736
|
modernIdoc.property({ fallback: 0 })
|
|
6636
6737
|
], exports.Viewport.prototype, "height", 2);
|
|
6637
|
-
|
|
6738
|
+
__decorateClass$Q([
|
|
6739
|
+
modernIdoc.property({ internal: true, fallback: false })
|
|
6740
|
+
], exports.Viewport.prototype, "msaa", 2);
|
|
6741
|
+
exports.Viewport = __decorateClass$Q([
|
|
6638
6742
|
customNode("Viewport")
|
|
6639
6743
|
], exports.Viewport);
|
|
6640
6744
|
|
|
6641
|
-
var __defProp$
|
|
6745
|
+
var __defProp$H = Object.defineProperty;
|
|
6642
6746
|
var __getOwnPropDesc$F = Object.getOwnPropertyDescriptor;
|
|
6643
|
-
var __decorateClass$
|
|
6747
|
+
var __decorateClass$P = (decorators, target, key, kind) => {
|
|
6644
6748
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$F(target, key) : target;
|
|
6645
6749
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6646
6750
|
if (decorator = decorators[i])
|
|
6647
6751
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6648
|
-
if (kind && result) __defProp$
|
|
6752
|
+
if (kind && result) __defProp$H(target, key, result);
|
|
6649
6753
|
return result;
|
|
6650
6754
|
};
|
|
6651
6755
|
exports.Effect = class Effect extends exports.TimelineNode {
|
|
@@ -6887,19 +6991,19 @@ exports.Effect = class Effect extends exports.TimelineNode {
|
|
|
6887
6991
|
}
|
|
6888
6992
|
}
|
|
6889
6993
|
};
|
|
6890
|
-
__decorateClass$
|
|
6994
|
+
__decorateClass$P([
|
|
6891
6995
|
modernIdoc.property({ internal: true })
|
|
6892
6996
|
], exports.Effect.prototype, "material", 2);
|
|
6893
|
-
__decorateClass$
|
|
6997
|
+
__decorateClass$P([
|
|
6894
6998
|
modernIdoc.property()
|
|
6895
6999
|
], exports.Effect.prototype, "effectMode", 2);
|
|
6896
|
-
__decorateClass$
|
|
7000
|
+
__decorateClass$P([
|
|
6897
7001
|
modernIdoc.property({ fallback: "" })
|
|
6898
7002
|
], exports.Effect.prototype, "glsl", 2);
|
|
6899
|
-
__decorateClass$
|
|
7003
|
+
__decorateClass$P([
|
|
6900
7004
|
modernIdoc.property({ fallback: "" })
|
|
6901
7005
|
], exports.Effect.prototype, "glslSrc", 2);
|
|
6902
|
-
exports.Effect = __decorateClass$
|
|
7006
|
+
exports.Effect = __decorateClass$P([
|
|
6903
7007
|
customNode("Effect")
|
|
6904
7008
|
], exports.Effect);
|
|
6905
7009
|
|
|
@@ -6929,14 +7033,14 @@ class RenderStack {
|
|
|
6929
7033
|
}
|
|
6930
7034
|
}
|
|
6931
7035
|
|
|
6932
|
-
var __defProp$
|
|
7036
|
+
var __defProp$G = Object.defineProperty;
|
|
6933
7037
|
var __getOwnPropDesc$E = Object.getOwnPropertyDescriptor;
|
|
6934
|
-
var __decorateClass$
|
|
7038
|
+
var __decorateClass$O = (decorators, target, key, kind) => {
|
|
6935
7039
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$E(target, key) : target;
|
|
6936
7040
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6937
7041
|
if (decorator = decorators[i])
|
|
6938
7042
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6939
|
-
if (kind && result) __defProp$
|
|
7043
|
+
if (kind && result) __defProp$G(target, key, result);
|
|
6940
7044
|
return result;
|
|
6941
7045
|
};
|
|
6942
7046
|
exports.Timeline = class Timeline extends exports.Node {
|
|
@@ -6981,52 +7085,54 @@ exports.Timeline = class Timeline extends exports.Node {
|
|
|
6981
7085
|
this.addTime(delta);
|
|
6982
7086
|
}
|
|
6983
7087
|
};
|
|
6984
|
-
__decorateClass$
|
|
7088
|
+
__decorateClass$O([
|
|
6985
7089
|
modernIdoc.property({ fallback: 0 })
|
|
6986
7090
|
], exports.Timeline.prototype, "startTime", 2);
|
|
6987
|
-
__decorateClass$
|
|
7091
|
+
__decorateClass$O([
|
|
6988
7092
|
modernIdoc.property({ fallback: 0 })
|
|
6989
7093
|
], exports.Timeline.prototype, "currentTime", 2);
|
|
6990
|
-
__decorateClass$
|
|
7094
|
+
__decorateClass$O([
|
|
6991
7095
|
modernIdoc.property({ fallback: Number.MAX_SAFE_INTEGER })
|
|
6992
7096
|
], exports.Timeline.prototype, "endTime", 2);
|
|
6993
|
-
__decorateClass$
|
|
7097
|
+
__decorateClass$O([
|
|
6994
7098
|
modernIdoc.property({ fallback: false })
|
|
6995
7099
|
], exports.Timeline.prototype, "loop", 2);
|
|
6996
|
-
exports.Timeline = __decorateClass$
|
|
7100
|
+
exports.Timeline = __decorateClass$O([
|
|
6997
7101
|
customNode("Timeline")
|
|
6998
7102
|
], exports.Timeline);
|
|
6999
7103
|
|
|
7104
|
+
var __defProp$F = Object.defineProperty;
|
|
7000
7105
|
var __getOwnPropDesc$D = Object.getOwnPropertyDescriptor;
|
|
7001
|
-
var __decorateClass$
|
|
7106
|
+
var __decorateClass$N = (decorators, target, key, kind) => {
|
|
7002
7107
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$D(target, key) : target;
|
|
7003
7108
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7004
7109
|
if (decorator = decorators[i])
|
|
7005
|
-
result = (decorator(result)) || result;
|
|
7110
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7111
|
+
if (kind && result) __defProp$F(target, key, result);
|
|
7006
7112
|
return result;
|
|
7007
7113
|
};
|
|
7008
7114
|
exports.Window = class Window extends exports.Viewport {
|
|
7009
|
-
//
|
|
7010
7115
|
};
|
|
7011
|
-
|
|
7116
|
+
__decorateClass$N([
|
|
7117
|
+
modernIdoc.property({ fallback: false })
|
|
7118
|
+
], exports.Window.prototype, "msaa", 2);
|
|
7119
|
+
exports.Window = __decorateClass$N([
|
|
7012
7120
|
customNode("Window")
|
|
7013
7121
|
], exports.Window);
|
|
7014
7122
|
|
|
7015
|
-
var __defProp$
|
|
7016
|
-
var __decorateClass$
|
|
7123
|
+
var __defProp$E = Object.defineProperty;
|
|
7124
|
+
var __decorateClass$M = (decorators, target, key, kind) => {
|
|
7017
7125
|
var result = void 0 ;
|
|
7018
7126
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7019
7127
|
if (decorator = decorators[i])
|
|
7020
7128
|
result = (decorator(target, key, result) ) || result;
|
|
7021
|
-
if (result) __defProp$
|
|
7129
|
+
if (result) __defProp$E(target, key, result);
|
|
7022
7130
|
return result;
|
|
7023
7131
|
};
|
|
7024
7132
|
class SceneTree extends MainLoop {
|
|
7025
|
-
fonts;
|
|
7026
7133
|
input = new Input();
|
|
7027
7134
|
renderStack = new RenderStack();
|
|
7028
7135
|
root = new exports.Window(true).setTree(this);
|
|
7029
|
-
timeline;
|
|
7030
7136
|
_backgroundColor = new Color();
|
|
7031
7137
|
_currentViewport;
|
|
7032
7138
|
getCurrentViewport() {
|
|
@@ -7035,9 +7141,9 @@ class SceneTree extends MainLoop {
|
|
|
7035
7141
|
setCurrentViewport(viewport) {
|
|
7036
7142
|
this._currentViewport = viewport;
|
|
7037
7143
|
}
|
|
7038
|
-
constructor(
|
|
7144
|
+
constructor(properties) {
|
|
7039
7145
|
super();
|
|
7040
|
-
this.
|
|
7146
|
+
this.setProperties(properties);
|
|
7041
7147
|
}
|
|
7042
7148
|
_updateProperty(key, value, oldValue) {
|
|
7043
7149
|
super._updateProperty(key, value, oldValue);
|
|
@@ -7045,6 +7151,9 @@ class SceneTree extends MainLoop {
|
|
|
7045
7151
|
case "backgroundColor":
|
|
7046
7152
|
this._backgroundColor.value = value;
|
|
7047
7153
|
break;
|
|
7154
|
+
case "timeline":
|
|
7155
|
+
this.timeline.setTree(this);
|
|
7156
|
+
break;
|
|
7048
7157
|
}
|
|
7049
7158
|
}
|
|
7050
7159
|
log(...args) {
|
|
@@ -7065,8 +7174,14 @@ class SceneTree extends MainLoop {
|
|
|
7065
7174
|
this.emit("rendered");
|
|
7066
7175
|
}
|
|
7067
7176
|
_renderScreen(renderer) {
|
|
7177
|
+
if (this.root.msaa) {
|
|
7178
|
+
renderer.framebuffer.finishRenderPass(
|
|
7179
|
+
this.root._glFramebuffer(renderer)
|
|
7180
|
+
);
|
|
7181
|
+
}
|
|
7068
7182
|
renderer.state.reset();
|
|
7069
7183
|
renderer.framebuffer.bind(null);
|
|
7184
|
+
renderer.gl.bindFramebuffer(renderer.gl.FRAMEBUFFER, null);
|
|
7070
7185
|
renderer.viewport.bind({
|
|
7071
7186
|
x: 0,
|
|
7072
7187
|
y: 0,
|
|
@@ -7086,23 +7201,29 @@ class SceneTree extends MainLoop {
|
|
|
7086
7201
|
renderer.texture.unbind(texture);
|
|
7087
7202
|
}
|
|
7088
7203
|
destroy() {
|
|
7089
|
-
super.destroy();
|
|
7090
7204
|
this.root.destroy();
|
|
7091
|
-
this.input.
|
|
7205
|
+
this.input.destroy();
|
|
7206
|
+
super.destroy();
|
|
7092
7207
|
}
|
|
7093
7208
|
}
|
|
7094
|
-
__decorateClass$
|
|
7095
|
-
modernIdoc.property({ internal: true, fallback: false })
|
|
7096
|
-
], SceneTree.prototype, "processPaused");
|
|
7097
|
-
__decorateClass$L([
|
|
7209
|
+
__decorateClass$M([
|
|
7098
7210
|
modernIdoc.property()
|
|
7099
7211
|
], SceneTree.prototype, "backgroundColor");
|
|
7100
|
-
__decorateClass$
|
|
7212
|
+
__decorateClass$M([
|
|
7101
7213
|
modernIdoc.property({ internal: true, fallback: false })
|
|
7102
7214
|
], SceneTree.prototype, "debug");
|
|
7215
|
+
__decorateClass$M([
|
|
7216
|
+
modernIdoc.property({ internal: true, fallback: false })
|
|
7217
|
+
], SceneTree.prototype, "processPaused");
|
|
7218
|
+
__decorateClass$M([
|
|
7219
|
+
modernIdoc.property({ internal: true, fallback: modernFont.fonts })
|
|
7220
|
+
], SceneTree.prototype, "fonts");
|
|
7221
|
+
__decorateClass$M([
|
|
7222
|
+
modernIdoc.property({ internal: true, default: () => new exports.Timeline() })
|
|
7223
|
+
], SceneTree.prototype, "timeline");
|
|
7103
7224
|
|
|
7104
7225
|
var __getOwnPropDesc$C = Object.getOwnPropertyDescriptor;
|
|
7105
|
-
var __decorateClass$
|
|
7226
|
+
var __decorateClass$L = (decorators, target, key, kind) => {
|
|
7106
7227
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$C(target, key) : target;
|
|
7107
7228
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7108
7229
|
if (decorator = decorators[i])
|
|
@@ -7115,7 +7236,7 @@ exports.Transition = class Transition extends exports.Effect {
|
|
|
7115
7236
|
this.setProperties(properties).append(children);
|
|
7116
7237
|
}
|
|
7117
7238
|
};
|
|
7118
|
-
exports.Transition = __decorateClass$
|
|
7239
|
+
exports.Transition = __decorateClass$L([
|
|
7119
7240
|
customNode("Transition", {
|
|
7120
7241
|
effectMode: "transition",
|
|
7121
7242
|
processMode: "pausable",
|
|
@@ -7123,14 +7244,14 @@ exports.Transition = __decorateClass$K([
|
|
|
7123
7244
|
})
|
|
7124
7245
|
], exports.Transition);
|
|
7125
7246
|
|
|
7126
|
-
var __defProp$
|
|
7247
|
+
var __defProp$D = Object.defineProperty;
|
|
7127
7248
|
var __getOwnPropDesc$B = Object.getOwnPropertyDescriptor;
|
|
7128
|
-
var __decorateClass$
|
|
7249
|
+
var __decorateClass$K = (decorators, target, key, kind) => {
|
|
7129
7250
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$B(target, key) : target;
|
|
7130
7251
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7131
7252
|
if (decorator = decorators[i])
|
|
7132
7253
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7133
|
-
if (kind && result) __defProp$
|
|
7254
|
+
if (kind && result) __defProp$D(target, key, result);
|
|
7134
7255
|
return result;
|
|
7135
7256
|
};
|
|
7136
7257
|
exports.Node2D = class Node2D extends exports.CanvasItem {
|
|
@@ -7234,24 +7355,24 @@ exports.Node2D = class Node2D extends exports.CanvasItem {
|
|
|
7234
7355
|
return this.globalTransform.apply(localPos, newPos);
|
|
7235
7356
|
}
|
|
7236
7357
|
};
|
|
7237
|
-
__decorateClass$
|
|
7358
|
+
__decorateClass$K([
|
|
7238
7359
|
modernIdoc.property({ internal: true, fallback: 0 })
|
|
7239
7360
|
], exports.Node2D.prototype, "rotation", 2);
|
|
7240
|
-
__decorateClass$
|
|
7361
|
+
__decorateClass$K([
|
|
7241
7362
|
modernIdoc.property({ internal: true, fallback: 0 })
|
|
7242
7363
|
], exports.Node2D.prototype, "globalRotation", 2);
|
|
7243
|
-
exports.Node2D = __decorateClass$
|
|
7364
|
+
exports.Node2D = __decorateClass$K([
|
|
7244
7365
|
customNode("Node2D")
|
|
7245
7366
|
], exports.Node2D);
|
|
7246
7367
|
|
|
7247
|
-
var __defProp$
|
|
7368
|
+
var __defProp$C = Object.defineProperty;
|
|
7248
7369
|
var __getOwnPropDesc$A = Object.getOwnPropertyDescriptor;
|
|
7249
|
-
var __decorateClass$
|
|
7370
|
+
var __decorateClass$J = (decorators, target, key, kind) => {
|
|
7250
7371
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$A(target, key) : target;
|
|
7251
7372
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7252
7373
|
if (decorator = decorators[i])
|
|
7253
7374
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7254
|
-
if (kind && result) __defProp$
|
|
7375
|
+
if (kind && result) __defProp$C(target, key, result);
|
|
7255
7376
|
return result;
|
|
7256
7377
|
};
|
|
7257
7378
|
exports.Camera2D = class Camera2D extends exports.Node2D {
|
|
@@ -7364,13 +7485,13 @@ exports.Camera2D = class Camera2D extends exports.Node2D {
|
|
|
7364
7485
|
return viewport.toCanvasScreen(globalPos, newPos);
|
|
7365
7486
|
}
|
|
7366
7487
|
};
|
|
7367
|
-
__decorateClass$
|
|
7488
|
+
__decorateClass$J([
|
|
7368
7489
|
modernIdoc.property({ internal: true, fallback: false })
|
|
7369
7490
|
], exports.Camera2D.prototype, "spaceKey", 2);
|
|
7370
|
-
__decorateClass$
|
|
7491
|
+
__decorateClass$J([
|
|
7371
7492
|
modernIdoc.property({ internal: true, fallback: false })
|
|
7372
7493
|
], exports.Camera2D.prototype, "grabbing", 2);
|
|
7373
|
-
exports.Camera2D = __decorateClass$
|
|
7494
|
+
exports.Camera2D = __decorateClass$J([
|
|
7374
7495
|
customNode("Camera2D", {
|
|
7375
7496
|
processMode: "disabled",
|
|
7376
7497
|
renderMode: "disabled"
|
|
@@ -7523,15 +7644,15 @@ function parseCSSTransformOrigin(transformOrigin) {
|
|
|
7523
7644
|
});
|
|
7524
7645
|
}
|
|
7525
7646
|
|
|
7526
|
-
var __defProp$
|
|
7647
|
+
var __defProp$B = Object.defineProperty;
|
|
7527
7648
|
var __getOwnPropDesc$z = Object.getOwnPropertyDescriptor;
|
|
7528
|
-
var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$
|
|
7529
|
-
var __decorateClass$
|
|
7649
|
+
var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7650
|
+
var __decorateClass$I = (decorators, target, key, kind) => {
|
|
7530
7651
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$z(target, key) : target;
|
|
7531
7652
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7532
7653
|
if (decorator = decorators[i])
|
|
7533
7654
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7534
|
-
if (kind && result) __defProp$
|
|
7655
|
+
if (kind && result) __defProp$B(target, key, result);
|
|
7535
7656
|
return result;
|
|
7536
7657
|
};
|
|
7537
7658
|
var __publicField$i = (obj, key, value) => __defNormalProp$i(obj, key + "" , value);
|
|
@@ -7591,43 +7712,43 @@ void main(void) {
|
|
|
7591
7712
|
gl_FragColor = c * alpha;
|
|
7592
7713
|
}`
|
|
7593
7714
|
}));
|
|
7594
|
-
__decorateClass$
|
|
7715
|
+
__decorateClass$I([
|
|
7595
7716
|
modernIdoc.property({ fallback: 1 })
|
|
7596
7717
|
], exports.ColorAdjustEffect.prototype, "saturation", 2);
|
|
7597
|
-
__decorateClass$
|
|
7718
|
+
__decorateClass$I([
|
|
7598
7719
|
modernIdoc.property({ fallback: 1 })
|
|
7599
7720
|
], exports.ColorAdjustEffect.prototype, "contrast", 2);
|
|
7600
|
-
__decorateClass$
|
|
7721
|
+
__decorateClass$I([
|
|
7601
7722
|
modernIdoc.property({ fallback: 1 })
|
|
7602
7723
|
], exports.ColorAdjustEffect.prototype, "brightness", 2);
|
|
7603
|
-
__decorateClass$
|
|
7724
|
+
__decorateClass$I([
|
|
7604
7725
|
modernIdoc.property({ fallback: 1 })
|
|
7605
7726
|
], exports.ColorAdjustEffect.prototype, "red", 2);
|
|
7606
|
-
__decorateClass$
|
|
7727
|
+
__decorateClass$I([
|
|
7607
7728
|
modernIdoc.property({ fallback: 1 })
|
|
7608
7729
|
], exports.ColorAdjustEffect.prototype, "green", 2);
|
|
7609
|
-
__decorateClass$
|
|
7730
|
+
__decorateClass$I([
|
|
7610
7731
|
modernIdoc.property({ fallback: 1 })
|
|
7611
7732
|
], exports.ColorAdjustEffect.prototype, "blue", 2);
|
|
7612
|
-
__decorateClass$
|
|
7733
|
+
__decorateClass$I([
|
|
7613
7734
|
modernIdoc.property({ fallback: 1 })
|
|
7614
7735
|
], exports.ColorAdjustEffect.prototype, "alpha", 2);
|
|
7615
|
-
__decorateClass$
|
|
7736
|
+
__decorateClass$I([
|
|
7616
7737
|
modernIdoc.property({ fallback: 1 })
|
|
7617
7738
|
], exports.ColorAdjustEffect.prototype, "gamma", 2);
|
|
7618
|
-
exports.ColorAdjustEffect = __decorateClass$
|
|
7739
|
+
exports.ColorAdjustEffect = __decorateClass$I([
|
|
7619
7740
|
customNode("ColorAdjustEffect")
|
|
7620
7741
|
], exports.ColorAdjustEffect);
|
|
7621
7742
|
|
|
7622
|
-
var __defProp$
|
|
7743
|
+
var __defProp$A = Object.defineProperty;
|
|
7623
7744
|
var __getOwnPropDesc$y = Object.getOwnPropertyDescriptor;
|
|
7624
|
-
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$
|
|
7625
|
-
var __decorateClass$
|
|
7745
|
+
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7746
|
+
var __decorateClass$H = (decorators, target, key, kind) => {
|
|
7626
7747
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$y(target, key) : target;
|
|
7627
7748
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7628
7749
|
if (decorator = decorators[i])
|
|
7629
7750
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7630
|
-
if (kind && result) __defProp$
|
|
7751
|
+
if (kind && result) __defProp$A(target, key, result);
|
|
7631
7752
|
return result;
|
|
7632
7753
|
};
|
|
7633
7754
|
var __publicField$h = (obj, key, value) => __defNormalProp$h(obj, key + "" , value);
|
|
@@ -7707,22 +7828,22 @@ void main(void) {
|
|
|
7707
7828
|
);
|
|
7708
7829
|
}`
|
|
7709
7830
|
}));
|
|
7710
|
-
__decorateClass$
|
|
7831
|
+
__decorateClass$H([
|
|
7711
7832
|
modernIdoc.property()
|
|
7712
7833
|
], exports.ColorFilterEffect.prototype, "filter", 2);
|
|
7713
|
-
exports.ColorFilterEffect = __decorateClass$
|
|
7834
|
+
exports.ColorFilterEffect = __decorateClass$H([
|
|
7714
7835
|
customNode("ColorFilterEffect")
|
|
7715
7836
|
], exports.ColorFilterEffect);
|
|
7716
7837
|
|
|
7717
|
-
var __defProp$
|
|
7838
|
+
var __defProp$z = Object.defineProperty;
|
|
7718
7839
|
var __getOwnPropDesc$x = Object.getOwnPropertyDescriptor;
|
|
7719
|
-
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$
|
|
7720
|
-
var __decorateClass$
|
|
7840
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7841
|
+
var __decorateClass$G = (decorators, target, key, kind) => {
|
|
7721
7842
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$x(target, key) : target;
|
|
7722
7843
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7723
7844
|
if (decorator = decorators[i])
|
|
7724
7845
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7725
|
-
if (kind && result) __defProp$
|
|
7846
|
+
if (kind && result) __defProp$z(target, key, result);
|
|
7726
7847
|
return result;
|
|
7727
7848
|
};
|
|
7728
7849
|
var __publicField$g = (obj, key, value) => __defNormalProp$g(obj, key + "" , value);
|
|
@@ -7798,25 +7919,25 @@ void main(void) {
|
|
|
7798
7919
|
gl_FragColor = vec4(mix(color.rgb, mask.rgb, color.a * mask.a), color.a);
|
|
7799
7920
|
}`
|
|
7800
7921
|
}));
|
|
7801
|
-
__decorateClass$
|
|
7922
|
+
__decorateClass$G([
|
|
7802
7923
|
modernIdoc.property({ default: () => [] })
|
|
7803
7924
|
], exports.ColorOverlayEffect.prototype, "colors", 2);
|
|
7804
|
-
__decorateClass$
|
|
7925
|
+
__decorateClass$G([
|
|
7805
7926
|
modernIdoc.property({ fallback: 0.5 })
|
|
7806
7927
|
], exports.ColorOverlayEffect.prototype, "alpha", 2);
|
|
7807
|
-
exports.ColorOverlayEffect = __decorateClass$
|
|
7928
|
+
exports.ColorOverlayEffect = __decorateClass$G([
|
|
7808
7929
|
customNode("ColorOverlayEffect")
|
|
7809
7930
|
], exports.ColorOverlayEffect);
|
|
7810
7931
|
|
|
7811
|
-
var __defProp$
|
|
7932
|
+
var __defProp$y = Object.defineProperty;
|
|
7812
7933
|
var __getOwnPropDesc$w = Object.getOwnPropertyDescriptor;
|
|
7813
|
-
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$
|
|
7814
|
-
var __decorateClass$
|
|
7934
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7935
|
+
var __decorateClass$F = (decorators, target, key, kind) => {
|
|
7815
7936
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$w(target, key) : target;
|
|
7816
7937
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7817
7938
|
if (decorator = decorators[i])
|
|
7818
7939
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7819
|
-
if (kind && result) __defProp$
|
|
7940
|
+
if (kind && result) __defProp$y(target, key, result);
|
|
7820
7941
|
return result;
|
|
7821
7942
|
};
|
|
7822
7943
|
var __publicField$f = (obj, key, value) => __defNormalProp$f(obj, key + "" , value);
|
|
@@ -7883,25 +8004,25 @@ void main(void) {
|
|
|
7883
8004
|
gl_FragColor = color;
|
|
7884
8005
|
}`
|
|
7885
8006
|
}));
|
|
7886
|
-
__decorateClass$
|
|
8007
|
+
__decorateClass$F([
|
|
7887
8008
|
modernIdoc.property({ default: () => [] })
|
|
7888
8009
|
], exports.ColorRemoveEffect.prototype, "colors", 2);
|
|
7889
|
-
__decorateClass$
|
|
8010
|
+
__decorateClass$F([
|
|
7890
8011
|
modernIdoc.property({ fallback: 0.5 })
|
|
7891
8012
|
], exports.ColorRemoveEffect.prototype, "epsilon", 2);
|
|
7892
|
-
exports.ColorRemoveEffect = __decorateClass$
|
|
8013
|
+
exports.ColorRemoveEffect = __decorateClass$F([
|
|
7893
8014
|
customNode("ColorRemoveEffect")
|
|
7894
8015
|
], exports.ColorRemoveEffect);
|
|
7895
8016
|
|
|
7896
|
-
var __defProp$
|
|
8017
|
+
var __defProp$x = Object.defineProperty;
|
|
7897
8018
|
var __getOwnPropDesc$v = Object.getOwnPropertyDescriptor;
|
|
7898
|
-
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$
|
|
7899
|
-
var __decorateClass$
|
|
8019
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8020
|
+
var __decorateClass$E = (decorators, target, key, kind) => {
|
|
7900
8021
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$v(target, key) : target;
|
|
7901
8022
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7902
8023
|
if (decorator = decorators[i])
|
|
7903
8024
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7904
|
-
if (kind && result) __defProp$
|
|
8025
|
+
if (kind && result) __defProp$x(target, key, result);
|
|
7905
8026
|
return result;
|
|
7906
8027
|
};
|
|
7907
8028
|
var __publicField$e = (obj, key, value) => __defNormalProp$e(obj, key + "" , value);
|
|
@@ -7990,25 +8111,25 @@ void main(void) {
|
|
|
7990
8111
|
}
|
|
7991
8112
|
}`
|
|
7992
8113
|
}));
|
|
7993
|
-
__decorateClass$
|
|
8114
|
+
__decorateClass$E([
|
|
7994
8115
|
modernIdoc.property({ default: () => [] })
|
|
7995
8116
|
], exports.ColorReplaceEffect.prototype, "colors", 2);
|
|
7996
|
-
__decorateClass$
|
|
8117
|
+
__decorateClass$E([
|
|
7997
8118
|
modernIdoc.property({ fallback: 0.05 })
|
|
7998
8119
|
], exports.ColorReplaceEffect.prototype, "epsilon", 2);
|
|
7999
|
-
exports.ColorReplaceEffect = __decorateClass$
|
|
8120
|
+
exports.ColorReplaceEffect = __decorateClass$E([
|
|
8000
8121
|
customNode("ColorReplaceEffect")
|
|
8001
8122
|
], exports.ColorReplaceEffect);
|
|
8002
8123
|
|
|
8003
|
-
var __defProp$
|
|
8124
|
+
var __defProp$w = Object.defineProperty;
|
|
8004
8125
|
var __getOwnPropDesc$u = Object.getOwnPropertyDescriptor;
|
|
8005
|
-
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$
|
|
8006
|
-
var __decorateClass$
|
|
8126
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8127
|
+
var __decorateClass$D = (decorators, target, key, kind) => {
|
|
8007
8128
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$u(target, key) : target;
|
|
8008
8129
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8009
8130
|
if (decorator = decorators[i])
|
|
8010
8131
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8011
|
-
if (kind && result) __defProp$
|
|
8132
|
+
if (kind && result) __defProp$w(target, key, result);
|
|
8012
8133
|
return result;
|
|
8013
8134
|
};
|
|
8014
8135
|
var __publicField$d = (obj, key, value) => __defNormalProp$d(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
@@ -8114,25 +8235,25 @@ void main(void) {
|
|
|
8114
8235
|
}`,
|
|
8115
8236
|
frag: frag$2
|
|
8116
8237
|
}));
|
|
8117
|
-
__decorateClass$
|
|
8238
|
+
__decorateClass$D([
|
|
8118
8239
|
modernIdoc.property({ fallback: 4 })
|
|
8119
8240
|
], exports.GaussianBlurEffect.prototype, "strength", 2);
|
|
8120
|
-
__decorateClass$
|
|
8241
|
+
__decorateClass$D([
|
|
8121
8242
|
modernIdoc.property({ fallback: 3 })
|
|
8122
8243
|
], exports.GaussianBlurEffect.prototype, "quality", 2);
|
|
8123
|
-
exports.GaussianBlurEffect = __decorateClass$
|
|
8244
|
+
exports.GaussianBlurEffect = __decorateClass$D([
|
|
8124
8245
|
customNode("GaussianBlurEffect")
|
|
8125
8246
|
], exports.GaussianBlurEffect);
|
|
8126
8247
|
|
|
8127
|
-
var __defProp$
|
|
8248
|
+
var __defProp$v = Object.defineProperty;
|
|
8128
8249
|
var __getOwnPropDesc$t = Object.getOwnPropertyDescriptor;
|
|
8129
|
-
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$
|
|
8130
|
-
var __decorateClass$
|
|
8250
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8251
|
+
var __decorateClass$C = (decorators, target, key, kind) => {
|
|
8131
8252
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$t(target, key) : target;
|
|
8132
8253
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8133
8254
|
if (decorator = decorators[i])
|
|
8134
8255
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8135
|
-
if (kind && result) __defProp$
|
|
8256
|
+
if (kind && result) __defProp$v(target, key, result);
|
|
8136
8257
|
return result;
|
|
8137
8258
|
};
|
|
8138
8259
|
var __publicField$c = (obj, key, value) => __defNormalProp$c(obj, key + "" , value);
|
|
@@ -8196,34 +8317,34 @@ void main(void) {
|
|
|
8196
8317
|
gl_FragColor = sample;
|
|
8197
8318
|
}`
|
|
8198
8319
|
}));
|
|
8199
|
-
__decorateClass$
|
|
8320
|
+
__decorateClass$C([
|
|
8200
8321
|
modernIdoc.property({ fallback: "#000000FF" })
|
|
8201
8322
|
], exports.DropShadowEffect.prototype, "color", 2);
|
|
8202
|
-
__decorateClass$
|
|
8323
|
+
__decorateClass$C([
|
|
8203
8324
|
modernIdoc.property({ fallback: 4 })
|
|
8204
8325
|
], exports.DropShadowEffect.prototype, "blur", 2);
|
|
8205
|
-
__decorateClass$
|
|
8326
|
+
__decorateClass$C([
|
|
8206
8327
|
modernIdoc.property({ fallback: 4 })
|
|
8207
8328
|
], exports.DropShadowEffect.prototype, "offsetX", 2);
|
|
8208
|
-
__decorateClass$
|
|
8329
|
+
__decorateClass$C([
|
|
8209
8330
|
modernIdoc.property({ fallback: 4 })
|
|
8210
8331
|
], exports.DropShadowEffect.prototype, "offsetY", 2);
|
|
8211
|
-
__decorateClass$
|
|
8332
|
+
__decorateClass$C([
|
|
8212
8333
|
modernIdoc.property({ fallback: false })
|
|
8213
8334
|
], exports.DropShadowEffect.prototype, "shadowOnly", 2);
|
|
8214
|
-
exports.DropShadowEffect = __decorateClass$
|
|
8335
|
+
exports.DropShadowEffect = __decorateClass$C([
|
|
8215
8336
|
customNode("DropShadowEffect")
|
|
8216
8337
|
], exports.DropShadowEffect);
|
|
8217
8338
|
|
|
8218
|
-
var __defProp$
|
|
8339
|
+
var __defProp$u = Object.defineProperty;
|
|
8219
8340
|
var __getOwnPropDesc$s = Object.getOwnPropertyDescriptor;
|
|
8220
|
-
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$
|
|
8221
|
-
var __decorateClass$
|
|
8341
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8342
|
+
var __decorateClass$B = (decorators, target, key, kind) => {
|
|
8222
8343
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$s(target, key) : target;
|
|
8223
8344
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8224
8345
|
if (decorator = decorators[i])
|
|
8225
8346
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8226
|
-
if (kind && result) __defProp$
|
|
8347
|
+
if (kind && result) __defProp$u(target, key, result);
|
|
8227
8348
|
return result;
|
|
8228
8349
|
};
|
|
8229
8350
|
var __publicField$b = (obj, key, value) => __defNormalProp$b(obj, key + "" , value);
|
|
@@ -8268,22 +8389,22 @@ void main(void) {
|
|
|
8268
8389
|
gl_FragColor = vec4(color.rgb * alpha, alpha);
|
|
8269
8390
|
}`
|
|
8270
8391
|
}));
|
|
8271
|
-
__decorateClass$
|
|
8392
|
+
__decorateClass$B([
|
|
8272
8393
|
modernIdoc.property({ fallback: 5 })
|
|
8273
8394
|
], exports.EmbossEffect.prototype, "strength", 2);
|
|
8274
|
-
exports.EmbossEffect = __decorateClass$
|
|
8395
|
+
exports.EmbossEffect = __decorateClass$B([
|
|
8275
8396
|
customNode("EmbossEffect")
|
|
8276
8397
|
], exports.EmbossEffect);
|
|
8277
8398
|
|
|
8278
|
-
var __defProp$
|
|
8399
|
+
var __defProp$t = Object.defineProperty;
|
|
8279
8400
|
var __getOwnPropDesc$r = Object.getOwnPropertyDescriptor;
|
|
8280
|
-
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$
|
|
8281
|
-
var __decorateClass$
|
|
8401
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8402
|
+
var __decorateClass$A = (decorators, target, key, kind) => {
|
|
8282
8403
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$r(target, key) : target;
|
|
8283
8404
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8284
8405
|
if (decorator = decorators[i])
|
|
8285
8406
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8286
|
-
if (kind && result) __defProp$
|
|
8407
|
+
if (kind && result) __defProp$t(target, key, result);
|
|
8287
8408
|
return result;
|
|
8288
8409
|
};
|
|
8289
8410
|
var __publicField$a = (obj, key, value) => __defNormalProp$a(obj, key + "" , value);
|
|
@@ -8457,46 +8578,46 @@ void main(void) {
|
|
|
8457
8578
|
gl_FragColor.a = texture2D(sampler, coord).a;
|
|
8458
8579
|
}`
|
|
8459
8580
|
}));
|
|
8460
|
-
__decorateClass$
|
|
8581
|
+
__decorateClass$A([
|
|
8461
8582
|
modernIdoc.property({ fallback: 10 })
|
|
8462
8583
|
], exports.GlitchEffect.prototype, "slices", 2);
|
|
8463
|
-
__decorateClass$
|
|
8584
|
+
__decorateClass$A([
|
|
8464
8585
|
modernIdoc.property({ fallback: 512 })
|
|
8465
8586
|
], exports.GlitchEffect.prototype, "sampleSize", 2);
|
|
8466
|
-
__decorateClass$
|
|
8587
|
+
__decorateClass$A([
|
|
8467
8588
|
modernIdoc.property({ fallback: 100 })
|
|
8468
8589
|
], exports.GlitchEffect.prototype, "offset", 2);
|
|
8469
|
-
__decorateClass$
|
|
8590
|
+
__decorateClass$A([
|
|
8470
8591
|
modernIdoc.property({ fallback: 0 })
|
|
8471
8592
|
], exports.GlitchEffect.prototype, "direction", 2);
|
|
8472
|
-
__decorateClass$
|
|
8593
|
+
__decorateClass$A([
|
|
8473
8594
|
modernIdoc.property({ fallback: 2 })
|
|
8474
8595
|
], exports.GlitchEffect.prototype, "fillMode", 2);
|
|
8475
|
-
__decorateClass$
|
|
8596
|
+
__decorateClass$A([
|
|
8476
8597
|
modernIdoc.property({ fallback: 0 })
|
|
8477
8598
|
], exports.GlitchEffect.prototype, "seed", 2);
|
|
8478
|
-
__decorateClass$
|
|
8599
|
+
__decorateClass$A([
|
|
8479
8600
|
modernIdoc.property({ default: () => [2, 2] })
|
|
8480
8601
|
], exports.GlitchEffect.prototype, "red", 2);
|
|
8481
|
-
__decorateClass$
|
|
8602
|
+
__decorateClass$A([
|
|
8482
8603
|
modernIdoc.property({ default: () => [-10, 4] })
|
|
8483
8604
|
], exports.GlitchEffect.prototype, "green", 2);
|
|
8484
|
-
__decorateClass$
|
|
8605
|
+
__decorateClass$A([
|
|
8485
8606
|
modernIdoc.property({ default: () => [10, -4] })
|
|
8486
8607
|
], exports.GlitchEffect.prototype, "blue", 2);
|
|
8487
|
-
exports.GlitchEffect = __decorateClass$
|
|
8608
|
+
exports.GlitchEffect = __decorateClass$A([
|
|
8488
8609
|
customNode("GlitchEffect")
|
|
8489
8610
|
], exports.GlitchEffect);
|
|
8490
8611
|
|
|
8491
|
-
var __defProp$
|
|
8612
|
+
var __defProp$s = Object.defineProperty;
|
|
8492
8613
|
var __getOwnPropDesc$q = Object.getOwnPropertyDescriptor;
|
|
8493
|
-
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$
|
|
8494
|
-
var __decorateClass$
|
|
8614
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8615
|
+
var __decorateClass$z = (decorators, target, key, kind) => {
|
|
8495
8616
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$q(target, key) : target;
|
|
8496
8617
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8497
8618
|
if (decorator = decorators[i])
|
|
8498
8619
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8499
|
-
if (kind && result) __defProp$
|
|
8620
|
+
if (kind && result) __defProp$s(target, key, result);
|
|
8500
8621
|
return result;
|
|
8501
8622
|
};
|
|
8502
8623
|
var __publicField$9 = (obj, key, value) => __defNormalProp$9(obj, key + "" , value);
|
|
@@ -8674,39 +8795,39 @@ void main(void) {
|
|
|
8674
8795
|
gl_FragColor = vec4(color.rgb + mist.rgb, color.a);
|
|
8675
8796
|
}`
|
|
8676
8797
|
}));
|
|
8677
|
-
__decorateClass$
|
|
8798
|
+
__decorateClass$z([
|
|
8678
8799
|
modernIdoc.property({ fallback: 0 })
|
|
8679
8800
|
], exports.GodrayEffect.prototype, "time", 2);
|
|
8680
|
-
__decorateClass$
|
|
8801
|
+
__decorateClass$z([
|
|
8681
8802
|
modernIdoc.property({ fallback: 30 })
|
|
8682
8803
|
], exports.GodrayEffect.prototype, "angle", 2);
|
|
8683
|
-
__decorateClass$
|
|
8804
|
+
__decorateClass$z([
|
|
8684
8805
|
modernIdoc.property({ fallback: 0.5 })
|
|
8685
8806
|
], exports.GodrayEffect.prototype, "gain", 2);
|
|
8686
|
-
__decorateClass$
|
|
8807
|
+
__decorateClass$z([
|
|
8687
8808
|
modernIdoc.property({ fallback: 2.5 })
|
|
8688
8809
|
], exports.GodrayEffect.prototype, "lacunarity", 2);
|
|
8689
|
-
__decorateClass$
|
|
8810
|
+
__decorateClass$z([
|
|
8690
8811
|
modernIdoc.property({ fallback: true })
|
|
8691
8812
|
], exports.GodrayEffect.prototype, "parallel", 2);
|
|
8692
|
-
__decorateClass$
|
|
8813
|
+
__decorateClass$z([
|
|
8693
8814
|
modernIdoc.property({ default: () => [0, 0] })
|
|
8694
8815
|
], exports.GodrayEffect.prototype, "center", 2);
|
|
8695
|
-
__decorateClass$
|
|
8816
|
+
__decorateClass$z([
|
|
8696
8817
|
modernIdoc.property({ fallback: 1 })
|
|
8697
8818
|
], exports.GodrayEffect.prototype, "alpha", 2);
|
|
8698
|
-
exports.GodrayEffect = __decorateClass$
|
|
8819
|
+
exports.GodrayEffect = __decorateClass$z([
|
|
8699
8820
|
customNode("GodrayEffect")
|
|
8700
8821
|
], exports.GodrayEffect);
|
|
8701
8822
|
|
|
8702
|
-
var __defProp$
|
|
8823
|
+
var __defProp$r = Object.defineProperty;
|
|
8703
8824
|
var __getOwnPropDesc$p = Object.getOwnPropertyDescriptor;
|
|
8704
|
-
var __decorateClass$
|
|
8825
|
+
var __decorateClass$y = (decorators, target, key, kind) => {
|
|
8705
8826
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$p(target, key) : target;
|
|
8706
8827
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8707
8828
|
if (decorator = decorators[i])
|
|
8708
8829
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8709
|
-
if (kind && result) __defProp$
|
|
8830
|
+
if (kind && result) __defProp$r(target, key, result);
|
|
8710
8831
|
return result;
|
|
8711
8832
|
};
|
|
8712
8833
|
const frag$1 = `varying vec2 vUv;
|
|
@@ -8796,28 +8917,28 @@ void main() {
|
|
|
8796
8917
|
});
|
|
8797
8918
|
}
|
|
8798
8919
|
};
|
|
8799
|
-
__decorateClass$
|
|
8920
|
+
__decorateClass$y([
|
|
8800
8921
|
modernIdoc.property({ fallback: 4 })
|
|
8801
8922
|
], exports.KawaseBlurEffect.prototype, "strength", 2);
|
|
8802
|
-
__decorateClass$
|
|
8923
|
+
__decorateClass$y([
|
|
8803
8924
|
modernIdoc.property({ fallback: 3 })
|
|
8804
8925
|
], exports.KawaseBlurEffect.prototype, "quality", 2);
|
|
8805
|
-
__decorateClass$
|
|
8926
|
+
__decorateClass$y([
|
|
8806
8927
|
modernIdoc.property({ default: () => [1, 1] })
|
|
8807
8928
|
], exports.KawaseBlurEffect.prototype, "pixelSize", 2);
|
|
8808
|
-
exports.KawaseBlurEffect = __decorateClass$
|
|
8929
|
+
exports.KawaseBlurEffect = __decorateClass$y([
|
|
8809
8930
|
customNode("KawaseBlurEffect")
|
|
8810
8931
|
], exports.KawaseBlurEffect);
|
|
8811
8932
|
|
|
8812
|
-
var __defProp$
|
|
8933
|
+
var __defProp$q = Object.defineProperty;
|
|
8813
8934
|
var __getOwnPropDesc$o = Object.getOwnPropertyDescriptor;
|
|
8814
|
-
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$
|
|
8815
|
-
var __decorateClass$
|
|
8935
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8936
|
+
var __decorateClass$x = (decorators, target, key, kind) => {
|
|
8816
8937
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$o(target, key) : target;
|
|
8817
8938
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8818
8939
|
if (decorator = decorators[i])
|
|
8819
8940
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8820
|
-
if (kind && result) __defProp$
|
|
8941
|
+
if (kind && result) __defProp$q(target, key, result);
|
|
8821
8942
|
return result;
|
|
8822
8943
|
};
|
|
8823
8944
|
var __publicField$8 = (obj, key, value) => __defNormalProp$8(obj, key + "" , value);
|
|
@@ -8905,25 +9026,25 @@ void main(void) {
|
|
|
8905
9026
|
}
|
|
8906
9027
|
}`
|
|
8907
9028
|
}));
|
|
8908
|
-
__decorateClass$
|
|
9029
|
+
__decorateClass$x([
|
|
8909
9030
|
modernIdoc.property({ internal: true })
|
|
8910
9031
|
], exports.MaskEffect.prototype, "texture", 2);
|
|
8911
|
-
__decorateClass$
|
|
9032
|
+
__decorateClass$x([
|
|
8912
9033
|
modernIdoc.property({ fallback: "" })
|
|
8913
9034
|
], exports.MaskEffect.prototype, "src", 2);
|
|
8914
|
-
exports.MaskEffect = __decorateClass$
|
|
9035
|
+
exports.MaskEffect = __decorateClass$x([
|
|
8915
9036
|
customNode("MaskEffect")
|
|
8916
9037
|
], exports.MaskEffect);
|
|
8917
9038
|
|
|
8918
|
-
var __defProp$
|
|
9039
|
+
var __defProp$p = Object.defineProperty;
|
|
8919
9040
|
var __getOwnPropDesc$n = Object.getOwnPropertyDescriptor;
|
|
8920
|
-
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$
|
|
8921
|
-
var __decorateClass$
|
|
9041
|
+
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9042
|
+
var __decorateClass$w = (decorators, target, key, kind) => {
|
|
8922
9043
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$n(target, key) : target;
|
|
8923
9044
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8924
9045
|
if (decorator = decorators[i])
|
|
8925
9046
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8926
|
-
if (kind && result) __defProp$
|
|
9047
|
+
if (kind && result) __defProp$p(target, key, result);
|
|
8927
9048
|
return result;
|
|
8928
9049
|
};
|
|
8929
9050
|
var __publicField$7 = (obj, key, value) => __defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
@@ -9010,40 +9131,40 @@ void main() {
|
|
|
9010
9131
|
};
|
|
9011
9132
|
__publicField$7(exports.OutlineEffect, "MIN_SAMPLES", 1);
|
|
9012
9133
|
__publicField$7(exports.OutlineEffect, "MAX_SAMPLES", 100);
|
|
9013
|
-
__decorateClass$
|
|
9134
|
+
__decorateClass$w([
|
|
9014
9135
|
modernIdoc.property({ fallback: "#000000ff" })
|
|
9015
9136
|
], exports.OutlineEffect.prototype, "color", 2);
|
|
9016
|
-
__decorateClass$
|
|
9137
|
+
__decorateClass$w([
|
|
9017
9138
|
modernIdoc.property({ fallback: 1 })
|
|
9018
9139
|
], exports.OutlineEffect.prototype, "width", 2);
|
|
9019
|
-
__decorateClass$
|
|
9140
|
+
__decorateClass$w([
|
|
9020
9141
|
modernIdoc.property({ fallback: "solid" })
|
|
9021
9142
|
], exports.OutlineEffect.prototype, "style", 2);
|
|
9022
|
-
__decorateClass$
|
|
9143
|
+
__decorateClass$w([
|
|
9023
9144
|
modernIdoc.property()
|
|
9024
9145
|
], exports.OutlineEffect.prototype, "image", 2);
|
|
9025
|
-
__decorateClass$
|
|
9146
|
+
__decorateClass$w([
|
|
9026
9147
|
modernIdoc.property({ fallback: 1 })
|
|
9027
9148
|
], exports.OutlineEffect.prototype, "opacity", 2);
|
|
9028
|
-
__decorateClass$
|
|
9149
|
+
__decorateClass$w([
|
|
9029
9150
|
modernIdoc.property({ fallback: 0.1 })
|
|
9030
9151
|
], exports.OutlineEffect.prototype, "quality", 2);
|
|
9031
|
-
__decorateClass$
|
|
9152
|
+
__decorateClass$w([
|
|
9032
9153
|
modernIdoc.property({ fallback: false })
|
|
9033
9154
|
], exports.OutlineEffect.prototype, "knockout", 2);
|
|
9034
|
-
exports.OutlineEffect = __decorateClass$
|
|
9155
|
+
exports.OutlineEffect = __decorateClass$w([
|
|
9035
9156
|
customNode("OutlineEffect")
|
|
9036
9157
|
], exports.OutlineEffect);
|
|
9037
9158
|
|
|
9038
|
-
var __defProp$
|
|
9159
|
+
var __defProp$o = Object.defineProperty;
|
|
9039
9160
|
var __getOwnPropDesc$m = Object.getOwnPropertyDescriptor;
|
|
9040
|
-
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$
|
|
9041
|
-
var __decorateClass$
|
|
9161
|
+
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9162
|
+
var __decorateClass$v = (decorators, target, key, kind) => {
|
|
9042
9163
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$m(target, key) : target;
|
|
9043
9164
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9044
9165
|
if (decorator = decorators[i])
|
|
9045
9166
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9046
|
-
if (kind && result) __defProp$
|
|
9167
|
+
if (kind && result) __defProp$o(target, key, result);
|
|
9047
9168
|
return result;
|
|
9048
9169
|
};
|
|
9049
9170
|
var __publicField$6 = (obj, key, value) => __defNormalProp$6(obj, key + "" , value);
|
|
@@ -9099,22 +9220,22 @@ void main(void) {
|
|
|
9099
9220
|
gl_FragColor = texture2D(sampler, coord);
|
|
9100
9221
|
}`
|
|
9101
9222
|
}));
|
|
9102
|
-
__decorateClass$
|
|
9223
|
+
__decorateClass$v([
|
|
9103
9224
|
modernIdoc.property({ fallback: 10 })
|
|
9104
9225
|
], exports.PixelateEffect.prototype, "strength", 2);
|
|
9105
|
-
exports.PixelateEffect = __decorateClass$
|
|
9226
|
+
exports.PixelateEffect = __decorateClass$v([
|
|
9106
9227
|
customNode("PixelateEffect")
|
|
9107
9228
|
], exports.PixelateEffect);
|
|
9108
9229
|
|
|
9109
|
-
var __defProp$
|
|
9230
|
+
var __defProp$n = Object.defineProperty;
|
|
9110
9231
|
var __getOwnPropDesc$l = Object.getOwnPropertyDescriptor;
|
|
9111
|
-
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$
|
|
9112
|
-
var __decorateClass$
|
|
9232
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9233
|
+
var __decorateClass$u = (decorators, target, key, kind) => {
|
|
9113
9234
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$l(target, key) : target;
|
|
9114
9235
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9115
9236
|
if (decorator = decorators[i])
|
|
9116
9237
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9117
|
-
if (kind && result) __defProp$
|
|
9238
|
+
if (kind && result) __defProp$n(target, key, result);
|
|
9118
9239
|
return result;
|
|
9119
9240
|
};
|
|
9120
9241
|
var __publicField$5 = (obj, key, value) => __defNormalProp$5(obj, key + "" , value);
|
|
@@ -9227,19 +9348,19 @@ void main() {
|
|
|
9227
9348
|
gl_FragColor = color;
|
|
9228
9349
|
}`
|
|
9229
9350
|
}));
|
|
9230
|
-
__decorateClass$
|
|
9351
|
+
__decorateClass$u([
|
|
9231
9352
|
modernIdoc.property()
|
|
9232
9353
|
], exports.ZoomBlurEffect.prototype, "center", 2);
|
|
9233
|
-
__decorateClass$
|
|
9354
|
+
__decorateClass$u([
|
|
9234
9355
|
modernIdoc.property({ fallback: 20 })
|
|
9235
9356
|
], exports.ZoomBlurEffect.prototype, "innerRadius", 2);
|
|
9236
|
-
__decorateClass$
|
|
9357
|
+
__decorateClass$u([
|
|
9237
9358
|
modernIdoc.property({ fallback: -1 })
|
|
9238
9359
|
], exports.ZoomBlurEffect.prototype, "radius", 2);
|
|
9239
|
-
__decorateClass$
|
|
9360
|
+
__decorateClass$u([
|
|
9240
9361
|
modernIdoc.property({ fallback: 0.1 })
|
|
9241
9362
|
], exports.ZoomBlurEffect.prototype, "strength", 2);
|
|
9242
|
-
exports.ZoomBlurEffect = __decorateClass$
|
|
9363
|
+
exports.ZoomBlurEffect = __decorateClass$u([
|
|
9243
9364
|
customNode("ZoomBlurEffect")
|
|
9244
9365
|
], exports.ZoomBlurEffect);
|
|
9245
9366
|
|
|
@@ -9287,13 +9408,13 @@ function getDrawOptions(fill, box) {
|
|
|
9287
9408
|
return { disableWrapMode, uvTransform };
|
|
9288
9409
|
}
|
|
9289
9410
|
|
|
9290
|
-
var __defProp$
|
|
9291
|
-
var __decorateClass$
|
|
9411
|
+
var __defProp$m = Object.defineProperty;
|
|
9412
|
+
var __decorateClass$t = (decorators, target, key, kind) => {
|
|
9292
9413
|
var result = void 0 ;
|
|
9293
9414
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9294
9415
|
if (decorator = decorators[i])
|
|
9295
9416
|
result = (decorator(target, key, result) ) || result;
|
|
9296
|
-
if (result) __defProp$
|
|
9417
|
+
if (result) __defProp$m(target, key, result);
|
|
9297
9418
|
return result;
|
|
9298
9419
|
};
|
|
9299
9420
|
class BaseElement2DFill extends CoreObject {
|
|
@@ -9302,6 +9423,7 @@ class BaseElement2DFill extends CoreObject {
|
|
|
9302
9423
|
this.parent = parent;
|
|
9303
9424
|
}
|
|
9304
9425
|
_texture;
|
|
9426
|
+
_animatedTexture;
|
|
9305
9427
|
_setProperties(properties) {
|
|
9306
9428
|
return super.setProperties(properties);
|
|
9307
9429
|
}
|
|
@@ -9332,25 +9454,27 @@ class BaseElement2DFill extends CoreObject {
|
|
|
9332
9454
|
}
|
|
9333
9455
|
async loadTexture() {
|
|
9334
9456
|
if (this.linearGradient || this.radialGradient) {
|
|
9335
|
-
|
|
9457
|
+
this._texture = new GradientTexture(
|
|
9336
9458
|
this.linearGradient ?? this.radialGradient,
|
|
9337
9459
|
this.parent.size.width,
|
|
9338
9460
|
this.parent.size.height
|
|
9339
9461
|
);
|
|
9340
9462
|
} else if (!modernIdoc.isNone(this.image)) {
|
|
9341
9463
|
this.parent.tree?.log(`load image ${this.image}`);
|
|
9342
|
-
|
|
9343
|
-
|
|
9344
|
-
|
|
9464
|
+
if (this.image.split("?")[0].endsWith(".gif")) {
|
|
9465
|
+
this._animatedTexture = await assets.gif.load(this.image);
|
|
9466
|
+
} else {
|
|
9467
|
+
this._texture = await assets.texture.load(this.image);
|
|
9468
|
+
}
|
|
9345
9469
|
}
|
|
9346
9470
|
}
|
|
9347
9471
|
async _updateTexture() {
|
|
9348
|
-
|
|
9472
|
+
await this.loadTexture();
|
|
9349
9473
|
this.parent.requestRedraw();
|
|
9350
9474
|
}
|
|
9351
9475
|
canDraw() {
|
|
9352
9476
|
return Boolean(
|
|
9353
|
-
this.enabled && (this._texture || this.color)
|
|
9477
|
+
this.enabled && (this._texture || this._animatedTexture || this.color)
|
|
9354
9478
|
);
|
|
9355
9479
|
}
|
|
9356
9480
|
draw() {
|
|
@@ -9363,53 +9487,84 @@ class BaseElement2DFill extends CoreObject {
|
|
|
9363
9487
|
}
|
|
9364
9488
|
);
|
|
9365
9489
|
ctx.uvTransform = uvTransform;
|
|
9366
|
-
ctx.fillStyle = this._texture ?? this.color;
|
|
9490
|
+
ctx.fillStyle = this._animatedTexture?.currentFrame.texture ?? this._texture ?? this.color;
|
|
9367
9491
|
ctx.fill({
|
|
9368
9492
|
disableWrapMode
|
|
9369
9493
|
});
|
|
9370
9494
|
}
|
|
9495
|
+
_getFrameCurrentTime() {
|
|
9496
|
+
const duration = this._animatedTexture?.duration ?? 0;
|
|
9497
|
+
if (!duration)
|
|
9498
|
+
return 0;
|
|
9499
|
+
const currentTime = this.parent._currentTime;
|
|
9500
|
+
if (currentTime < 0)
|
|
9501
|
+
return 0;
|
|
9502
|
+
return currentTime % duration;
|
|
9503
|
+
}
|
|
9504
|
+
updateFrameIndex() {
|
|
9505
|
+
if (!this._animatedTexture)
|
|
9506
|
+
return this;
|
|
9507
|
+
const currentTime = this._getFrameCurrentTime();
|
|
9508
|
+
const frames = this._animatedTexture.frames;
|
|
9509
|
+
const len = frames.length;
|
|
9510
|
+
if (len <= 1 && this._animatedTexture.frameIndex === 0)
|
|
9511
|
+
return this;
|
|
9512
|
+
let index = len - 1;
|
|
9513
|
+
for (let time = 0, i = 0; i < len; i++) {
|
|
9514
|
+
time += frames[i].duration ?? 0;
|
|
9515
|
+
if (time >= currentTime) {
|
|
9516
|
+
index = i;
|
|
9517
|
+
break;
|
|
9518
|
+
}
|
|
9519
|
+
}
|
|
9520
|
+
if (this._animatedTexture.frameIndex !== index) {
|
|
9521
|
+
this._animatedTexture.frameIndex = index;
|
|
9522
|
+
this.parent.requestRedraw();
|
|
9523
|
+
}
|
|
9524
|
+
return this;
|
|
9525
|
+
}
|
|
9371
9526
|
}
|
|
9372
|
-
__decorateClass$
|
|
9527
|
+
__decorateClass$t([
|
|
9373
9528
|
modernIdoc.property({ fallback: true })
|
|
9374
9529
|
], BaseElement2DFill.prototype, "enabled");
|
|
9375
|
-
__decorateClass$
|
|
9530
|
+
__decorateClass$t([
|
|
9376
9531
|
modernIdoc.property()
|
|
9377
9532
|
], BaseElement2DFill.prototype, "color");
|
|
9378
|
-
__decorateClass$
|
|
9533
|
+
__decorateClass$t([
|
|
9379
9534
|
modernIdoc.property()
|
|
9380
9535
|
], BaseElement2DFill.prototype, "image");
|
|
9381
|
-
__decorateClass$
|
|
9536
|
+
__decorateClass$t([
|
|
9382
9537
|
modernIdoc.property()
|
|
9383
9538
|
], BaseElement2DFill.prototype, "linearGradient");
|
|
9384
|
-
__decorateClass$
|
|
9539
|
+
__decorateClass$t([
|
|
9385
9540
|
modernIdoc.property()
|
|
9386
9541
|
], BaseElement2DFill.prototype, "radialGradient");
|
|
9387
|
-
__decorateClass$
|
|
9542
|
+
__decorateClass$t([
|
|
9388
9543
|
modernIdoc.property()
|
|
9389
9544
|
], BaseElement2DFill.prototype, "cropRect");
|
|
9390
|
-
__decorateClass$
|
|
9545
|
+
__decorateClass$t([
|
|
9391
9546
|
modernIdoc.property()
|
|
9392
9547
|
], BaseElement2DFill.prototype, "stretchRect");
|
|
9393
|
-
__decorateClass$
|
|
9548
|
+
__decorateClass$t([
|
|
9394
9549
|
modernIdoc.property()
|
|
9395
9550
|
], BaseElement2DFill.prototype, "dpi");
|
|
9396
|
-
__decorateClass$
|
|
9551
|
+
__decorateClass$t([
|
|
9397
9552
|
modernIdoc.property()
|
|
9398
9553
|
], BaseElement2DFill.prototype, "rotateWithShape");
|
|
9399
|
-
__decorateClass$
|
|
9554
|
+
__decorateClass$t([
|
|
9400
9555
|
modernIdoc.property()
|
|
9401
9556
|
], BaseElement2DFill.prototype, "tile");
|
|
9402
|
-
__decorateClass$
|
|
9557
|
+
__decorateClass$t([
|
|
9403
9558
|
modernIdoc.property()
|
|
9404
9559
|
], BaseElement2DFill.prototype, "opacity");
|
|
9405
9560
|
|
|
9406
|
-
var __defProp$
|
|
9407
|
-
var __decorateClass$
|
|
9561
|
+
var __defProp$l = Object.defineProperty;
|
|
9562
|
+
var __decorateClass$s = (decorators, target, key, kind) => {
|
|
9408
9563
|
var result = void 0 ;
|
|
9409
9564
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9410
9565
|
if (decorator = decorators[i])
|
|
9411
9566
|
result = (decorator(target, key, result) ) || result;
|
|
9412
|
-
if (result) __defProp$
|
|
9567
|
+
if (result) __defProp$l(target, key, result);
|
|
9413
9568
|
return result;
|
|
9414
9569
|
};
|
|
9415
9570
|
class BaseElement2DBackground extends BaseElement2DFill {
|
|
@@ -9427,17 +9582,17 @@ class BaseElement2DBackground extends BaseElement2DFill {
|
|
|
9427
9582
|
}
|
|
9428
9583
|
}
|
|
9429
9584
|
}
|
|
9430
|
-
__decorateClass$
|
|
9585
|
+
__decorateClass$s([
|
|
9431
9586
|
modernIdoc.property()
|
|
9432
9587
|
], BaseElement2DBackground.prototype, "fillWithShape");
|
|
9433
9588
|
|
|
9434
|
-
var __defProp$
|
|
9435
|
-
var __decorateClass$
|
|
9589
|
+
var __defProp$k = Object.defineProperty;
|
|
9590
|
+
var __decorateClass$r = (decorators, target, key, kind) => {
|
|
9436
9591
|
var result = void 0 ;
|
|
9437
9592
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9438
9593
|
if (decorator = decorators[i])
|
|
9439
9594
|
result = (decorator(target, key, result) ) || result;
|
|
9440
|
-
if (result) __defProp$
|
|
9595
|
+
if (result) __defProp$k(target, key, result);
|
|
9441
9596
|
return result;
|
|
9442
9597
|
};
|
|
9443
9598
|
class BaseElement2DForeground extends BaseElement2DFill {
|
|
@@ -9455,17 +9610,17 @@ class BaseElement2DForeground extends BaseElement2DFill {
|
|
|
9455
9610
|
}
|
|
9456
9611
|
}
|
|
9457
9612
|
}
|
|
9458
|
-
__decorateClass$
|
|
9613
|
+
__decorateClass$r([
|
|
9459
9614
|
modernIdoc.property()
|
|
9460
9615
|
], BaseElement2DForeground.prototype, "fillWithShape");
|
|
9461
9616
|
|
|
9462
|
-
var __defProp$
|
|
9463
|
-
var __decorateClass$
|
|
9617
|
+
var __defProp$j = Object.defineProperty;
|
|
9618
|
+
var __decorateClass$q = (decorators, target, key, kind) => {
|
|
9464
9619
|
var result = void 0 ;
|
|
9465
9620
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9466
9621
|
if (decorator = decorators[i])
|
|
9467
9622
|
result = (decorator(target, key, result) ) || result;
|
|
9468
|
-
if (result) __defProp$
|
|
9623
|
+
if (result) __defProp$j(target, key, result);
|
|
9469
9624
|
return result;
|
|
9470
9625
|
};
|
|
9471
9626
|
class BaseElement2DOutline extends BaseElement2DFill {
|
|
@@ -9508,29 +9663,29 @@ class BaseElement2DOutline extends BaseElement2DFill {
|
|
|
9508
9663
|
ctx.stroke({ disableWrapMode });
|
|
9509
9664
|
}
|
|
9510
9665
|
}
|
|
9511
|
-
__decorateClass$
|
|
9666
|
+
__decorateClass$q([
|
|
9512
9667
|
modernIdoc.property({ fallback: "#00000000" })
|
|
9513
9668
|
], BaseElement2DOutline.prototype, "color");
|
|
9514
|
-
__decorateClass$
|
|
9669
|
+
__decorateClass$q([
|
|
9515
9670
|
modernIdoc.property({ fallback: 0 })
|
|
9516
9671
|
], BaseElement2DOutline.prototype, "width");
|
|
9517
|
-
__decorateClass$
|
|
9672
|
+
__decorateClass$q([
|
|
9518
9673
|
modernIdoc.property({ fallback: "solid" })
|
|
9519
9674
|
], BaseElement2DOutline.prototype, "style");
|
|
9520
|
-
__decorateClass$
|
|
9675
|
+
__decorateClass$q([
|
|
9521
9676
|
modernIdoc.property({ fallback: "butt" })
|
|
9522
9677
|
], BaseElement2DOutline.prototype, "lineCap");
|
|
9523
|
-
__decorateClass$
|
|
9678
|
+
__decorateClass$q([
|
|
9524
9679
|
modernIdoc.property({ fallback: "miter" })
|
|
9525
9680
|
], BaseElement2DOutline.prototype, "lineJoin");
|
|
9526
9681
|
|
|
9527
|
-
var __defProp$
|
|
9528
|
-
var __decorateClass$
|
|
9682
|
+
var __defProp$i = Object.defineProperty;
|
|
9683
|
+
var __decorateClass$p = (decorators, target, key, kind) => {
|
|
9529
9684
|
var result = void 0 ;
|
|
9530
9685
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9531
9686
|
if (decorator = decorators[i])
|
|
9532
9687
|
result = (decorator(target, key, result) ) || result;
|
|
9533
|
-
if (result) __defProp$
|
|
9688
|
+
if (result) __defProp$i(target, key, result);
|
|
9534
9689
|
return result;
|
|
9535
9690
|
};
|
|
9536
9691
|
class BaseElement2DShadow extends CoreObject {
|
|
@@ -9570,29 +9725,29 @@ class BaseElement2DShadow extends CoreObject {
|
|
|
9570
9725
|
}
|
|
9571
9726
|
}
|
|
9572
9727
|
}
|
|
9573
|
-
__decorateClass$
|
|
9728
|
+
__decorateClass$p([
|
|
9574
9729
|
modernIdoc.property({ fallback: true })
|
|
9575
9730
|
], BaseElement2DShadow.prototype, "enabled");
|
|
9576
|
-
__decorateClass$
|
|
9731
|
+
__decorateClass$p([
|
|
9577
9732
|
modernIdoc.property({ fallback: "#000000FF" })
|
|
9578
9733
|
], BaseElement2DShadow.prototype, "color");
|
|
9579
|
-
__decorateClass$
|
|
9734
|
+
__decorateClass$p([
|
|
9580
9735
|
modernIdoc.property({ fallback: 0 })
|
|
9581
9736
|
], BaseElement2DShadow.prototype, "blur");
|
|
9582
|
-
__decorateClass$
|
|
9737
|
+
__decorateClass$p([
|
|
9583
9738
|
modernIdoc.property({ fallback: 0 })
|
|
9584
9739
|
], BaseElement2DShadow.prototype, "offsetY");
|
|
9585
|
-
__decorateClass$
|
|
9740
|
+
__decorateClass$p([
|
|
9586
9741
|
modernIdoc.property({ fallback: 0 })
|
|
9587
9742
|
], BaseElement2DShadow.prototype, "offsetX");
|
|
9588
9743
|
|
|
9589
|
-
var __defProp$
|
|
9590
|
-
var __decorateClass$
|
|
9744
|
+
var __defProp$h = Object.defineProperty;
|
|
9745
|
+
var __decorateClass$o = (decorators, target, key, kind) => {
|
|
9591
9746
|
var result = void 0 ;
|
|
9592
9747
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9593
9748
|
if (decorator = decorators[i])
|
|
9594
9749
|
result = (decorator(target, key, result) ) || result;
|
|
9595
|
-
if (result) __defProp$
|
|
9750
|
+
if (result) __defProp$h(target, key, result);
|
|
9596
9751
|
return result;
|
|
9597
9752
|
};
|
|
9598
9753
|
class BaseElement2DShape extends CoreObject {
|
|
@@ -9667,19 +9822,19 @@ class BaseElement2DShape extends CoreObject {
|
|
|
9667
9822
|
}
|
|
9668
9823
|
}
|
|
9669
9824
|
}
|
|
9670
|
-
__decorateClass$
|
|
9825
|
+
__decorateClass$o([
|
|
9671
9826
|
modernIdoc.property({ fallback: true })
|
|
9672
9827
|
], BaseElement2DShape.prototype, "enabled");
|
|
9673
|
-
__decorateClass$
|
|
9828
|
+
__decorateClass$o([
|
|
9674
9829
|
modernIdoc.property()
|
|
9675
9830
|
], BaseElement2DShape.prototype, "preset");
|
|
9676
|
-
__decorateClass$
|
|
9831
|
+
__decorateClass$o([
|
|
9677
9832
|
modernIdoc.property()
|
|
9678
9833
|
], BaseElement2DShape.prototype, "svg");
|
|
9679
|
-
__decorateClass$
|
|
9834
|
+
__decorateClass$o([
|
|
9680
9835
|
modernIdoc.property()
|
|
9681
9836
|
], BaseElement2DShape.prototype, "viewBox");
|
|
9682
|
-
__decorateClass$
|
|
9837
|
+
__decorateClass$o([
|
|
9683
9838
|
modernIdoc.property()
|
|
9684
9839
|
], BaseElement2DShape.prototype, "paths");
|
|
9685
9840
|
|
|
@@ -9695,20 +9850,21 @@ for (const key in defaultStyles$1) {
|
|
|
9695
9850
|
modernIdoc.defineProperty(BaseElement2DStyle, key, { fallback });
|
|
9696
9851
|
}
|
|
9697
9852
|
|
|
9698
|
-
var __defProp$
|
|
9699
|
-
var __decorateClass$
|
|
9853
|
+
var __defProp$g = Object.defineProperty;
|
|
9854
|
+
var __decorateClass$n = (decorators, target, key, kind) => {
|
|
9700
9855
|
var result = void 0 ;
|
|
9701
9856
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9702
9857
|
if (decorator = decorators[i])
|
|
9703
9858
|
result = (decorator(target, key, result) ) || result;
|
|
9704
|
-
if (result) __defProp$
|
|
9859
|
+
if (result) __defProp$g(target, key, result);
|
|
9705
9860
|
return result;
|
|
9706
9861
|
};
|
|
9707
9862
|
class BaseElement2DText extends CoreObject {
|
|
9708
9863
|
constructor(parent) {
|
|
9709
9864
|
super();
|
|
9710
9865
|
this.parent = parent;
|
|
9711
|
-
this.base = new modernText.Text()
|
|
9866
|
+
this.base = new modernText.Text();
|
|
9867
|
+
this.base.setPropertyAccessor(this);
|
|
9712
9868
|
}
|
|
9713
9869
|
base;
|
|
9714
9870
|
measureResult;
|
|
@@ -9880,38 +10036,43 @@ class BaseElement2DText extends CoreObject {
|
|
|
9880
10036
|
ctx.stroke();
|
|
9881
10037
|
}
|
|
9882
10038
|
}
|
|
10039
|
+
} else {
|
|
10040
|
+
ctx.addPath(path);
|
|
10041
|
+
ctx.style = { ...path.style };
|
|
10042
|
+
ctx.vertTransform = this._getVertTransform();
|
|
10043
|
+
ctx.fill();
|
|
9883
10044
|
}
|
|
9884
10045
|
});
|
|
9885
10046
|
});
|
|
9886
10047
|
}
|
|
9887
10048
|
}
|
|
9888
|
-
__decorateClass$
|
|
10049
|
+
__decorateClass$n([
|
|
9889
10050
|
modernIdoc.property({ fallback: true })
|
|
9890
10051
|
], BaseElement2DText.prototype, "enabled");
|
|
9891
|
-
__decorateClass$
|
|
10052
|
+
__decorateClass$n([
|
|
9892
10053
|
modernIdoc.property({ fallback: () => [] })
|
|
9893
10054
|
], BaseElement2DText.prototype, "content");
|
|
9894
|
-
__decorateClass$
|
|
10055
|
+
__decorateClass$n([
|
|
9895
10056
|
modernIdoc.property({ alias: "parent.style.json" })
|
|
9896
10057
|
], BaseElement2DText.prototype, "style");
|
|
9897
|
-
__decorateClass$
|
|
10058
|
+
__decorateClass$n([
|
|
9898
10059
|
modernIdoc.property()
|
|
9899
10060
|
], BaseElement2DText.prototype, "effects");
|
|
9900
|
-
__decorateClass$
|
|
10061
|
+
__decorateClass$n([
|
|
9901
10062
|
modernIdoc.property()
|
|
9902
10063
|
], BaseElement2DText.prototype, "fill");
|
|
9903
|
-
__decorateClass$
|
|
10064
|
+
__decorateClass$n([
|
|
9904
10065
|
modernIdoc.property()
|
|
9905
10066
|
], BaseElement2DText.prototype, "outline");
|
|
9906
|
-
__decorateClass$
|
|
10067
|
+
__decorateClass$n([
|
|
9907
10068
|
modernIdoc.property({ alias: "base.measureDom" })
|
|
9908
10069
|
], BaseElement2DText.prototype, "measureDom");
|
|
9909
|
-
__decorateClass$
|
|
10070
|
+
__decorateClass$n([
|
|
9910
10071
|
modernIdoc.property({ alias: "base.fonts" })
|
|
9911
10072
|
], BaseElement2DText.prototype, "fonts");
|
|
9912
10073
|
|
|
9913
10074
|
var __getOwnPropDesc$k = Object.getOwnPropertyDescriptor;
|
|
9914
|
-
var __decorateClass$
|
|
10075
|
+
var __decorateClass$m = (decorators, target, key, kind) => {
|
|
9915
10076
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$k(target, key) : target;
|
|
9916
10077
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9917
10078
|
if (decorator = decorators[i])
|
|
@@ -10079,6 +10240,13 @@ exports.BaseElement2D = class BaseElement2D extends exports.Node2D {
|
|
|
10079
10240
|
break;
|
|
10080
10241
|
}
|
|
10081
10242
|
}
|
|
10243
|
+
_process(delta) {
|
|
10244
|
+
this.foreground.updateFrameIndex();
|
|
10245
|
+
this.fill.updateFrameIndex();
|
|
10246
|
+
this.outline.updateFrameIndex();
|
|
10247
|
+
this.background.updateFrameIndex();
|
|
10248
|
+
super._process(delta);
|
|
10249
|
+
}
|
|
10082
10250
|
_updateMaskImage() {
|
|
10083
10251
|
const nodePath = "__$style.maskImage";
|
|
10084
10252
|
const maskImage = this.style.maskImage;
|
|
@@ -10324,7 +10492,7 @@ exports.BaseElement2D = class BaseElement2D extends exports.Node2D {
|
|
|
10324
10492
|
});
|
|
10325
10493
|
}
|
|
10326
10494
|
};
|
|
10327
|
-
exports.BaseElement2D = __decorateClass$
|
|
10495
|
+
exports.BaseElement2D = __decorateClass$m([
|
|
10328
10496
|
customNode("BaseElement2D")
|
|
10329
10497
|
], exports.BaseElement2D);
|
|
10330
10498
|
|
|
@@ -10352,7 +10520,7 @@ class FlexElement2DStyle extends BaseElement2DStyle {
|
|
|
10352
10520
|
}
|
|
10353
10521
|
|
|
10354
10522
|
var __getOwnPropDesc$j = Object.getOwnPropertyDescriptor;
|
|
10355
|
-
var __decorateClass$
|
|
10523
|
+
var __decorateClass$l = (decorators, target, key, kind) => {
|
|
10356
10524
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$j(target, key) : target;
|
|
10357
10525
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
10358
10526
|
if (decorator = decorators[i])
|
|
@@ -10404,7 +10572,7 @@ exports.Element2D = class Element2D extends exports.BaseElement2D {
|
|
|
10404
10572
|
}
|
|
10405
10573
|
}
|
|
10406
10574
|
};
|
|
10407
|
-
exports.Element2D = __decorateClass$
|
|
10575
|
+
exports.Element2D = __decorateClass$l([
|
|
10408
10576
|
customNode("Element2D")
|
|
10409
10577
|
], exports.Element2D);
|
|
10410
10578
|
|
|
@@ -10715,7 +10883,7 @@ class FlexLayout {
|
|
|
10715
10883
|
}
|
|
10716
10884
|
|
|
10717
10885
|
var __getOwnPropDesc$i = Object.getOwnPropertyDescriptor;
|
|
10718
|
-
var __decorateClass$
|
|
10886
|
+
var __decorateClass$k = (decorators, target, key, kind) => {
|
|
10719
10887
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$i(target, key) : target;
|
|
10720
10888
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
10721
10889
|
if (decorator = decorators[i])
|
|
@@ -10793,18 +10961,18 @@ exports.FlexElement2D = class FlexElement2D extends exports.BaseElement2D {
|
|
|
10793
10961
|
}
|
|
10794
10962
|
}
|
|
10795
10963
|
};
|
|
10796
|
-
exports.FlexElement2D = __decorateClass$
|
|
10964
|
+
exports.FlexElement2D = __decorateClass$k([
|
|
10797
10965
|
customNode("FlexElement2D")
|
|
10798
10966
|
], exports.FlexElement2D);
|
|
10799
10967
|
|
|
10800
|
-
var __defProp$
|
|
10968
|
+
var __defProp$f = Object.defineProperty;
|
|
10801
10969
|
var __getOwnPropDesc$h = Object.getOwnPropertyDescriptor;
|
|
10802
|
-
var __decorateClass$
|
|
10970
|
+
var __decorateClass$j = (decorators, target, key, kind) => {
|
|
10803
10971
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$h(target, key) : target;
|
|
10804
10972
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
10805
10973
|
if (decorator = decorators[i])
|
|
10806
10974
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
10807
|
-
if (kind && result) __defProp$
|
|
10975
|
+
if (kind && result) __defProp$f(target, key, result);
|
|
10808
10976
|
return result;
|
|
10809
10977
|
};
|
|
10810
10978
|
exports.Image2D = class Image2D extends exports.Element2D {
|
|
@@ -10940,19 +11108,19 @@ exports.Image2D = class Image2D extends exports.Element2D {
|
|
|
10940
11108
|
});
|
|
10941
11109
|
}
|
|
10942
11110
|
};
|
|
10943
|
-
__decorateClass$
|
|
11111
|
+
__decorateClass$j([
|
|
10944
11112
|
modernIdoc.property({ internal: true })
|
|
10945
11113
|
], exports.Image2D.prototype, "texture", 2);
|
|
10946
|
-
__decorateClass$
|
|
11114
|
+
__decorateClass$j([
|
|
10947
11115
|
modernIdoc.property({ fallback: "" })
|
|
10948
11116
|
], exports.Image2D.prototype, "src", 2);
|
|
10949
|
-
__decorateClass$
|
|
11117
|
+
__decorateClass$j([
|
|
10950
11118
|
modernIdoc.property()
|
|
10951
11119
|
], exports.Image2D.prototype, "srcRect", 2);
|
|
10952
|
-
__decorateClass$
|
|
11120
|
+
__decorateClass$j([
|
|
10953
11121
|
modernIdoc.property({ fallback: false })
|
|
10954
11122
|
], exports.Image2D.prototype, "gif", 2);
|
|
10955
|
-
exports.Image2D = __decorateClass$
|
|
11123
|
+
exports.Image2D = __decorateClass$j([
|
|
10956
11124
|
customNode("Image2D")
|
|
10957
11125
|
], exports.Image2D);
|
|
10958
11126
|
|
|
@@ -10976,14 +11144,14 @@ class TextureRect2D extends exports.Element2D {
|
|
|
10976
11144
|
}
|
|
10977
11145
|
}
|
|
10978
11146
|
|
|
10979
|
-
var __defProp$
|
|
11147
|
+
var __defProp$e = Object.defineProperty;
|
|
10980
11148
|
var __getOwnPropDesc$g = Object.getOwnPropertyDescriptor;
|
|
10981
|
-
var __decorateClass$
|
|
11149
|
+
var __decorateClass$i = (decorators, target, key, kind) => {
|
|
10982
11150
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$g(target, key) : target;
|
|
10983
11151
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
10984
11152
|
if (decorator = decorators[i])
|
|
10985
11153
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
10986
|
-
if (kind && result) __defProp$
|
|
11154
|
+
if (kind && result) __defProp$e(target, key, result);
|
|
10987
11155
|
return result;
|
|
10988
11156
|
};
|
|
10989
11157
|
exports.Lottie2D = class Lottie2D extends TextureRect2D {
|
|
@@ -11026,20 +11194,20 @@ exports.Lottie2D = class Lottie2D extends TextureRect2D {
|
|
|
11026
11194
|
super._process(delta);
|
|
11027
11195
|
}
|
|
11028
11196
|
};
|
|
11029
|
-
__decorateClass$
|
|
11197
|
+
__decorateClass$i([
|
|
11030
11198
|
modernIdoc.property({ fallback: "" })
|
|
11031
11199
|
], exports.Lottie2D.prototype, "src", 2);
|
|
11032
|
-
exports.Lottie2D = __decorateClass$
|
|
11200
|
+
exports.Lottie2D = __decorateClass$i([
|
|
11033
11201
|
customNode("Lottie2D")
|
|
11034
11202
|
], exports.Lottie2D);
|
|
11035
11203
|
|
|
11036
|
-
var __defProp$
|
|
11037
|
-
var __decorateClass$
|
|
11204
|
+
var __defProp$d = Object.defineProperty;
|
|
11205
|
+
var __decorateClass$h = (decorators, target, key, kind) => {
|
|
11038
11206
|
var result = void 0 ;
|
|
11039
11207
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11040
11208
|
if (decorator = decorators[i])
|
|
11041
11209
|
result = (decorator(target, key, result) ) || result;
|
|
11042
|
-
if (result) __defProp$
|
|
11210
|
+
if (result) __defProp$d(target, key, result);
|
|
11043
11211
|
return result;
|
|
11044
11212
|
};
|
|
11045
11213
|
class TransformRect2D extends exports.Element2D {
|
|
@@ -11085,18 +11253,18 @@ class TransformRect2D extends exports.Element2D {
|
|
|
11085
11253
|
this._drawEllipse(width, height / 2);
|
|
11086
11254
|
}
|
|
11087
11255
|
}
|
|
11088
|
-
__decorateClass$
|
|
11256
|
+
__decorateClass$h([
|
|
11089
11257
|
modernIdoc.property({ fallback: 6 })
|
|
11090
11258
|
], TransformRect2D.prototype, "handleSize");
|
|
11091
11259
|
|
|
11092
|
-
var __defProp$
|
|
11260
|
+
var __defProp$c = Object.defineProperty;
|
|
11093
11261
|
var __getOwnPropDesc$f = Object.getOwnPropertyDescriptor;
|
|
11094
|
-
var __decorateClass$
|
|
11262
|
+
var __decorateClass$g = (decorators, target, key, kind) => {
|
|
11095
11263
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$f(target, key) : target;
|
|
11096
11264
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11097
11265
|
if (decorator = decorators[i])
|
|
11098
11266
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
11099
|
-
if (kind && result) __defProp$
|
|
11267
|
+
if (kind && result) __defProp$c(target, key, result);
|
|
11100
11268
|
return result;
|
|
11101
11269
|
};
|
|
11102
11270
|
exports.Video2D = class Video2D extends TextureRect2D {
|
|
@@ -11149,21 +11317,21 @@ exports.Video2D = class Video2D extends TextureRect2D {
|
|
|
11149
11317
|
super._process(delta);
|
|
11150
11318
|
}
|
|
11151
11319
|
};
|
|
11152
|
-
__decorateClass$
|
|
11320
|
+
__decorateClass$g([
|
|
11153
11321
|
modernIdoc.property({ fallback: "" })
|
|
11154
11322
|
], exports.Video2D.prototype, "src", 2);
|
|
11155
|
-
exports.Video2D = __decorateClass$
|
|
11323
|
+
exports.Video2D = __decorateClass$g([
|
|
11156
11324
|
customNode("Video2D")
|
|
11157
11325
|
], exports.Video2D);
|
|
11158
11326
|
|
|
11159
|
-
var __defProp$
|
|
11327
|
+
var __defProp$b = Object.defineProperty;
|
|
11160
11328
|
var __getOwnPropDesc$e = Object.getOwnPropertyDescriptor;
|
|
11161
|
-
var __decorateClass$
|
|
11329
|
+
var __decorateClass$f = (decorators, target, key, kind) => {
|
|
11162
11330
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$e(target, key) : target;
|
|
11163
11331
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11164
11332
|
if (decorator = decorators[i])
|
|
11165
11333
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
11166
|
-
if (kind && result) __defProp$
|
|
11334
|
+
if (kind && result) __defProp$b(target, key, result);
|
|
11167
11335
|
return result;
|
|
11168
11336
|
};
|
|
11169
11337
|
const linear = (amount) => amount;
|
|
@@ -11482,19 +11650,19 @@ exports.Animation = class Animation extends exports.TimelineNode {
|
|
|
11482
11650
|
});
|
|
11483
11651
|
}
|
|
11484
11652
|
};
|
|
11485
|
-
__decorateClass$
|
|
11653
|
+
__decorateClass$f([
|
|
11486
11654
|
modernIdoc.property({ fallback: "parent" })
|
|
11487
11655
|
], exports.Animation.prototype, "effectMode", 2);
|
|
11488
|
-
__decorateClass$
|
|
11656
|
+
__decorateClass$f([
|
|
11489
11657
|
modernIdoc.property({ fallback: false })
|
|
11490
11658
|
], exports.Animation.prototype, "loop", 2);
|
|
11491
|
-
__decorateClass$
|
|
11659
|
+
__decorateClass$f([
|
|
11492
11660
|
modernIdoc.property({ default: () => [] })
|
|
11493
11661
|
], exports.Animation.prototype, "keyframes", 2);
|
|
11494
|
-
__decorateClass$
|
|
11662
|
+
__decorateClass$f([
|
|
11495
11663
|
modernIdoc.property()
|
|
11496
11664
|
], exports.Animation.prototype, "easing", 2);
|
|
11497
|
-
exports.Animation = __decorateClass$
|
|
11665
|
+
exports.Animation = __decorateClass$f([
|
|
11498
11666
|
customNode("Animation", {
|
|
11499
11667
|
renderMode: "disabled",
|
|
11500
11668
|
processMode: "pausable",
|
|
@@ -12375,10 +12543,10 @@ class WebAudio extends AudioPipeline {
|
|
|
12375
12543
|
}
|
|
12376
12544
|
}
|
|
12377
12545
|
|
|
12378
|
-
var __defProp$
|
|
12546
|
+
var __defProp$a = Object.defineProperty;
|
|
12379
12547
|
var __getOwnPropDesc$d = Object.getOwnPropertyDescriptor;
|
|
12380
|
-
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$
|
|
12381
|
-
var __decorateClass$
|
|
12548
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12549
|
+
var __decorateClass$e = (decorators, target, key, kind) => {
|
|
12382
12550
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$d(target, key) : target;
|
|
12383
12551
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
12384
12552
|
if (decorator = decorators[i])
|
|
@@ -12590,7 +12758,7 @@ exports.Audio = class Audio extends exports.TimelineNode {
|
|
|
12590
12758
|
}
|
|
12591
12759
|
};
|
|
12592
12760
|
__publicField$4(exports.Audio, "_soundPool", []);
|
|
12593
|
-
exports.Audio = __decorateClass$
|
|
12761
|
+
exports.Audio = __decorateClass$e([
|
|
12594
12762
|
customNode("Audio")
|
|
12595
12763
|
], exports.Audio);
|
|
12596
12764
|
|
|
@@ -12598,14 +12766,14 @@ class AudioSpectrum extends exports.Node2D {
|
|
|
12598
12766
|
//
|
|
12599
12767
|
}
|
|
12600
12768
|
|
|
12601
|
-
var __defProp$
|
|
12769
|
+
var __defProp$9 = Object.defineProperty;
|
|
12602
12770
|
var __getOwnPropDesc$c = Object.getOwnPropertyDescriptor;
|
|
12603
|
-
var __decorateClass$
|
|
12771
|
+
var __decorateClass$d = (decorators, target, key, kind) => {
|
|
12604
12772
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$c(target, key) : target;
|
|
12605
12773
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
12606
12774
|
if (decorator = decorators[i])
|
|
12607
12775
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
12608
|
-
if (kind && result) __defProp$
|
|
12776
|
+
if (kind && result) __defProp$9(target, key, result);
|
|
12609
12777
|
return result;
|
|
12610
12778
|
};
|
|
12611
12779
|
exports.AudioWaveform = class AudioWaveform extends exports.Element2D {
|
|
@@ -12696,21 +12864,21 @@ exports.AudioWaveform = class AudioWaveform extends exports.Element2D {
|
|
|
12696
12864
|
}
|
|
12697
12865
|
}
|
|
12698
12866
|
};
|
|
12699
|
-
__decorateClass$
|
|
12867
|
+
__decorateClass$d([
|
|
12700
12868
|
modernIdoc.property()
|
|
12701
12869
|
], exports.AudioWaveform.prototype, "src", 2);
|
|
12702
|
-
__decorateClass$
|
|
12870
|
+
__decorateClass$d([
|
|
12703
12871
|
modernIdoc.property({ fallback: 0 })
|
|
12704
12872
|
], exports.AudioWaveform.prototype, "gap", 2);
|
|
12705
|
-
__decorateClass$
|
|
12873
|
+
__decorateClass$d([
|
|
12706
12874
|
modernIdoc.property({ fallback: "#000000" })
|
|
12707
12875
|
], exports.AudioWaveform.prototype, "color", 2);
|
|
12708
|
-
exports.AudioWaveform = __decorateClass$
|
|
12876
|
+
exports.AudioWaveform = __decorateClass$d([
|
|
12709
12877
|
customNode("AudioWaveform")
|
|
12710
12878
|
], exports.AudioWaveform);
|
|
12711
12879
|
|
|
12712
12880
|
var __getOwnPropDesc$b = Object.getOwnPropertyDescriptor;
|
|
12713
|
-
var __decorateClass$
|
|
12881
|
+
var __decorateClass$c = (decorators, target, key, kind) => {
|
|
12714
12882
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$b(target, key) : target;
|
|
12715
12883
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
12716
12884
|
if (decorator = decorators[i])
|
|
@@ -12758,18 +12926,18 @@ exports.Control = class Control extends exports.Element2D {
|
|
|
12758
12926
|
_guiInput(event, key) {
|
|
12759
12927
|
}
|
|
12760
12928
|
};
|
|
12761
|
-
exports.Control = __decorateClass$
|
|
12929
|
+
exports.Control = __decorateClass$c([
|
|
12762
12930
|
customNode("Control")
|
|
12763
12931
|
], exports.Control);
|
|
12764
12932
|
|
|
12765
|
-
var __defProp$
|
|
12933
|
+
var __defProp$8 = Object.defineProperty;
|
|
12766
12934
|
var __getOwnPropDesc$a = Object.getOwnPropertyDescriptor;
|
|
12767
|
-
var __decorateClass$
|
|
12935
|
+
var __decorateClass$b = (decorators, target, key, kind) => {
|
|
12768
12936
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$a(target, key) : target;
|
|
12769
12937
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
12770
12938
|
if (decorator = decorators[i])
|
|
12771
12939
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
12772
|
-
if (kind && result) __defProp$
|
|
12940
|
+
if (kind && result) __defProp$8(target, key, result);
|
|
12773
12941
|
return result;
|
|
12774
12942
|
};
|
|
12775
12943
|
exports.Range = class Range extends exports.Control {
|
|
@@ -12792,39 +12960,39 @@ exports.Range = class Range extends exports.Control {
|
|
|
12792
12960
|
}
|
|
12793
12961
|
}
|
|
12794
12962
|
};
|
|
12795
|
-
__decorateClass$
|
|
12963
|
+
__decorateClass$b([
|
|
12796
12964
|
modernIdoc.property({ fallback: false })
|
|
12797
12965
|
], exports.Range.prototype, "allowGreater", 2);
|
|
12798
|
-
__decorateClass$
|
|
12966
|
+
__decorateClass$b([
|
|
12799
12967
|
modernIdoc.property({ fallback: false })
|
|
12800
12968
|
], exports.Range.prototype, "allowLesser", 2);
|
|
12801
|
-
__decorateClass$
|
|
12969
|
+
__decorateClass$b([
|
|
12802
12970
|
modernIdoc.property({ fallback: 1 })
|
|
12803
12971
|
], exports.Range.prototype, "page", 2);
|
|
12804
|
-
__decorateClass$
|
|
12972
|
+
__decorateClass$b([
|
|
12805
12973
|
modernIdoc.property({ fallback: 0 })
|
|
12806
12974
|
], exports.Range.prototype, "minValue", 2);
|
|
12807
|
-
__decorateClass$
|
|
12975
|
+
__decorateClass$b([
|
|
12808
12976
|
modernIdoc.property({ fallback: 100 })
|
|
12809
12977
|
], exports.Range.prototype, "maxValue", 2);
|
|
12810
|
-
__decorateClass$
|
|
12978
|
+
__decorateClass$b([
|
|
12811
12979
|
modernIdoc.property({ fallback: 0.01 })
|
|
12812
12980
|
], exports.Range.prototype, "step", 2);
|
|
12813
|
-
__decorateClass$
|
|
12981
|
+
__decorateClass$b([
|
|
12814
12982
|
modernIdoc.property({ fallback: 0 })
|
|
12815
12983
|
], exports.Range.prototype, "value", 2);
|
|
12816
|
-
exports.Range = __decorateClass$
|
|
12984
|
+
exports.Range = __decorateClass$b([
|
|
12817
12985
|
customNode("Range")
|
|
12818
12986
|
], exports.Range);
|
|
12819
12987
|
|
|
12820
|
-
var __defProp$
|
|
12988
|
+
var __defProp$7 = Object.defineProperty;
|
|
12821
12989
|
var __getOwnPropDesc$9 = Object.getOwnPropertyDescriptor;
|
|
12822
|
-
var __decorateClass$
|
|
12990
|
+
var __decorateClass$a = (decorators, target, key, kind) => {
|
|
12823
12991
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$9(target, key) : target;
|
|
12824
12992
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
12825
12993
|
if (decorator = decorators[i])
|
|
12826
12994
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
12827
|
-
if (kind && result) __defProp$
|
|
12995
|
+
if (kind && result) __defProp$7(target, key, result);
|
|
12828
12996
|
return result;
|
|
12829
12997
|
};
|
|
12830
12998
|
exports.Ruler = class Ruler extends exports.Control {
|
|
@@ -12972,45 +13140,45 @@ exports.Ruler = class Ruler extends exports.Control {
|
|
|
12972
13140
|
}
|
|
12973
13141
|
}
|
|
12974
13142
|
};
|
|
12975
|
-
__decorateClass$
|
|
13143
|
+
__decorateClass$a([
|
|
12976
13144
|
modernIdoc.property({ fallback: 0 })
|
|
12977
13145
|
], exports.Ruler.prototype, "offsetX", 2);
|
|
12978
|
-
__decorateClass$
|
|
13146
|
+
__decorateClass$a([
|
|
12979
13147
|
modernIdoc.property({ fallback: 0 })
|
|
12980
13148
|
], exports.Ruler.prototype, "offsetY", 2);
|
|
12981
|
-
__decorateClass$
|
|
13149
|
+
__decorateClass$a([
|
|
12982
13150
|
modernIdoc.property({ fallback: 20 })
|
|
12983
13151
|
], exports.Ruler.prototype, "thickness", 2);
|
|
12984
|
-
__decorateClass$
|
|
13152
|
+
__decorateClass$a([
|
|
12985
13153
|
modernIdoc.property({ fallback: 3 })
|
|
12986
13154
|
], exports.Ruler.prototype, "markHeight", 2);
|
|
12987
|
-
__decorateClass$
|
|
13155
|
+
__decorateClass$a([
|
|
12988
13156
|
modernIdoc.property({ fallback: "#b2b6bc" })
|
|
12989
13157
|
], exports.Ruler.prototype, "color", 2);
|
|
12990
|
-
__decorateClass$
|
|
13158
|
+
__decorateClass$a([
|
|
12991
13159
|
modernIdoc.property({ fallback: "#f9f9fa" })
|
|
12992
13160
|
], exports.Ruler.prototype, "markBackgroundColor", 2);
|
|
12993
|
-
__decorateClass$
|
|
13161
|
+
__decorateClass$a([
|
|
12994
13162
|
modernIdoc.property({ fallback: "#b2b6bc" })
|
|
12995
13163
|
], exports.Ruler.prototype, "markColor", 2);
|
|
12996
|
-
__decorateClass$
|
|
13164
|
+
__decorateClass$a([
|
|
12997
13165
|
modernIdoc.property({ fallback: 300 })
|
|
12998
13166
|
], exports.Ruler.prototype, "gap", 2);
|
|
12999
|
-
__decorateClass$
|
|
13167
|
+
__decorateClass$a([
|
|
13000
13168
|
modernIdoc.property({ fallback: 1 })
|
|
13001
13169
|
], exports.Ruler.prototype, "gapScale", 2);
|
|
13002
|
-
exports.Ruler = __decorateClass$
|
|
13170
|
+
exports.Ruler = __decorateClass$a([
|
|
13003
13171
|
customNode("Ruler")
|
|
13004
13172
|
], exports.Ruler);
|
|
13005
13173
|
|
|
13006
|
-
var __defProp$
|
|
13174
|
+
var __defProp$6 = Object.defineProperty;
|
|
13007
13175
|
var __getOwnPropDesc$8 = Object.getOwnPropertyDescriptor;
|
|
13008
|
-
var __decorateClass$
|
|
13176
|
+
var __decorateClass$9 = (decorators, target, key, kind) => {
|
|
13009
13177
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$8(target, key) : target;
|
|
13010
13178
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
13011
13179
|
if (decorator = decorators[i])
|
|
13012
13180
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
13013
|
-
if (kind && result) __defProp$
|
|
13181
|
+
if (kind && result) __defProp$6(target, key, result);
|
|
13014
13182
|
return result;
|
|
13015
13183
|
};
|
|
13016
13184
|
exports.ScrollBar = class ScrollBar extends exports.Range {
|
|
@@ -13069,15 +13237,15 @@ exports.ScrollBar = class ScrollBar extends exports.Range {
|
|
|
13069
13237
|
return false;
|
|
13070
13238
|
}
|
|
13071
13239
|
};
|
|
13072
|
-
__decorateClass$
|
|
13240
|
+
__decorateClass$9([
|
|
13073
13241
|
modernIdoc.property({ fallback: "vertical" })
|
|
13074
13242
|
], exports.ScrollBar.prototype, "direction", 2);
|
|
13075
|
-
exports.ScrollBar = __decorateClass$
|
|
13243
|
+
exports.ScrollBar = __decorateClass$9([
|
|
13076
13244
|
customNode("ScrollBar")
|
|
13077
13245
|
], exports.ScrollBar);
|
|
13078
13246
|
|
|
13079
13247
|
var __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor;
|
|
13080
|
-
var __decorateClass$
|
|
13248
|
+
var __decorateClass$8 = (decorators, target, key, kind) => {
|
|
13081
13249
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$7(target, key) : target;
|
|
13082
13250
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
13083
13251
|
if (decorator = decorators[i])
|
|
@@ -13090,14 +13258,14 @@ exports.XScrollBar = class XScrollBar extends exports.ScrollBar {
|
|
|
13090
13258
|
this.setProperties(properties).append(children);
|
|
13091
13259
|
}
|
|
13092
13260
|
};
|
|
13093
|
-
exports.XScrollBar = __decorateClass$
|
|
13261
|
+
exports.XScrollBar = __decorateClass$8([
|
|
13094
13262
|
customNode("XScrollBar", {
|
|
13095
13263
|
direction: "horizontal"
|
|
13096
13264
|
})
|
|
13097
13265
|
], exports.XScrollBar);
|
|
13098
13266
|
|
|
13099
13267
|
var __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor;
|
|
13100
|
-
var __decorateClass$
|
|
13268
|
+
var __decorateClass$7 = (decorators, target, key, kind) => {
|
|
13101
13269
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$6(target, key) : target;
|
|
13102
13270
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
13103
13271
|
if (decorator = decorators[i])
|
|
@@ -13110,20 +13278,20 @@ exports.YScrollBar = class YScrollBar extends exports.ScrollBar {
|
|
|
13110
13278
|
this.setProperties(properties).append(children);
|
|
13111
13279
|
}
|
|
13112
13280
|
};
|
|
13113
|
-
exports.YScrollBar = __decorateClass$
|
|
13281
|
+
exports.YScrollBar = __decorateClass$7([
|
|
13114
13282
|
customNode("YScrollBar", {
|
|
13115
13283
|
direction: "vertical"
|
|
13116
13284
|
})
|
|
13117
13285
|
], exports.YScrollBar);
|
|
13118
13286
|
|
|
13119
|
-
var __defProp$
|
|
13287
|
+
var __defProp$5 = Object.defineProperty;
|
|
13120
13288
|
var __getOwnPropDesc$5 = Object.getOwnPropertyDescriptor;
|
|
13121
|
-
var __decorateClass$
|
|
13289
|
+
var __decorateClass$6 = (decorators, target, key, kind) => {
|
|
13122
13290
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$5(target, key) : target;
|
|
13123
13291
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
13124
13292
|
if (decorator = decorators[i])
|
|
13125
13293
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
13126
|
-
if (kind && result) __defProp$
|
|
13294
|
+
if (kind && result) __defProp$5(target, key, result);
|
|
13127
13295
|
return result;
|
|
13128
13296
|
};
|
|
13129
13297
|
exports.Scaler = class Scaler extends exports.Node {
|
|
@@ -13184,32 +13352,32 @@ exports.Scaler = class Scaler extends exports.Node {
|
|
|
13184
13352
|
}
|
|
13185
13353
|
}
|
|
13186
13354
|
};
|
|
13187
|
-
__decorateClass$
|
|
13355
|
+
__decorateClass$6([
|
|
13188
13356
|
modernIdoc.property({ default: 1 })
|
|
13189
13357
|
], exports.Scaler.prototype, "translateX", 2);
|
|
13190
|
-
__decorateClass$
|
|
13358
|
+
__decorateClass$6([
|
|
13191
13359
|
modernIdoc.property({ default: 1 })
|
|
13192
13360
|
], exports.Scaler.prototype, "translateY", 2);
|
|
13193
|
-
__decorateClass$
|
|
13361
|
+
__decorateClass$6([
|
|
13194
13362
|
modernIdoc.property({ default: 1 })
|
|
13195
13363
|
], exports.Scaler.prototype, "scale", 2);
|
|
13196
|
-
__decorateClass$
|
|
13364
|
+
__decorateClass$6([
|
|
13197
13365
|
modernIdoc.property({ default: 0.05 })
|
|
13198
13366
|
], exports.Scaler.prototype, "minScale", 2);
|
|
13199
|
-
__decorateClass$
|
|
13367
|
+
__decorateClass$6([
|
|
13200
13368
|
modernIdoc.property({ default: 10 })
|
|
13201
13369
|
], exports.Scaler.prototype, "maxScale", 2);
|
|
13202
|
-
exports.Scaler = __decorateClass$
|
|
13370
|
+
exports.Scaler = __decorateClass$6([
|
|
13203
13371
|
customNode("Scaler", {
|
|
13204
13372
|
processMode: "disabled",
|
|
13205
13373
|
renderMode: "disabled"
|
|
13206
13374
|
})
|
|
13207
13375
|
], exports.Scaler);
|
|
13208
13376
|
|
|
13209
|
-
var __defProp$
|
|
13377
|
+
var __defProp$4 = Object.defineProperty;
|
|
13210
13378
|
var __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor;
|
|
13211
|
-
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$
|
|
13212
|
-
var __decorateClass$
|
|
13379
|
+
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13380
|
+
var __decorateClass$5 = (decorators, target, key, kind) => {
|
|
13213
13381
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$4(target, key) : target;
|
|
13214
13382
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
13215
13383
|
if (decorator = decorators[i])
|
|
@@ -13298,14 +13466,14 @@ void main(void) {
|
|
|
13298
13466
|
gl_FragColor = color;
|
|
13299
13467
|
}`
|
|
13300
13468
|
}));
|
|
13301
|
-
exports.KawaseTransition = __decorateClass$
|
|
13469
|
+
exports.KawaseTransition = __decorateClass$5([
|
|
13302
13470
|
customNode("KawaseTransition")
|
|
13303
13471
|
], exports.KawaseTransition);
|
|
13304
13472
|
|
|
13305
|
-
var __defProp$
|
|
13473
|
+
var __defProp$3 = Object.defineProperty;
|
|
13306
13474
|
var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
|
|
13307
|
-
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$
|
|
13308
|
-
var __decorateClass$
|
|
13475
|
+
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13476
|
+
var __decorateClass$4 = (decorators, target, key, kind) => {
|
|
13309
13477
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$3(target, key) : target;
|
|
13310
13478
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
13311
13479
|
if (decorator = decorators[i])
|
|
@@ -13351,14 +13519,14 @@ void main() {
|
|
|
13351
13519
|
gl_FragColor = mix(src2Color, src1Color, mixPercent);
|
|
13352
13520
|
}`
|
|
13353
13521
|
}));
|
|
13354
|
-
exports.LeftEraseTransition = __decorateClass$
|
|
13522
|
+
exports.LeftEraseTransition = __decorateClass$4([
|
|
13355
13523
|
customNode("LeftEraseTransition")
|
|
13356
13524
|
], exports.LeftEraseTransition);
|
|
13357
13525
|
|
|
13358
|
-
var __defProp$
|
|
13526
|
+
var __defProp$2 = Object.defineProperty;
|
|
13359
13527
|
var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
|
|
13360
|
-
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$
|
|
13361
|
-
var __decorateClass$
|
|
13528
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13529
|
+
var __decorateClass$3 = (decorators, target, key, kind) => {
|
|
13362
13530
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$2(target, key) : target;
|
|
13363
13531
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
13364
13532
|
if (decorator = decorators[i])
|
|
@@ -13458,14 +13626,14 @@ void main(void) {
|
|
|
13458
13626
|
gl_FragColor = color;
|
|
13459
13627
|
}`
|
|
13460
13628
|
}));
|
|
13461
|
-
exports.TiltShiftTransition = __decorateClass$
|
|
13629
|
+
exports.TiltShiftTransition = __decorateClass$3([
|
|
13462
13630
|
customNode("TiltShiftTransition")
|
|
13463
13631
|
], exports.TiltShiftTransition);
|
|
13464
13632
|
|
|
13465
|
-
var __defProp = Object.defineProperty;
|
|
13633
|
+
var __defProp$1 = Object.defineProperty;
|
|
13466
13634
|
var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
|
|
13467
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13468
|
-
var __decorateClass$
|
|
13635
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13636
|
+
var __decorateClass$2 = (decorators, target, key, kind) => {
|
|
13469
13637
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target;
|
|
13470
13638
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
13471
13639
|
if (decorator = decorators[i])
|
|
@@ -13552,7 +13720,7 @@ void main(void) {
|
|
|
13552
13720
|
gl_FragColor = texture2D(sampler, coord);
|
|
13553
13721
|
}`
|
|
13554
13722
|
}));
|
|
13555
|
-
exports.TwistTransition = __decorateClass$
|
|
13723
|
+
exports.TwistTransition = __decorateClass$2([
|
|
13556
13724
|
customNode("TwistTransition")
|
|
13557
13725
|
], exports.TwistTransition);
|
|
13558
13726
|
|
|
@@ -13917,7 +14085,7 @@ class Assets {
|
|
|
13917
14085
|
const assets = new Assets().use(new FontLoader()).use(new GifLoader()).use(new JsonLoader()).use(new LottieLoader()).use(new TextLoader()).use(new TextureLoader()).use(new VideoLoader());
|
|
13918
14086
|
|
|
13919
14087
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13920
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
14088
|
+
var __decorateClass$1 = (decorators, target, key, kind) => {
|
|
13921
14089
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
13922
14090
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
13923
14091
|
if (decorator = decorators[i])
|
|
@@ -14126,10 +14294,19 @@ exports.CanvasItemEditor = class CanvasItemEditor extends exports.Control {
|
|
|
14126
14294
|
}
|
|
14127
14295
|
}
|
|
14128
14296
|
};
|
|
14129
|
-
exports.CanvasItemEditor = __decorateClass([
|
|
14297
|
+
exports.CanvasItemEditor = __decorateClass$1([
|
|
14130
14298
|
customNode("CanvasItemEditor")
|
|
14131
14299
|
], exports.CanvasItemEditor);
|
|
14132
14300
|
|
|
14301
|
+
var __defProp = Object.defineProperty;
|
|
14302
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
14303
|
+
var result = void 0 ;
|
|
14304
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
14305
|
+
if (decorator = decorators[i])
|
|
14306
|
+
result = (decorator(target, key, result) ) || result;
|
|
14307
|
+
if (result) __defProp(target, key, result);
|
|
14308
|
+
return result;
|
|
14309
|
+
};
|
|
14133
14310
|
const defaultOptions = {
|
|
14134
14311
|
alpha: true,
|
|
14135
14312
|
stencil: true,
|
|
@@ -14161,9 +14338,6 @@ class Engine extends SceneTree {
|
|
|
14161
14338
|
set pixelRatio(val) {
|
|
14162
14339
|
this.renderer.pixelRatio = val;
|
|
14163
14340
|
this.resize(this.width, this.height);
|
|
14164
|
-
if (this.view) {
|
|
14165
|
-
this.view.dataset.pixelRatio = String(val);
|
|
14166
|
-
}
|
|
14167
14341
|
}
|
|
14168
14342
|
_resizeObserver = SUPPORTS_RESIZE_OBSERVER ? new ResizeObserver((entries) => {
|
|
14169
14343
|
const entry = entries[0];
|
|
@@ -14172,36 +14346,30 @@ class Engine extends SceneTree {
|
|
|
14172
14346
|
this.resize(width, height);
|
|
14173
14347
|
}
|
|
14174
14348
|
}) : void 0;
|
|
14175
|
-
constructor(
|
|
14349
|
+
constructor(properties = {}) {
|
|
14176
14350
|
const {
|
|
14177
|
-
debug = false,
|
|
14178
14351
|
view,
|
|
14179
14352
|
width,
|
|
14180
14353
|
height,
|
|
14181
14354
|
pixelRatio = DEVICE_PIXEL_RATIO,
|
|
14182
|
-
|
|
14183
|
-
|
|
14184
|
-
|
|
14185
|
-
autoStart,
|
|
14186
|
-
timeline,
|
|
14187
|
-
...glOptions
|
|
14188
|
-
} = options;
|
|
14189
|
-
super(timeline);
|
|
14190
|
-
this.debug = debug;
|
|
14355
|
+
autoResize
|
|
14356
|
+
} = properties;
|
|
14357
|
+
super();
|
|
14191
14358
|
this.renderer = new WebGLRenderer(view, {
|
|
14192
|
-
|
|
14193
|
-
|
|
14359
|
+
alpha: defaultOptions.alpha ?? properties.alpha,
|
|
14360
|
+
stencil: defaultOptions.stencil ?? properties.stencil,
|
|
14361
|
+
antialias: defaultOptions.antialias ?? properties.antialias,
|
|
14362
|
+
premultipliedAlpha: defaultOptions.premultipliedAlpha ?? properties.premultipliedAlpha,
|
|
14363
|
+
preserveDrawingBuffer: defaultOptions.preserveDrawingBuffer ?? properties.preserveDrawingBuffer,
|
|
14364
|
+
powerPreference: defaultOptions.powerPreference ?? properties.powerPreference
|
|
14194
14365
|
});
|
|
14195
14366
|
this._setupInput();
|
|
14196
14367
|
this.pixelRatio = pixelRatio;
|
|
14197
|
-
this.backgroundColor = backgroundColor;
|
|
14198
|
-
this.fonts = fonts;
|
|
14199
14368
|
if (autoResize) {
|
|
14200
14369
|
if (!view && this.renderer.view) {
|
|
14201
14370
|
this.renderer.view.style.width = "100%";
|
|
14202
14371
|
this.renderer.view.style.height = "100%";
|
|
14203
14372
|
}
|
|
14204
|
-
this.enableAutoResize(autoResize);
|
|
14205
14373
|
} else {
|
|
14206
14374
|
this.resize(
|
|
14207
14375
|
width || this.gl.drawingBufferWidth || this.view?.clientWidth || 200,
|
|
@@ -14209,7 +14377,26 @@ class Engine extends SceneTree {
|
|
|
14209
14377
|
!view
|
|
14210
14378
|
);
|
|
14211
14379
|
}
|
|
14212
|
-
|
|
14380
|
+
this.setProperties(properties);
|
|
14381
|
+
}
|
|
14382
|
+
_updateProperty(key, value, oldValue) {
|
|
14383
|
+
super._updateProperty(key, value, oldValue);
|
|
14384
|
+
switch (key) {
|
|
14385
|
+
case "autoResize":
|
|
14386
|
+
if (this.view) {
|
|
14387
|
+
if (this.autoResize) {
|
|
14388
|
+
this._resizeObserver?.observe(this.view);
|
|
14389
|
+
} else {
|
|
14390
|
+
this._resizeObserver?.unobserve(this.view);
|
|
14391
|
+
}
|
|
14392
|
+
}
|
|
14393
|
+
break;
|
|
14394
|
+
case "autoStart":
|
|
14395
|
+
if (this.autoStart) {
|
|
14396
|
+
this.start();
|
|
14397
|
+
}
|
|
14398
|
+
break;
|
|
14399
|
+
}
|
|
14213
14400
|
}
|
|
14214
14401
|
_setupInput() {
|
|
14215
14402
|
if (this.view) {
|
|
@@ -14232,16 +14419,6 @@ class Engine extends SceneTree {
|
|
|
14232
14419
|
}
|
|
14233
14420
|
return this;
|
|
14234
14421
|
}
|
|
14235
|
-
enableAutoResize(enable = true) {
|
|
14236
|
-
if (this.view) {
|
|
14237
|
-
if (enable) {
|
|
14238
|
-
this._resizeObserver?.observe(this.view);
|
|
14239
|
-
} else {
|
|
14240
|
-
this._resizeObserver?.unobserve(this.view);
|
|
14241
|
-
}
|
|
14242
|
-
}
|
|
14243
|
-
return this;
|
|
14244
|
-
}
|
|
14245
14422
|
resize(width, height, updateCss = false) {
|
|
14246
14423
|
this.renderer.resize(width, height, updateCss);
|
|
14247
14424
|
this.root.width = width;
|
|
@@ -14274,11 +14451,6 @@ class Engine extends SceneTree {
|
|
|
14274
14451
|
this._render(this.renderer);
|
|
14275
14452
|
});
|
|
14276
14453
|
}
|
|
14277
|
-
destroy() {
|
|
14278
|
-
super.destroy();
|
|
14279
|
-
this.enableAutoResize(false);
|
|
14280
|
-
this.renderer.destroy();
|
|
14281
|
-
}
|
|
14282
14454
|
toPixels() {
|
|
14283
14455
|
return this.renderer.toPixels();
|
|
14284
14456
|
}
|
|
@@ -14321,7 +14493,21 @@ class Engine extends SceneTree {
|
|
|
14321
14493
|
}
|
|
14322
14494
|
return canvas2;
|
|
14323
14495
|
}
|
|
14496
|
+
destroy() {
|
|
14497
|
+
this._resizeObserver?.disconnect();
|
|
14498
|
+
this.renderer.destroy();
|
|
14499
|
+
super.destroy();
|
|
14500
|
+
}
|
|
14324
14501
|
}
|
|
14502
|
+
__decorateClass([
|
|
14503
|
+
modernIdoc.property({ alias: "root.msaa" })
|
|
14504
|
+
], Engine.prototype, "msaa");
|
|
14505
|
+
__decorateClass([
|
|
14506
|
+
modernIdoc.property({ fallback: false })
|
|
14507
|
+
], Engine.prototype, "autoResize");
|
|
14508
|
+
__decorateClass([
|
|
14509
|
+
modernIdoc.property({ fallback: false })
|
|
14510
|
+
], Engine.prototype, "autoStart");
|
|
14325
14511
|
|
|
14326
14512
|
let engine;
|
|
14327
14513
|
const queue = [];
|