melonjs 20.8.0 → 20.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/build/application/application.d.ts +66 -8
- package/build/application/application.d.ts.map +1 -1
- package/build/application/defaultApplicationSettings.d.ts +1 -0
- package/build/application/defaultApplicationSettings.d.ts.map +1 -1
- package/build/application/resize.d.ts +25 -0
- package/build/application/resize.d.ts.map +1 -1
- package/build/application/scaleMethods.d.ts +13 -3
- package/build/application/scaleMethods.d.ts.map +1 -1
- package/build/application/settings.d.ts +56 -5
- package/build/application/settings.d.ts.map +1 -1
- package/build/audio/audio.d.ts +29 -5
- package/build/audio/audio.d.ts.map +1 -1
- package/build/audio/autopause.d.ts +36 -0
- package/build/audio/autopause.d.ts.map +1 -0
- package/build/audio/backend/engine.d.ts +10 -0
- package/build/audio/backend/engine.d.ts.map +1 -1
- package/build/audio/backend/sound.d.ts.map +1 -1
- package/build/audio/backend/spatial.d.ts.map +1 -1
- package/build/audio/context.d.ts +35 -0
- package/build/audio/context.d.ts.map +1 -0
- package/build/audio/playback.d.ts.map +1 -1
- package/build/audio/procedural.d.ts.map +1 -1
- package/build/audio/spatial.d.ts +87 -0
- package/build/audio/spatial.d.ts.map +1 -0
- package/build/audio/state.d.ts +1 -0
- package/build/audio/state.d.ts.map +1 -1
- package/build/audio/types.d.ts +46 -6
- package/build/audio/types.d.ts.map +1 -1
- package/build/camera/camera2d.d.ts.map +1 -1
- package/build/camera/effects/fade_effect.d.ts.map +1 -1
- package/build/camera/effects/mask_effect.d.ts.map +1 -1
- package/build/camera/effects/shake_effect.d.ts.map +1 -1
- package/build/geometries/box3d.d.ts +1 -1
- package/build/geometries/box3d.d.ts.map +1 -1
- package/build/geometries/ellipse.d.ts +1 -1
- package/build/geometries/ellipse.d.ts.map +1 -1
- package/build/geometries/line.d.ts +1 -1
- package/build/geometries/line.d.ts.map +1 -1
- package/build/geometries/point.d.ts +1 -1
- package/build/geometries/point.d.ts.map +1 -1
- package/build/geometries/polygon.d.ts +1 -1
- package/build/geometries/polygon.d.ts.map +1 -1
- package/build/geometries/rectangle.d.ts +1 -1
- package/build/geometries/rectangle.d.ts.map +1 -1
- package/build/geometries/roundrect.d.ts +1 -1
- package/build/geometries/roundrect.d.ts.map +1 -1
- package/build/geometries/sphere.d.ts +1 -1
- package/build/geometries/sphere.d.ts.map +1 -1
- package/build/index.d.ts +8 -2
- package/build/index.d.ts.map +1 -1
- package/build/index.js +36985 -34678
- package/build/index.js.map +4 -4
- package/build/input/gamepad.d.ts +129 -3
- package/build/input/gamepad.d.ts.map +1 -1
- package/build/level/gltf/GLTFModel.d.ts +5 -4
- package/build/level/gltf/GLTFModel.d.ts.map +1 -1
- package/build/level/gltf/GLTFScene.d.ts.map +1 -1
- package/build/level/tiled/TMXObjectFactory.d.ts +3 -2
- package/build/level/tiled/TMXObjectFactory.d.ts.map +1 -1
- package/build/level/tiled/TMXTileMap.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXObliqueRenderer.d.ts +1 -4
- package/build/level/tiled/renderer/TMXObliqueRenderer.d.ts.map +1 -1
- package/build/loader/cache.d.ts +220 -0
- package/build/loader/cache.d.ts.map +1 -1
- package/build/loader/loader.d.ts +20 -349
- package/build/loader/loader.d.ts.map +1 -1
- package/build/loader/parsers/gltf.d.ts +115 -0
- package/build/loader/parsers/gltf.d.ts.map +1 -1
- package/build/math/color.d.ts +1 -1
- package/build/math/color.d.ts.map +1 -1
- package/build/math/matrix2d.d.ts +1 -1
- package/build/math/matrix2d.d.ts.map +1 -1
- package/build/math/matrix3d.d.ts +1 -1
- package/build/math/matrix3d.d.ts.map +1 -1
- package/build/math/observableVector2d.d.ts +14 -2
- package/build/math/observableVector2d.d.ts.map +1 -1
- package/build/math/observableVector3d.d.ts +15 -1
- package/build/math/observableVector3d.d.ts.map +1 -1
- package/build/math/vector2d.d.ts +31 -1
- package/build/math/vector2d.d.ts.map +1 -1
- package/build/math/vector3d.d.ts +38 -1
- package/build/math/vector3d.d.ts.map +1 -1
- package/build/math/vertex.d.ts.map +1 -1
- package/build/particles/emitter.d.ts.map +1 -1
- package/build/particles/particle.d.ts +7 -1
- package/build/particles/particle.d.ts.map +1 -1
- package/build/particles/settings.d.ts +35 -0
- package/build/particles/settings.d.ts.map +1 -1
- package/build/physics/bounds.d.ts +1 -1
- package/build/physics/bounds.d.ts.map +1 -1
- package/build/physics/broadphase/octree.d.ts +24 -0
- package/build/physics/broadphase/octree.d.ts.map +1 -1
- package/build/physics/broadphase/quadtree.d.ts +31 -0
- package/build/physics/broadphase/quadtree.d.ts.map +1 -1
- package/build/physics/builtin/body.d.ts +14 -0
- package/build/physics/builtin/body.d.ts.map +1 -1
- package/build/pool.d.ts +4 -0
- package/build/pool.d.ts.map +1 -1
- package/build/renderable/colorlayer.d.ts +13 -0
- package/build/renderable/colorlayer.d.ts.map +1 -1
- package/build/renderable/container.d.ts.map +1 -1
- package/build/renderable/groundshadow.d.ts.map +1 -1
- package/build/renderable/instanced_mesh.d.ts +56 -0
- package/build/renderable/instanced_mesh.d.ts.map +1 -1
- package/build/renderable/mesh.d.ts +97 -11
- package/build/renderable/mesh.d.ts.map +1 -1
- package/build/renderable/renderable.d.ts +41 -3
- package/build/renderable/renderable.d.ts.map +1 -1
- package/build/renderable/sprite.d.ts +2 -1
- package/build/renderable/sprite.d.ts.map +1 -1
- package/build/renderable/sprite3d.d.ts +6 -2
- package/build/renderable/sprite3d.d.ts.map +1 -1
- package/build/renderable/text/bitmaptext.d.ts +63 -2
- package/build/renderable/text/bitmaptext.d.ts.map +1 -1
- package/build/renderable/text/bitmaptextdata.d.ts +1 -1
- package/build/renderable/text/bitmaptextdata.d.ts.map +1 -1
- package/build/renderable/text/glypheffect.d.ts +44 -0
- package/build/renderable/text/glypheffect.d.ts.map +1 -0
- package/build/renderable/text/text.d.ts +17 -0
- package/build/renderable/text/text.d.ts.map +1 -1
- package/build/renderable/trail.d.ts.map +1 -1
- package/build/renderable/trail3d.d.ts +174 -0
- package/build/renderable/trail3d.d.ts.map +1 -0
- package/build/renderable/trigger.d.ts +2 -1
- package/build/renderable/trigger.d.ts.map +1 -1
- package/build/renderable/ui/panelpaint.d.ts +5 -0
- package/build/renderable/ui/panelpaint.d.ts.map +1 -0
- package/build/renderable/ui/progressbar.d.ts +2 -4
- package/build/renderable/ui/progressbar.d.ts.map +1 -1
- package/build/renderable/ui/uipanel.d.ts +245 -0
- package/build/renderable/ui/uipanel.d.ts.map +1 -0
- package/build/renderable/ui/uitextbutton.d.ts +30 -1
- package/build/renderable/ui/uitextbutton.d.ts.map +1 -1
- package/build/state/state.d.ts.map +1 -1
- package/build/system/bootstrap.d.ts.map +1 -1
- package/build/system/legacy_pool.d.ts +22 -2
- package/build/system/legacy_pool.d.ts.map +1 -1
- package/build/system/pool.d.ts +5 -8
- package/build/system/pool.d.ts.map +1 -1
- package/build/tweens/tween.d.ts +1 -1
- package/build/tweens/tween.d.ts.map +1 -1
- package/build/video/effects/tintPulse.d.ts +0 -5
- package/build/video/effects/tintPulse.d.ts.map +1 -1
- package/build/video/effects/wave.d.ts +0 -5
- package/build/video/effects/wave.d.ts.map +1 -1
- package/build/video/gpu/batcher.d.ts +8 -2
- package/build/video/gpu/batcher.d.ts.map +1 -1
- package/build/video/gradient.d.ts +1 -0
- package/build/video/gradient.d.ts.map +1 -1
- package/build/video/rendertarget/canvasrendertarget.d.ts.map +1 -1
- package/build/video/rendertarget/rendertarget.d.ts +12 -5
- package/build/video/rendertarget/rendertarget.d.ts.map +1 -1
- package/build/video/rendertarget/webglrendertarget.d.ts.map +1 -1
- package/build/video/rendertarget/webgpurendertarget.d.ts +6 -12
- package/build/video/rendertarget/webgpurendertarget.d.ts.map +1 -1
- package/build/video/texture/atlas.d.ts +1 -1
- package/build/video/texture/atlas.d.ts.map +1 -1
- package/build/video/texture/texture2d.d.ts +6 -0
- package/build/video/texture/texture2d.d.ts.map +1 -1
- package/build/video/webgl/batchers/lit_quad_batcher.d.ts +2 -11
- package/build/video/webgl/batchers/lit_quad_batcher.d.ts.map +1 -1
- package/package.json +2 -2
- package/skills/AGENTS.md +1 -1
- package/skills/melonjs/SKILL.md +2 -0
- package/skills/melonjs-3d/SKILL.md +192 -18
- package/skills/melonjs-3d-assets/SKILL.md +36 -2
- package/skills/melonjs-audio/SKILL.md +229 -8
- package/skills/melonjs-camera-and-drawing/SKILL.md +73 -3
- package/skills/melonjs-display-and-scaling/SKILL.md +273 -0
- package/skills/melonjs-effects-and-shaders/SKILL.md +4 -4
- package/skills/melonjs-events/SKILL.md +8 -6
- package/skills/melonjs-input/SKILL.md +100 -4
- package/skills/melonjs-math/SKILL.md +313 -0
- package/skills/melonjs-particles-and-trails/SKILL.md +88 -14
- package/skills/melonjs-performance/SKILL.md +50 -19
- package/skills/melonjs-physics/SKILL.md +2 -1
- package/skills/melonjs-renderables/SKILL.md +6 -1
- package/skills/melonjs-scenes-and-state/SKILL.md +14 -3
- package/skills/melonjs-sprites-and-animation/SKILL.md +9 -4
- package/skills/melonjs-tilemaps/SKILL.md +40 -12
- package/skills/melonjs-ui-and-text/SKILL.md +382 -4
package/build/loader/loader.d.ts
CHANGED
|
@@ -254,248 +254,23 @@ export function unload(asset: Asset): boolean;
|
|
|
254
254
|
*/
|
|
255
255
|
export function unloadAll(): void;
|
|
256
256
|
/**
|
|
257
|
-
*
|
|
258
|
-
* @
|
|
259
|
-
* @
|
|
260
|
-
* @
|
|
261
|
-
*/
|
|
262
|
-
export function getTMX(elt: string): object;
|
|
263
|
-
/**
|
|
264
|
-
* return the specified Binary object
|
|
265
|
-
* @param {string} elt - name of the binary object ("ymTrack");
|
|
266
|
-
* @returns {object} requested element or null if not found
|
|
267
|
-
* @category Assets
|
|
268
|
-
*/
|
|
269
|
-
export function getBinary(elt: string): object;
|
|
270
|
-
/**
|
|
271
|
-
* return the specified Image Object
|
|
272
|
-
* @param {string} image - name of the Image element ("tileset-platformer");
|
|
273
|
-
* @returns {HTMLImageElement|CompressedImage|null} requested element or null if not found
|
|
274
|
-
* @category Assets
|
|
275
|
-
*/
|
|
276
|
-
export function getImage(image: string): HTMLImageElement | CompressedImage | null;
|
|
277
|
-
/**
|
|
278
|
-
* return the specified JSON Object
|
|
279
|
-
* @param {string} elt - name of the json file
|
|
280
|
-
* @returns {JSON}
|
|
281
|
-
* @category Assets
|
|
257
|
+
* additional import for TypeScript
|
|
258
|
+
* @import {CompressedImage} from "./parsers/compressed_textures/compressed_image.js";
|
|
259
|
+
* @import GLShader from "../video/webgl/glshader.js";
|
|
260
|
+
* @import ShaderEffect from "../video/effects/shadereffect.js";
|
|
282
261
|
*/
|
|
283
|
-
export function getJSON(elt: string): JSON;
|
|
284
262
|
/**
|
|
285
|
-
*
|
|
286
|
-
*
|
|
287
|
-
* @returns {object} parsed OBJ data with `vertices` (Float32Array), `uvs` (Float32Array), `indices` (Uint16Array), and `vertexCount` (number), or null if not found
|
|
288
|
-
* @category Assets
|
|
289
|
-
* @example
|
|
290
|
-
* // 1. preload the OBJ model and its texture
|
|
291
|
-
* me.loader.preload([
|
|
292
|
-
* { name: "cube", type: "obj", src: "models/cube.obj" },
|
|
293
|
-
* { name: "cube", type: "image", src: "models/cube_texture.png" },
|
|
294
|
-
* ], () => {
|
|
295
|
-
* // 2. create a Mesh using the preloaded model name
|
|
296
|
-
* const mesh = new me.Mesh(400, 300, {
|
|
297
|
-
* model: "cube", // references the preloaded OBJ
|
|
298
|
-
* texture: "cube", // references the preloaded image
|
|
299
|
-
* width: 200,
|
|
300
|
-
* height: 200,
|
|
301
|
-
* });
|
|
302
|
-
* me.game.world.addChild(mesh);
|
|
263
|
+
* The parsed glTF/GLB scene descriptors, re-exported from the parser that
|
|
264
|
+
* defines them so `loader.GLTFData` keeps naming a type.
|
|
303
265
|
*
|
|
304
|
-
*
|
|
305
|
-
*
|
|
306
|
-
*
|
|
307
|
-
*
|
|
308
|
-
* // data.indices — Uint16Array of triangle vertex indices
|
|
309
|
-
* // data.vertexCount — number of unique vertices
|
|
310
|
-
* // data.groups — usemtl material groups ({materialName, start, count} index ranges)
|
|
311
|
-
* });
|
|
266
|
+
* `getGLTF` is reached as `loader.getGLTF`, and the parser module is not part
|
|
267
|
+
* of the public entry point, so without these the return type of a public
|
|
268
|
+
* function was a type a consumer could not name.
|
|
269
|
+
* @typedef {import("./parsers/gltf.js").GLTFData} GLTFData
|
|
312
270
|
*/
|
|
313
|
-
export function getOBJ(elt: string): object;
|
|
314
271
|
/**
|
|
315
272
|
* One mesh primitive out of a parsed glTF/GLB scene.
|
|
316
|
-
*
|
|
317
|
-
* Spelled out rather than left as `object` so the geometry can be read from
|
|
318
|
-
* TypeScript — feeding `vertices`/`uvs`/`normals`/`indices` straight into a
|
|
319
|
-
* {@link Mesh} or {@link InstancedMesh} is the whole point of exposing it.
|
|
320
|
-
* @typedef {object} GLTFNode
|
|
321
|
-
* @property {number[]} world - accumulated world transform, 16 floats, column-major
|
|
322
|
-
* @property {Float32Array} vertices - positions, x,y,z triplets
|
|
323
|
-
* @property {Float32Array} normals - per-vertex normals
|
|
324
|
-
* @property {Float32Array} uvs - texture coordinates, u,v pairs
|
|
325
|
-
* @property {Uint16Array|Uint32Array} indices - triangle vertex indices
|
|
326
|
-
* @property {number} vertexCount - number of vertices
|
|
327
|
-
* @property {HTMLImageElement|null} image - decoded baseColor texture, or `null`
|
|
328
|
-
* @property {number[]} [baseColorFactor] - material baseColor factor, `[r, g, b, a]`
|
|
329
|
-
* @property {Uint32Array} [colors] - per-vertex colour, packed RGBA8
|
|
330
|
-
* @property {string} [textureRepeat] - wrap mode derived from the glTF sampler
|
|
331
|
-
* @property {string} [textureFilter] - magnification filter derived from the glTF sampler
|
|
332
|
-
* @property {number} [alphaCutoff] - cutout threshold from `alphaMode: "MASK"`
|
|
333
|
-
* @property {number[]} [emissive] - emissive factor, `[r, g, b]`
|
|
334
|
-
* @property {boolean} [unlit] - the material carried `KHR_materials_unlit`
|
|
335
|
-
* @property {boolean} [doubleSided] - the material is double-sided
|
|
336
|
-
* @property {string} [name] - the source node's name
|
|
337
|
-
*/
|
|
338
|
-
/**
|
|
339
|
-
* a parsed glTF/GLB scene descriptor, as returned by {@link loader.getGLTF}
|
|
340
|
-
* @typedef {object} GLTFData
|
|
341
|
-
* @property {GLTFNode[]} nodes - one entry per mesh primitive
|
|
342
|
-
* @property {Array<{world: number[], type?: string, perspective?: {yfov?: number, aspectRatio?: number, znear?: number, zfar?: number}, orthographic?: object}>} cameras - glTF cameras, each with its `world` transform + the glTF camera parameters (`perspective` for perspective cameras, `orthographic` otherwise)
|
|
343
|
-
* @property {object[]} lights - parsed `KHR_lights_punctual` lights (`type`, `color`, `intensity`, `range`, `innerConeAngle`/`outerConeAngle` for spots, world-space `direction`/`position`, `name`)
|
|
344
|
-
* @property {{min: number[], max: number[]}} bounds - world-space scene bounds in glTF units
|
|
345
|
-
* @property {object[]} graph - the full node graph (every node's TRS/matrix + children), for custom traversal
|
|
346
|
-
* @property {object[]} animations - parsed node animations (consumed by `GLTFModel` playback)
|
|
347
|
-
*/
|
|
348
|
-
/**
|
|
349
|
-
* return the parsed glTF/GLB scene descriptor for the given asset name.
|
|
350
|
-
*
|
|
351
|
-
* The descriptor is `{ nodes, cameras, lights, bounds, graph, animations }`:
|
|
352
|
-
* - `nodes` — one entry per mesh primitive, each carrying its accumulated
|
|
353
|
-
* `world` transform (16 floats, column-major), `vertices`, `normals`,
|
|
354
|
-
* `uvs`, `indices`, `vertexCount`, a decoded baseColor `image` (or `null`),
|
|
355
|
-
* and a `doubleSided` flag.
|
|
356
|
-
* - `cameras` — glTF cameras, each with its `world` transform + perspective
|
|
357
|
-
* parameters.
|
|
358
|
-
* - `lights` — parsed `KHR_lights_punctual` lights (`type`, `color`,
|
|
359
|
-
* `intensity`, `range`, spot cone angles, world-space
|
|
360
|
-
* `direction`/`position`, `name`); empty without the extension. The
|
|
361
|
-
* level director instantiates directional, point and spot lights
|
|
362
|
-
* automatically (see {@link level.load} options).
|
|
363
|
-
* - `bounds` — world-space `{ min, max }` (glTF units), handy for framing.
|
|
364
|
-
*
|
|
365
|
-
* Most code never needs this: a preloaded glTF/GLB auto-registers with the
|
|
366
|
-
* {@link level} director, so the whole scene loads into a container in one
|
|
367
|
-
* call via `me.level.load(name)` — exactly like a Tiled map. Reach for
|
|
368
|
-
* `getGLTF` only when you want to inspect the raw descriptor (e.g. to frame
|
|
369
|
-
* a `Camera3d` from the embedded camera).
|
|
370
|
-
* @param {string} elt - name of the glTF/GLB file (as specified in the preload list)
|
|
371
|
-
* @returns {GLTFData|null} the parsed scene descriptor, or `null` if not found
|
|
372
|
-
* @category Assets
|
|
373
|
-
* @example
|
|
374
|
-
* me.loader.preload(
|
|
375
|
-
* [{ name: "diorama", type: "glb", src: "scenes/diorama.glb" }],
|
|
376
|
-
* () => {
|
|
377
|
-
* // load the whole scene into the world (view under a Camera3d)
|
|
378
|
-
* me.level.load("diorama", { scale: 32 });
|
|
379
|
-
*
|
|
380
|
-
* // ...or inspect the raw descriptor for custom framing
|
|
381
|
-
* const scene = me.loader.getGLTF("diorama");
|
|
382
|
-
* const { min, max } = scene.bounds;
|
|
383
|
-
* },
|
|
384
|
-
* );
|
|
385
|
-
*/
|
|
386
|
-
export function getGLTF(elt: string): GLTFData | null;
|
|
387
|
-
/**
|
|
388
|
-
* Return the precompiled `ShaderEffect` for the given "shader" asset —
|
|
389
|
-
* compiled once during preloading, ready to assign to a renderable or
|
|
390
|
-
* camera `shader` property.
|
|
391
|
-
*
|
|
392
|
-
* **This returns a SHARED instance**: the *same* `ShaderEffect` object on
|
|
393
|
-
* every call, owned by the loader (its `shared` flag is `true`). That means:
|
|
394
|
-
* - it is safe to assign to any number of renderables — none of their
|
|
395
|
-
* cleanup paths will auto-destroy it, only {@link loader.unload} /
|
|
396
|
-
* {@link loader.unloadAll} free it (and its GL program);
|
|
397
|
-
* - all of them share ONE set of uniform values — `setUniform` on it
|
|
398
|
-
* affects every renderable using the shader.
|
|
399
|
-
*
|
|
400
|
-
* When a renderable needs its **own** uniform values, make a private,
|
|
401
|
-
* caller-owned copy with `ShaderEffect.clone()` — the clone's `shared` flag
|
|
402
|
-
* is reset to `false`, so it is auto-destroyed with the renderable it is
|
|
403
|
-
* assigned to, like any hand-constructed effect.
|
|
404
|
-
*
|
|
405
|
-
* A shader asset declared as a **complete program** — a
|
|
406
|
-
* `{vertex, fragment}` GLSL pair and/or a full `wgsl` module (see the
|
|
407
|
-
* example) — compiles into a raw {@link GLShader} instead, carrying one
|
|
408
|
-
* realization per GPU backend (`isWebGL` / `isWebGPU`): the type the
|
|
409
|
-
* hosted paths take directly (a `Mesh` custom shader,
|
|
410
|
-
* `renderer.customShader`, a custom batcher). Same shared-instance
|
|
411
|
-
* semantics, and `GLShader.clone()` likewise yields a caller-owned copy.
|
|
412
|
-
*
|
|
413
|
-
* Degradation is never fatal: a fragment-body asset without a body in the
|
|
414
|
-
* active renderer's language (or on Canvas) is an inert `ShaderEffect`
|
|
415
|
-
* stub, and a complete-program asset without a realization for the active
|
|
416
|
-
* backend is an inert `GLShader` — assigning either just keeps the
|
|
417
|
-
* built-in rendering. Note that shader assets require an initialized
|
|
418
|
-
* Application (`await app.init()`) — an inherent precondition of the
|
|
419
|
-
* preload flow, since the loading screen itself needs the renderer.
|
|
420
|
-
* @param {string} elt - name of the shader asset (as specified in the preload list)
|
|
421
|
-
* @returns {ShaderEffect|GLShader|null} the shared, precompiled shader, or `null` if not found
|
|
422
|
-
* @category Assets
|
|
423
|
-
* @example
|
|
424
|
-
* me.loader.preload([
|
|
425
|
-
* // from a file (or data: URI)
|
|
426
|
-
* { name: "waterRipple", type: "shader", src: "shaders/waterRipple.frag" },
|
|
427
|
-
* // or inline GLSL via the `data` field
|
|
428
|
-
* { name: "flash", type: "shader", data: `
|
|
429
|
-
* uniform float uIntensity;
|
|
430
|
-
* vec4 apply(vec4 color, vec2 uv) { return mix(color, vec4(1.0), uIntensity); }
|
|
431
|
-
* ` },
|
|
432
|
-
* // or a complete program — a {vertex, fragment} GLSL pair and/or a
|
|
433
|
-
* // full WGSL module → one GLShader carrying both realizations; the
|
|
434
|
-
* // active renderer hosts the one it speaks
|
|
435
|
-
* { name: "toonMesh", type: "shader", src: {
|
|
436
|
-
* vertex: "shaders/toon.vert",
|
|
437
|
-
* fragment: "shaders/toon.frag",
|
|
438
|
-
* wgsl: "shaders/toon.wgsl",
|
|
439
|
-
* } },
|
|
440
|
-
* ], () => {
|
|
441
|
-
* // one shared program — same uniform state for every user
|
|
442
|
-
* mySprite.addPostEffect(me.loader.getShader("waterRipple"));
|
|
443
|
-
* // private copy with its own uniforms (caller-owned, shared = false)
|
|
444
|
-
* boss.addPostEffect(me.loader.getShader("flash").clone());
|
|
445
|
-
* // a complete program hosts on a mesh, replacing the built-in shading
|
|
446
|
-
* myMesh.addPostEffect(me.loader.getShader("toonMesh"));
|
|
447
|
-
* });
|
|
448
|
-
*/
|
|
449
|
-
export function getShader(elt: string): ShaderEffect | GLShader | null;
|
|
450
|
-
/**
|
|
451
|
-
* return the specified MTL material data
|
|
452
|
-
* @param {string} elt - name of the MTL file (as specified in the preload list)
|
|
453
|
-
* @returns {object} map of material names to properties (`Kd`, `d`, `map_Kd`), or null if not found
|
|
454
|
-
* @category Assets
|
|
455
|
-
* @example
|
|
456
|
-
* // 1. preload OBJ + MTL + texture
|
|
457
|
-
* me.loader.preload([
|
|
458
|
-
* { name: "fox", type: "obj", src: "models/fox.obj" },
|
|
459
|
-
* { name: "fox", type: "mtl", src: "models/fox.mtl" },
|
|
460
|
-
* { name: "colormap", type: "image", src: "models/colormap.png" },
|
|
461
|
-
* ], () => {
|
|
462
|
-
* // 2. create a Mesh with material — texture, tint, opacity auto-applied
|
|
463
|
-
* const mesh = new me.Mesh(400, 300, {
|
|
464
|
-
* model: "fox",
|
|
465
|
-
* material: "fox",
|
|
466
|
-
* texture: "colormap",
|
|
467
|
-
* width: 200,
|
|
468
|
-
* height: 200,
|
|
469
|
-
* });
|
|
470
|
-
*
|
|
471
|
-
* // 3. or access the raw material data directly
|
|
472
|
-
* const materials = me.loader.getMTL("fox");
|
|
473
|
-
* // materials["colormap"].Kd — [r, g, b] diffuse color (0-1 range)
|
|
474
|
-
* // materials["colormap"].d — opacity (0-1)
|
|
475
|
-
* // materials["colormap"].Ke — [r, g, b] emissive color (glow, applied as Mesh.emissive)
|
|
476
|
-
* // materials["colormap"].map_Kd — resolved texture URL
|
|
477
|
-
* });
|
|
478
|
-
*/
|
|
479
|
-
export function getMTL(elt: string): object;
|
|
480
|
-
/**
|
|
481
|
-
* return the specified Video Object
|
|
482
|
-
* @param {string} elt - name of the video file
|
|
483
|
-
* @returns {HTMLVideoElement}
|
|
484
|
-
* @category Assets
|
|
485
|
-
*/
|
|
486
|
-
export function getVideo(elt: string): HTMLVideoElement;
|
|
487
|
-
/**
|
|
488
|
-
* return the specified FontFace Object
|
|
489
|
-
* @param {string} elt - name of the font file
|
|
490
|
-
* @returns {FontFace}
|
|
491
|
-
* @category Assets
|
|
492
|
-
*/
|
|
493
|
-
export function getFont(elt: string): FontFace;
|
|
494
|
-
/**
|
|
495
|
-
* additional import for TypeScript
|
|
496
|
-
* @import {CompressedImage} from "./parsers/compressed_textures/compressed_image.js";
|
|
497
|
-
* @import GLShader from "../video/webgl/glshader.js";
|
|
498
|
-
* @import ShaderEffect from "../video/effects/shadereffect.js";
|
|
273
|
+
* @typedef {import("./parsers/gltf.js").GLTFNode} GLTFNode
|
|
499
274
|
*/
|
|
500
275
|
/**
|
|
501
276
|
* a small class to manage loading of stuff and manage resources
|
|
@@ -614,121 +389,17 @@ export type Asset = {
|
|
|
614
389
|
loop?: boolean;
|
|
615
390
|
};
|
|
616
391
|
/**
|
|
617
|
-
*
|
|
392
|
+
* The parsed glTF/GLB scene descriptors, re-exported from the parser that
|
|
393
|
+
* defines them so `loader.GLTFData` keeps naming a type.
|
|
618
394
|
*
|
|
619
|
-
*
|
|
620
|
-
*
|
|
621
|
-
*
|
|
395
|
+
* `getGLTF` is reached as `loader.getGLTF`, and the parser module is not part
|
|
396
|
+
* of the public entry point, so without these the return type of a public
|
|
397
|
+
* function was a type a consumer could not name.
|
|
622
398
|
*/
|
|
623
|
-
export type
|
|
624
|
-
/**
|
|
625
|
-
* - accumulated world transform, 16 floats, column-major
|
|
626
|
-
*/
|
|
627
|
-
world: number[];
|
|
628
|
-
/**
|
|
629
|
-
* - positions, x,y,z triplets
|
|
630
|
-
*/
|
|
631
|
-
vertices: Float32Array;
|
|
632
|
-
/**
|
|
633
|
-
* - per-vertex normals
|
|
634
|
-
*/
|
|
635
|
-
normals: Float32Array;
|
|
636
|
-
/**
|
|
637
|
-
* - texture coordinates, u,v pairs
|
|
638
|
-
*/
|
|
639
|
-
uvs: Float32Array;
|
|
640
|
-
/**
|
|
641
|
-
* - triangle vertex indices
|
|
642
|
-
*/
|
|
643
|
-
indices: Uint16Array | Uint32Array;
|
|
644
|
-
/**
|
|
645
|
-
* - number of vertices
|
|
646
|
-
*/
|
|
647
|
-
vertexCount: number;
|
|
648
|
-
/**
|
|
649
|
-
* - decoded baseColor texture, or `null`
|
|
650
|
-
*/
|
|
651
|
-
image: HTMLImageElement | null;
|
|
652
|
-
/**
|
|
653
|
-
* - material baseColor factor, `[r, g, b, a]`
|
|
654
|
-
*/
|
|
655
|
-
baseColorFactor?: number[];
|
|
656
|
-
/**
|
|
657
|
-
* - per-vertex colour, packed RGBA8
|
|
658
|
-
*/
|
|
659
|
-
colors?: Uint32Array;
|
|
660
|
-
/**
|
|
661
|
-
* - wrap mode derived from the glTF sampler
|
|
662
|
-
*/
|
|
663
|
-
textureRepeat?: string;
|
|
664
|
-
/**
|
|
665
|
-
* - magnification filter derived from the glTF sampler
|
|
666
|
-
*/
|
|
667
|
-
textureFilter?: string;
|
|
668
|
-
/**
|
|
669
|
-
* - cutout threshold from `alphaMode: "MASK"`
|
|
670
|
-
*/
|
|
671
|
-
alphaCutoff?: number;
|
|
672
|
-
/**
|
|
673
|
-
* - emissive factor, `[r, g, b]`
|
|
674
|
-
*/
|
|
675
|
-
emissive?: number[];
|
|
676
|
-
/**
|
|
677
|
-
* - the material carried `KHR_materials_unlit`
|
|
678
|
-
*/
|
|
679
|
-
unlit?: boolean;
|
|
680
|
-
/**
|
|
681
|
-
* - the material is double-sided
|
|
682
|
-
*/
|
|
683
|
-
doubleSided?: boolean;
|
|
684
|
-
/**
|
|
685
|
-
* - the source node's name
|
|
686
|
-
*/
|
|
687
|
-
name?: string;
|
|
688
|
-
};
|
|
399
|
+
export type GLTFData = import("./parsers/gltf.js").GLTFData;
|
|
689
400
|
/**
|
|
690
|
-
* a parsed glTF/GLB scene
|
|
401
|
+
* One mesh primitive out of a parsed glTF/GLB scene.
|
|
691
402
|
*/
|
|
692
|
-
export type
|
|
693
|
-
|
|
694
|
-
* - one entry per mesh primitive
|
|
695
|
-
*/
|
|
696
|
-
nodes: GLTFNode[];
|
|
697
|
-
/**
|
|
698
|
-
* - glTF cameras, each with its `world` transform + the glTF camera parameters (`perspective` for perspective cameras, `orthographic` otherwise)
|
|
699
|
-
*/
|
|
700
|
-
cameras: Array<{
|
|
701
|
-
world: number[];
|
|
702
|
-
type?: string;
|
|
703
|
-
perspective?: {
|
|
704
|
-
yfov?: number;
|
|
705
|
-
aspectRatio?: number;
|
|
706
|
-
znear?: number;
|
|
707
|
-
zfar?: number;
|
|
708
|
-
};
|
|
709
|
-
orthographic?: object;
|
|
710
|
-
}>;
|
|
711
|
-
/**
|
|
712
|
-
* - parsed `KHR_lights_punctual` lights (`type`, `color`, `intensity`, `range`, `innerConeAngle`/`outerConeAngle` for spots, world-space `direction`/`position`, `name`)
|
|
713
|
-
*/
|
|
714
|
-
lights: object[];
|
|
715
|
-
/**
|
|
716
|
-
* - world-space scene bounds in glTF units
|
|
717
|
-
*/
|
|
718
|
-
bounds: {
|
|
719
|
-
min: number[];
|
|
720
|
-
max: number[];
|
|
721
|
-
};
|
|
722
|
-
/**
|
|
723
|
-
* - the full node graph (every node's TRS/matrix + children), for custom traversal
|
|
724
|
-
*/
|
|
725
|
-
graph: object[];
|
|
726
|
-
/**
|
|
727
|
-
* - parsed node animations (consumed by `GLTFModel` playback)
|
|
728
|
-
*/
|
|
729
|
-
animations: object[];
|
|
730
|
-
};
|
|
731
|
-
import type { CompressedImage } from "./parsers/compressed_textures/compressed_image.js";
|
|
732
|
-
import type ShaderEffect from "../video/effects/shadereffect.js";
|
|
733
|
-
import type GLShader from "../video/webgl/glshader.js";
|
|
403
|
+
export type GLTFNode = import("./parsers/gltf.js").GLTFNode;
|
|
404
|
+
export { getBinary, getFont, getGLTF, getImage, getJSON, getMTL, getOBJ, getShader, getTMX, getVideo } from "./cache.js";
|
|
734
405
|
//# sourceMappingURL=loader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/loader/loader.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/loader/loader.js"],"names":[],"mappings":"AAyHA;;;;GAIG;AACH,mDAEC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,oCAdG;IAAyB,WAAW;IACV,OAAO;IACP,eAAe;CACzC,QAqBF;AAED;;;;;;;;;;;;GAYG;AACH,iCATW,MAAM,QACN,MAAM,QA6BhB;AAwKD;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,gCAnBW,MAAM,4BAiChB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,gCAnDW,KAAK,EAAE,2CAEP,OAAO,GACL,OAAO,CAAC,IAAI,CAAC,CAyFzB;AAED;;;;;;;;;;;;;;IAcI;AACJ,4BAbW,MAAM,QAqChB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,4BAhCW,KAAK,0CAGH,MAAM,GAAC,OAAO,CAAC,IAAI,CAAC,CAiGhC;AAED;;;;;;GAMG;AACH,8BALW,KAAK,GACH,OAAO,CA8DnB;AAED;;;;GAIG;AACH,kCAYC;AAnvBD;;;;;GAKG;AAEH;;;;;;;;GAQG;AACH;;;GAGG;AACH;;;GAGG;AAGH,2BAAwB;AAExB;;GAEG;AACH;;EAA0B;AAE1B;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAdU,MAAM,CAcO;AAEvB;;;;;;;;;;;;;;;;;GAiBG;AACH,4BAdU,OAAO,CAckB;;;;;;;;;;;;;;;;;;;;kBA4PrB,CAAS,IAAM,EAAN,MAAM,KAAG,MAAM;;;;;;;kBAGxB,CAAS,IAAM,EAAN,MAAM,KAAG,OAAO;;;;;;;;;UAWzB,MAAM;;;;UACN,MAAM;;;;;;UACN,MAAM,GAAC,MAAM,EAAE;;;;WAGf,MAAM,GAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAC;;;;aACrC,OAAO;;;;eACP,OAAO;;;;WACP,OAAO;;;;;;;;;;uBA5UR,OAAO,mBAAmB,EAAE,QAAQ;;;;uBAIpC,OAAO,mBAAmB,EAAE,QAAQ"}
|
|
@@ -1,2 +1,117 @@
|
|
|
1
1
|
|
|
2
|
+
/**
|
|
3
|
+
* One mesh primitive out of a parsed glTF/GLB scene.
|
|
4
|
+
*
|
|
5
|
+
* Spelled out rather than left as `object` so the geometry can be read from
|
|
6
|
+
* TypeScript — feeding `vertices`/`uvs`/`normals`/`indices` straight into a
|
|
7
|
+
* {@link Mesh} or {@link InstancedMesh} is the whole point of exposing it.
|
|
8
|
+
*/
|
|
9
|
+
export type GLTFNode = {
|
|
10
|
+
/**
|
|
11
|
+
* - accumulated world transform, 16 floats, column-major
|
|
12
|
+
*/
|
|
13
|
+
world: number[];
|
|
14
|
+
/**
|
|
15
|
+
* - positions, x,y,z triplets
|
|
16
|
+
*/
|
|
17
|
+
vertices: Float32Array;
|
|
18
|
+
/**
|
|
19
|
+
* - per-vertex normals
|
|
20
|
+
*/
|
|
21
|
+
normals: Float32Array;
|
|
22
|
+
/**
|
|
23
|
+
* - texture coordinates, u,v pairs
|
|
24
|
+
*/
|
|
25
|
+
uvs: Float32Array;
|
|
26
|
+
/**
|
|
27
|
+
* - triangle vertex indices
|
|
28
|
+
*/
|
|
29
|
+
indices: Uint16Array | Uint32Array;
|
|
30
|
+
/**
|
|
31
|
+
* - number of vertices
|
|
32
|
+
*/
|
|
33
|
+
vertexCount: number;
|
|
34
|
+
/**
|
|
35
|
+
* - decoded baseColor texture, or `null`
|
|
36
|
+
*/
|
|
37
|
+
image: HTMLImageElement | null;
|
|
38
|
+
/**
|
|
39
|
+
* - material baseColor factor, `[r, g, b, a]`
|
|
40
|
+
*/
|
|
41
|
+
baseColorFactor?: number[];
|
|
42
|
+
/**
|
|
43
|
+
* - per-vertex colour, packed RGBA8
|
|
44
|
+
*/
|
|
45
|
+
colors?: Uint32Array;
|
|
46
|
+
/**
|
|
47
|
+
* - wrap mode derived from the glTF sampler
|
|
48
|
+
*/
|
|
49
|
+
textureRepeat?: string;
|
|
50
|
+
/**
|
|
51
|
+
* - magnification filter derived from the glTF sampler
|
|
52
|
+
*/
|
|
53
|
+
textureFilter?: string;
|
|
54
|
+
/**
|
|
55
|
+
* - cutout threshold from `alphaMode: "MASK"`
|
|
56
|
+
*/
|
|
57
|
+
alphaCutoff?: number;
|
|
58
|
+
/**
|
|
59
|
+
* - emissive factor, `[r, g, b]`
|
|
60
|
+
*/
|
|
61
|
+
emissive?: number[];
|
|
62
|
+
/**
|
|
63
|
+
* - the material carried `KHR_materials_unlit`
|
|
64
|
+
*/
|
|
65
|
+
unlit?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* - the material is double-sided
|
|
68
|
+
*/
|
|
69
|
+
doubleSided?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* - the source node's name
|
|
72
|
+
*/
|
|
73
|
+
name?: string;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* a parsed glTF/GLB scene descriptor, as returned by {@link loader.getGLTF}
|
|
77
|
+
*/
|
|
78
|
+
export type GLTFData = {
|
|
79
|
+
/**
|
|
80
|
+
* - one entry per mesh primitive
|
|
81
|
+
*/
|
|
82
|
+
nodes: GLTFNode[];
|
|
83
|
+
/**
|
|
84
|
+
* - glTF cameras, each with its `world` transform + the glTF camera parameters (`perspective` for perspective cameras, `orthographic` otherwise)
|
|
85
|
+
*/
|
|
86
|
+
cameras: Array<{
|
|
87
|
+
world: number[];
|
|
88
|
+
type?: string;
|
|
89
|
+
perspective?: {
|
|
90
|
+
yfov?: number;
|
|
91
|
+
aspectRatio?: number;
|
|
92
|
+
znear?: number;
|
|
93
|
+
zfar?: number;
|
|
94
|
+
};
|
|
95
|
+
orthographic?: object;
|
|
96
|
+
}>;
|
|
97
|
+
/**
|
|
98
|
+
* - parsed `KHR_lights_punctual` lights (`type`, `color`, `intensity`, `range`, `innerConeAngle`/`outerConeAngle` for spots, world-space `direction`/`position`, `name`)
|
|
99
|
+
*/
|
|
100
|
+
lights: object[];
|
|
101
|
+
/**
|
|
102
|
+
* - world-space scene bounds in glTF units
|
|
103
|
+
*/
|
|
104
|
+
bounds: {
|
|
105
|
+
min: number[];
|
|
106
|
+
max: number[];
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* - the full node graph (every node's TRS/matrix + children), for custom traversal
|
|
110
|
+
*/
|
|
111
|
+
graph: object[];
|
|
112
|
+
/**
|
|
113
|
+
* - parsed node animations (consumed by `GLTFModel` playback)
|
|
114
|
+
*/
|
|
115
|
+
animations: object[];
|
|
116
|
+
};
|
|
2
117
|
//# sourceMappingURL=gltf.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gltf.d.ts","sourceRoot":"","sources":["../../../src/loader/parsers/gltf.js"],"names":[],"mappings":"AA2CA;;;;;;GAMG;AACH,sCALW,WAAW,GACT;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,UAAU,GAAG,IAAI,CAAA;CAAE,CAmCpD;AAsED;;;;;GAKG;AACH,+EAgCC;AA8KD;;;;;;;;;;;GAWG;AACH,oCARW,MAAM,EAAE,eACR,MAAM,EAAE,YACR,MAAM,EAAE,SACR,MAAM,EAAE,GACN,MAAM,EAAE,CAqCpB;AAED;;;;;;;;GAQG;AACH,wCAPW,MAAM,EAAE,YACR,MAAM,EAAE,SACR,MAAM,EAAE,GACN,MAAM,EAAE,CAMpB;AAED;;;;GAIG;AACH,gDASC;AAsED;;;;;;GAMG;AACH,kEAWC;AAED;;;;GAIG;AACH,oDAEC;AAmID;;;;;;;;;;;GAWG;AACH,uCAVW,WAAW,YACX,MAAM,aAGN,MAAM,GAEJ,OAAO,CAAC,MAAM,CAAC,CAsa3B;AAED;;;;;;;;;GASG;AACH,kCARW,MAAM,CAAC,KAAK,oDAGZ,MAAM,GACJ,MAAM,CA8BlB"}
|
|
1
|
+
{"version":3,"file":"gltf.d.ts","sourceRoot":"","sources":["../../../src/loader/parsers/gltf.js"],"names":[],"mappings":"AA2CA;;;;;;GAMG;AACH,sCALW,WAAW,GACT;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,UAAU,GAAG,IAAI,CAAA;CAAE,CAmCpD;AAsED;;;;;GAKG;AACH,+EAgCC;AA8KD;;;;;;;;;;;GAWG;AACH,oCARW,MAAM,EAAE,eACR,MAAM,EAAE,YACR,MAAM,EAAE,SACR,MAAM,EAAE,GACN,MAAM,EAAE,CAqCpB;AAED;;;;;;;;GAQG;AACH,wCAPW,MAAM,EAAE,YACR,MAAM,EAAE,SACR,MAAM,EAAE,GACN,MAAM,EAAE,CAMpB;AAED;;;;GAIG;AACH,gDASC;AAsED;;;;;;GAMG;AACH,kEAWC;AAED;;;;GAIG;AACH,oDAEC;AAmID;;;;;;;;;;;GAWG;AACH,uCAVW,WAAW,YACX,MAAM,aAGN,MAAM,GAEJ,OAAO,CAAC,MAAM,CAAC,CAsa3B;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH;;;;;;;;;GASG;AAEH;;;;;;;;;GASG;AACH,kCARW,MAAM,CAAC,KAAK,oDAGZ,MAAM,GACJ,MAAM,CA8BlB;;;;;;;;;;;;WAjEa,MAAM,EAAE;;;;cACR,YAAY;;;;aACZ,YAAY;;;;SACZ,YAAY;;;;aACZ,WAAW,GAAC,WAAW;;;;iBACvB,MAAM;;;;WACN,gBAAgB,GAAC,IAAI;;;;sBACrB,MAAM,EAAE;;;;aACR,WAAW;;;;oBACX,MAAM;;;;oBACN,MAAM;;;;kBACN,MAAM;;;;eACN,MAAM,EAAE;;;;YACR,OAAO;;;;kBACP,OAAO;;;;WACP,MAAM;;;;;;;;;WAMN,QAAQ,EAAE;;;;aACV,KAAK,CAAC;QAAC,KAAK,EAAE,MAAM,EAAE,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE;YAAC,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,WAAW,CAAC,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAA;SAAC,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAC,CAAC;;;;YAClJ,MAAM,EAAE;;;;YACR;QAAC,GAAG,EAAE,MAAM,EAAE,CAAC;QAAC,GAAG,EAAE,MAAM,EAAE,CAAA;KAAC;;;;WAC9B,MAAM,EAAE;;;;gBACR,MAAM,EAAE"}
|
package/build/math/color.d.ts
CHANGED
|
@@ -250,5 +250,5 @@ export declare class Color {
|
|
|
250
250
|
*/
|
|
251
251
|
toRGBA(alpha?: number): `rgba(${number},${number},${number},${number})`;
|
|
252
252
|
}
|
|
253
|
-
export declare const colorPool: import("../
|
|
253
|
+
export declare const colorPool: import("../index.ts").Pool<Color, [r?: string | number | Color | undefined, g?: number | undefined, b?: number | undefined, alpha?: number | undefined]>;
|
|
254
254
|
//# sourceMappingURL=color.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../src/math/color.ts"],"names":[],"mappings":"AAuOA,qBAAa,KAAK;IACjB,OAAO,CAAC,cAAc,CAAe;IAErC;;;;;;OAMG;gBACS,CAAC,GAAE,KAAK,GAAG,MAAM,GAAG,MAAU,EAAE,CAAC,SAAI,EAAE,CAAC,SAAI,EAAE,KAAK,SAAM;IAcrE;;;OAGG;IACH,IAAI,CAAC,WAEJ;IAED;;;OAGG;IACH,IAAI,CAAC,CAAC,KAAK,QAAA,EAEV;IAED;;;OAGG;IACH,IAAI,CAAC,WAEJ;IAED;;;OAGG;IACH,IAAI,CAAC,CAAC,KAAK,QAAA,EAEV;IAED;;;OAGG;IACH,IAAI,CAAC,WAEJ;IAED;;;OAGG;IACH,IAAI,CAAC,CAAC,KAAK,QAAA,EAEV;IAED;;;OAGG;IACH,IAAI,KAAK,WAER;IAED;;;OAGG;IACH,IAAI,KAAK,CAAC,KAAK,QAAA,EAEd;IAED;;;;;;;OAOG;IACH,QAAQ,CAAC,CAAC,GAAE,MAAU,EAAE,CAAC,GAAE,MAAU,EAAE,CAAC,GAAE,MAAU,EAAE,KAAK,SAAM;IASjE;;;;;;;OAOG;IACH,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,SAAM;IASrD;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,SAAM;IAStD;;;;;;OAMG;IACH,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM;IA8CtC;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,MAA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G;IACH,IAAI,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM;IAS1B;;;;OAIG;IACH,GAAG,CAAC,KAAK,EAAE,KAAK;IAsBhB;;;;OAIG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM;IASpB;;;;;OAKG;IACH,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM;IAYhC;;;;OAIG;IACH,OAAO,CAAC,KAAK,EAAE,MAAM;IAqBrB;;;;;OAKG;IACH,MAAM,CAAC,GAAG,SAAI,EAAE,GAAG,SAAM;IAgBzB;;;;OAIG;IACH,MAAM,CAAC,KAAK,EAAE,KAAK;IASnB;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM;IAQzB;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM;IAazB;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,EAAE,IAAI,MAAM,EAAE,EAAE,IAAI,UAAQ;IAmD7C;;;;OAIG;IACH,QAAQ,CAAC,KAAK,SAAM;IAgBpB;;;OAGG;IACH,OAAO;IAIP;;;OAGG;IACH,KAAK;IAKL;;;;OAIG;IACH,MAAM,CAAC,KAAK,SAAyB;IAKrC;;;OAGG;IACH,KAAK;IAIL;;;;OAIG;IACH,MAAM,CAAC,KAAK,SAAa;CAGzB;AAED,eAAO,MAAM,SAAS,0JAwBpB,CAAC"}
|
package/build/math/matrix2d.d.ts
CHANGED
|
@@ -159,6 +159,6 @@ export declare class Matrix2d {
|
|
|
159
159
|
*/
|
|
160
160
|
toString(): string;
|
|
161
161
|
}
|
|
162
|
-
export declare const matrix2dPool: import("../
|
|
162
|
+
export declare const matrix2dPool: import("../index.js").Pool<Matrix2d, ConstructorArg>;
|
|
163
163
|
export {};
|
|
164
164
|
//# sourceMappingURL=matrix2d.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matrix2d.d.ts","sourceRoot":"","sources":["../../src/math/matrix2d.ts"],"names":[],"mapp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C,EAAE,QAAQ;IAexB;;;;;OAKG;IACH,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,SAAI;IActB;;;;OAIG;IACH,MAAM,CAAC,CAAC,EAAE,QAAQ;IAIlB;;;;OAIG;IACH,MAAM,CAAC,CAAC,EAAE,MAAM;IAIhB;;;;OAIG;IACH,MAAM,CAAC,CAAC,EAAE,MAAM;IAIhB;;;;OAIG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM;IAsBpB;;;;;OAKG;IACH,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,QAAQ;IACzC,SAAS,CAAC,MAAM,EAAE,QAAQ,GAAG,QAAQ;IAmBrC;;;OAGG;IACH,UAAU;IAiBV;;;;OAIG;IACH,MAAM,CAAC,CAAC,EAAE,QAAQ;IAclB;;;OAGG;IACH,KAAK;IAIL;;;OAGG;IACH,OAAO;IAIP;;;OAGG;IACH,QAAQ;CAOR;AAED,eAAO,MAAM,YAAY,sDAWxB,CAAC"}
|
package/build/math/matrix3d.d.ts
CHANGED
|
@@ -216,6 +216,6 @@ export declare class Matrix3d {
|
|
|
216
216
|
*/
|
|
217
217
|
toString(): string;
|
|
218
218
|
}
|
|
219
|
-
export declare const matrix3dPool: import("../
|
|
219
|
+
export declare const matrix3dPool: import("../index.ts").Pool<Matrix3d, ConstructorArg>;
|
|
220
220
|
export {};
|
|
221
221
|
//# sourceMappingURL=matrix3d.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matrix3d.d.ts","sourceRoot":"","sources":["../../src/math/matrix3d.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAG/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,KAAK,cAAc,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,CAAC,CAAC,EAAE,QAAQ;IAIlB;;;;OAIG;IACH,MAAM,CAAC,CAAC,EAAE,MAAM;IAIhB;;;;OAIG;IACH,MAAM,CAAC,CAAC,EAAE,MAAM;IAIhB;;;;;OAKG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,QAAQ;IA+DlC;;;;;;OAMG;IACH,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,GAAG,QAAQ;IACrD,SAAS,CAAC,MAAM,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ;IA6BhD;;;OAGG;IACH,UAAU;IAwBV;;;;OAIG;IACH,MAAM,CAAC,CAAC,EAAE,QAAQ;IAwBlB;;;;OAIG;IACH,UAAU,CAAC,GAAG,CAAC,EAAE,QAAQ;IAOzB;;;OAGG;IACH,KAAK;IAIL;;;OAGG;IACH,OAAO;IAIP;;;OAGG;IACH,QAAQ;CASR;AAED,eAAO,MAAM,YAAY,sDAWxB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Vector2d } from "./vector2d.ts";
|
|
2
2
|
/**
|
|
3
|
-
* Represents a point in a
|
|
3
|
+
* Represents a point in a 2D coordinate vector that can be observed for changes.
|
|
4
4
|
* @category Math
|
|
5
5
|
*/
|
|
6
6
|
export declare class ObservableVector2d {
|
|
@@ -230,6 +230,18 @@ export declare class ObservableVector2d {
|
|
|
230
230
|
* @returns Reference to this object for method chaining
|
|
231
231
|
*/
|
|
232
232
|
lerp(v: Vector2d | ObservableVector2d, alpha: number): this;
|
|
233
|
+
/**
|
|
234
|
+
* Spherically interpolate between this vector and the given one.
|
|
235
|
+
*
|
|
236
|
+
* Turns along the arc between the two DIRECTIONS at a constant angular
|
|
237
|
+
* rate rather than straight across the chord, taking the shorter way
|
|
238
|
+
* round. See {@link Vector2d.slerp} for what that is good for and how
|
|
239
|
+
* the opposite-directions case resolves.
|
|
240
|
+
* @param v - the vector to interpolate toward
|
|
241
|
+
* @param alpha - 0 leaves this vector alone, 1 reaches `v`
|
|
242
|
+
* @returns Reference to this object for method chaining
|
|
243
|
+
*/
|
|
244
|
+
slerp(v: Vector2d | ObservableVector2d, alpha: number): this;
|
|
233
245
|
/**
|
|
234
246
|
* Frame-rate independent exponential damping toward `target`.
|
|
235
247
|
* Per-component wrapper around {@link damp} that triggers the
|
|
@@ -292,5 +304,5 @@ export declare class ObservableVector2d {
|
|
|
292
304
|
*/
|
|
293
305
|
revoke(): void;
|
|
294
306
|
}
|
|
295
|
-
export declare const observableVector2dPool: import("../
|
|
307
|
+
export declare const observableVector2dPool: import("../index.ts").Pool<ObservableVector2d, [x?: number | undefined, y?: number | undefined, callback?: () => void]>;
|
|
296
308
|
//# sourceMappingURL=observableVector2d.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observableVector2d.d.ts","sourceRoot":"","sources":["../../src/math/observableVector2d.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"observableVector2d.d.ts","sourceRoot":"","sources":["../../src/math/observableVector2d.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAsBzC;;;GAGG;AACH,qBAAa,kBAAkB;IAiB9B,OAAO,CAAC,eAAe,CAAiB;IAExC;;;;;OAKG;gBACS,CAAC,GAAE,MAAU,EAAE,CAAC,GAAE,MAAU,EAAE,QAAQ,CAAC,EAAE,MAAM,IAAI;IAsB/D;;;;;OAKG;IACH,GAAG,CAAC,CAAC,SAAI,EAAE,CAAC,SAAI;IAShB;;;;;OAKG;IACH,QAAQ,CAAC,CAAC,SAAI,EAAE,CAAC,SAAI;IAQrB;;OAEG;IACH,IAAI,CAAC,IAQQ,MAAM,CANlB;IAED;;;OAGG;IACH,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,EAElB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