duckengine
Version:
A 2D Game Engine for the web.
3 lines • 18.5 kB
HTML
<html class="default no-js"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>core/physics/utils/rectToRectIntersect | DuckEngine - v2.1.0</title><meta name="description" content="Documentation for DuckEngine - v2.1.0"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">DuckEngine - v2.1.0</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">DuckEngine - v2.1.0</a></li><li><a href="core_physics_utils_rectToRectIntersect.html">core/physics/utils/rectToRectIntersect</a></li></ul><h1>Module core/physics/utils/rectToRectIntersect</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Functions</h3><ul class="tsd-index-list"><li class="tsd-kind-function tsd-parent-kind-module"><a href="core_physics_utils_rectToRectIntersect.html#rectToRectIntersect" class="tsd-kind-icon">rect<wbr/>To<wbr/>Rect<wbr/>Intersect</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Functions</h2><section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-module"><a id="rectToRectIntersect" class="tsd-anchor"></a><h3>rect<wbr/>To<wbr/>Rect<wbr/>Intersect</h3><ul class="tsd-signatures tsd-kind-function tsd-parent-kind-module"><li class="tsd-signature tsd-kind-icon">rect<wbr/>To<wbr/>Rect<wbr/>Intersect<span class="tsd-signature-symbol">(</span>rect<span class="tsd-signature-symbol">: </span><a href="../classes/core_gameobjects_sprite.Sprite.html" class="tsd-signature-type" data-tsd-kind="Class">Sprite</a><span class="tsd-signature-symbol"> | </span><a href="../classes/core_gameobjects_rect.Rect.html" class="tsd-signature-type" data-tsd-kind="Class">Rect</a><span class="tsd-signature-symbol"> | </span><a href="../classes/core_gameobjects_roundrect.RoundRect.html" class="tsd-signature-type" data-tsd-kind="Class">RoundRect</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span>h<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>position<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>x<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>y<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">; </span>w<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> }</span>, rect2<span class="tsd-signature-symbol">: </span><a href="../classes/core_gameobjects_sprite.Sprite.html" class="tsd-signature-type" data-tsd-kind="Class">Sprite</a><span class="tsd-signature-symbol"> | </span><a href="../classes/core_gameobjects_rect.Rect.html" class="tsd-signature-type" data-tsd-kind="Class">Rect</a><span class="tsd-signature-symbol"> | </span><a href="../classes/core_gameobjects_roundrect.RoundRect.html" class="tsd-signature-type" data-tsd-kind="Class">RoundRect</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span>h<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>position<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>x<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>y<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">; </span>w<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/physics/utils/rectToRectIntersect.ts#L13">core/physics/utils/rectToRectIntersect.ts:13</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>function</dt><dd></dd><dt>description</dt><dd><p>Returns a boolean based on if a rectangle is intersecting with a rectangle</p>
</dd><dt>since</dt><dd><p>1.1.0-beta</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>rect: <a href="../classes/core_gameobjects_sprite.Sprite.html" class="tsd-signature-type" data-tsd-kind="Class">Sprite</a><span class="tsd-signature-symbol"> | </span><a href="../classes/core_gameobjects_rect.Rect.html" class="tsd-signature-type" data-tsd-kind="Class">Rect</a><span class="tsd-signature-symbol"> | </span><a href="../classes/core_gameobjects_roundrect.RoundRect.html" class="tsd-signature-type" data-tsd-kind="Class">RoundRect</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span>h<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>position<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>x<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>y<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">; </span>w<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> }</span></h5></li><li><h5>rect2: <a href="../classes/core_gameobjects_sprite.Sprite.html" class="tsd-signature-type" data-tsd-kind="Class">Sprite</a><span class="tsd-signature-symbol"> | </span><a href="../classes/core_gameobjects_rect.Rect.html" class="tsd-signature-type" data-tsd-kind="Class">Rect</a><span class="tsd-signature-symbol"> | </span><a href="../classes/core_gameobjects_roundrect.RoundRect.html" class="tsd-signature-type" data-tsd-kind="Class">RoundRect</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span>h<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>position<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>x<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>y<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">; </span>w<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> }</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../modules.html">Modules</a></li><li class=" tsd-kind-module"><a href="core_animation_animation.html">core/animation/animation</a></li><li class=" tsd-kind-module"><a href="core_animation_animationFrame.html">core/animation/animation<wbr/>Frame</a></li><li class=" tsd-kind-module"><a href="core_animation_animationManager.html">core/animation/animation<wbr/>Manager</a></li><li class=" tsd-kind-module"><a href="core_animation_animationState.html">core/animation/animation<wbr/>State</a></li><li class=" tsd-kind-module"><a href="core_animation_stateMachine.html">core/animation/state<wbr/>Machine</a></li><li class=" tsd-kind-module"><a href="core_camera_camera.html">core/camera/camera</a></li><li class=" tsd-kind-module"><a href="core_cutscene_cutscene.html">core/cutscene/cutscene</a></li><li class=" tsd-kind-module"><a href="core_debug_debug.html">core/debug/debug</a></li><li class=" tsd-kind-module"><a href="core_display_displayManager.html">core/display/display<wbr/>Manager</a></li><li class=" tsd-kind-module"><a href="core_effect_effect.html">core/effect/effect</a></li><li class=" tsd-kind-module"><a href="core_effect_preset_explosion.html">core/effect/preset/explosion</a></li><li class=" tsd-kind-module"><a href="core_effect_preset_smoke.html">core/effect/preset/smoke</a></li><li class=" tsd-kind-module"><a href="core_events_eventEmitter.html">core/events/event<wbr/>Emitter</a></li><li class=" tsd-kind-module"><a href="core_events_events.html">core/events/events</a></li><li class=" tsd-kind-module"><a href="core_events_main_displayEvents.html">core/events/main/display<wbr/>Events</a></li><li class=" tsd-kind-module"><a href="core_events_main_gameEvents.html">core/events/main/game<wbr/>Events</a></li><li class=" tsd-kind-module"><a href="core_events_main_rendererEvents.html">core/events/main/renderer<wbr/>Events</a></li><li class=" tsd-kind-module"><a href="core_events_other_buttonEvents.html">core/events/other/button<wbr/>Events</a></li><li class=" tsd-kind-module"><a href="core_events_other_cutsceneEvents.html">core/events/other/cutscene<wbr/>Events</a></li><li class=" tsd-kind-module"><a href="core_events_other_groupEvents.html">core/events/other/group<wbr/>Events</a></li><li class=" tsd-kind-module"><a href="core_game.html">core/game</a></li><li class=" tsd-kind-module"><a href="core_gameobjects_circle.html">core/gameobjects/circle</a></li><li class=" tsd-kind-module"><a href="core_gameobjects_gameObject.html">core/gameobjects/game<wbr/>Object</a></li><li class=" tsd-kind-module"><a href="core_gameobjects_misc_canvasModulate.html">core/gameobjects/misc/canvas<wbr/>Modulate</a></li><li class=" tsd-kind-module"><a href="core_gameobjects_particles_particle.html">core/gameobjects/particles/particle</a></li><li class=" tsd-kind-module"><a href="core_gameobjects_particles_particleEmitter.html">core/gameobjects/particles/particle<wbr/>Emitter</a></li><li class=" tsd-kind-module"><a href="core_gameobjects_rect.html">core/gameobjects/rect</a></li><li class=" tsd-kind-module"><a href="core_gameobjects_roundrect.html">core/gameobjects/roundrect</a></li><li class=" tsd-kind-module"><a href="core_gameobjects_sprite.html">core/gameobjects/sprite</a></li><li class=" tsd-kind-module"><a href="core_gameobjects_ui_button.html">core/gameobjects/ui/button</a></li><li class=" tsd-kind-module"><a href="core_gameobjects_ui_imageRect.html">core/gameobjects/ui/image<wbr/>Rect</a></li><li class=" tsd-kind-module"><a href="core_gameobjects_ui_panel.html">core/gameobjects/ui/panel</a></li><li class=" tsd-kind-module"><a href="core_gameobjects_ui_text.html">core/gameobjects/ui/text</a></li><li class=" tsd-kind-module"><a href="core_gameobjects_ui_ui.html">core/gameobjects/ui/ui</a></li><li class=" tsd-kind-module"><a href="core_group_group.html">core/group/group</a></li><li class=" tsd-kind-module"><a href="core_input_input.html">core/input/input</a></li><li class=" tsd-kind-module"><a href="core_input_keyboardInput.html">core/input/keyboard<wbr/>Input</a></li><li class=" tsd-kind-module"><a href="core_input_models_key.html">core/input/models/key</a></li><li class=" tsd-kind-module"><a href="core_input_models_mouse.html">core/input/models/mouse</a></li><li class=" tsd-kind-module"><a href="core_input_mouseInput.html">core/input/mouse<wbr/>Input</a></li><li class=" tsd-kind-module"><a href="core_lights_staticLight.html">core/lights/static<wbr/>Light</a></li><li class=" tsd-kind-module"><a href="core_loader_loader.html">core/loader/loader</a></li><li class=" tsd-kind-module"><a href="core_map_map.html">core/map/map</a></li><li class=" tsd-kind-module"><a href="core_map_tile.html">core/map/tile</a></li><li class=" tsd-kind-module"><a href="core_map_tilelayer.html">core/map/tilelayer</a></li><li class=" tsd-kind-module"><a href="core_map_tilemap.html">core/map/tilemap</a></li><li class=" tsd-kind-module"><a href="core_map_tileset.html">core/map/tileset</a></li><li class=" tsd-kind-module"><a href="core_math_clamp.html">core/math/clamp</a></li><li class=" tsd-kind-module"><a href="core_math_lerp.html">core/math/lerp</a></li><li class=" tsd-kind-module"><a href="core_math_randomFloat.html">core/math/random<wbr/>Float</a></li><li class=" tsd-kind-module"><a href="core_math_randomInt.html">core/math/random<wbr/>Int</a></li><li class=" tsd-kind-module"><a href="core_math_vector2.html">core/math/vector2</a></li><li class=" tsd-kind-module"><a href="core_misc_pluginManager.html">core/misc/plugin<wbr/>Manager</a></li><li class=" tsd-kind-module"><a href="core_models_displayList.html">core/models/display<wbr/>List</a></li><li class=" tsd-kind-module"><a href="core_models_physicsList.html">core/models/physics<wbr/>List</a></li><li class=" tsd-kind-module"><a href="core_physics_models_area.html">core/physics/models/area</a></li><li class=" tsd-kind-module"><a href="core_physics_models_collider.html">core/physics/models/collider</a></li><li class=" tsd-kind-module"><a href="core_physics_models_hitbox.html">core/physics/models/hitbox</a></li><li class=" tsd-kind-module"><a href="core_physics_physicsBody.html">core/physics/physics<wbr/>Body</a></li><li class=" tsd-kind-module"><a href="core_physics_server_physicsServer.html">core/physics/server/physics<wbr/>Server</a></li><li class=" tsd-kind-module"><a href="core_physics_utils_circleToRectIntersect.html">core/physics/utils/circle<wbr/>To<wbr/>Rect<wbr/>Intersect</a></li><li class=" tsd-kind-module"><a href="core_physics_utils_hitboxFaceIntersect.html">core/physics/utils/hitbox<wbr/>Face<wbr/>Intersect</a></li><li class="current tsd-kind-module"><a href="core_physics_utils_rectToRectIntersect.html">core/physics/utils/rect<wbr/>To<wbr/>Rect<wbr/>Intersect</a></li><li class=" tsd-kind-module"><a href="core_renderer_baseRenderer.html">core/renderer/base<wbr/>Renderer</a></li><li class=" tsd-kind-module"><a href="core_renderer_canvas_canvasRenderer.html">core/renderer/canvas/canvas<wbr/>Renderer</a></li><li class=" tsd-kind-module"><a href="core_renderer_canvas_const_blendModes.html">core/renderer/canvas/const/blend<wbr/>Modes</a></li><li class=" tsd-kind-module"><a href="core_renderer_canvas_pipeline_rendererPipeline.html">core/renderer/canvas/pipeline/renderer<wbr/>Pipeline</a></li><li class=" tsd-kind-module"><a href="core_scene.html">core/scene</a></li><li class=" tsd-kind-module"><a href="core_sound_soundPlayer.html">core/sound/sound<wbr/>Player</a></li><li class=" tsd-kind-module"><a href="core_storage_cacheManager.html">core/storage/cache<wbr/>Manager</a></li><li class=" tsd-kind-module"><a href="core_texture_texture.html">core/texture/texture</a></li><li class=" tsd-kind-module"><a href="core_texture_textureAtlas.html">core/texture/texture<wbr/>Atlas</a></li><li class=" tsd-kind-module"><a href="core_texture_textureBase.html">core/texture/texture<wbr/>Base</a></li><li class=" tsd-kind-module"><a href="core_texture_textureSheet.html">core/texture/texture<wbr/>Sheet</a></li><li class=" tsd-kind-module"><a href="index.html">index</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="tsd-kind-function tsd-parent-kind-module"><a href="core_physics_utils_rectToRectIntersect.html#rectToRectIntersect" class="tsd-kind-icon">rect<wbr/>To<wbr/>Rect<wbr/>Intersect</a></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-namespace"><span class="tsd-kind-icon">Namespace</span></li><li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li><li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li><li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="../assets/main.js"></script></body></html>