melonjs 20.7.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 +7 -3
- package/build/application/application.d.ts +66 -8
- package/build/application/application.d.ts.map +1 -1
- package/build/application/defaultApplicationSettings.d.ts +6 -0
- package/build/application/defaultApplicationSettings.d.ts.map +1 -1
- package/build/application/header.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 +144 -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 -1
- package/build/audio/backend/engine.d.ts.map +1 -1
- package/build/audio/backend/sound.d.ts +0 -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/camera3d.d.ts +95 -8
- package/build/camera/camera3d.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 +25 -7
- package/build/geometries/box3d.d.ts.map +1 -1
- package/build/geometries/ellipse.d.ts +15 -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 +15 -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 +36 -7
- package/build/geometries/sphere.d.ts.map +1 -1
- package/build/index.d.ts +16 -3
- package/build/index.d.ts.map +1 -1
- package/build/index.js +38172 -33633
- 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/input/pointerevent.d.ts +8 -0
- package/build/input/pointerevent.d.ts.map +1 -1
- package/build/level/gltf/GLTFModel.d.ts +20 -33
- package/build/level/gltf/GLTFModel.d.ts.map +1 -1
- package/build/level/gltf/GLTFScene.d.ts +40 -1
- package/build/level/gltf/GLTFScene.d.ts.map +1 -1
- package/build/level/level.d.ts +35 -0
- package/build/level/level.d.ts.map +1 -1
- package/build/level/tiled/TMXLayer.d.ts +5 -2
- package/build/level/tiled/TMXLayer.d.ts.map +1 -1
- package/build/level/tiled/TMXObject.d.ts +0 -1
- package/build/level/tiled/TMXObjectFactory.d.ts +3 -2
- package/build/level/tiled/TMXObjectFactory.d.ts.map +1 -1
- package/build/level/tiled/TMXTile.d.ts +2 -1
- package/build/level/tiled/TMXTile.d.ts.map +1 -1
- package/build/level/tiled/TMXTileMap.d.ts +7 -4
- package/build/level/tiled/TMXTileMap.d.ts.map +1 -1
- package/build/level/tiled/TMXTileset.d.ts +1 -1
- package/build/level/tiled/TMXTileset.d.ts.map +1 -1
- package/build/level/tiled/TMXTilesetGroup.d.ts +5 -0
- package/build/level/tiled/TMXTilesetGroup.d.ts.map +1 -1
- package/build/level/tiled/factories/shape.d.ts +0 -1
- package/build/level/tiled/renderer/TMXHexagonalRenderer.d.ts +6 -5
- package/build/level/tiled/renderer/TMXHexagonalRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXIsometricRenderer.d.ts +5 -0
- package/build/level/tiled/renderer/TMXIsometricRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXObliqueRenderer.d.ts +5 -7
- package/build/level/tiled/renderer/TMXObliqueRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXOrthogonalRenderer.d.ts +5 -0
- package/build/level/tiled/renderer/TMXOrthogonalRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXRenderer.d.ts +19 -4
- package/build/level/tiled/renderer/TMXRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/autodetect.d.ts +0 -4
- package/build/level/tiled/renderer/autodetect.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 -340
- package/build/loader/loader.d.ts.map +1 -1
- package/build/loader/loadingscreen.d.ts +1 -2
- package/build/loader/loadingscreen.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/loader/parsers/shader.d.ts +0 -2
- package/build/math/color.d.ts +28 -5
- 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 +29 -2
- package/build/particles/particle.d.ts.map +1 -1
- package/build/particles/settings.d.ts +104 -0
- package/build/particles/settings.d.ts.map +1 -1
- package/build/physics/adapter.d.ts +9 -1
- package/build/physics/adapter.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 +17 -2
- package/build/physics/builtin/body.d.ts.map +1 -1
- package/build/physics/builtin/builtin-adapter.d.ts.map +1 -1
- package/build/physics/builtin/detector.d.ts +0 -1
- package/build/physics/builtin/detector.d.ts.map +1 -1
- package/build/physics/builtin/sat.d.ts +0 -7
- package/build/physics/builtin/sat3d.d.ts +46 -0
- package/build/physics/builtin/sat3d.d.ts.map +1 -1
- package/build/physics/response.d.ts +45 -62
- package/build/physics/response.d.ts.map +1 -1
- package/build/pool.d.ts +4 -0
- package/build/pool.d.ts.map +1 -1
- package/build/renderable/collectable.d.ts +6 -1
- package/build/renderable/collectable.d.ts.map +1 -1
- package/build/renderable/colorlayer.d.ts +17 -4
- package/build/renderable/colorlayer.d.ts.map +1 -1
- package/build/renderable/container.d.ts +23 -17
- package/build/renderable/container.d.ts.map +1 -1
- package/build/renderable/entity/entity.d.ts +12 -16
- package/build/renderable/entity/entity.d.ts.map +1 -1
- package/build/renderable/frameAnimation.d.ts +1 -1
- package/build/renderable/groundshadow.d.ts +1 -0
- package/build/renderable/groundshadow.d.ts.map +1 -1
- package/build/renderable/imagelayer.d.ts +12 -5
- package/build/renderable/imagelayer.d.ts.map +1 -1
- package/build/renderable/instanced_mesh.d.ts +56 -7
- package/build/renderable/instanced_mesh.d.ts.map +1 -1
- package/build/renderable/mesh.d.ts +369 -4
- package/build/renderable/mesh.d.ts.map +1 -1
- package/build/renderable/nineslicesprite.d.ts +3 -13
- package/build/renderable/nineslicesprite.d.ts.map +1 -1
- package/build/renderable/renderable.d.ts +129 -28
- package/build/renderable/renderable.d.ts.map +1 -1
- package/build/renderable/sprite.d.ts +7 -20
- package/build/renderable/sprite.d.ts.map +1 -1
- package/build/renderable/sprite3d.d.ts +31 -16
- package/build/renderable/sprite3d.d.ts.map +1 -1
- package/build/renderable/text/bitmaptext.d.ts +76 -5
- package/build/renderable/text/bitmaptext.d.ts.map +1 -1
- package/build/renderable/text/bitmaptextdata.d.ts +1 -5
- 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 +22 -3
- package/build/renderable/text/text.d.ts.map +1 -1
- package/build/renderable/text/textmetrics.d.ts +2 -0
- package/build/renderable/text/textmetrics.d.ts.map +1 -1
- package/build/renderable/trail.d.ts +0 -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 +28 -5
- 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 +192 -0
- package/build/renderable/ui/progressbar.d.ts.map +1 -0
- package/build/renderable/ui/uibaseelement.d.ts +48 -3
- package/build/renderable/ui/uibaseelement.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/uispriteelement.d.ts +19 -3
- package/build/renderable/ui/uispriteelement.d.ts.map +1 -1
- 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 +24 -4
- package/build/system/legacy_pool.d.ts.map +1 -1
- package/build/system/pool.d.ts +15 -8
- package/build/system/pool.d.ts.map +1 -1
- package/build/tweens/tween.d.ts +50 -3
- package/build/tweens/tween.d.ts.map +1 -1
- package/build/video/canvas/canvas_renderer.d.ts +34 -23
- package/build/video/canvas/canvas_renderer.d.ts.map +1 -1
- package/build/video/effects/blendEffect.d.ts +0 -1
- package/build/video/effects/bloom.d.ts +72 -0
- package/build/video/effects/bloom.d.ts.map +1 -0
- package/build/video/effects/blur.d.ts +3 -2
- package/build/video/effects/blur.d.ts.map +1 -1
- package/build/video/effects/chromaticAberration.d.ts +3 -2
- package/build/video/effects/chromaticAberration.d.ts.map +1 -1
- package/build/video/effects/colorMatrix.d.ts +3 -2
- package/build/video/effects/colorMatrix.d.ts.map +1 -1
- package/build/video/effects/desaturate.d.ts +10 -2
- package/build/video/effects/desaturate.d.ts.map +1 -1
- package/build/video/effects/dissolve.d.ts +3 -2
- package/build/video/effects/dissolve.d.ts.map +1 -1
- package/build/video/effects/dropShadow.d.ts +3 -2
- package/build/video/effects/dropShadow.d.ts.map +1 -1
- package/build/video/effects/flash.d.ts +3 -2
- package/build/video/effects/flash.d.ts.map +1 -1
- package/build/video/effects/glow.d.ts +3 -2
- package/build/video/effects/glow.d.ts.map +1 -1
- package/build/video/effects/hologram.d.ts +3 -2
- package/build/video/effects/hologram.d.ts.map +1 -1
- package/build/video/effects/invert.d.ts +10 -2
- package/build/video/effects/invert.d.ts.map +1 -1
- package/build/video/effects/outline.d.ts +3 -2
- package/build/video/effects/outline.d.ts.map +1 -1
- package/build/video/effects/pixelate.d.ts +3 -2
- package/build/video/effects/pixelate.d.ts.map +1 -1
- package/build/video/effects/radialGradient.d.ts +8 -3
- package/build/video/effects/radialGradient.d.ts.map +1 -1
- package/build/video/effects/scanline.d.ts +3 -2
- package/build/video/effects/scanline.d.ts.map +1 -1
- package/build/video/effects/sepia.d.ts +10 -2
- package/build/video/effects/sepia.d.ts.map +1 -1
- package/build/video/effects/shadereffect.d.ts +10 -4
- package/build/video/effects/shadereffect.d.ts.map +1 -1
- package/build/video/effects/shine.d.ts +3 -2
- package/build/video/effects/shine.d.ts.map +1 -1
- package/build/video/effects/tintPulse.d.ts +3 -7
- package/build/video/effects/tintPulse.d.ts.map +1 -1
- package/build/video/effects/tonemap.d.ts +121 -0
- package/build/video/effects/tonemap.d.ts.map +1 -0
- package/build/video/effects/vignette.d.ts +3 -2
- package/build/video/effects/vignette.d.ts.map +1 -1
- package/build/video/effects/wave.d.ts +3 -7
- 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/gpu/vertexformat.d.ts +26 -0
- package/build/video/gpu/vertexformat.d.ts.map +1 -1
- package/build/video/gradient.d.ts +1 -1
- package/build/video/gradient.d.ts.map +1 -1
- package/build/video/renderer.d.ts +111 -7
- package/build/video/renderer.d.ts.map +1 -1
- package/build/video/renderstate.d.ts +2 -0
- package/build/video/renderstate.d.ts.map +1 -1
- package/build/video/rendertarget/canvasrendertarget.d.ts +3 -4
- package/build/video/rendertarget/canvasrendertarget.d.ts.map +1 -1
- package/build/video/rendertarget/render_target_pool.d.ts +0 -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 +0 -1
- package/build/video/rendertarget/webglrendertarget.d.ts.map +1 -1
- package/build/video/rendertarget/webgpurendertarget.d.ts +24 -14
- package/build/video/rendertarget/webgpurendertarget.d.ts.map +1 -1
- package/build/video/texture/atlas.d.ts +2 -1
- package/build/video/texture/atlas.d.ts.map +1 -1
- package/build/video/texture/cache.d.ts +1 -3
- package/build/video/texture/frametexture.d.ts +0 -1
- package/build/video/texture/frametexture.d.ts.map +1 -1
- package/build/video/texture/noise_texture2d.d.ts +1 -0
- package/build/video/texture/noise_texture2d.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/utils/autodetect.d.ts +0 -2
- package/build/video/webgl/batchers/batcher.d.ts +0 -9
- package/build/video/webgl/batchers/batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/lit_quad_batcher.d.ts +2 -0
- package/build/video/webgl/batchers/lit_quad_batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/material_batcher.d.ts +4 -2
- package/build/video/webgl/batchers/material_batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/mesh_batcher.d.ts +0 -3
- package/build/video/webgl/batchers/mesh_batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/quad_batcher.d.ts +4 -0
- package/build/video/webgl/batchers/quad_batcher.d.ts.map +1 -1
- package/build/video/webgl/buffer/index.d.ts +0 -1
- package/build/video/webgl/buffer/retained_geometry.d.ts +0 -1
- package/build/video/webgl/glshader.d.ts +5 -3
- package/build/video/webgl/glshader.d.ts.map +1 -1
- package/build/video/webgl/renderers/tmxlayer/orthogonal.d.ts +0 -4
- package/build/video/webgl/texture/store.d.ts +0 -1
- package/build/video/webgl/webgl_renderer.d.ts +63 -24
- package/build/video/webgl/webgl_renderer.d.ts.map +1 -1
- package/build/video/webgpu/batchers/mesh_batcher.d.ts +0 -3
- package/build/video/webgpu/batchers/mesh_batcher.d.ts.map +1 -1
- package/build/video/webgpu/batchers/quad_batcher.d.ts +0 -2
- package/build/video/webgpu/batchers/quad_batcher.d.ts.map +1 -1
- package/build/video/webgpu/batchers/webgpu_batcher.d.ts +0 -2
- package/build/video/webgpu/batchers/webgpu_batcher.d.ts.map +1 -1
- package/build/video/webgpu/pipeline/cache.d.ts.map +1 -1
- package/build/video/webgpu/renderers/tmxlayer/orthogonal.d.ts +0 -2
- package/build/video/webgpu/texture/frametexture.d.ts +0 -2
- package/build/video/webgpu/texture/frametexture.d.ts.map +1 -1
- package/build/video/webgpu/texture/store.d.ts +0 -1
- package/build/video/webgpu/webgpu_renderer.d.ts +7 -75
- package/build/video/webgpu/webgpu_renderer.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 +454 -22
- package/skills/melonjs-3d-assets/SKILL.md +111 -10
- package/skills/melonjs-audio/SKILL.md +229 -8
- package/skills/melonjs-camera-and-drawing/SKILL.md +127 -1
- package/skills/melonjs-display-and-scaling/SKILL.md +273 -0
- package/skills/melonjs-effects-and-shaders/SKILL.md +341 -29
- package/skills/melonjs-events/SKILL.md +8 -6
- package/skills/melonjs-input/SKILL.md +147 -7
- package/skills/melonjs-math/SKILL.md +313 -0
- package/skills/melonjs-particles-and-trails/SKILL.md +189 -13
- package/skills/melonjs-performance/SKILL.md +131 -23
- package/skills/melonjs-physics/SKILL.md +103 -28
- package/skills/melonjs-renderables/SKILL.md +8 -2
- package/skills/melonjs-scenes-and-state/SKILL.md +134 -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 +546 -7
- package/build/level/gltf/srgb.d.ts +0 -20
- package/build/level/gltf/srgb.d.ts.map +0 -1
package/build/input/gamepad.d.ts
CHANGED
|
@@ -71,16 +71,27 @@ export declare const GAMEPAD: {
|
|
|
71
71
|
* @param button - Button/Axis definition
|
|
72
72
|
* @param button.type - "buttons" or "axes"
|
|
73
73
|
* @param button.code - button or axis code id
|
|
74
|
-
* @param button.threshold -
|
|
74
|
+
* @param button.threshold - how far past the deadzone the axis must travel to
|
|
75
|
+
* trigger the keycode. It is ADDED to {@link input.setGamepadDeadzone}, it does
|
|
76
|
+
* not replace it, so with the default deadzone of 0.1 a threshold of 0.5 fires
|
|
77
|
+
* at 0.6 of full deflection. Its SIGN picks the half of the axis to watch:
|
|
78
|
+
* negative for left/up, positive for right/down, and the two halves are bound
|
|
79
|
+
* separately. Ignored for `"buttons"`, which take the browser's own pressed
|
|
80
|
+
* state; the deadzone reaches a button only where a non-standard mapping
|
|
81
|
+
* routes an axis onto one through its `analog` array.
|
|
75
82
|
* @param keyCode - (See {@link input.KEY})
|
|
83
|
+
* @throws {Error} if `keyCode` has no action bound to it yet — call
|
|
84
|
+
* {@link input.bindKey} first.
|
|
76
85
|
* @example
|
|
77
86
|
* // enable the keyboard
|
|
78
87
|
* me.input.bindKey(me.input.KEY.X, "shoot");
|
|
79
88
|
* ...
|
|
80
89
|
* // map the lower face button on the first gamepad to the X key
|
|
81
90
|
* me.input.bindGamepad(0, {type:"buttons", code: me.input.GAMEPAD.BUTTONS.FACE_1}, me.input.KEY.X);
|
|
82
|
-
* // map the left
|
|
91
|
+
* // map the left half of the stick to LEFT, firing at 0.6 of full travel
|
|
92
|
+
* // (0.1 deadzone + 0.5 threshold), and the right half to RIGHT
|
|
83
93
|
* me.input.bindGamepad(0, {type:"axes", code: me.input.GAMEPAD.AXES.LX, threshold: -0.5}, me.input.KEY.LEFT);
|
|
94
|
+
* me.input.bindGamepad(0, {type:"axes", code: me.input.GAMEPAD.AXES.LX, threshold: 0.5}, me.input.KEY.RIGHT);
|
|
84
95
|
* @category Input
|
|
85
96
|
*/
|
|
86
97
|
export declare function bindGamepad(index: number, button: {
|
|
@@ -90,17 +101,33 @@ export declare function bindGamepad(index: number, button: {
|
|
|
90
101
|
}, keyCode: number): void;
|
|
91
102
|
/**
|
|
92
103
|
* unbind the defined keycode
|
|
104
|
+
*
|
|
105
|
+
* Takes the `type` the binding was made with, because a button code and an
|
|
106
|
+
* axis code are both small integers from different sets and they collide:
|
|
107
|
+
* `GAMEPAD.AXES.LX` and `GAMEPAD.BUTTONS.FACE_1` are both 0. Without it an
|
|
108
|
+
* axis could not be unbound at all, and asking for one by its code removed
|
|
109
|
+
* whatever button happened to share the number.
|
|
93
110
|
* @param index - Gamepad index
|
|
94
111
|
* @param button - (See {@link input.GAMEPAD})
|
|
112
|
+
* @param type - which table the binding is in, `"buttons"` by default
|
|
95
113
|
* @example
|
|
96
114
|
* me.input.unbindGamepad(0, me.input.GAMEPAD.BUTTONS.FACE_1);
|
|
115
|
+
* me.input.unbindGamepad(0, me.input.GAMEPAD.AXES.LX, "axes");
|
|
97
116
|
* @category Input
|
|
98
117
|
*/
|
|
99
|
-
export declare function unbindGamepad(index: number, button: number): void;
|
|
118
|
+
export declare function unbindGamepad(index: number, button: number, type?: "buttons" | "axes"): void;
|
|
100
119
|
/**
|
|
101
120
|
* Set deadzone for analog gamepad inputs<br>
|
|
102
121
|
* The default deadzone is 0.1 (10%) Analog values less than this will be ignored
|
|
122
|
+
*
|
|
123
|
+
* For axes it is the floor that a binding's own `threshold` is added to: one
|
|
124
|
+
* bound with `threshold: 0.5` under this default fires at 0.6, so raising it
|
|
125
|
+
* moves every axis binding with it. An ordinary button never consults it at
|
|
126
|
+
* all, since its pressed state comes from the browser; it reaches a button
|
|
127
|
+
* only where a non-standard mapping routes an axis onto one through its
|
|
128
|
+
* `analog` array.
|
|
103
129
|
* @param value - Deadzone value
|
|
130
|
+
* @see {@link input.bindGamepad}
|
|
104
131
|
* @category Input
|
|
105
132
|
*/
|
|
106
133
|
export declare function setGamepadDeadzone(value: number): void;
|
|
@@ -135,5 +162,104 @@ export declare function setGamepadDeadzone(value: number): void;
|
|
|
135
162
|
* });
|
|
136
163
|
*/
|
|
137
164
|
export declare const setGamepadMapping: (id: string, mapping: Partial<GamepadMapping>) => void;
|
|
165
|
+
/**
|
|
166
|
+
* Options for {@link input.vibrateGamepad}.
|
|
167
|
+
* @category Input
|
|
168
|
+
*/
|
|
169
|
+
export interface GamepadVibration {
|
|
170
|
+
/** how long the effect runs, milliseconds */
|
|
171
|
+
duration?: number;
|
|
172
|
+
/** the heavy, low-frequency motor, `0` to `1` */
|
|
173
|
+
strongMagnitude?: number;
|
|
174
|
+
/** the light, high-frequency motor, `0` to `1` */
|
|
175
|
+
weakMagnitude?: number;
|
|
176
|
+
/** how long to wait before it starts, milliseconds */
|
|
177
|
+
startDelay?: number;
|
|
178
|
+
/** left trigger motor, `0` to `1`. `"trigger-rumble"` only */
|
|
179
|
+
leftTrigger?: number;
|
|
180
|
+
/** right trigger motor, `0` to `1`. `"trigger-rumble"` only */
|
|
181
|
+
rightTrigger?: number;
|
|
182
|
+
/**
|
|
183
|
+
* Which effect to play. `"dual-rumble"` is the one every haptic pad
|
|
184
|
+
* supports; `"trigger-rumble"` drives the motors inside the triggers and
|
|
185
|
+
* is not widely implemented.
|
|
186
|
+
*/
|
|
187
|
+
type?: GamepadHapticEffectType;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Whether the pad at this index can vibrate.
|
|
191
|
+
*
|
|
192
|
+
* For deciding what to OFFER — a rumble toggle in an options screen, say.
|
|
193
|
+
* Nothing needs to call it before {@link input.vibrateGamepad}, which is a
|
|
194
|
+
* no-op on a pad without motors.
|
|
195
|
+
* @param index - Gamepad index
|
|
196
|
+
* @returns true when there is haptic hardware to drive
|
|
197
|
+
* @category Input
|
|
198
|
+
*/
|
|
199
|
+
export declare function hasGamepadVibration(index: number): boolean;
|
|
200
|
+
/**
|
|
201
|
+
* Vibrate a gamepad.
|
|
202
|
+
*
|
|
203
|
+
* Safe to call blind: with no pad in that slot, no motors, or a browser
|
|
204
|
+
* without the Gamepad API at all, it resolves `false` and does nothing. That
|
|
205
|
+
* is the whole error path, so game code never has to branch on support.
|
|
206
|
+
*
|
|
207
|
+
* Magnitudes default to FULL, unlike the underlying web API where every
|
|
208
|
+
* parameter defaults to zero and a bare `playEffect("dual-rumble")` is a
|
|
209
|
+
* silent no-op. `vibrateGamepad(0)` vibrates.
|
|
210
|
+
*
|
|
211
|
+
* A second call preempts the first on the same pad, which is what makes a
|
|
212
|
+
* rapid series of hits read as a rapid series of hits rather than a queue.
|
|
213
|
+
* That is for DISTINCT events: a sustained rumble should be one effect with
|
|
214
|
+
* a long `duration`, not a call per frame, which would spend a promise and a
|
|
215
|
+
* preempted effect every frame to produce one continuous one.
|
|
216
|
+
* @param index - Gamepad index
|
|
217
|
+
* @param options - how hard and how long; see {@link GamepadVibration}
|
|
218
|
+
* @returns whether the effect ran to completion. `false` covers unsupported,
|
|
219
|
+
* preempted by a later call, and rejected by the device alike — a rumble is
|
|
220
|
+
* feedback, and nothing sensible branches on which of those happened.
|
|
221
|
+
* @example
|
|
222
|
+
* // a short, sharp knock
|
|
223
|
+
* input.vibrateGamepad(0, { duration: 90, strongMagnitude: 0.4, weakMagnitude: 0.8 });
|
|
224
|
+
* // and a long heavy one for something big
|
|
225
|
+
* input.vibrateGamepad(0, { duration: 600, strongMagnitude: 1, weakMagnitude: 0.5 });
|
|
226
|
+
* @category Input
|
|
227
|
+
*/
|
|
228
|
+
export declare function vibrateGamepad(index: number, options?: GamepadVibration): Promise<boolean>;
|
|
229
|
+
/**
|
|
230
|
+
* Stop whatever a gamepad is currently playing.
|
|
231
|
+
*
|
|
232
|
+
* For cutting a long effect short — the player pausing, or a run ending under
|
|
233
|
+
* a rumble that would otherwise outlive it. A no-op where there is nothing to
|
|
234
|
+
* stop.
|
|
235
|
+
* @param index - Gamepad index
|
|
236
|
+
* @category Input
|
|
237
|
+
*/
|
|
238
|
+
export declare function stopGamepadVibration(index: number): void;
|
|
239
|
+
/**
|
|
240
|
+
* The index of the pad the player is actually using.
|
|
241
|
+
*
|
|
242
|
+
* Slots are handed out in plug order, so index 0 is a guess rather than an
|
|
243
|
+
* answer: a wheel, a spare pad or a keyboard-shaped device left plugged in
|
|
244
|
+
* can hold slot 0 for a whole session while the player presses buttons on
|
|
245
|
+
* slot 1. Nothing in the browser reports which is "the" controller, and the
|
|
246
|
+
* one thing that identifies it is use.
|
|
247
|
+
*
|
|
248
|
+
* So this reports the last pad to produce a BOUND input, falling back to the
|
|
249
|
+
* first connected one before anything has been pressed, and to -1 when there
|
|
250
|
+
* is no pad at all. Pass it wherever an index is wanted —
|
|
251
|
+
* {@link input.vibrateGamepad} most of all, since rumbling the wrong pad is
|
|
252
|
+
* both useless and impossible to notice in testing.
|
|
253
|
+
*
|
|
254
|
+
* It follows bound inputs only, which is what makes it an answer about the
|
|
255
|
+
* player rather than about electrical noise: a resting stick on a worn pad
|
|
256
|
+
* reports movement for ever, and would otherwise claim to be the active one.
|
|
257
|
+
* @returns the gamepad index, or -1 when no gamepad is connected
|
|
258
|
+
* @example
|
|
259
|
+
* // rumble whichever pad the player is holding
|
|
260
|
+
* input.vibrateGamepad(input.activeGamepad(), { duration: 120 });
|
|
261
|
+
* @category Input
|
|
262
|
+
*/
|
|
263
|
+
export declare function activeGamepad(): number;
|
|
138
264
|
export {};
|
|
139
265
|
//# sourceMappingURL=gamepad.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gamepad.d.ts","sourceRoot":"","sources":["../../src/input/gamepad.ts"],"names":[],"mappings":"AAWA,UAAU,cAAc;IACvB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;CACtE;
|
|
1
|
+
{"version":3,"file":"gamepad.d.ts","sourceRoot":"","sources":["../../src/input/gamepad.ts"],"names":[],"mappings":"AAWA,UAAU,cAAc;IACvB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;CACtE;AAoSD;;GAEG;AACH,eAAO,MAAM,OAAO;IACnB;;;;;;;;OAQG;;;;;;;;;;;IAYH;;;;;;;;;;;OAWG;;;;;;;;;;;;;;;;;;;;;;;;;;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cAAc,CAC7B,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,gBAAqB,GAC5B,OAAO,CAAC,OAAO,CAAC,CAelB;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAOxD;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAkBtC"}
|
|
@@ -77,6 +77,14 @@ export declare function unbindPointer(button?: number): void;
|
|
|
77
77
|
/**
|
|
78
78
|
* allows registration of event listeners on the object target. <br>
|
|
79
79
|
* melonJS will pass a me.Pointer object to the defined callback.
|
|
80
|
+
*
|
|
81
|
+
* Regions under the pointer are asked in the order they are drawn, topmost
|
|
82
|
+
* first, and the walk continues downwards until a callback returns `false`.
|
|
83
|
+
* Depth is resolved per container, so a child's `pos.z` orders it among its
|
|
84
|
+
* siblings only and a cross-container pair is decided at the common ancestor,
|
|
85
|
+
* matching what is drawn on top. `app.viewport` is asked BEFORE all of them
|
|
86
|
+
* rather than as a fallback, so a callback registered on it should not return
|
|
87
|
+
* `false` unless it means to swallow every pointer event in the game.
|
|
80
88
|
* @see Pointer
|
|
81
89
|
* @see {@link http://www.w3.org/TR/pointerevents/#list-of-pointer-events | W3C Pointer Event list}
|
|
82
90
|
* @param eventType - The event type for which the object is registering <br>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pointerevent.d.ts","sourceRoot":"","sources":["../../src/input/pointerevent.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAepD,OAAO,OAAO,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"pointerevent.d.ts","sourceRoot":"","sources":["../../src/input/pointerevent.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAepD,OAAO,OAAO,MAAM,cAAc,CAAC;AA2mBnC;;GAEG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MAAM,EAAE,GAAG,GAAG,IAAI,CAMzD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAO5C;AAED;;;GAGG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAMzC"}
|
|
@@ -28,26 +28,41 @@
|
|
|
28
28
|
* app.world.addChild(boat);
|
|
29
29
|
*
|
|
30
30
|
* // ...then drive it like anything else
|
|
31
|
-
* boat.
|
|
32
|
-
* boat.depth = travelled;
|
|
31
|
+
* boat.setPosition(steerX, waterLevel, travelled);
|
|
33
32
|
* boat.rotate(lean - lastLean, AXIS_Z);
|
|
34
33
|
*/
|
|
35
34
|
export default class GLTFModel extends Container {
|
|
36
35
|
/**
|
|
37
|
-
* @param {import("../../loader/
|
|
36
|
+
* @param {import("../../loader/parsers/gltf.js").GLTFData} data - the parsed glTF descriptor, as returned by {@link loader.getGLTF}
|
|
38
37
|
* @param {object} [options]
|
|
39
38
|
* @param {number} [options.scale=1] - pixels per glTF unit (uniform scene scale)
|
|
40
39
|
* @param {boolean} [options.rightHanded=true] - glTF Y-up → engine Y-down via a rotation (no mirror)
|
|
41
40
|
* @param {boolean} [options.lit=false] - render the part meshes through the lit batcher
|
|
42
41
|
* @param {boolean} [options.castGroundShadow] - give the parts a ground shadow; omit to inherit the application setting
|
|
43
42
|
* @param {number} [options.shadowGroundY] - world Y of the floor those shadows land on
|
|
43
|
+
* @param {number} [options.shadowOpacity=0.45] - opacity of those shadows before any height fade
|
|
44
|
+
* @param {number} [options.shadowScale=1] - size multiplier for those shadows (see {@link Mesh#shadowScale})
|
|
45
|
+
* @param {number} [options.shadowOffset=0] - how far to slide them along their direction, in multiples of each blob's own radius; needs `shadowGroundY` (see {@link Mesh#shadowOffset}). `shadowGroundPoint` is deliberately not a scene option: one floor point shared by every part would stack their blobs on a single spot
|
|
46
|
+
* @param {number} [options.shadowStretch=1] - how much longer they are along that direction, clamped to 3
|
|
47
|
+
* @param {number} [options.shadowDirectionX=0] - x of the ground direction they are cast along
|
|
48
|
+
* @param {number} [options.shadowDirectionZ=0] - z of the ground direction they are cast along
|
|
49
|
+
* @param {number[]|Vector3d} [options.shadowGroundNormal] - the UP normal of the floor those shadows land on; needs `shadowGroundY` (see {@link Mesh#shadowGroundNormal})
|
|
50
|
+
* @param {Light3d} [options.shadowLight] - a {@link Light3d} to take that direction from instead
|
|
44
51
|
*/
|
|
45
|
-
constructor(data: import("../../loader/
|
|
52
|
+
constructor(data: import("../../loader/parsers/gltf.js").GLTFData, options?: {
|
|
46
53
|
scale?: number | undefined;
|
|
47
54
|
rightHanded?: boolean | undefined;
|
|
48
55
|
lit?: boolean | undefined;
|
|
49
56
|
castGroundShadow?: boolean | undefined;
|
|
50
57
|
shadowGroundY?: number | undefined;
|
|
58
|
+
shadowOpacity?: number | undefined;
|
|
59
|
+
shadowScale?: number | undefined;
|
|
60
|
+
shadowOffset?: number | undefined;
|
|
61
|
+
shadowStretch?: number | undefined;
|
|
62
|
+
shadowDirectionX?: number | undefined;
|
|
63
|
+
shadowDirectionZ?: number | undefined;
|
|
64
|
+
shadowGroundNormal?: number[] | Vector3d | undefined;
|
|
65
|
+
shadowLight?: any;
|
|
51
66
|
});
|
|
52
67
|
/**
|
|
53
68
|
* playback multiplier for the current animation (1 = authored speed).
|
|
@@ -120,36 +135,8 @@ export default class GLTFModel extends Container {
|
|
|
120
135
|
* @returns {GLTFModel} this, for chaining
|
|
121
136
|
*/
|
|
122
137
|
stop(): GLTFModel;
|
|
123
|
-
/**
|
|
124
|
-
* {@link Container#draw} translates the renderer by `pos` so children draw
|
|
125
|
-
* in container-local space. This rig's children are already in world space,
|
|
126
|
-
* so that translation is undone here rather than doubling the placement.
|
|
127
|
-
* Paired with `autoTransform = false`, which suppresses the matching
|
|
128
|
-
* rotation fold.
|
|
129
|
-
* @param {CanvasRenderer|WebGLRenderer} renderer - a renderer instance
|
|
130
|
-
* @param {Camera2d} [viewport] - the camera rendering this frame
|
|
131
|
-
*/
|
|
132
|
-
draw(renderer: CanvasRenderer | WebGLRenderer, viewport?: Camera2d): void;
|
|
133
|
-
/**
|
|
134
|
-
* Where this model is, as a 2D box — what culling, picking and the physics
|
|
135
|
-
* broadphase all read.
|
|
136
|
-
*
|
|
137
|
-
* A `Container` has no dimensions of its own, and one left that way reports
|
|
138
|
-
* an EMPTY bounds: a model claiming to be nowhere, which the broadphase
|
|
139
|
-
* cannot place. A rig's size is known at load from the glTF scene AABB, so
|
|
140
|
-
* this is a placement of a measurement taken once in the constructor rather
|
|
141
|
-
* than a walk of the parts — `Container#updateBounds` with
|
|
142
|
-
* `enableChildBoundsUpdate` would re-measure the whole rig on every call,
|
|
143
|
-
* and that flag is for a group whose extent really is its members' union.
|
|
144
|
-
*
|
|
145
|
-
* The box is the model's bounding SPHERE squared off, so a turned model
|
|
146
|
-
* still reports something that contains it. Generous bounds only cost
|
|
147
|
-
* broadphase pruning; tight ones lose contacts.
|
|
148
|
-
* @param {boolean} [absolute=true] - in world rather than local coordinates
|
|
149
|
-
* @returns {Bounds} this model's bounding box
|
|
150
|
-
*/
|
|
151
|
-
updateBounds(absolute?: boolean): Bounds;
|
|
152
138
|
}
|
|
153
139
|
import Container from "../../renderable/container.js";
|
|
154
140
|
import type { AnimationOptionsInput } from "../../renderable/animation.ts";
|
|
141
|
+
import type { Vector3d } from "../../math/vector3d.ts";
|
|
155
142
|
//# sourceMappingURL=GLTFModel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GLTFModel.d.ts","sourceRoot":"","sources":["../../../src/level/gltf/GLTFModel.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GLTFModel.d.ts","sourceRoot":"","sources":["../../../src/level/gltf/GLTFModel.js"],"names":[],"mappings":"AA+DA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH;IACC;;;;;;;;;;;;;;;;OAgBG;IACH,kBAhBW,OAAO,8BAA8B,EAAE,QAAQ,YAEvD;QAAyB,KAAK;QACJ,W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;IACH,+CAYC;CACD;sBAzyBqB,+BAA+B;2CASX,+BAA+B;8BAC9C,wBAAwB"}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
|
|
2
|
+
/**
|
|
3
|
+
* additional import for TypeScript
|
|
4
|
+
* @import Container from "../../renderable/container.js";
|
|
5
|
+
* @import Mesh from "../../renderable/mesh.js";
|
|
6
|
+
* @import {Light3d} from "../../lighting/light3d.ts";
|
|
7
|
+
* @import {Vector3d} from "../../math/vector3d.ts";
|
|
8
|
+
*/
|
|
2
9
|
/**
|
|
3
10
|
* A loadable 3D scene parsed from a glTF / GLB asset. Instances are created
|
|
4
11
|
* and registered with the {@link level} director (usually automatically by
|
|
@@ -75,6 +82,28 @@ export default class GLTFScene {
|
|
|
75
82
|
* shadows land on ({@link Mesh#shadowGroundY}); omit it and each blob sits
|
|
76
83
|
* at its own object's base at full strength, which is right for a scene
|
|
77
84
|
* whose props already rest on the ground.
|
|
85
|
+
* @param {number} [options.shadowOpacity] - how dark the blobs are ({@link Mesh#shadowOpacity})
|
|
86
|
+
* @param {number} [options.shadowScale] - blob footprint multiplier ({@link Mesh#shadowScale})
|
|
87
|
+
* @param {number} [options.shadowOffset] - how far to slide them along the light, in blob radii ({@link Mesh#shadowOffset})
|
|
88
|
+
* @param {number} [options.shadowStretch] - how much longer they are along it ({@link Mesh#shadowStretch})
|
|
89
|
+
* @param {number} [options.shadowDirectionX] - x of the ground direction they are cast along ({@link Mesh#shadowDirectionX})
|
|
90
|
+
* @param {number} [options.shadowDirectionZ] - z of that direction ({@link Mesh#shadowDirectionZ})
|
|
91
|
+
* @param {number[]|Vector3d} [options.shadowGroundNormal] - up normal of the floor, for a scene that is not level ({@link Mesh#shadowGroundNormal})
|
|
92
|
+
* @param {Light3d} [options.shadowLight] - a light to take the direction from, re-read every draw ({@link Mesh#shadowLight})
|
|
93
|
+
* @example
|
|
94
|
+
* // a loaded scene lit by a sun the game owns, so a day/night cycle
|
|
95
|
+
* // carries the shadows with it
|
|
96
|
+
* const sun = new Light3d({ direction: [0.4, 1, 0.2] });
|
|
97
|
+
* app.world.addChild(sun);
|
|
98
|
+
* await level.load("village", {
|
|
99
|
+
* scale: 40,
|
|
100
|
+
* castGroundShadow: true,
|
|
101
|
+
* shadowGroundY: 0,
|
|
102
|
+
* shadowLight: sun,
|
|
103
|
+
* shadowOffset: 0.6,
|
|
104
|
+
* shadowStretch: 1.8,
|
|
105
|
+
* async: true,
|
|
106
|
+
* });
|
|
78
107
|
*/
|
|
79
108
|
addTo(container: Container, options?: {
|
|
80
109
|
scale?: number | undefined;
|
|
@@ -83,7 +112,17 @@ export default class GLTFScene {
|
|
|
83
112
|
lightIntensityScale?: number | undefined;
|
|
84
113
|
castGroundShadow?: boolean | undefined;
|
|
85
114
|
shadowGroundY?: number | undefined;
|
|
115
|
+
shadowOpacity?: number | undefined;
|
|
116
|
+
shadowScale?: number | undefined;
|
|
117
|
+
shadowOffset?: number | undefined;
|
|
118
|
+
shadowStretch?: number | undefined;
|
|
119
|
+
shadowDirectionX?: number | undefined;
|
|
120
|
+
shadowDirectionZ?: number | undefined;
|
|
121
|
+
shadowGroundNormal?: number[] | Vector3d | undefined;
|
|
122
|
+
shadowLight?: Light3d | undefined;
|
|
86
123
|
}): void;
|
|
87
124
|
}
|
|
88
|
-
import
|
|
125
|
+
import type Container from "../../renderable/container.js";
|
|
126
|
+
import type { Vector3d } from "../../math/vector3d.ts";
|
|
127
|
+
import { Light3d } from "../../lighting/light3d.ts";
|
|
89
128
|
//# sourceMappingURL=GLTFScene.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GLTFScene.d.ts","sourceRoot":"","sources":["../../../src/level/gltf/GLTFScene.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GLTFScene.d.ts","sourceRoot":"","sources":["../../../src/level/gltf/GLTFScene.js"],"names":[],"mappings":"AA0aA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,oCALW,aAAa,aACb,MAAM,QAyChB;AA5dD;;;;;;GAMG;AACH;;;;;;;;;GASG;AACH;IAwCC;;;;;;;;;;;;;OAaG;IACH,oBAJU,aAAa,CAAC,MAAM,CAAC,CAyB5B;IA1EH;;OAEG;IACH,qBAFW,MAAM,EAkBhB;IAfA;;;OAGG;IACH,MAFU,MAAM,CAEG;IACnB;;;OAGG;IACH,QAFU,MAAM,CAEI;IACpB;;;OAGG;IACH,MAFU,MAAM,CAEY;IAG7B;;;;OAIG;IACH,cAFa,MAAM,GAAC,SAAS,CAI5B;IAED;;;;OAIG;IACH,qBAEC;IAuCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwDG;IACH,iBAtDW,SAAS,YAEjB;QAAyB,KAAK;QACJ,WAAW;QAEX,MAAM;QAQP,mBAAmB;QAQlB,gBAAgB;QAMjB,aAAa;QAIb,aAAa;QACb,WAAW;QACX,YAAY;QACZ,aAAa;QACb,gBAAgB;QAChB,gBAAgB;QACL,kBAAkB;QAC5B,WAAW;KACrC,QA2LF;IAED;;;;;;;;;;;;;OAaG;IACH,sBAPW,SAAS,SACT,MAAM,SACN,MAAM,WACN,MAAM,QAsEhB;IAED;;;;;;OAMG;IACH,gBAAY;CACZ;0BApayB,oCAAoC;2BAOpC,+BAA+B;8BAG9B,wBAAwB;wBAd3B,2BAA2B"}
|
package/build/level/level.d.ts
CHANGED
|
@@ -234,7 +234,42 @@ export type LevelLoadOptions = {
|
|
|
234
234
|
* - (glTF/GLB only) world Y the ground shadows land on
|
|
235
235
|
*/
|
|
236
236
|
shadowGroundY?: number;
|
|
237
|
+
/**
|
|
238
|
+
* - (glTF/GLB only) how dark the blobs are ({@link Mesh#shadowOpacity})
|
|
239
|
+
*/
|
|
240
|
+
shadowOpacity?: number;
|
|
241
|
+
/**
|
|
242
|
+
* - (glTF/GLB only) blob footprint multiplier ({@link Mesh#shadowScale})
|
|
243
|
+
*/
|
|
244
|
+
shadowScale?: number;
|
|
245
|
+
/**
|
|
246
|
+
* - (glTF/GLB only) how far to slide them along the light, in blob radii ({@link Mesh#shadowOffset})
|
|
247
|
+
*/
|
|
248
|
+
shadowOffset?: number;
|
|
249
|
+
/**
|
|
250
|
+
* - (glTF/GLB only) how much longer they are along it ({@link Mesh#shadowStretch})
|
|
251
|
+
*/
|
|
252
|
+
shadowStretch?: number;
|
|
253
|
+
/**
|
|
254
|
+
* - (glTF/GLB only) x of the ground direction they are cast along
|
|
255
|
+
*/
|
|
256
|
+
shadowDirectionX?: number;
|
|
257
|
+
/**
|
|
258
|
+
* - (glTF/GLB only) z of that direction
|
|
259
|
+
*/
|
|
260
|
+
shadowDirectionZ?: number;
|
|
261
|
+
/**
|
|
262
|
+
* - (glTF/GLB only) up normal of the floor, for a scene that is not level
|
|
263
|
+
*/
|
|
264
|
+
shadowGroundNormal?: number[] | Vector3d;
|
|
265
|
+
/**
|
|
266
|
+
* - (glTF/GLB only) a {@link Light3d} to take the shadow direction from, re-read every draw
|
|
267
|
+
*/
|
|
268
|
+
shadowLight?: Light3d;
|
|
237
269
|
};
|
|
238
270
|
import TMXTileMap from "./tiled/TMXTileMap.js";
|
|
239
271
|
import GLTFScene from "./gltf/GLTFScene.js";
|
|
272
|
+
import type Container from "../renderable/container.js";
|
|
273
|
+
import type { Vector3d } from "../math/vector3d.ts";
|
|
274
|
+
import type { Light3d } from "../lighting/light3d.ts";
|
|
240
275
|
//# sourceMappingURL=level.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"level.d.ts","sourceRoot":"","sources":["../../src/level/level.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"level.d.ts","sourceRoot":"","sources":["../../src/level/level.js"],"names":[],"mappings":"AA4GA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH,iCALU,aAAa,CAAC,MAAM,CAAC,CAY5B;;IAQF;;;;;;;OAOG;IACH,qBALW,M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BArIE,uBAAuB;sBADxB,qBAAqB;2BAKjB,4BAA4B;8BAG3B,qBAAqB;6BADtB,wBAAwB"}
|
|
@@ -34,7 +34,7 @@ export default class TMXLayer extends Renderable {
|
|
|
34
34
|
* @type {TMXTilesetGroup}
|
|
35
35
|
*/
|
|
36
36
|
tilesets: TMXTilesetGroup;
|
|
37
|
-
tileset:
|
|
37
|
+
tileset: TMXTileset | null;
|
|
38
38
|
maxTileSize: {
|
|
39
39
|
width: number;
|
|
40
40
|
height: number;
|
|
@@ -111,7 +111,7 @@ export default class TMXLayer extends Renderable {
|
|
|
111
111
|
* layer.setRenderer(map.getRenderer());
|
|
112
112
|
*/
|
|
113
113
|
setRenderer(renderer: TMXRenderer): void;
|
|
114
|
-
renderer:
|
|
114
|
+
renderer: TMXRenderer | undefined;
|
|
115
115
|
/**
|
|
116
116
|
* Return the layer current renderer object
|
|
117
117
|
* @returns {TMXRenderer} renderer
|
|
@@ -176,6 +176,9 @@ export default class TMXLayer extends Renderable {
|
|
|
176
176
|
clearTile(x: number, y: number): void;
|
|
177
177
|
}
|
|
178
178
|
import Renderable from "../../renderable/renderable.js";
|
|
179
|
+
import type TMXTilesetGroup from "./TMXTilesetGroup.js";
|
|
180
|
+
import type TMXTileset from "./TMXTileset.js";
|
|
179
181
|
import Tile from "./TMXTile.js";
|
|
180
182
|
import CanvasRenderer from "../../video/canvas/canvas_renderer";
|
|
183
|
+
import type TMXRenderer from "./renderer/TMXRenderer.js";
|
|
181
184
|
//# sourceMappingURL=TMXLayer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TMXLayer.d.ts","sourceRoot":"","sources":["../../../src/level/tiled/TMXLayer.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TMXLayer.d.ts","sourceRoot":"","sources":["../../../src/level/tiled/TMXLayer.js"],"names":[],"mappings":"AA6HA;;;;GAIG;AACH;IACC;;;;;;;;OAQG;IACH,iBARW,MAAM,QACN,MAAM,aACN,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AA6B;IAiB/B;;;;;;OAMG;IACH,oBALW,MAAM,KACN,MAAM,KACN,MAAM,GACJ,IAAI,CAQhB;IAED;;;;;;;;;OASG;IACH,UARW,MAAM,KACN,MAAM,gBACN,MAAM,GACJ,IAAI,CA6ChB;IAED;;;;;;;;;OASG;IACH,aARW,MAAM,KACN,MAAM,QA8BhB;IAED;;;;OAIG;IACH,yBAQC;IAED;;;;OAIG;IACH,qCAIC;CACD;uBA1tBsB,gCAAgC;iCAgBvB,sBAAsB;4BAD3B,iBAAiB;iBAN3B,cAAc;2BARJ,oCAAoC;6BAanC,2BAA2B"}
|
|
@@ -51,9 +51,10 @@ export function registerTiledObjectFactory(type: string, factory: Function): voi
|
|
|
51
51
|
* registerTiledObjectClass("Enemy", Enemy);
|
|
52
52
|
*
|
|
53
53
|
* @example
|
|
54
|
-
* //
|
|
54
|
+
* // the older spelling: `pool.register` registers a Tiled factory as a side
|
|
55
|
+
* // effect, and additionally makes the class RECYCLABLE, which this registry
|
|
56
|
+
* // alone does not do
|
|
55
57
|
* pool.register("CoinEntity", CoinEntity, true);
|
|
56
|
-
* // CoinEntity is now available both in the pool AND as a Tiled object factory
|
|
57
58
|
*/
|
|
58
59
|
export function registerTiledObjectClass(name: string, Constructor: Function): void;
|
|
59
60
|
//# sourceMappingURL=TMXObjectFactory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TMXObjectFactory.d.ts","sourceRoot":"","sources":["../../../src/level/tiled/TMXObjectFactory.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TMXObjectFactory.d.ts","sourceRoot":"","sources":["../../../src/level/tiled/TMXObjectFactory.js"],"names":[],"mappings":"AA2CA;;;;;;;GAOG;AACH,0CALW,MAAM,GACJ,OAAO,GAAC,MAAM,EAAE,CAiB5B;AAED;;;;;;;;;;;;;GAaG;AACH,2CALW,MAAM,GACJ,MAAM,CAuBlB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,iDApBW,MAAM,2BAgChB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,+CAbW,MAAM,+BA0ChB;AAsBD;;;;;;;;GAQG;AACH,gDALW,MAAM,+BAWhB;AAoED;;;;;;;;GAQG;AACH,0CANW,MAAM,OACN,UAAU,GACR,UAAU,CAsBtB"}
|
|
@@ -58,6 +58,7 @@ export default class Tile extends Bounds {
|
|
|
58
58
|
*/
|
|
59
59
|
getRenderable(settings?: object): Renderable;
|
|
60
60
|
}
|
|
61
|
-
import { Matrix2d } from "../../math/matrix2d.ts";
|
|
62
61
|
import { Bounds } from "../../physics/bounds.ts";
|
|
62
|
+
import type TMXTileset from "./TMXTileset.js";
|
|
63
|
+
import type Renderable from "../../renderable/renderable.js";
|
|
63
64
|
//# sourceMappingURL=TMXTile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TMXTile.d.ts","sourceRoot":"","sources":["../../../src/level/tiled/TMXTile.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TMXTile.d.ts","sourceRoot":"","sources":["../../../src/level/tiled/TMXTile.js"],"names":[],"mappings":"AAsBA;;;;;;;;;;;;;;;;;GAiBG;AACH,8CARW,QAAQ,YACR,MAAM,SACN,MAAM,UACN,MAAM,GACJ,QAAQ,CAyBpB;AAED;;;GAGG;AACH;IACC;;;;;OAKG;IACH,eALW,MAAM,KACN,MAAM,OACN,MAAM,WACN,UAAU,EAmFpB;IAhEA;;;OAGG;IACH,SAFU,UAAU,CAEE;IAEtB;;;;;OAKG;IACH,kBAJU,QAAQ,GAAC,IAAI,CAIK;IAE5B;;;OAGG;IACH,KAFU,MAAM,CAEJ;IAEZ;;;OAGG;IACH,KAFU,MAAM,CAEJ;IAEZ;;;OAGG;IACH,QAFU,MAAM,CAEC;IAEjB;;;OAGG;IACH,UAFU,OAAO,CAE+B;IAEhD;;;OAGG;IACH,UAFU,OAAO,CAE+B;IAEhD;;;OAGG;IACH,WAFU,OAAO,CAEiC;IAElD;;;OAGG;IACH,SAFU,OAAO,CAE8C;IAYhE;;;;;OAKG;IACH,4BAJW,QAAQ,QAoBlB;IAED;;;;OAIG;IACH,yBAHW,MAAM,GACJ,UAAU,CAmDtB;CACD;yBA3OwB,wBAAwB;uBAC1B,yBAAyB;4BAMrB,iBAAiB;4BADjB,gCAAgC"}
|
|
@@ -98,9 +98,9 @@ export default class TMXTileMap {
|
|
|
98
98
|
hexsidelength: number;
|
|
99
99
|
staggeraxis: any;
|
|
100
100
|
staggerindex: any;
|
|
101
|
-
bounds:
|
|
102
|
-
width:
|
|
103
|
-
height:
|
|
101
|
+
bounds: Bounds;
|
|
102
|
+
width: number;
|
|
103
|
+
height: number;
|
|
104
104
|
backgroundcolor: any;
|
|
105
105
|
initialized: boolean;
|
|
106
106
|
/**
|
|
@@ -108,7 +108,7 @@ export default class TMXTileMap {
|
|
|
108
108
|
* @returns {TMXRenderer} a TMX renderer
|
|
109
109
|
*/
|
|
110
110
|
getRenderer(): TMXRenderer;
|
|
111
|
-
renderer: import("./renderer/TMXHexagonalRenderer.js").default | import("./renderer/TMXIsometricRenderer.js").default | import("./renderer/TMXOrthogonalRenderer.js").default |
|
|
111
|
+
renderer: import("./renderer/TMXHexagonalRenderer.js").default | import("./renderer/TMXIsometricRenderer.js").default | import("./renderer/TMXOrthogonalRenderer.js").default | undefined;
|
|
112
112
|
/**
|
|
113
113
|
* return the map bounding rect
|
|
114
114
|
* @returns {Bounds}
|
|
@@ -149,6 +149,9 @@ export default class TMXTileMap {
|
|
|
149
149
|
destroy(): void;
|
|
150
150
|
}
|
|
151
151
|
import TMXTilesetGroup from "./TMXTilesetGroup.js";
|
|
152
|
+
import type { Bounds } from "../../physics/bounds.ts";
|
|
153
|
+
import type TMXRenderer from "./renderer/TMXRenderer.js";
|
|
152
154
|
import Container from "../../renderable/container.js";
|
|
155
|
+
import type Renderable from "../../renderable/renderable.js";
|
|
153
156
|
import TMXLayer from "./TMXLayer.js";
|
|
154
157
|
//# sourceMappingURL=TMXTileMap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TMXTileMap.d.ts","sourceRoot":"","sources":["../../../src/level/tiled/TMXTileMap.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TMXTileMap.d.ts","sourceRoot":"","sources":["../../../src/level/tiled/TMXTileMap.js"],"names":[],"mappings":"AAiJA;;;;GAIG;AACH;IACC;;;;;;;;;;;OAWG;IACH,oBAJU,aAAa,CAAC,MAAM,CAAC,CAIsC;IAErE;;;;;;;;OAQG;IACH,qBARW,MAAM,QACN,MAAM,EAiKhB;IAzJA;;;;OAIG;IACH,aAAgB;IAEhB;;;OAGG;IACH,MAFU,MAAM,CAEG;IAEnB;;;OAGG;IACH,QAFU,MAAM,CAEG;IAEnB;;;OAGG;IACH,MAFU,MAAM,CAEO;IAEvB;;;OAGG;IACH,MAFU,MAAM,CAEQ;IAExB;;;OAGG;IACH,WAFU,MAAM,CAEgB;IAEhC;;;OAGG;IACH,YAFU,MAAM,CAEkB;IAElC;;;;OAIG;IACH,UAHU,MAAM,CAGmB;IAEnC;;;;OAIG;IACH,aAHU,MAAM,CAGmB;IAEnC;;;;OAIG;IACH,OAHU,MAAM,CAGe;IAE/B;;;;OAIG;IACH,OAHU,MAAM,CAGe;IAE/B;;;;;OAKG;IACH,aAHU,MAAM,CAGmC;IAEnD;;;OAGG;IACH,SAFU,MAAM,CAEgB;IAEhC;;;OAGG;IACH,cAFU,MAAM,CAE0B;IAE1C;;;OAGG;IACH,OAFU,MAAM,CAEO;IAGvB,6CAAoB;IAInB,cAAgB;IAIhB,oBAAsB;IAIvB,kBAA8C;IAG9C,iCAAmD;IAGnD,sBAAwC;IACxC,iBAAmC;IACnC,kBAAqC;IAGrC,eAAoD;IAGpD,cAA8B;IAC9B,eAAgC;IAGhC,qBAA2C;IAwB3C,qBAAwB;IAGzB;;;OAGG;IACH,eAFa,WAAW,CAUvB;IAHC,0LAAuC;IAKzC;;;OAGG;IACH,aAFa,MAAM,CAKlB;IAED;;;;OAIG;IACH,gCA2DC;IAED;;;;;;;;;;;OAWG;IACH,iBATW,SAAS,YACT,OAAO,sBACP,OAAO,QAgFjB;IAED;;;;;;;;;OASG;IACH,qBAJW,OAAO,GAEL,UAAU,EAAE,CA4GxB;IAED;;;OAGG;IACH,aAFa,QAAQ,EAAE,CAMtB;IAED;;OAEG;IACH,gBAKC;CACD;4BAtnB2B,sBAAsB;4BAIzB,yBAAyB;6BAEtB,2BAA2B;sBAhBjC,+BAA+B;4BAe1B,gCAAgC;qBARtC,eAAe"}
|
|
@@ -84,7 +84,7 @@ export default class TMXTileset {
|
|
|
84
84
|
* @type {Map}
|
|
85
85
|
*/
|
|
86
86
|
private animations;
|
|
87
|
-
image:
|
|
87
|
+
image: HTMLImageElement | import("../../loader/parsers/compressed_textures/compressed_image.js").CompressedImage | null | undefined;
|
|
88
88
|
texture: any;
|
|
89
89
|
atlas: any;
|
|
90
90
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TMXTileset.d.ts","sourceRoot":"","sources":["../../../src/level/tiled/TMXTileset.js"],"names":[],"mappings":"AAcA;;;GAGG;AACH;IACC;;;;OAIG;IACH,qBAJY,MAAM,iBACN,MAAM,kBACN,MAAM,EAqPjB;IAlPA;;;;;OAKG;IACH,gBAJU,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAIE;IAE/B;;;;;OAKG;IACH,iBAJU,GAAG,CAAC,MAAM,EAAE,gBAAgB,GAAC,iBAAiB,CAAC,CAIzB;IAEhC;;;OAGG;IACH,UAFU,MAAM,CAEiB;IAEjC;;;OAGG;IACH,SAFU,MAAM,CAEY;IAe5B;;;OAGG;IACH,MAFU,MAAM,CAEQ;IAExB;;;OAGG;IACH,WAFU,MAAM,CAEmB;IAEnC;;;OAGG;IACH,YAFU,MAAM,CAEqB;IAErC;;;;OAIG;IACH,SAHU,MAAM,CAGsB;IAEtC;;;;OAIG;IACH,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MAAM,QA2ChB;IArCA,oIAAoC;IASpC,aAKE;IACF,WAAoC;IAwBrC;;;;OAIG;IACH,kBAHW,MAAM,GACJ,gBAAgB,GAAC,iBAAiB,GAAC,SAAS,CAIxD;IAED;;;;;;OAMG;IACH,qBALW,MAAM,QACN,MAAM,QAMhB;IAED;;;;OAIG;IACH,cAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;;OAIG;IACH,mBAHW,MAAM,GACJ,MAAM,CAYlB;IAED;;;;OAIG;IACH,0BAHW,MAAM,GACJ,MAAM,GAAC,SAAS,CAI5B;IAED;;;;;;OAMG;IACH,WALW,MAAM,GACJ,OAAO,CAyBnB;IAED;;;;;;;;OAQG;IACH,mBAPW,QAAQ,MACR,MAAM,MACN,MAAM,WACN,IAAI,QAsFd;IAED;;;;;;;;;;;;;;OAcG;IACH,sBARW,QAAQ,MACR,MAAM,MACN,MAAM,OACN,MAAM,YACN,MAAM,QAgGhB;CACD;yBArxBwB,wBAAwB"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* additional import for TypeScript
|
|
3
|
+
* @import TMXTileset from "./TMXTileset.js";
|
|
4
|
+
*/
|
|
1
5
|
/**
|
|
2
6
|
* an object containing all tileset
|
|
3
7
|
*/
|
|
@@ -23,4 +27,5 @@ export default class TMXTilesetGroup {
|
|
|
23
27
|
*/
|
|
24
28
|
getTilesetByGid(gid: number): TMXTileset;
|
|
25
29
|
}
|
|
30
|
+
import type TMXTileset from "./TMXTileset.js";
|
|
26
31
|
//# sourceMappingURL=TMXTilesetGroup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TMXTilesetGroup.d.ts","sourceRoot":"","sources":["../../../src/level/tiled/TMXTilesetGroup.js"],"names":[],"mappings":"AAEA;;GAEG;AACH;IAEE,gBAAkB;IAClB,eAAe;IAEf;;;OAGG;IACH,kBAAwB;IAGzB;;;OAGG;IACH,aAFW,UAAU,QAKpB;IAED;;;;OAIG;IACH,qBAHW,MAAM,GACJ,UAAU,CAItB;IAED;;;;;OAKG;IACH,qBAHW,MAAM,GACJ,UAAU,CAmCtB;CACD"}
|
|
1
|
+
{"version":3,"file":"TMXTilesetGroup.d.ts","sourceRoot":"","sources":["../../../src/level/tiled/TMXTilesetGroup.js"],"names":[],"mappings":"AAEA;;;GAGG;AACH;;GAEG;AACH;IAEE,gBAAkB;IAClB,eAAe;IAEf;;;OAGG;IACH,kBAAwB;IAGzB;;;OAGG;IACH,aAFW,UAAU,QAKpB;IAED;;;;OAIG;IACH,qBAHW,MAAM,GACJ,UAAU,CAItB;IAED;;;;;OAKG;IACH,qBAHW,MAAM,GACJ,UAAU,CAmCtB;CACD;4BA3E0B,iBAAiB"}
|
|
@@ -7,17 +7,18 @@ export default class TMXHexagonalRenderer extends TMXRenderer {
|
|
|
7
7
|
* @param {TMXTileMap} map - the TMX map
|
|
8
8
|
*/
|
|
9
9
|
constructor(map: TMXTileMap);
|
|
10
|
-
hexsidelength:
|
|
10
|
+
hexsidelength: number;
|
|
11
11
|
staggerX: boolean;
|
|
12
12
|
staggerEven: boolean;
|
|
13
|
-
sidelengthx:
|
|
14
|
-
sidelengthy:
|
|
13
|
+
sidelengthx: number;
|
|
14
|
+
sidelengthy: number;
|
|
15
15
|
sideoffsetx: number;
|
|
16
16
|
sideoffsety: number;
|
|
17
|
-
columnwidth:
|
|
18
|
-
rowheight:
|
|
17
|
+
columnwidth: number;
|
|
18
|
+
rowheight: number;
|
|
19
19
|
centers: Vector2d[];
|
|
20
20
|
}
|
|
21
21
|
import TMXRenderer from "./TMXRenderer.js";
|
|
22
22
|
import { Vector2d } from "../../../math/vector2d.ts";
|
|
23
|
+
import type TMXTileMap from "../TMXTileMap.js";
|
|
23
24
|
//# sourceMappingURL=TMXHexagonalRenderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TMXHexagonalRenderer.d.ts","sourceRoot":"","sources":["../../../../src/level/tiled/renderer/TMXHexagonalRenderer.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TMXHexagonalRenderer.d.ts","sourceRoot":"","sources":["../../../../src/level/tiled/renderer/TMXHexagonalRenderer.js"],"names":[],"mappings":"AAuBA;;;GAGG;AACH;IACC;;OAEG;IACH,iBAFW,UAAU,EAgCpB;IA3BA,sBAA2C;IAC3C,kBAAuC;IACvC,qBAA8C;IAE9C,oBAAoB;IACpB,oBAAoB;IAUpB,oBAA0D;IAC1D,oBAA2D;IAE3D,oBAAsD;IACtD,kBAAoD;IAEpD,oBAKC;IAGF;;;;OAIG;IACH,+BAEC;IAED;;;;OAIG;IACH,0DA0BC;IAED;;;OAGG;IACH,mCAEC;IAED;;;OAGG;IACH,mCAEC;IAED;;;OAGG;IACH,qCAiBC;IAED;;;OAGG;IACH,sCAiBC;IAED;;;OAGG;IACH,wCAiBC;IAED;;;OAGG;IACH,yCAiBC;IAED;;;;OAIG;IACH,+CAqFC;IAED;;;;OAIG;IACH,+CAoBC;IAED;;;;OAIG;IACH,4DAaC;IAED;;;;;OAKG;IACH,wFAYC;IAED;;;;OAIG;IACH,0DAoKC;CACD;wBA3hBuB,kBAAkB;yBAHH,2BAA2B;4BAOvC,kBAAkB"}
|