ohzi-core 10.3.3 → 10.4.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.module.js","sources":["../src/Browser.js","../src/utilities/Validation.js","../src/resource_loader/AbstractLoader.js","../src/utilities/OMath.js","../src/action_sequencer/ActionSequencer.js","../src/utilities/EasingFunctions.js","../src/action_sequencer/ActionInterpolator.js","../src/action_sequencer/NumberInterpolator.js","../src/view_components/ViewContext.js","../src/action_sequencer/ActionEvent.js","../src/view_components/transition/DrawIOAnimationSheet.js","../src/view_components/transition/ActionSequencerBuilder.js","../src/EventManager.js","../src/ResourceContainer.js","../src/utilities/HTMLUtilities.js","../src/view_components/transition/TransitionTable.js","../src/Time.js","../src/view_components/ViewState.js","../src/view_components/transition/ViewStateTransitionHandler.js","../src/view_components/ViewManager.js","../src/view_components/ApplicationView.js","../src/BaseApplication.js","../src/render_mode/BaseRender.js","../src/materials/BaseShaderMaterial.js","../src/materials/BlitMaterial.js","../src/materials/AddMaterial.js","../src/materials/UnrealBloomComposeMaterial.js","../src/CameraManager.js","../src/Capabilities.js","../src/canvas_drawer/CanvasDrawer.js","../src/Configuration.js","../src/html_utilities/css_animator_states/Idle.js","../src/html_utilities/css_animator_states/Animating.js","../src/html_utilities/CSSAnimator.js","../src/components/AxisHelper.js","../src/SceneManager.js","../src/primitives/Cube.js","../src/primitives/Sphere.js","../src/primitives/Arrow.js","../src/OScreen.js","../src/materials/ScreenSpaceTextureMaterial.js","../src/PerspectiveCamera.js","../src/Debug.js","../src/materials/ClearDepthNormalMaterial.js","../src/materials/DepthNormalMaterial.js","../src/render_utilities/DepthAndNormalsRenderer.js","../src/render_utilities/Blitter.js","../src/Graphics.js","../src/materials/NormalMaterial.js","../src/render_mode/DebugNormalsRender.js","../src/KeyboardInput.js","../src/OS.js","../src/ReflectionPlaneContext.js","../src/static_batcher/GeometryBatch.js","../src/static_batcher/GeometryBatcher.js","../src/UI.js","../src/utilities/PerspectiveFrustumPointFitter.js","../src/utilities/OrthographicFrustumPointFitter.js","../src/utilities/CameraUtilities.js","../src/Initializer.js","../src/materials/SSAOMaterial.js","../src/materials/SSAOComposeMaterial.js","../src/materials/DisplayNormalTextureMaterial.js","../src/materials/BoxBlurMaterial.js","../src/render_utilities/Blurrer.js","../src/render_mode/NormalAORender.js","../src/render_mode/NormalRender.js","../src/render_mode/VRRender.js","../src/materials/GaussianBlurMaterial.js","../src/materials/LuminosityHighPassMaterial.js","../src/render_utilities/GaussianBlurrer.js","../src/render_mode/UnrealBloomRender.js","../src/OrthographicCamera.js","../src/view_components/ViewComponentManager.js","../src/RenderLoop.js","../src/Screen.js","../src/canvas_drawer/SimpleTextDrawer.js","../src/view_components/ViewComponent.js","../src/primitives/HorizontalPlane.js","../src/primitives/VerticalPlane.js","../src/utilities/ArrayUtilities.js","../src/utilities/FrustumPointFitter.js","../src/utilities/GeometryUtilities.js","../src/utilities/ImageUtilities.js","../src/utilities/MeshSampler.js","../src/utilities/ModelUtilities.js","../src/utilities/ObjectUtilities.js","../src/utilities/StringUtilities.js","../src/utilities/TimeUtilities.js","../src/components/Grid.js","../src/components/Line.js","../src/components/WorldImage.js","../src/components/Text2D.js","../src/materials/UIElementMaterial.js","../src/ui/ui_element_position/ScreenSpacePosition.js","../src/ui/ui_element_position/WorldSpacePosition.js","../src/ui/ui_element_state/UIElementState.js","../src/ui/ui_element_state/OnIdle.js","../src/ui/ui_element_state/OnMouseEnter.js","../src/ui/ui_element_state/OnMouseExit.js","../src/ui/ui_element_state/OnMouseHover.js","../src/components/UIElement.js","../src/components/UpdatableMaterialMesh.js","../src/components/sdf_text/TextGlyph.js","../src/components/sdf_text/SDFText.js","../src/materials/SDFTextMaterial.js","../src/components/sdf_text/SDFTextBatch.js","../src/action_sequencer/VectorInterpolator.js","../src/materials/MedianFilterMaterial.js","../src/render_utilities/MedianFilter.js","../src/materials/DualFilteringBlurMaterial.js","../src/materials/AlphaFilterMaterial.js","../src/render_utilities/DualFilteringBlurrer.js","../src/gpu_particles/ParticleAttribute.js","../src/gpu_particles/GPUParticleSystem.js","../src/materials/gpu_particles/ParticleStorageMaterial.js","../src/gpu_particles/ParticlePositionAttribute.js","../src/data_textures/CustomDataTexture.js","../src/data_textures/RGBDataTexture.js","../src/data_textures/RGBADataTexture.js","../src/data_textures/RGBFloatDataTexture.js","../src/data_textures/RGBAFloatDataTexture.js","../src/static_batcher/BatchedMesh.js","../src/static_batcher/MeshBatcher.js","../src/components/AudioClip.js","../src/resource_loader/AudioLoader.js","../src/resource_loader/BasisLoader.js","../src/resource_loader/CubemapLoader.js","../src/resource_loader/DAELoader.js","../src/resource_loader/FileLoader.js","../src/resource_loader/FontLoader.js","../src/resource_loader/GLTFLoader.js","../src/resource_loader/GLTFDRACOLoader.js","../src/resource_loader/HDRCubeTextureLoader.js","../src/resource_loader/JSONLoader.js","../src/resource_loader/OBJLoader.js","../src/resource_loader/PointArrayLoader.js","../src/resource_loader/RGBETextureLoader.js","../src/resource_loader/TextLoader.js","../src/resource_loader/AsyncTextureLoader.js","../src/resource_loader/TextureLoader.js","../src/resource_loader/VideoLoader.js","../src/resource_loader/ResourceBatch.js"],"sourcesContent":["\nclass Browser\n{\n init()\n {\n this.browser_name = '';\n this.agent = window.navigator.userAgent.toLowerCase();\n\n switch (true)\n {\n case this.agent.indexOf('edge') > -1:\n this.browser_name = 'edge_ie';\n break;\n case this.agent.indexOf('edg') > -1:\n this.browser_name = 'edge_chromium';\n break;\n case this.agent.indexOf('opr') > -1 && !!window.opr:\n this.browser_name = 'opera';\n break;\n case this.agent.indexOf('chrome') > -1 && !!window.chrome:\n this.browser_name = 'chrome';\n break;\n case this.agent.indexOf('trident') > -1:\n this.browser_name = 'iexplorer';\n break;\n case this.agent.indexOf('firefox') > -1:\n this.browser_name = 'firefox';\n break;\n case this.agent.indexOf('safari') > -1:\n this.browser_name = 'safari';\n break;\n default:\n this.browser_name = 'other';\n break;\n }\n\n this.version = this.get_version();\n }\n\n get name()\n {\n return this.browser_name;\n }\n\n get is_safari()\n {\n return this.browser_name === 'safari';\n }\n\n get is_chrome()\n {\n return this.browser_name === 'chrome';\n }\n\n get is_edge()\n {\n return this.browser_name === 'edge_ie';\n }\n\n get is_edge_chromium()\n {\n return this.browser_name === 'edge_chromium';\n }\n\n get has_webm()\n {\n return !!(this.is_chrome || this.is_firefox || this.is_edge_chromium);\n }\n\n get has_hvec()\n {\n return this.is_safari;\n }\n\n get preferred_video_extension()\n {\n return this.has_webm ? 'webm' : this.has_hvec ? 'hvec.mp4' : 'mp4';\n }\n\n get_version()\n {\n const ua = navigator.userAgent;\n let tem = '';\n let version = 0;\n\n let M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\\/))\\/?\\s*(\\d+)/i) || [];\n\n if (/trident/i.test(M[1]))\n {\n tem = /\\brv[ :]+(\\d+)/g.exec(ua) || [];\n version = 'IE ' + (tem[1] || '');\n }\n if (M[1] === 'Chrome')\n {\n tem = ua.match(/\\b(OPR|Edge)\\/(\\d+)/);\n if (tem != null) version = tem.slice(1).join(' ').replace('OPR', 'Opera');\n }\n\n M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, '-?'];\n if ((tem = ua.match(/version\\/(\\d+(\\.\\d+)?)/i)) != null) M.splice(1, 1, tem[1]);\n\n version = M.join(' ');\n\n return Number(version.split(' ')[1]);\n }\n}\n\nconst browser = new Browser();\nexport { browser as Browser };\n","class Validation\n{\n constructor()\n {}\n\n static is_int(n)\n {\n return Number(n) === n && n % 1 === 0;\n }\n\n static is_float(n)\n {\n return Number(n) === n && n % 1 !== 0;\n }\n\n static is_number(n)\n {\n return this.is_int(n) || this.is_float(n);\n }\n\n static is_json(str)\n {\n try\n {\n JSON.parse(str);\n }\n catch (e)\n {\n return false;\n }\n\n return true;\n }\n}\n\nexport { Validation };\n","import { Browser } from '../Browser';\r\nimport { Validation } from '../utilities/Validation';\r\n\r\nclass AbstractLoader\r\n{\r\n constructor(resource_id, url, size = 1)\r\n {\r\n this.resource_id = resource_id;\r\n this.url = url;\r\n this.loaded_bytes = 0;\r\n this.total_bytes = size;\r\n\r\n this.has_finished = false;\r\n this.has_error = false;\r\n this.error_message = 'none';\r\n }\r\n\r\n __update_downloaded_bytes(loaded, total)\r\n {\r\n loaded = Validation.is_number(loaded) ? loaded : 1;\r\n total = Validation.is_number(total) ? total : 1;\r\n\r\n this.loaded_bytes = loaded;\r\n\r\n if (total > 0)\r\n {\r\n this.total_bytes = total;\r\n }\r\n\r\n if (this.loaded_bytes > this.total_bytes)\r\n {\r\n console.warn('Total bytes is smaller than loaded ones. Please set total bytes by hand to:', this.url);\r\n }\r\n }\r\n\r\n __loading_ended()\r\n {\r\n this.has_finished = true;\r\n }\r\n\r\n __set_error(message)\r\n {\r\n this.has_error = true;\r\n this.error_message = message;\r\n }\r\n\r\n print_error()\r\n {\r\n console.error('Error while loading ' + this.resource_id + '\\n\\t path: ' + this.url + '\\n\\t\\t' + this.error_message);\r\n }\r\n\r\n load(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n const cache = Browser.is_safari ? 'no-cache' : 'default';\r\n\r\n fetch(this.url, {\r\n method: 'GET', // *GET, POST, PUT, DELETE, etc.\r\n mode: 'cors', // no-cors, *cors, same-origin\r\n cache: cache, // *default, no-cache, reload, force-cache, only-if-cached\r\n credentials: 'same-origin', // include, *same-origin, omit\r\n redirect: 'follow' // manual, *follow, error\r\n })\r\n .then(this.on_progress.bind(this, resource_container))\r\n .catch(this.__on_error.bind(this));\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n\r\n async on_progress(resource_container, response)\r\n {\r\n const response_clone = response.clone();\r\n const reader = response.body.getReader();\r\n\r\n // Step 2: get total length\r\n const contentLength = +response.headers.get('Content-Length');\r\n\r\n // Step 3: read the data\r\n let receivedLength = 0; // received that many bytes at the moment\r\n\r\n while (true)\r\n {\r\n const { done, value } = await reader.read();\r\n\r\n if (done)\r\n {\r\n break;\r\n }\r\n\r\n receivedLength += value.length;\r\n\r\n this.__update_downloaded_bytes(receivedLength, contentLength);\r\n // console.log(`Received ${receivedLength} of ${contentLength}`);\r\n }\r\n\r\n this.on_preloaded_finished(resource_container, response_clone);\r\n }\r\n\r\n on_preloaded_finished(resource_container, response)\r\n {\r\n }\r\n\r\n __on_error(data)\r\n {\r\n console.error(data);\r\n }\r\n}\r\n\r\nexport { AbstractLoader };\r\n","import { Vector3 } from 'three';\n\nclass OMath\n{\n constructor()\n {}\n\n static linear_map(value,\n from_range_start_value,\n from_range_end_value,\n to_range_start_value,\n to_range_end_value)\n {\n return ((value - from_range_start_value) / (from_range_end_value - from_range_start_value)) * (to_range_end_value - to_range_start_value) + to_range_start_value;\n }\n\n static between(value, min, max)\n {\n return (value >= min && value <= max);\n }\n\n static mod(number, divisor)\n {\n return ((number % divisor) + divisor) % divisor;\n }\n\n static rgb_to_hex(rgb)\n {\n rgb.r = Math.round(rgb.r * 255).toString(16);\n rgb.g = Math.round(rgb.g * 255).toString(16);\n rgb.b = Math.round(rgb.b * 255).toString(16);\n\n if (rgb.r.length === 1)\n {\n rgb.r = '0' + rgb.r;\n }\n if (rgb.g.length === 1)\n {\n rgb.g = '0' + rgb.g;\n }\n if (rgb.b.length === 1)\n {\n rgb.b = '0' + rgb.b;\n }\n\n return '#' + rgb.r + rgb.g + rgb.b;\n }\n\n static project_points_on_plane(points, plane)\n {\n const projected_point = new Vector3();\n const points_on_plane = [];\n for (let i = 0; i < points.length; i++)\n {\n plane.projectPoint(points[i], projected_point);\n points_on_plane.push(projected_point.clone());\n }\n\n return points_on_plane;\n }\n\n static matrix4_lerp(from, to, target, t)\n {\n for (let i = 0; i < 16; i++)\n {\n target.elements[i] = this.lerp(from.elements[i], to.elements[i], t);\n }\n }\n\n static equals(x1, x2)\n {\n return Math.abs(x1 - x2) < 0.000001;\n }\n\n static lerp(x, y, t)\n {\n return (1 - t) * x + t * y;\n }\n\n static clamp(value, min, max)\n {\n return Math.max(min, Math.min(max, value));\n }\n\n static euclideanModulo(n, m)\n {\n return ((n % m) + m) % m;\n }\n\n static pingpong(x, length = 1)\n {\n return length - Math.abs(OMath.euclideanModulo(x, length * 2) - length);\n }\n\n static degToRad(degrees)\n {\n return degrees * (Math.PI / 180);\n }\n\n static radToDeg(radians)\n {\n return radians * (180 / Math.PI);\n }\n\n static deg_to_rad(degrees)\n {\n return degrees * (Math.PI / 180);\n }\n\n static rad_to_deg(radians)\n {\n return radians * (180 / Math.PI);\n }\n\n static perspective_divide(v)\n {\n v.x /= v.w;\n v.y /= v.w;\n v.z /= v.w;\n return v;\n }\n\n static points_average(points)\n {\n const center = points[0].clone();\n for (let i = 1; i < points.length; i++)\n {\n center.add(points[i]);\n }\n center.multiplyScalar(1 / points.length);\n return center;\n }\n\n static get_random_color()\n {\n const arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'a', 'b', 'c', 'd', 'e', 'f'];\n\n let col = '#';\n col += arr[Math.floor(Math.random() * 16)];\n col += arr[Math.floor(Math.random() * 16)];\n\n col += arr[Math.floor(Math.random() * 16)];\n col += arr[Math.floor(Math.random() * 16)];\n\n col += arr[Math.floor(Math.random() * 16)];\n col += arr[Math.floor(Math.random() * 16)];\n return col;\n }\n\n static saturate(x)\n {\n return OMath.clamp(x, 0, 1);\n }\n}\n\nexport { OMath };\n","\nimport { OMath } from '../utilities/OMath';\n\nclass ActionSequencer\n{\n constructor(context)\n {\n this.elapsed_time = -0.00001;\n this.playback_speed = this.__get_playback_speed();\n this.playing = false;\n\n this.action_events = [];\n this.context = context;\n\n this.initial_context = JSON.parse(JSON.stringify(context));\n\n this.tmp_t = 0;\n\n this.channels = {};\n\n const channel_names = Object.keys(context);\n for (let i = 0; i < channel_names.length; i++)\n {\n this.channels[channel_names[i]] = [];\n }\n\n this.duration = 0;\n }\n\n play()\n {\n this.playing = true;\n }\n\n stop()\n {\n this.playing = false;\n }\n\n reset()\n {\n this.elapsed_time = -0.00001;\n }\n\n skip()\n {\n const duration = this.get_duration();\n this.__play_clips(this.elapsed_time, duration + 0.0001);\n this.elapsed_time = duration;\n }\n\n update(delta_time)\n {\n if (this.playing)\n {\n this.__play_clips(this.elapsed_time, this.elapsed_time + delta_time * this.playback_speed);\n this.elapsed_time = this.elapsed_time + delta_time * this.playback_speed;\n }\n }\n\n set_progress(time)\n {\n this.elapsed_time = OMath.clamp(time, 0, this.duration);\n this.__play_clips(this.elapsed_time, this.elapsed_time);\n }\n\n set_normalized_progress(t)\n {\n this.elapsed_time = OMath.clamp(t, 0, 1) * this.duration;\n this.__play_clips(this.elapsed_time, this.elapsed_time);\n }\n\n get_progress()\n {\n return OMath.clamp(this.elapsed_time / this.get_duration(), 0, 1);\n }\n\n is_finished()\n {\n return this.elapsed_time > this.get_duration();\n }\n\n add_action_event(trigger_time, action)\n {\n this.action_events.push({\n trigger_time: trigger_time,\n action: action\n });\n\n this.duration = Math.max(this.duration, trigger_time);\n }\n\n add_action_interpolator(from, to, interpolator, use_dynamic_from_value = false)\n {\n if (use_dynamic_from_value)\n {\n const keyframes = this.channels[interpolator.attribute_name];\n\n if (keyframes === undefined)\n {\n console.error(`${interpolator.attribute_name} missing in initial state data.`);\n }\n\n if (keyframes.length === 0)\n {\n interpolator.from = this.initial_context[interpolator.attribute_name];\n }\n else\n {\n interpolator.from = keyframes[keyframes.length - 1].interpolator.to;\n }\n }\n\n const keyframe = {\n from: from,\n to: to,\n interpolator: interpolator\n };\n\n this.duration = Math.max(this.duration, to);\n this.channels[interpolator.attribute_name].push(keyframe);\n }\n\n get_current_target_value(name)\n {\n const keyframe = this.__get_current_keyframe(name, this.elapsed_time);\n\n if (this.elapsed_time < keyframe.from)\n {\n return keyframe.interpolator.evaluate(0);\n }\n\n return keyframe.interpolator.evaluate(1);\n }\n\n get_current_starting_value(name)\n {\n const keyframe = this.__get_current_keyframe(name, this.elapsed_time);\n\n return keyframe.interpolator.evaluate(0);\n }\n\n get_current_progress(name)\n {\n const keyframe = this.__get_current_keyframe(name, this.elapsed_time);\n const t = this.__linear_map_01(this.elapsed_time, keyframe.from, keyframe.to);\n\n return keyframe.interpolator.easing_function(t);\n }\n\n get_duration()\n {\n return this.duration;\n }\n\n __play_clips(from, to)\n {\n for (let i = 0; i < this.action_events.length; i++)\n {\n if (this.action_events[i].trigger_time > from - Number.EPSILON &&\n this.action_events[i].trigger_time < to + Number.EPSILON)\n {\n // console.log(\"Play event: \" + this.action_events[i].action.constructor.name + \" at \"+ this.action_events[i].trigger_time);\n this.action_events[i].action.trigger();\n }\n }\n const channel_names = Object.keys(this.initial_context);\n\n for (let i = 0; i < channel_names.length; i++)\n {\n const name = channel_names[i];\n const keyframe = this.__get_current_keyframe(name, from);\n\n this.context[name] = this.evaluate_keyframe(keyframe, from);\n }\n }\n\n evaluate_keyframe(keyframe, time)\n {\n this.tmp_t = this.__linear_map_01(time, keyframe.from, keyframe.to);\n\n return keyframe.interpolator.evaluate(OMath.clamp(this.tmp_t, 0, 1));\n }\n\n get_keyframes(channel_name)\n {\n return this.channels[channel_name];\n }\n\n is_channel_redefined(channel_name)\n {\n for (let i = 0; i < this.channels[channel_name].length; i++)\n {\n const keyframe = this.channels[channel_name][i];\n\n if (keyframe.interpolator.initial)\n {\n return false;\n }\n }\n\n return true;\n }\n\n __linear_map_01(value,\n from_range_start_value,\n from_range_end_value)\n {\n return OMath.saturate(((value - from_range_start_value) / (from_range_end_value - from_range_start_value)) * (1 - 0) + 0);\n }\n\n __get_current_keyframe(channel_name, time)\n {\n let current = undefined;\n\n const keyframes = this.channels[channel_name];\n\n for (let i = 0; i < keyframes.length; i++)\n {\n const keyframe = keyframes[i];\n\n if (time >= keyframe.from && time <= keyframe.to)\n {\n current = keyframe;\n return current;\n }\n }\n\n let min = Infinity;\n\n for (let i = 0; i < keyframes.length; i++)\n {\n const keyframe = keyframes[i];\n const distance = Math.abs(keyframe.to - time);\n\n if (distance < min)\n {\n current = keyframe;\n min = distance;\n }\n }\n\n return current;\n }\n\n __get_playback_speed()\n {\n const url_params = new URLSearchParams(window.location.search);\n\n const transitions_velocity = url_params.get('transitions_velocity');\n\n if (transitions_velocity)\n {\n return Number(transitions_velocity);\n }\n else\n {\n return 1;\n }\n }\n}\n\nexport { ActionSequencer };\n","class EasingFunctions\n{\n constructor()\n {}\n\n static linear(x)\n {\n return x;\n }\n\n static triangular(x)\n {\n return 1 - Math.abs((x * 2) % (1 * 2) - 1);\n }\n\n static ease_in_sine(x)\n {\n return 1 - Math.cos(x * 3.1415926 / 2);\n }\n\n static ease_out_sine(x)\n {\n return Math.sin(x * 3.1415926 / 2);\n }\n\n static ease_in_out_sine(x)\n {\n return -(Math.cos(3.1415926 * x) - 1) / 2;\n }\n\n static ease_in_cubic(x)\n {\n return x * x * x;\n }\n\n static ease_out_cubic(x)\n {\n return 1 - Math.pow(1 - x, 3);\n }\n\n static ease_in_out_cubic(x)\n {\n return x < 0.5\n ? 4 * x * x * x\n : 1 - Math.pow(-2 * x + 2, 3) / 2;\n }\n\n static ease_in_quad(x)\n {\n return x * x;\n }\n\n static ease_out_quad(x)\n {\n return 1 - (1 - x) * (1 - x);\n }\n\n static ease_in_out_quad(x)\n {\n return x < 0.5\n ? 2 * x * x\n : 1 - Math.pow(-2 * x + 2, 2) / 2;\n }\n\n static ease_in_quart(x)\n {\n return x * x * x * x;\n }\n\n static ease_out_quart(x)\n {\n return 1 - Math.pow(1 - x, 4);\n }\n\n static ease_in_out_quart(x)\n {\n return x < 0.5\n ? 8 * x * x * x * x\n : 1 - Math.pow(-2 * x + 2, 4) / 2;\n }\n\n static ease_in_quint(x)\n {\n return x * x * x * x * x;\n }\n\n static ease_out_quint(x)\n {\n return 1 - Math.pow(1 - x, 5);\n }\n\n static ease_in_out_quint(x)\n {\n return x < 0.5\n ? 16 * x * x * x * x * x\n : 1 - Math.pow(-2 * x + 2, 5) / 2;\n }\n\n static ease_in_expo(x)\n {\n return x === 0 ? 0 : Math.pow(2, 10 * x - 10);\n }\n\n static ease_out_expo(x)\n {\n return x === 1 ? 1 : 1 - Math.pow(2, -10 * x);\n }\n\n static ease_in_out_expo(x)\n {\n return x === 0\n ? 0\n : x === 1\n ? 1\n : x < 0.5\n ? Math.pow(2, 20 * x - 10) / 2\n : (2 - Math.pow(2, -20 * x + 10)) / 2;\n }\n\n static ease_in_circ(x)\n {\n return 1 - Math.sqrt(1 - Math.pow(x, 2));\n }\n\n static ease_out_circ(x)\n {\n return Math.sqrt(1 - Math.pow(x - 1, 2));\n }\n\n static ease_in_out_circ(x)\n {\n return x < 0.5\n ? (1 - Math.sqrt(1 - Math.pow(2 * x, 2))) / 2\n : (Math.sqrt(1 - Math.pow(-2 * x + 2, 2)) + 1) / 2;\n }\n\n static ease_in_back(x)\n {\n return 2.7015 * x * x * x - 1.7015 * x * x;\n }\n\n static ease_out_back(x)\n {\n return 1 + 2.7015 * Math.pow(x - 1, 3) + 1.7015 * Math.pow(x - 1, 2);\n }\n\n static ease_in_out_back(x)\n {\n return x < 0.5\n ? (Math.pow(2 * x, 2) * ((2.5949095 + 1) * 2 * x - 2.5949095)) / 2\n : (Math.pow(2 * x - 2, 2) * ((2.5949095 + 1) * (x * 2 - 2) + 2.5949095) + 2) / 2;\n }\n\n static ease_in_elastic(x)\n {\n const c4 = (2 * Math.PI) / 3;\n\n return x === 0\n ? 0\n : x === 1\n ? 1\n : -Math.pow(2, 10 * x - 10) * Math.sin((x * 10 - 10.75) * c4);\n }\n\n static ease_out_elastic(x)\n {\n return x === 0\n ? 0\n : x === 1\n ? 1\n : Math.pow(2, -10 * x) * Math.sin((x * 10 - 0.75) * 2.0943950) + 1;\n }\n\n static ease_in_out_elastic(x)\n {\n return x === 0\n ? 0\n : x === 1\n ? 1\n : x < 0.5\n ? -(Math.pow(2, 20 * x - 10) * Math.sin((20 * x - 11.125) * 1.3962633)) / 2\n : Math.pow(2, -20 * x + 10) * Math.sin((20 * x - 11.125) * 1.3962633) / 2 + 1;\n }\n\n static ease_in_bounce(x)\n {\n return 1 - this.ease_out_bounce(1 - x);\n }\n\n static ease_out_bounce(x)\n {\n const n1 = 7.5625;\n const d1 = 2.75;\n\n if (x < 1 / d1)\n {\n return n1 * x * x;\n }\n else if (x < 2 / d1)\n {\n return n1 * (x -= 1.5 / d1) * x + 0.75;\n }\n else if (x < 2.5 / d1)\n {\n return n1 * (x -= 2.25 / d1) * x + 0.9375;\n }\n else\n {\n return n1 * (x -= 2.625 / d1) * x + 0.984375;\n }\n }\n\n static ease_in_out_bounce(x)\n {\n return x < 0.5\n ? (1 - this.ease_out_bounce(1 - 2 * x)) / 2\n : (1 + this.ease_out_bounce(2 * x - 1)) / 2;\n }\n\n static heartbeat(t)\n {\n return 1.0 - Math.pow(Math.abs(Math.sin(t + 1.0)), 63.0) * Math.sign(Math.sin(t)) * Math.sin(t + 1.5 + 1.0) * 0.8;\n }\n}\n\nexport { EasingFunctions };\n","import { EasingFunctions } from '../utilities/EasingFunctions';\n\nclass ActionInterpolator\n{\n constructor(easing_function = 'linear')\n {\n this.easing_function = undefined;\n\n if (typeof easing_function === 'string')\n {\n this.easing_function = EasingFunctions[easing_function];\n }\n else\n {\n this.easing_function = easing_function;\n }\n }\n\n update(context, t)\n {\n\n }\n}\n\nexport { ActionInterpolator };\n","import { ActionInterpolator } from './ActionInterpolator';\nimport { OMath } from '../utilities/OMath';\n\nclass NumberInterpolator extends ActionInterpolator\n{\n constructor(attribute_name, from = 0, to = 1, initial = false, easing_function = 'linear')\n {\n super(easing_function);\n\n this.attribute_name = attribute_name;\n this.from = from;\n this.to = to;\n this.initial = initial;\n }\n\n update(context, t)\n {\n context[this.attribute_name] = OMath.lerp(this.from, this.to, this.easing_function(t));\n }\n\n evaluate(t)\n {\n return OMath.lerp(this.from, this.to, this.easing_function(t));\n }\n}\n\nexport { NumberInterpolator };\n","class ViewContext\n{\n constructor()\n {\n this.app = undefined;\n }\n\n set_app(app)\n {\n this.app = app;\n }\n}\n\nconst view_context = new ViewContext();\nexport { view_context as ViewContext };\n","import { ViewContext } from '../view_components/ViewContext';\n\nclass ActionEvent\n{\n constructor(name, method, args)\n {\n this.name = name;\n this.method = method;\n this.args = args;\n }\n\n trigger()\n {\n ViewContext.app[this.name][this.method](...this.args.split(','));\n }\n}\n\nexport { ActionEvent };\n","class DrawIOAnimationSheet\n{\n constructor()\n {\n\n }\n\n parse(xml_document)\n {\n const doc = new DOMParser().parseFromString(xml_document, 'text/xml');\n\n const animation_nodes = doc.querySelectorAll('mxGeometry');\n\n const animation_tracks = [];\n const triggers = [];\n\n for (let i = 0; i < animation_nodes.length; i++)\n {\n const node = animation_nodes[i];\n const parent_node = node.parentElement;\n const data = parent_node.getAttribute('value');\n\n const x_pos = this.get_node_x_position(node);\n\n const from = x_pos / 100;\n const duration = parseFloat(node.getAttribute('width')) / 100;\n\n // is trigger\n if (parent_node.getAttribute('style').includes('rhombus;'))\n {\n const split_data = data.split('.');\n const trigger_name = split_data[0];\n const trigger_method = split_data[1];\n\n triggers.push({\n name: trigger_name,\n method: trigger_method,\n at_time: from + duration * 0.5\n });\n }\n\n const valid_element = parent_node.getAttribute('style').includes('rounded=0;') &&\n !parent_node.getAttribute('style').includes('text;');\n\n if (valid_element && data !== '' && !data.includes(' '))\n {\n const split_data = data.split('=');\n\n const attribute_name = split_data[0];\n\n const value_data = split_data[1].split('--');\n const to_value = parseFloat(value_data[0]);\n const easing_function = value_data[1];\n\n if (split_data.length !== 2)\n {\n console.error('DrawIO data is malformed:', data);\n }\n\n if (value_data.length !== 2)\n {\n console.error('DrawIO data is malformed:', data);\n }\n\n animation_tracks.push({\n attribute_name: attribute_name,\n from_time: from,\n to_time: from + duration,\n to_value: to_value,\n easing_function: easing_function\n });\n }\n }\n\n animation_tracks.sort((a, b) =>\n {\n return a.from_time - b.from_time;\n });\n return {\n animation_tracks: animation_tracks,\n triggers: triggers\n };\n }\n\n get_node_x_position(node)\n {\n const x_pos = node.getAttribute('x');\n return x_pos === null ? 0 : parseFloat(x_pos);\n }\n}\n\nexport { DrawIOAnimationSheet };\n","import { ActionSequencer } from '../../action_sequencer/ActionSequencer';\nimport { NumberInterpolator } from '../../action_sequencer/NumberInterpolator';\nimport { ActionEvent } from '../../action_sequencer/ActionEvent';\nimport { DrawIOAnimationSheet } from './DrawIOAnimationSheet';\n\nclass ActionSequencerBuilder\n{\n constructor(default_state_data)\n {\n this.default_state_data = default_state_data;\n }\n\n from_animation_sheet(animation_data, current_context, initial_context)\n {\n initial_context = initial_context || this.default_state_data;\n const tracks = animation_data.animation_tracks;\n const triggers = animation_data.triggers;\n\n const initial_tracks = this.state_to_tracks(this.default_state_data, this.get_longest_time(animation_data.animation_tracks));\n\n for (let i = 0; i < initial_tracks.length; i++)\n {\n if (tracks.find(element => element.attribute_name === initial_tracks[i].attribute_name) === undefined)\n {\n tracks.push(initial_tracks[i]);\n }\n }\n\n const sequencer = new ActionSequencer(current_context);\n\n for (let i = 0; i < tracks.length; i++)\n {\n const t = tracks[i];\n const interpolator = new NumberInterpolator(\n t.attribute_name,\n current_context[t.attribute_name],\n t.to_value,\n t.initial,\n t.easing_function\n );\n\n sequencer.add_action_interpolator(t.from_time, t.to_time, interpolator, true);\n }\n\n for (let i = 0; i < triggers.length; i++)\n {\n const t = triggers[i];\n const action_event = new ActionEvent(t.name, t.method, t.args);\n sequencer.add_action_event(t.at_time, action_event);\n }\n\n return sequencer;\n }\n\n state_to_tracks(state, longest_time)\n {\n const tracks = [];\n\n const keys = Object.keys(state);\n\n for (let i = 0; i < keys.length; i++)\n {\n tracks.push({\n attribute_name: keys[i],\n from_time: 0,\n to_time: longest_time < 1 ? longest_time : 1,\n to_value: state[keys[i]],\n initial: true,\n easing_function: 'ease_in_out_cubic'\n });\n }\n\n return tracks;\n }\n\n from_draw_io(xml, context)\n {\n const transition_data = (new DrawIOAnimationSheet()).parse(xml);\n const tracks = transition_data.animation_tracks;\n const triggers = transition_data.triggers;\n const sequencer = new ActionSequencer(context);\n\n for (let i = 0; i < tracks.length; i++)\n {\n const t = tracks[i];\n const interpolator = new NumberInterpolator(\n t.attribute_name,\n context[t.attribute_name],\n t.to_value,\n t.initial,\n t.easing_function\n );\n\n sequencer.add_action_interpolator(t.from_time, t.to_time, interpolator, true);\n }\n\n for (let i = 0; i < triggers.length; i++)\n {\n const t = triggers[i];\n const action_event = new ActionEvent(t.name, t.method);\n sequencer.add_action_event(t.at_time, action_event);\n }\n\n return sequencer;\n }\n\n get_longest_time(tracks)\n {\n let longest_time = -1;\n\n for (let i = 0; i < tracks.length; i++)\n {\n const track = tracks[i];\n\n const track_time = track.to_time;\n\n longest_time = track_time > longest_time ? track_time : longest_time;\n }\n\n return longest_time;\n }\n}\n\nexport { ActionSequencerBuilder };\n","class EventManager\n{\n init()\n {\n this.queue = {};\n\n this.zoom_changed_evt = 'zoom_changed';\n this.store_clickd_evt = 'store_clicked';\n this.point_selected_evt = 'point_selected';\n this.config_changed = 'config_changed';\n\n this.path_substep_completed = 'path_substep_completed';\n this.path_completed = 'path_completed';\n this.go_to_store_requested_evt = 'go_to_store_requested';\n\n this.resource_loaded_evt = 'resource_loaded';\n this.service_clicked_evt = 'service_clicked';\n this.unit_pos_updated_evt = 'unit_position_updated';\n\n this.floor_changed_evt = 'floor_changed';\n\n this.on_enter_floor_navigation = 'on_enter_floor_navigation';\n this.on_exit_floor_navigation = 'on_exit_floor_navigation';\n\n this.on_enter_floor_selection = 'on_enter_floor_selection';\n this.on_exit_floor_selection = 'on_exit_floor_selection';\n\n this.on_enter_outside_navigation = 'on_enter_outside_navigation';\n this.on_exit_outside_navigation = 'on_exit_outside_navigation';\n\n this.step_selected_evt = 'step_selected';\n }\n\n fire(event, payload)\n {\n const queue = this.queue[event];\n\n if (queue === undefined)\n {\n return;\n }\n let i = queue.length;\n while (i--)\n {\n queue[i](payload);\n }\n }\n\n on(event, callback)\n {\n if (typeof this.queue[event] === 'undefined')\n {\n this.queue[event] = [];\n }\n\n this.queue[event].push(callback);\n }\n\n fire_zoom_changed(zoom)\n {\n this.fire(this.zoom_changed_evt, zoom);\n }\n\n fire_store_selected(store_id)\n {\n this.fire(this.store_clickd_evt, store_id);\n }\n\n fire_point_selected(hit_data)\n {\n this.fire(this.point_selected_evt, hit_data);\n }\n\n fire_config_changed()\n {\n this.fire(this.config_changed);\n }\n\n fire_path_substep_completed(step_number)\n {\n this.fire(this.path_substep_completed, step_number);\n }\n\n fire_path_completed()\n {\n this.fire(this.path_completed);\n }\n\n fire_step_selected(step_index)\n {\n this.fire(this.step_selected_evt, step_index);\n }\n\n fire_go_to_store_requested(store_id)\n {\n this.fire(this.go_to_store_requested_evt, store_id);\n }\n\n fire_resource_loaded(resource)\n {\n this.fire(this.resource_loaded_evt, resource);\n }\n\n fire_service_clicked(service)\n {\n this.fire(this.service_clicked_evt, service);\n }\n\n fire_unit_position_updated(unit_data)\n {\n this.fire(this.unit_pos_updated_evt, unit_data);\n }\n\n fire_floor_switched(floor_id)\n {\n this.fire(this.floor_changed_evt, floor_id);\n }\n\n fire_on_enter_floor_navigation(state)\n {\n this.fire(this.on_enter_floor_navigation, state);\n }\n\n fire_on_exit_floor_navigation(state)\n {\n this.fire(this.on_exit_floor_navigation, state);\n }\n\n fire_on_enter_floor_selection(state)\n {\n this.fire(this.on_enter_floor_selection, state);\n }\n\n fire_on_exit_floor_selection(state)\n {\n this.fire(this.on_exit_floor_selection, state);\n }\n\n fire_on_enter_outside_navigation(state)\n {\n this.fire(this.on_enter_outside_navigation, state);\n }\n\n fire_on_exit_outside_navigation(state)\n {\n this.fire(this.on_exit_outside_navigation, state);\n }\n}\n\nconst event_manager = new EventManager();\nexport { event_manager as EventManager };\n","import { EventManager } from './EventManager';\n\nclass ResourceContainer\n{\n init()\n {\n this.resources = {};\n this.resources_by_url = {};\n }\n\n set_resource(name, url, resource)\n {\n const urls = Object.keys(this.resources_by_url);\n\n if (urls.includes(url))\n {\n this.resources[name] = this.resources_by_url[url];\n }\n else\n {\n this.resources[name] = resource;\n this.resources_by_url[url] = resource;\n }\n\n EventManager.fire_resource_loaded({ name: name, value: resource });\n }\n\n get_resource(name)\n {\n return this.resources[name];\n }\n\n get(name)\n {\n return this.resources[name];\n }\n}\n\nconst resource_container = new ResourceContainer();\nexport { resource_container as ResourceContainer };\n","class HTMLUtilities\n{\n static load_images(container)\n {\n const images = container.querySelectorAll('img');\n\n for (let i = 0; i < images.length; i++)\n {\n const image = images[i];\n\n if (image.dataset.src)\n {\n image.src = image.dataset.src;\n }\n }\n\n const image_objects = container.querySelectorAll('object');\n\n for (let i = 0; i < image_objects.length; i++)\n {\n const image_object = image_objects[i];\n\n if (image_object.dataset.src)\n {\n image_object.data = image_object.dataset.src;\n }\n }\n }\n\n static load_videos(container)\n {\n const videos = container.querySelectorAll('video');\n\n for (let i = 0; i < videos.length; i++)\n {\n const video = videos[i];\n\n if (video.dataset.src)\n {\n video.src = video.dataset.src;\n }\n }\n }\n}\n\nexport { HTMLUtilities };\n","import { ActionSequencerBuilder } from './ActionSequencerBuilder';\n\nclass TransitionTable\n{\n constructor()\n {\n this.transitions = [];\n this.default_state_data = {};\n }\n\n get(from_state_name, to_state_name, current_context)\n {\n for (let i = 0; i < this.transitions.length; i++)\n {\n if (this.transitions[i].from === from_state_name && this.transitions[i].to === to_state_name)\n {\n const action_sequencer = new ActionSequencerBuilder(this.default_state_data).from_animation_sheet(this.transitions[i].data, current_context);\n return action_sequencer;\n }\n }\n\n for (let i = 0; i < this.transitions.length; i++)\n {\n if (this.transitions[i].to === to_state_name && this.transitions[i].from === undefined)\n {\n const action_sequencer = new ActionSequencerBuilder(this.default_state_data).from_animation_sheet(this.transitions[i].data, current_context);\n return action_sequencer;\n }\n }\n\n console.error('TransitionTable.get no data found for: ', from_state_name, to_state_name);\n return undefined;\n }\n\n add_transitions(transitions)\n {\n for (let i = 0; i < transitions.length; i++)\n {\n this.transitions.push(transitions[i]);\n }\n }\n\n set_transitions(transitions)\n {\n this.transitions = transitions;\n }\n\n set_default_state_data(default_state_data)\n {\n this.default_state_data = default_state_data;\n }\n}\n\nexport { TransitionTable };\n","import { Vector2 } from 'three';\nimport { Clock } from 'three';\n\nclass Time\n{\n constructor()\n {\n this.delta_buffer = [0.016, 0.016, 0.016, 0.016, 0.016, 0.016, 0.016, 0.016, 0.016, 0.016];\n }\n\n init()\n {\n this.___time = new Clock();\n this.__raw_delta_time = 0;\n this.__elapsed_time = 0;\n this.__allocated_time = new Vector2(0, 0);\n\n this.delta_time = 0.016;\n }\n\n get elapsed_time()\n {\n return this.__elapsed_time;\n }\n\n get shader_time()\n {\n this.__allocated_time.x = this.delta_time;\n this.__allocated_time.y = this.elapsed_time;\n return this.__allocated_time;\n }\n\n __update()\n {\n this.__raw_delta_time = this.___time.getDelta();\n this.__elapsed_time = this.___time.getElapsedTime();\n\n this.delta_buffer.shift();\n this.delta_buffer.push(this.__raw_delta_time < 0.32 ? this.__raw_delta_time : 0.032);\n\n this.__calculate_delta_time();\n }\n\n __calculate_delta_time()\n {\n this.delta_time = 0;\n\n for (let i = 0; i < this.delta_buffer.length; i++)\n {\n this.delta_time += this.delta_buffer[i];\n }\n\n this.delta_time = this.delta_time / this.delta_buffer.length;\n }\n}\n\nconst time = new Time();\nexport { time as Time };\n","class ViewState\n{\n constructor(name)\n {\n this.name = name;\n }\n\n start()\n {\n }\n\n show()\n {\n }\n\n hide()\n {\n }\n\n before_enter()\n {\n }\n\n on_enter()\n {\n }\n\n update()\n {\n }\n\n update_enter_transition(global_view_data, transition_progress, action_sequencer)\n {\n // Backward compatibility. It will be removed in future releases.\n this.update_transition(global_view_data, transition_progress, action_sequencer);\n }\n\n update_exit_transition(global_view_data, transition_progress, action_sequencer)\n {\n }\n\n // Deprecated\n update_transition(global_view_data, transition_progress, action_sequencer)\n {\n }\n\n before_exit()\n {\n }\n\n on_exit()\n {\n }\n}\n\nexport { ViewState };\n","import { Time } from '../../Time';\nimport { ViewState } from '../ViewState';\n\nclass ViewStateTransitionHandler\n{\n constructor(transition_table)\n {\n this.last_state = new ViewState();\n this.current_state = new ViewState();\n\n this.default_state_data = {};\n this.current_state_data = {};\n\n this.transition_table = transition_table;\n\n this.transitioning = false;\n }\n\n go_to_state(state, skip = false)\n {\n if (this.transitioning)\n {\n this.__exit_last_state();\n }\n\n this.last_state = this.current_state;\n this.current_state = state;\n\n this.last_state.before_exit();\n this.current_state.show();\n\n this.action_sequencer = this.transition_table.get(this.last_state.name, this.current_state.name, this.current_state_data);\n this.current_state.before_enter();\n\n this.action_sequencer.play();\n\n this.transitioning = true;\n\n if (skip)\n {\n this.action_sequencer.skip();\n this.update();\n }\n }\n\n update()\n {\n if (this.transitioning)\n {\n this.__update_transitions();\n\n if (this.action_sequencer.is_finished())\n {\n this.transitioning = false;\n\n this.__update_transitions();\n\n this.__exit_last_state();\n\n this.current_state.on_enter();\n }\n }\n else\n {\n this.current_state.update();\n }\n }\n\n set_state(state)\n {\n this.current_state = state;\n }\n\n set_default_state_data(default_state_data)\n {\n Object.assign(this.default_state_data, default_state_data);\n Object.assign(this.current_state_data, default_state_data);\n }\n\n __update_transitions()\n {\n this.action_sequencer.update(Time.delta_time);\n this.last_state.update_exit_transition(this.current_state_data, this.action_sequencer.get_progress(), this.action_sequencer);\n this.current_state.update_enter_transition(this.current_state_data, this.action_sequencer.get_progress(), this.action_sequencer);\n }\n\n __exit_last_state()\n {\n if (this.last_state.name !== this.current_state.name)\n {\n this.last_state.hide();\n }\n\n this.last_state.on_exit();\n }\n}\n\nexport { ViewStateTransitionHandler };\n","import { TransitionTable } from './transition/TransitionTable';\nimport { ViewStateTransitionHandler } from './transition/ViewStateTransitionHandler';\n\nclass ViewManager\n{\n constructor()\n {\n this.views = [];\n\n this.transition_table = new TransitionTable();\n this.transition_handler = new ViewStateTransitionHandler(this.transition_table);\n\n this.view_change_subscribers = [];\n\n this.browser_title_suffix = '';\n }\n\n update()\n {\n this.transition_handler.update();\n\n this.__set_views_opacities();\n }\n\n go_to_view(view_name, change_url = true, skip = false)\n {\n const v = this.get(view_name);\n this.transition_handler.go_to_state(v, skip);\n\n if (change_url)\n {\n this.__change_browser_url(v.url);\n this.__change_browser_title(v.url);\n }\n\n this.notify_view_change(view_name);\n }\n\n go_to_scene(scene_name, change_url = false, skip = false)\n {\n const next_view = this.get(scene_name);\n const transition_view = this.get('transition');\n\n transition_view.set_next_view(next_view);\n this.go_to_view(transition_view.name, change_url, skip);\n }\n\n subscribe_to_view_change(subscriber)\n {\n this.view_change_subscribers.push(subscriber);\n }\n\n notify_view_change(view_name)\n {\n for (let i = 0; i < this.view_change_subscribers.length; i++)\n {\n const subscriber = this.view_change_subscribers[i];\n subscriber.on_view_change(view_name);\n }\n }\n\n register_view(view)\n {\n this.views.push(view);\n }\n\n has_view(view_name)\n {\n for (let i = 0; i < this.views.length; i++)\n {\n if (this.views[i].name === view_name)\n {\n return true;\n }\n }\n return false;\n }\n\n add_transitions(transitions)\n {\n this.transition_table.add_transitions(transitions);\n }\n\n set_transitions(transitions)\n {\n this.transition_table.set_transitions(transitions);\n }\n\n set_view(view_name)\n {\n const view = this.get(view_name);\n\n this.transition_handler.set_state(view);\n }\n\n set_browser_title_suffix(title_suffix)\n {\n this.browser_title_suffix = title_suffix;\n }\n\n get_current_view()\n {\n return this.transition_handler.current_state;\n }\n\n get_view_by_name(view_name)\n {\n console.warn('DEPRECATED. Use ViewManager.get instead');\n this.get(view_name);\n }\n\n get(view_name)\n {\n for (let i = 0; i < this.views.length; i++)\n {\n if (this.views[i].name === view_name)\n {\n return this.views[i];\n }\n }\n console.error('[ViewManager.get] no view found for: ', view_name);\n return undefined;\n }\n\n get_view_by_url(url)\n {\n console.warn('DEPRECATED. Use ViewManager.get_by_url instead');\n this.get_by_url(url);\n }\n\n get_by_url(url)\n {\n for (let i = 0; i < this.views.length; i++)\n {\n if (this.views[i].url === url)\n {\n return this.views[i];\n }\n }\n console.error('[ViewManager.get_by_url] no view found for: ', url);\n return undefined;\n }\n\n set_default_state_data(default_state_data)\n {\n this.transition_table.set_default_state_data(default_state_data);\n this.transition_handler.set_default_state_data(default_state_data);\n }\n\n __change_browser_url(url)\n {\n window.history.pushState('', '', url);\n }\n\n __change_browser_title(name)\n {\n const title = this.__capitalize(name);\n\n document.title = title ? `${title} | ${this.browser_title_suffix}` : this.browser_title_suffix;\n }\n\n __set_views_opacities()\n {\n for (let i = 0; i < this.views.length; i++)\n {\n this.views[i].set_opacity(this.transition_handler.current_state_data);\n }\n }\n\n __capitalize(string)\n {\n let aux_string = string.toUpperCase().replace('/', '');\n aux_string = this.__snake_to_whitespace(aux_string);\n\n return aux_string;\n }\n\n __snake_to_whitespace(string)\n {\n return string.replace(\n /([-_][A-Z])/g,\n (group) => group\n .replace('-', ' ')\n .replace('_', ' ')\n );\n }\n}\n\nconst view_manager = new ViewManager();\nexport { view_manager as ViewManager };\n","import { ResourceContainer } from '../ResourceContainer';\nimport { HTMLUtilities } from '../utilities/HTMLUtilities';\nimport { ViewManager } from './ViewManager';\nimport { ViewState } from './ViewState';\n\nclass ApplicationView extends ViewState\n{\n constructor({ name, url, container })\n {\n super(name);\n\n this.container = container;\n this.url = url;\n\n let transition_data = ResourceContainer.get(`${name}_data`);\n\n transition_data = transition_data || {\n animation_tracks: [],\n triggers: []\n };\n\n const transitions = [\n {\n to: name,\n data: transition_data\n }\n ];\n\n ViewManager.register_view(this);\n ViewManager.add_transitions(transitions);\n }\n\n show()\n {\n this.container.classList.add('before_enter');\n this.container.classList.remove('before_exit');\n this.container.classList.remove('hidden');\n }\n\n on_enter()\n {\n this.container.classList.remove('before_enter');\n this.container.classList.remove('before_exit');\n this.container.classList.remove('hidden');\n }\n\n before_exit()\n {\n this.container.classList.add('before_exit');\n this.container.classList.remove('before_enter');\n this.container.classList.remove('hidden');\n }\n\n hide()\n {\n this.container.classList.add('hidden');\n this.container.classList.remove('before_enter');\n this.container.classList.remove('before_exit');\n }\n\n load_html_images()\n {\n HTMLUtilities.load_images(this.container);\n }\n\n load_html_videos()\n {\n HTMLUtilities.load_videos(this.container);\n }\n\n set_opacity(current_state_data)\n {\n this.container.style.opacity = current_state_data[`${this.name}_opacity`];\n }\n}\n\nexport { ApplicationView };\n","class BaseApplication\n{\n on_post_start()\n {}\n\n on_enter()\n {}\n\n on_exit()\n {}\n\n update()\n {}\n\n on_post_render()\n {}\n\n on_pre_render()\n {}\n\n on_frame_end()\n {}\n}\n\nexport { BaseApplication };\n","class BaseRender\n{\n constructor()\n {\n\n }\n\n render()\n {\n\n }\n\n on_enter(context, renderer)\n {\n\n }\n\n on_exit(context, renderer)\n {\n\n }\n\n resize()\n {\n\n }\n\n dispose()\n {\n\n }\n}\n\nexport { BaseRender };\n","import basic_vert from '../shaders/basic_color/basic_color.vert';\nimport basic_frag from '../shaders/basic_color/basic_color.frag';\n\nimport { ShaderMaterial } from 'three';\nimport { Color } from 'three';\n\nclass BaseShaderMaterial extends ShaderMaterial\n{\n constructor(vert, frag, uniforms)\n {\n super({\n vertexShader: vert || basic_vert,\n fragmentShader: frag || basic_frag,\n uniforms: uniforms || {\n _Color: { value: new Color('#FF0000') }\n }\n });\n }\n}\n\nexport { BaseShaderMaterial };\n","import vert from '../shaders/copy/copy.vert';\nimport frag from '../shaders/copy/copy.frag';\n\nimport { ShaderMaterial } from 'three';\nimport { Vector2 } from 'three';\nimport { NoBlending } from 'three';\nimport { AlwaysDepth } from 'three';\n\nclass BlitMaterial extends ShaderMaterial\n{\n constructor(frag_shader, vert_shader, defines)\n {\n super({\n uniforms: {\n _MainTex: { value: null },\n _Resolution: { value: new Vector2(0, 0) },\n _TargetResolution: { value: new Vector2(0, 0) }\n },\n defines: defines || {},\n vertexShader: vert_shader || vert,\n fragmentShader: frag_shader || frag,\n depthWrite: false,\n blending: NoBlending,\n depthTest: false,\n depthFunc: AlwaysDepth\n });\n }\n}\n\nexport { BlitMaterial };\n","import { BlitMaterial } from './BlitMaterial';\n\nimport frag from '../shaders/add/add.frag';\n\nclass AddMaterial extends BlitMaterial\n{\n constructor(nMips)\n {\n super(frag);\n\n this.uniforms._SecondTex = { value: undefined };\n }\n\n set_add_texture(tex)\n {\n this.uniforms._SecondTex.value = tex;\n }\n}\n\nexport { AddMaterial };\n","import { BlitMaterial } from './BlitMaterial';\n\nimport frag from '../shaders/gaussian_blur/unreal_bloom_compose.frag';\n\nimport { Color } from 'three';\nclass UnrealBloomComposeMaterial extends BlitMaterial\n{\n constructor(nMips)\n {\n super(frag, undefined, {\n NUM_MIPS: nMips\n });\n this.uniforms._MainTex = { value: undefined };\n this.uniforms._BlurredTex = { value: undefined };\n this.uniforms._BloomStrength = { value: 1 };\n\n this.uniforms.blurTexture1 = { value: null };\n this.uniforms.blurTexture2 = { value: null };\n this.uniforms.blurTexture3 = { value: null };\n this.uniforms.blurTexture4 = { value: null };\n this.uniforms.blurTexture5 = { value: null };\n\n this.uniforms.bloomStrength = { value: 1.0 };\n this.uniforms.bloomFactors = { value: [1.0, 0.8, 0.6, 0.4, 0.2] };\n this.uniforms.bloomRadius = { value: 0.0 };\n\n const bloomTintColors = [\n new Color('#FFFFFF'),\n new Color('#FFFFFF'),\n new Color('#FFFFFF'),\n new Color('#FFFFFF'),\n new Color('#FFFFFF')\n ];\n\n this.uniforms.bloomTintColors = { value: bloomTintColors };\n }\n\n set_RT_0(rt)\n {\n this.uniforms.blurTexture1.value = rt;\n }\n\n set_RT_1(rt)\n {\n this.uniforms.blurTexture2.value = rt;\n }\n\n set_RT_2(rt)\n {\n this.uniforms.blurTexture3.value = rt;\n }\n\n set_RT_3(rt)\n {\n this.uniforms.blurTexture4.value = rt;\n }\n\n set_RT_4(rt)\n {\n this.uniforms.blurTexture5.value = rt;\n }\n\n set_bloom_strength(value)\n {\n this.uniforms.bloomStrength.value = value;\n }\n\n set_bloom_radius(value)\n {\n this.uniforms.bloomRadius.value = value;\n }\n\n set_tint_color_0(col_string)\n {\n this.uniforms.bloomTintColors.value[0].set(col_string);\n }\n\n set_tint_color_1(col_string)\n {\n this.uniforms.bloomTintColors.value[1].set(col_string);\n }\n\n set_tint_color_2(col_string)\n {\n this.uniforms.bloomTintColors.value[2].set(col_string);\n }\n\n set_tint_color_3(col_string)\n {\n this.uniforms.bloomTintColors.value[3].set(col_string);\n }\n\n set_tint_color_4(col_string)\n {\n this.uniforms.bloomTintColors.value[4].set(col_string);\n }\n}\n\nexport { UnrealBloomComposeMaterial };\n","class CameraManager\n{\n init()\n {\n this._current = undefined;\n // VR Spectator\n this._spectator = undefined;\n }\n\n set current(camera)\n {\n this._current = camera;\n }\n\n get current()\n {\n return this._current;\n }\n\n set spectator(camera)\n {\n this._spectator = camera;\n }\n\n get spectator()\n {\n return this._spectator;\n }\n}\n\nconst camera_manager = new CameraManager();\nexport { camera_manager as CameraManager };\n","class Capabilities\n{\n init()\n {\n this.max_anisotropy = 0;\n this.vertex_texture_sampler_available = false;\n this.fp_textures_available = false;\n }\n}\n\nconst capabilities = new Capabilities();\nexport { capabilities as Capabilities };\n","import { CanvasTexture } from 'three';\nimport { Vector2 } from 'three';\nimport { UVMapping } from 'three';\nimport { ClampToEdgeWrapping } from 'three';\nimport { NearestFilter } from 'three';\n\nclass CanvasDrawer\n{\n constructor(uses_dynamic_font)\n {\n this.uses_dynamic_font = uses_dynamic_font;\n this.__textHeight = null;\n\n this.canvas = document.createElement('canvas');\n this.ctx = this.canvas.getContext('2d');\n }\n\n getFontHeight(fontStyle = 'Arial')\n {\n if (this.__textHeight == null || this.uses_dynamic_font)\n {\n const body = document.getElementsByTagName('body')[0];\n const dummy = document.createElement('div');\n const dummyText = document.createTextNode('MÉqgOLAKTAL');\n dummy.appendChild(dummyText);\n dummy.setAttribute('style', `font:${fontStyle};position:absolute;top:0;left:0`);\n body.appendChild(dummy);\n this.__textHeight = dummy.offsetHeight;\n body.removeChild(dummy);\n }\n return this.__textHeight;\n }\n\n get_text_size(text, font = '24px Arial')\n {\n const size = new Vector2();\n this.ctx.font = font;\n size.x = Math.ceil(this.ctx.measureText(text).width);\n size.y = Math.ceil(this.getFontHeight(font));\n return size;\n }\n\n draw_canvas(text, ctxOptions = {})\n {\n ctxOptions.font = ctxOptions.font || '24px Arial';\n ctxOptions.font_color = ctxOptions.font_color || '#000000';\n\n this.__draw(text, ctxOptions, this.canvas, this.ctx);\n return this.canvas;\n }\n\n draw_on_texture(text, ctxOptions)\n {\n const canvas = this.draw_canvas(text, ctxOptions);\n const canvas_texture = new CanvasTexture(canvas, UVMapping,\n ClampToEdgeWrapping,\n ClampToEdgeWrapping,\n NearestFilter,\n NearestFilter);\n canvas_texture.generateMipMaps = false;\n canvas_texture.needsUpdate = true;\n\n return canvas_texture;\n }\n\n __draw(text, ctxOptions)\n {}\n\n roundRect(ctx, x, y, width, height, radius, fill, stroke)\n {\n if (typeof stroke === 'undefined')\n {\n stroke = true;\n }\n if (typeof radius === 'undefined')\n {\n radius = 5;\n }\n if (typeof radius === 'number')\n {\n radius = { tl: radius, tr: radius, br: radius, bl: radius };\n }\n else\n {\n const defaultRadius = { tl: 0, tr: 0, br: 0, bl: 0 };\n for (const side in defaultRadius)\n {\n radius[side] = radius[side] || defaultRadius[side];\n }\n }\n ctx.beginPath();\n ctx.moveTo(x + radius.tl, y);\n ctx.lineTo(x + width - radius.tr, y);\n ctx.quadraticCurveTo(x + width, y, x + width, y + radius.tr);\n ctx.lineTo(x + width, y + height - radius.br);\n ctx.quadraticCurveTo(x + width, y + height, x + width - radius.br, y + height);\n ctx.lineTo(x + radius.bl, y + height);\n ctx.quadraticCurveTo(x, y + height, x, y + height - radius.bl);\n ctx.lineTo(x, y + radius.tl);\n ctx.quadraticCurveTo(x, y, x + radius.tl, y);\n ctx.closePath();\n if (fill)\n {\n ctx.fill();\n }\n if (stroke)\n {\n ctx.stroke();\n }\n }\n}\n\nexport { CanvasDrawer };\n","/*\n\n A configuration class used as a singleton\n\n*/\n\nclass Configuration\n{\n init(parameters = {})\n {\n this.dpr = 1;\n\n this.app = {}; // for arbitrary use in end application\n }\n\n from_json(json)\n {\n\n }\n}\n\nconst configuration = new Configuration();\nexport { configuration as Configuration };\n","class Idle\n{\n constructor()\n {\n }\n\n get is_animating()\n {\n return false;\n }\n\n on_enter(view)\n {\n\n }\n\n update(view)\n {\n }\n\n on_exit(view)\n {\n\n }\n}\n\nexport { Idle };\n","import { Time } from '../../Time';\nimport { Idle } from './Idle';\n\nimport { OMath } from '../../utilities/OMath';\nclass Animating\n{\n constructor()\n {\n this.t = 0;\n this.easing_function_t = 0;\n }\n\n get is_animating()\n {\n return true;\n }\n\n on_enter(animator)\n {\n }\n\n update(animator)\n {\n this.t += Time.delta_time / animator.duration;\n\n this.easing_function_t = animator.easing_function(this.t);\n this.easing_function_t = OMath.clamp(this.easing_function_t, 0, 1);\n\n animator.set_property_value(OMath.lerp(animator.from, animator.to, this.easing_function_t));\n\n if (this.easing_function_t >= 0.9999)\n {\n animator.set_property_value(animator.to);\n\n animator.set_current_state(new Idle());\n animator.finished_callback(animator);\n }\n }\n\n on_exit(view)\n {\n\n }\n}\n\nexport { Animating };\n","import { Animating } from './css_animator_states/Animating';\nimport { Idle } from './css_animator_states/Idle';\nimport { EasingFunctions } from '../utilities/EasingFunctions';\n\nclass CSSAnimator\n{\n constructor({\n element,\n css_property,\n from = 0,\n to = 1,\n duration = 1,\n value_prefix = '',\n value_suffix = '',\n easing_function = EasingFunctions.ease_in_out_cubic,\n finished_callback = () =>\n {}\n })\n {\n this.element = element;\n this.css_property = css_property;\n this.from = from;\n this.to = to;\n this.value_prefix = value_prefix;\n this.value_suffix = value_suffix;\n this.duration = duration;\n this.easing_function = easing_function;\n this.finished_callback = finished_callback;\n\n this.current_state = new Idle();\n }\n\n animate()\n {\n this.set_current_state(new Animating());\n }\n\n stop()\n {\n this.set_current_state(new Idle());\n }\n\n set_property_value(value)\n {\n this.element.style[this.css_property] = `${this.value_prefix}${value}${this.value_suffix}`;\n }\n\n update()\n {\n this.current_state.update(this);\n }\n\n get is_animating()\n {\n return this.current_state.is_animating;\n }\n\n set_current_state(state)\n {\n this.current_state.on_exit(this);\n this.current_state = state;\n this.current_state.on_enter(this);\n }\n}\n\nexport { CSSAnimator };\n","\nimport { Object3D } from 'three';\nimport { LineBasicMaterial } from 'three';\nimport { AlwaysDepth } from 'three';\nimport { BufferGeometry } from 'three';\nimport { Vector3 } from 'three';\nimport { Line } from 'three';\n\nclass AxisHelper extends Object3D\n{\n constructor(scale = 1.0)\n {\n super();\n\n const blue_points = [];\n blue_points.push(new Vector3(0, 0, 0));\n blue_points.push(new Vector3(0, 0, 1000));\n\n const blue_axis_mat = new LineBasicMaterial({ color: 0x4444ff, depthFunc: AlwaysDepth });\n const blue_axis_geo = new BufferGeometry().setFromPoints(blue_points);\n const blue_axis_line = new Line(blue_axis_geo, blue_axis_mat);\n blue_axis_line.renderOrder = 50000;\n\n const green_points = [];\n green_points.push(new Vector3(0, 0, 0));\n green_points.push(new Vector3(0, 1000, 0));\n\n const green_axis_mat = new LineBasicMaterial({ color: 0x44ff44, depthFunc: AlwaysDepth });\n const green_axis_geo = new BufferGeometry().setFromPoints(green_points);\n const green_axis_line = new Line(green_axis_geo, green_axis_mat);\n green_axis_line.renderOrder = 50000;\n\n const red_points = [];\n red_points.push(new Vector3(0, 0, 0));\n red_points.push(new Vector3(1000, 0, 0));\n\n const red_axis_mat = new LineBasicMaterial({ color: 0xff4444, depthFunc: AlwaysDepth });\n const red_axis_geo = new BufferGeometry().setFromPoints(red_points);\n const red_axis_line = new Line(red_axis_geo, red_axis_mat);\n red_axis_line.renderOrder = 50000;\n\n this.renderOrder = 100000;\n\n this.add(blue_axis_line);\n this.add(green_axis_line);\n this.add(red_axis_line);\n\n this.scale.set(scale, scale, scale);\n }\n\n update()\n {\n }\n\n dispose()\n {\n }\n}\n\nexport { AxisHelper };\n","import { Scene } from 'three';\n\nclass SceneManager\n{\n init()\n {\n this._current = new Scene();\n this._current.name = 'default_scene';\n }\n\n add_scene(name)\n {\n\n }\n\n get current()\n {\n return this._current;\n }\n\n set current(scene)\n {\n this._current = scene;\n }\n\n dispose()\n {\n this.current.traverse(child =>\n {\n if (child.geometry)\n {\n child.geometry.dispose();\n child.material.dispose();\n }\n });\n\n while (this.current.children.length > 0)\n {\n this.current.remove(this.current.children[0]);\n }\n }\n}\n\nconst scene_manager = new SceneManager();\nexport { scene_manager as SceneManager };\n","\nimport { Vector3, Mesh } from 'three';\nimport { BoxGeometry } from 'three';\nimport { MeshBasicMaterial } from 'three';\n\nclass Cube extends Mesh\n{\n constructor(size, segments, color)\n {\n size = size || new Vector3(1, 1, 1);\n segments = segments || new Vector3(1, 1, 1);\n color = color || 0xff0000;\n const geometry = new BoxGeometry(size.x, size.y, size.z, segments.x, segments.y, segments.z);\n const material = new MeshBasicMaterial({ color: color });\n super(geometry, material);\n }\n}\n\nexport { Cube };\n","import { Mesh } from 'three';\nimport { SphereBufferGeometry } from 'three';\nimport { MeshBasicMaterial } from 'three';\n\nclass Sphere extends Mesh\n{\n constructor(radius, color)\n {\n color = color || '#FF0000';\n radius = radius || 1;\n const geometry = new SphereBufferGeometry(radius, 64, 64);\n const material = new MeshBasicMaterial({ color: color });\n super(geometry, material);\n }\n}\n\nexport { Sphere };\n","import { CylinderBufferGeometry } from 'three';\nimport { ConeBufferGeometry } from 'three';\nimport { MeshBasicMaterial } from 'three';\nimport { Vector3, Mesh } from 'three';\n\nimport * as BufferGeometryUtils from 'three/examples/jsm/utils/BufferGeometryUtils.js';\n\nclass Arrow extends Mesh\n{\n constructor(color, length, dir)\n {\n color = color || '#FF0000';\n length = length || 1;\n\n const cone_height = 0.4;\n const cylinder_height = length - cone_height;\n const cylinder_geo = new CylinderBufferGeometry(0.01, 0.01, cylinder_height, 32);\n cylinder_geo.translate(0, cylinder_height / 2, 0);\n\n const cone_geometry = new ConeBufferGeometry(0.1, cone_height, 32);\n cone_geometry.translate(0, cylinder_height + cone_height / 2, 0);\n\n const buffer_geometry = BufferGeometryUtils.mergeBufferGeometries([cylinder_geo, cone_geometry]);\n buffer_geometry.rotateX(3.14 / 2);\n\n const material = new MeshBasicMaterial({ color: color });\n super(buffer_geometry, material);\n\n if (dir)\n {\n this.quaternion.setFromUnitVectors(new Vector3(0, 0, 1), dir);\n }\n\n this._dir = dir;\n }\n\n set dir(dir)\n {\n this.quaternion.setFromUnitVectors(new Vector3(0, 0, 1), dir);\n this._dir = dir;\n }\n\n get dir()\n {\n return this._dir;\n }\n\n set length(value)\n {\n this.scale.z = value;\n }\n\n get length()\n {\n return this.scale.z;\n }\n}\n\nexport { Arrow };\n","import { Vector2 } from 'three';\n\nclass OScreen\n{\n init()\n {\n this.width = 1;\n this.height = 1;\n\n this.position = new Vector2();\n\n this.render_width = 1;\n this.render_height = 1;\n this.width_height = new Vector2(this.width, this.height);\n\n this.dpr = 1;\n this.pixel_size = new Vector2(1 / this.width, 1 / this.height);\n }\n\n update_position(x, y)\n {\n this.position.set(x, y);\n }\n\n update()\n {\n this.size_changed = false;\n }\n\n update_size(width, height)\n {\n this.width = width;\n this.height = height;\n\n this.pixel_size = new Vector2(1 / this.width, 1 / this.height);\n\n this.width_height.x = width;\n this.width_height.y = height;\n\n this.render_width = width * this.dpr;\n this.render_height = height * this.dpr;\n\n this.size_changed = true;\n }\n\n apply_pixel_density_v2(vector2)\n {\n vector2.multiplyScalar(1 / this.dpr);\n\n return vector2;\n }\n\n apply_pixel_density(value)\n {\n return value * (1 / this.dpr);\n }\n\n get_pixel_size()\n {\n return this.pixel_size;\n }\n\n get aspect_ratio()\n {\n return this.width / this.height;\n }\n\n get portrait()\n {\n return this.width < this.height;\n }\n}\n\nconst oscreen = new OScreen();\nexport { oscreen as OScreen };\n","import { BaseShaderMaterial } from './BaseShaderMaterial';\nimport { Vector2 } from 'three';\nclass ScreenSpaceTextureMaterial extends BaseShaderMaterial\n{\n constructor(x, y, w, h)\n {\n const vert = `\n uniform vec2 _ScreenSpacePosition;\n uniform vec2 _ScreenSize;\n uniform vec2 _TextureSize;\n varying vec2 vUv;\n void main()\n {\n vec2 pos = uv * vec2(_TextureSize.x / _ScreenSize.x, _TextureSize.y / _ScreenSize.y);\n pos += vec2(_ScreenSpacePosition.x / _ScreenSize.x, _ScreenSpacePosition.y / _ScreenSize.y);\n\n pos.x = pos.x * 2.0 - 1.0;\n pos.y = pos.y * 2.0 - 1.0;\n\n gl_Position = vec4(pos, 0.0, 1.0);\n vUv = uv;\n }\n `;\n const frag = `\n uniform sampler2D _MainTex;\n varying vec2 vUv;\n\n void main()\n {\n gl_FragColor = texture2D(_MainTex, vUv);\n }\n `;\n super(vert, frag, {\n _MainTex: { value: undefined },\n _ScreenSpacePosition: { value: new Vector2() },\n _ScreenSize: { value: new Vector2() },\n _TextureSize: { value: new Vector2() }\n });\n }\n\n set_position(x, y)\n {\n this.uniforms._ScreenSpacePosition.value.set(x, y);\n }\n\n set_texture(tex, w, h)\n {\n this.uniforms._MainTex.value = tex;\n this.uniforms._TextureSize.value.set(tex.image.width, tex.image.height);\n\n if (w !== undefined)\n {\n this.uniforms._TextureSize.value.x = w;\n }\n if (h !== undefined)\n {\n this.uniforms._TextureSize.value.y = h;\n }\n }\n\n set_screen_size(w, h)\n {\n this.uniforms._ScreenSize.value.set(w, h);\n }\n}\n\nexport { ScreenSpaceTextureMaterial };\n","import { Color } from 'three';\nimport { PerspectiveCamera as TPerspectiveCamera } from 'three';\n\nclass PerspectiveCamera extends TPerspectiveCamera\n{\n constructor(fov, aspect, near, far)\n {\n super(fov, aspect, near, far);\n\n this.clear_color = new Color('#000000');\n this.clear_alpha = 1;\n }\n\n copy(camera)\n {\n super.copy(camera);\n this.clear_color.copy(camera.clear_color);\n this.clear_alpha = camera.clear_alpha;\n return this;\n }\n}\n\nexport { PerspectiveCamera };\n","import { AxisHelper } from './components/AxisHelper';\n\nimport { SceneManager } from './SceneManager';\nimport { Cube } from './primitives/Cube';\nimport { Sphere } from './primitives/Sphere';\nimport { Arrow } from './primitives/Arrow';\nimport { OScreen } from './OScreen';\nimport { ScreenSpaceTextureMaterial } from './materials/ScreenSpaceTextureMaterial';\nimport { PerspectiveCamera } from './PerspectiveCamera';\n\nimport { Vector3 } from 'three';\nimport { LineBasicMaterial } from 'three';\nimport { BufferGeometry } from 'three';\nimport { Line } from 'three';\nimport { PlaneGeometry } from 'three';\nimport { ShaderMaterial } from 'three';\nimport { Vector4 } from 'three';\nimport { Mesh } from 'three';\nimport { Box3 } from 'three';\nimport { Box3Helper } from 'three';\nimport { Scene } from 'three';\nimport { CatmullRomCurve3 } from 'three';\nimport { SphereGeometry } from 'three';\nimport { MeshBasicMaterial } from 'three';\n\nimport basic_color_vert from './shaders/basic_color/basic_color.vert';\nimport basic_color_frag from './shaders/basic_color/basic_color.frag';\n\nclass Debug\n{\n init()\n {\n this.Vector3_one = new Vector3(1, 1, 1);\n this.Vector3_zero = new Vector3(0, 0, 0);\n this.canvas_renderer = undefined;\n\n this.display_texture_meshes = [];\n\n this.ctx = undefined;\n this.scene = new Scene();\n this.camera = new PerspectiveCamera();\n // this.camera.clear_alpha = 0;\n }\n\n draw_arrow(origin, dir, color = 0xff0000)\n {\n const arrow = new Arrow(color, dir.length(), dir.clone().normalize());\n arrow.position.copy(origin);\n SceneManager.current.add(arrow);\n return arrow;\n }\n\n draw_axis()\n {\n const axis = new AxisHelper();\n SceneManager.current.add(axis);\n return axis;\n }\n\n set_debug_RT(RT)\n {\n this.rt_debug = RT;\n }\n\n draw_rectangle(position_2d, width, height, color)\n {\n width = width || 100;\n height = height || 100;\n this.ctx.fillStyle = color || 'rgba(255, 0, 0, 1)';\n this.ctx.fillRect(position_2d.x - width / 2,\n (this.ctx.canvas.height - position_2d.y) - height / 2, width, height);\n }\n\n clear()\n {\n if (this.ctx)\n {\n this.ctx.clearRect(0, 0, this.ctx.canvas.width, this.ctx.canvas.height);\n }\n }\n\n draw_line_2D(from, to, color)\n {\n this.ctx.strokeStyle = color || 'rgba(255, 0, 0, 1)';\n this.ctx.beginPath();\n this.ctx.moveTo(from.x, from.y);\n this.ctx.lineTo(to.x, to.y);\n this.ctx.closePath();\n this.ctx.stroke();\n }\n\n draw_line(points, color = 0xff0000)\n {\n const material = new LineBasicMaterial({\n color: color\n });\n\n const geometry = new BufferGeometry().setFromPoints(points);\n\n const line = new Line(geometry, material);\n line.frustumCulled = false;\n SceneManager.current.add(line);\n return line;\n }\n\n draw_cube(pos, size, color)\n {\n size = size || 1;\n color = color || 0xff0000;\n pos = pos || new Vector3();\n\n const cube = new Cube(new Vector3(size, size, size), undefined, color);\n cube.position.copy(pos);\n SceneManager.current.add(cube);\n return cube;\n }\n\n draw_oriented_cube(from, to, height = 1, color = '#FF0000', depth = 0.1)\n {\n const size = from.distanceTo(to);\n const cube = new Cube(new Vector3(depth, height, size), undefined, color);\n\n const center = to.clone().sub(from).multiplyScalar(0.5);\n const forward_dir = center.clone().normalize();\n center.add(from);\n\n cube.position.copy(center);\n\n // let up = new Vector3(0, 1, 0);\n // let forward = forward_dir.clone();\n // let right = forward.clone().cross(up);\n\n // cube.quaternion.setFromRotationMatrix(new Matrix4().makeBasis(right,up,forward));\n cube.quaternion.setFromUnitVectors(new Vector3(0, 0, -1), forward_dir);\n\n SceneManager.current.add(cube);\n return cube;\n }\n\n draw_plane(width, height, color)\n {\n const geometry = new PlaneGeometry(width, height);\n const material = new ShaderMaterial({\n uniforms: {\n _Color: { value: new Vector4(0, 1, 0, 0.2) }\n },\n vertexShader: basic_color_vert,\n fragmentShader: basic_color_frag,\n transparent: true,\n depthWrite: false\n });\n\n const plane = new Mesh(geometry, material);\n plane.renderOrder = -10000;\n SceneManager.current.add(plane);\n return plane;\n }\n\n draw_empty_cube(pos, size, color)\n {\n size = size || 1;\n color = color || 0xff0000;\n\n const box = new Box3().setFromCenterAndSize(new Vector3(), new Vector3(size, size, size));\n const helper = new Box3Helper(box, color);\n helper.position.copy(pos || new Vector3());\n return helper;\n }\n\n draw_sphere(pos, size, color)\n {\n size = size || 1;\n color = color || 0xff0000;\n pos = pos || new Vector3();\n\n const sphere = new Sphere(size, color);\n sphere.position.copy(pos);\n SceneManager.current.add(sphere);\n return sphere;\n }\n\n draw_point_array(input_points, open = false, color = 0xff0000)\n {\n const catmull = new CatmullRomCurve3(input_points, open);\n catmull.updateArcLengths();\n const points = catmull.getSpacedPoints(200);\n const line_helper = this.draw_line(points, 0x00ff00);\n // line_helper.position.y = 1.5;\n return line_helper;\n }\n\n draw_sphere_helper(sphere, color)\n {\n color = color || 0xff0000;\n const geometry = new SphereGeometry(sphere.radius, 32, 32);\n const material = new MeshBasicMaterial({ color: color });\n const sphere_mesh = new Mesh(geometry, material);\n sphere_mesh.position.copy(sphere.center);\n SceneManager.current.add(sphere_mesh);\n return sphere_mesh;\n }\n\n draw_math_sphere(sphere)\n {\n const geometry = new SphereGeometry(sphere.radius, 32, 32);\n const material = new ShaderMaterial({\n uniforms: {\n _Color: { value: new Vector4(1, 0, 0, 0.2) }\n },\n vertexShader: basic_color_vert,\n fragmentShader: basic_color_frag,\n transparent: true\n });\n // var material = new MeshBasicMaterial( {color: 0xff0000, transparent = true} );\n const sphere1 = new Mesh(geometry, material);\n sphere1.position.copy(sphere.center);\n SceneManager.current.add(sphere1);\n }\n\n draw_bounding_box(bb)\n {\n const helper = new Box3Helper(bb, 0xffff00);\n SceneManager.current.add(helper);\n }\n\n draw_curve(curve, options)\n {\n const offset = new Vector3(0, 0, 0);\n if (options)\n {\n offset.y = options.offset || 0;\n }\n\n for (let i = 0; i < curve.length - 1; i++)\n {\n this.draw_line(curve[i].clone().add(offset), curve[i + 1].clone().add(offset));\n }\n }\n\n draw_texture(tex, w, h)\n {\n const mesh = new Mesh(new PlaneGeometry(1, 1), new ScreenSpaceTextureMaterial());\n this.display_texture_meshes.push(mesh);\n this.scene.add(mesh);\n\n mesh.material.set_texture(tex, w, h);\n return mesh;\n }\n\n render(graphics)\n {\n for (let i = 0; i < this.display_texture_meshes.length; i++)\n {\n this.display_texture_meshes[i].material.set_screen_size(OScreen.width, OScreen.height);\n }\n if (this.scene.children.length > 0)\n {\n graphics.render(this.scene, this.camera);\n }\n }\n}\n\nconst debug = new Debug();\nexport { debug as Debug };\n","import { BlitMaterial } from '../materials/BlitMaterial';\n\nimport frag from '../shaders/clear/clear_depth_normal.frag';\n\nimport { Vector4 } from 'three';\n\nclass ClearDepthNormalMaterial extends BlitMaterial\n{\n constructor(clear_depth, clear_normal)\n {\n super(frag);\n this.uniforms._DepthNormal = { value: new Vector4(clear_depth, clear_normal.x, clear_normal.y, clear_normal.z) };\n }\n}\n\nexport { ClearDepthNormalMaterial };\n","import vert from '../shaders/depth_normals/depth_normals.vert';\nimport frag from '../shaders/depth_normals/depth_normals.frag';\n\nimport { ShaderMaterial } from 'three';\n\nclass DepthNormalMaterial extends ShaderMaterial\n{\n constructor()\n {\n super({\n uniforms: {\n _FarPlane: { value: 1 }\n },\n vertexShader: vert,\n fragmentShader: frag\n });\n }\n\n set far_plane(value)\n {\n this.uniforms._FarPlane.value = value;\n }\n\n get far_plane()\n {\n return this.uniforms._FarPlane.value;\n }\n}\n\nexport { DepthNormalMaterial };\n","import { CameraManager } from '../CameraManager';\nimport { OScreen } from '../OScreen';\n\nimport { ClearDepthNormalMaterial } from '../materials/ClearDepthNormalMaterial';\nimport { DepthNormalMaterial } from '../materials/DepthNormalMaterial';\n\nimport { WebGLRenderTarget } from 'three';\nimport { Vector3 } from 'three';\n\nclass DepthAndNormalsRenderer\n{\n constructor()\n {\n this.RT = new WebGLRenderTarget(OScreen.width, OScreen.height);\n\n this.clear_depth_normal_mat = new ClearDepthNormalMaterial(1, new Vector3(0, 0, 1));\n this.depth_normal_material = new DepthNormalMaterial();\n }\n\n render(graphics)\n {\n this.__resize_RT_if_necessary();\n\n graphics.clear(this.RT, undefined, true, true);\n\n graphics.blit_clear_with_material(this.RT, this.clear_depth_normal_mat);\n\n this.depth_normal_material.far_plane = CameraManager.current.far;\n\n graphics.render(undefined, undefined, this.RT, this.depth_normal_material);\n }\n\n __resize_RT_if_necessary()\n {\n if (this.RT.width !== OScreen.width || this.RT.height !== OScreen.height)\n {\n this.RT.setSize(OScreen.width, OScreen.height);\n }\n }\n\n get render_target()\n {\n return this.RT;\n }\n}\n\nexport { DepthAndNormalsRenderer };\n","import { BlitMaterial } from '../materials/BlitMaterial';\n\nimport { Scene } from 'three';\nimport { Mesh } from 'three';\nimport { PlaneGeometry } from 'three';\nimport { OrthographicCamera } from 'three';\n\nclass Blitter\n{\n constructor(renderer)\n {\n this.renderer = renderer;\n this._blit_scene = new Scene();\n this._blit_material = new BlitMaterial();\n this._blit_quad = new Mesh(\n new PlaneGeometry(1, 1), this._blit_material);\n this._blit_scene.add(this._blit_quad);\n this._blit_camera = new OrthographicCamera(-1, 1, 1, -1, -10000, 10000);\n }\n\n blit(src, dst)\n {\n this._blit_quad.material = this._blit_material;\n\n const src_texture = src.isWebGLRenderTarget === true ? src.texture : src;\n const src_width = src.isWebGLRenderTarget === true ? src.width : src.image.width;\n const src_height = src.isWebGLRenderTarget === true ? src.height : src.image.height;\n\n this._blit_quad.material.uniforms._MainTex.value = src_texture;\n this._blit_quad.material.uniforms._Resolution.value.set(src_width, src_height);\n\n if (dst)\n {\n this._blit_quad.material.uniforms._TargetResolution.value.set(dst.width, dst.height);\n }\n else\n {\n this.renderer.getSize(this._blit_quad.material.uniforms._TargetResolution.value);\n }\n\n this.__render(dst);\n }\n\n material_pass(mat, dst)\n {\n this._blit_quad.material = mat;\n // this._blit_quad.material.uniforms._MainTex.value = undefined;\n // this._blit_quad.material.uniforms._Resolution.value.set(1, 1);\n\n this.__render(dst);\n }\n\n blit_with_material(src, dst, mat)\n {\n const src_texture = src.isWebGLRenderTarget === true ? src.texture : src;\n const src_width = src.isWebGLRenderTarget === true ? src.width : src.image.width;\n const src_height = src.isWebGLRenderTarget === true ? src.height : src.image.height;\n\n this._blit_quad.material = mat;\n this._blit_quad.material.uniforms._MainTex.value = src_texture;\n this._blit_quad.material.uniforms._Resolution.value.set(src_width, src_height);\n\n if (dst)\n {\n this._blit_quad.material.uniforms._TargetResolution.value.set(dst.width, dst.height);\n }\n else\n {\n this.renderer.getSize(this._blit_quad.material.uniforms._TargetResolution.value);\n }\n\n this.__render(dst);\n }\n\n blit_clear_with_material(dst_RT, mat)\n {\n this._blit_quad.material = mat;\n\n this.__render(dst_RT);\n }\n\n dispose()\n {\n this._blit_quad.geometry.dispose();\n this._blit_quad.material.dispose();\n }\n\n __render(RT)\n {\n RT = RT === undefined ? null : RT;\n\n const current_rt = this.renderer.getRenderTarget();\n\n this.renderer.setRenderTarget(RT === undefined ? null : RT);\n this.renderer.render(this._blit_scene, this._blit_camera);\n\n this.renderer.setRenderTarget(current_rt);\n }\n}\n\nexport { Blitter };\n","import { Configuration } from './Configuration';\nimport { BaseRender } from './render_mode/BaseRender';\nimport { OScreen } from './OScreen';\nimport { CameraManager } from './CameraManager';\nimport { SceneManager } from './SceneManager';\nimport { Capabilities } from './Capabilities';\nimport { DepthAndNormalsRenderer } from './render_utilities/DepthAndNormalsRenderer';\nimport { Blitter } from './render_utilities/Blitter';\n\nimport {\n NearestFilter,\n RGBAFormat,\n LinearEncoding,\n FloatType,\n WebGLRenderTarget,\n ShaderMaterial,\n NoBlending,\n AlwaysDepth\n} from 'three';\n\nimport { WebGLRenderer } from 'three';\n\nclass Graphics\n{\n init(canvas, core_attributes, context_attributes, threejs_attributes)\n {\n this._renderer = undefined;\n this.blitter = undefined;\n this.canvas = undefined;\n this.no_render = undefined;\n this.current_render_mode = undefined;\n this.generateDepthNormalTexture = false;\n this.depth_and_normals_renderer = undefined;\n\n this.is_webgl2 = false;\n this.canvas_context = undefined;\n this.context_attributes = undefined;\n\n this.core_attributes = {\n force_webgl2: true,\n xr_enabled: false\n };\n\n this.context_attributes = {\n alpha: true,\n antialias: false,\n depth: true,\n desynchronized: false,\n failIfMajorPerformanceCaveat: false,\n powerPreference: 'high-performance',\n premultipliedAlpha: true,\n preserveDrawingBuffer: true,\n stencil: false\n };\n\n this.threejs_attributes = {\n logarithmicDepthBuffer: false\n };\n\n Object.assign(this.core_attributes, core_attributes);\n Object.assign(this.context_attributes, context_attributes);\n\n Object.assign(this.threejs_attributes, this.context_attributes);\n Object.assign(this.threejs_attributes, threejs_attributes);\n\n if (this.core_attributes.force_webgl2)\n {\n this.canvas_context = canvas.getContext('webgl2', this.context_attributes) ||\n canvas.getContext('webgl', this.context_attributes) ||\n canvas.getContext('experimental-webgl', this.context_attributes);\n }\n else\n {\n this.canvas_context = canvas.getContext('webgl', this.context_attributes) ||\n canvas.getContext('experimental-webgl', this.context_attributes);\n }\n\n this.is_webgl2 = this.canvas_context.constructor.name === 'WebGL2RenderingContext';\n\n // console.log(`Using WebGL ${this.is_webgl2 ? 2 : 1}`);\n\n this.threejs_attributes.canvas = canvas;\n this.threejs_attributes.context = this.canvas_context;\n\n this._renderer = new WebGLRenderer(this.threejs_attributes);\n\n if (this.core_attributes.xr_enabled)\n {\n this._renderer.xr.enabled = true;\n }\n else\n {\n this._renderer.autoClear = false;\n }\n\n this._renderer.setPixelRatio(1);\n\n OScreen.dpr = Configuration.dpr;\n\n if (!this.is_webgl2)\n {\n this._renderer.extensions.get('ANGLE_instanced_arrays');\n }\n\n this.blitter = new Blitter(this._renderer);\n\n this.canvas = this._renderer.domElement;\n\n this.no_render = new BaseRender();\n\n this.current_render_mode = this.no_render;\n Capabilities.max_anisotropy = this._renderer.capabilities.getMaxAnisotropy();\n Capabilities.vertex_texture_sampler_available = this._renderer.capabilities.maxVertexTextures > 0;\n Capabilities.fp_textures_available = this.is_floating_point_texture_available();\n\n this.generateDepthNormalTexture = false;\n\n this.depth_and_normals_renderer = new DepthAndNormalsRenderer();\n\n this.resize_observer = new ResizeObserver(this.on_resize.bind(this));\n this.resize_observer.observe(this.canvas);\n }\n\n get dom_element()\n {\n return this._renderer.domElement;\n }\n\n get depth_normals_RT()\n {\n return this.depth_and_normals_renderer.render_target;\n }\n\n set_state(new_state)\n {\n // console.log('VIEWAPI - map render mode switch to: ' + new_state.constructor.name);\n\n this.current_render_mode.on_exit(this, this._renderer);\n this.current_render_mode = new_state;\n this.current_render_mode.on_enter(this, this._renderer);\n }\n\n update()\n {\n if (this.generateDepthNormalTexture)\n {\n this.depth_and_normals_renderer.render(this);\n }\n\n this.__update_current_camera();\n\n if (CameraManager.current)\n {\n this.current_render_mode.render();\n }\n\n OScreen.update();\n }\n\n __update_current_camera()\n {\n if (CameraManager.current)\n {\n CameraManager.current.aspect = OScreen.aspect_ratio;\n CameraManager.current.updateProjectionMatrix();\n CameraManager.current.updateMatrix();\n CameraManager.current.updateMatrixWorld(true);\n }\n }\n\n render(scene, camera, RT, override_mat)\n {\n this.__apply_override_material(scene, override_mat);\n\n this._renderer.setRenderTarget(RT === undefined ? null : RT);\n this._renderer.render(scene || SceneManager.current,\n camera || CameraManager.current);\n\n this.__apply_override_material(scene, undefined);\n }\n\n render_scene(scene)\n {\n if (scene.on_pre_render)\n {\n scene.on_pre_render();\n }\n\n if (scene.render)\n {\n scene.render();\n }\n else\n {\n this.render(scene, undefined);\n }\n\n if (scene.on_post_render)\n {\n scene.on_post_render();\n }\n }\n\n __apply_override_material(scene, mat)\n {\n mat = mat === undefined ? null : mat;\n if (scene)\n {\n scene.overrideMaterial = mat;\n }\n else\n {\n SceneManager.current.overrideMaterial = mat;\n }\n }\n\n readback_RT(RT, buffer)\n {\n this._renderer.readRenderTargetPixels(RT, 0, 0, RT.width, RT.height, buffer);\n }\n\n clear(RT, camera, clear_depth, clear_stencil)\n {\n this._renderer.setRenderTarget(RT === undefined ? null : RT);\n\n if (camera)\n {\n this._renderer.setClearColor(camera.clear_color, camera.clear_alpha);\n }\n\n this._renderer.clear(!!camera, // clear color\n !!clear_depth,\n !!clear_stencil);\n }\n\n on_resize(entries)\n {\n for (const entry of entries)\n {\n OScreen.dpr = Configuration.dpr;\n OScreen.update_position(entry.contentRect.x, entry.contentRect.y);\n OScreen.update_size(entry.contentRect.width, entry.contentRect.height);\n\n this.canvas.width = OScreen.render_width;\n this.canvas.height = OScreen.render_height;\n\n this._renderer.setViewport(0, 0, OScreen.render_width, OScreen.render_height);\n\n this.__update_current_camera();\n }\n }\n\n material_pass(mat, dst)\n {\n this.blitter.material_pass(mat, dst);\n }\n\n blit(src_RT, dst_RT, mat)\n {\n if (mat)\n {\n this.blitter.blit_with_material(src_RT, dst_RT, mat);\n }\n else\n {\n this.blitter.blit(src_RT, dst_RT);\n }\n }\n\n blit_clear_with_material(dst_RT, mat)\n {\n this.blitter.blit_clear_with_material(dst_RT, mat);\n }\n\n take_screenshot(blob_callback, width = OScreen.width, height = OScreen.height)\n {\n // const ctx = this;\n\n const old_width = OScreen.width;\n const old_height = OScreen.height;\n\n const new_width = width;\n const new_height = height;\n\n const tile_width = 1024;\n const tile_height = 1024;\n\n const divisions_x = parseInt(Math.ceil(new_width / tile_width));\n const divisions_y = parseInt(Math.ceil(new_height / tile_height));\n\n OScreen.update_size(tile_width, tile_height);\n const old_dpr = this._renderer.getPixelRatio();\n this._renderer.setPixelRatio(1);\n\n this._renderer.setSize(tile_width, tile_height, false);\n\n const canvas_2d = document.createElement('canvas');\n const ctx_2D = canvas_2d.getContext('2d');\n\n ctx_2D.canvas.width = new_width;\n ctx_2D.canvas.height = new_height;\n\n CameraManager.current.aspect = OScreen.aspect_ratio;\n CameraManager.current.updateMatrix();\n CameraManager.current.updateMatrixWorld(true);\n\n for (let x = 0; x < divisions_x; x++)\n {\n for (let y = 0; y < divisions_y; y++)\n {\n CameraManager.current.setViewOffset(new_width, new_height,\n OScreen.width * x, OScreen.height * y,\n OScreen.width, OScreen.height);\n this.current_render_mode.render();\n\n ctx_2D.drawImage(this._renderer.domElement, OScreen.width * x, OScreen.height * y);\n }\n }\n\n // transform the result canvas into a blob\n // } from them the callback turns into a ULR and download it\n ctx_2D.canvas.toBlob(blob_callback, 'image/png;base64;');\n\n CameraManager.current.clearViewOffset();\n\n OScreen.update_size(old_width, old_height);\n this._renderer.setPixelRatio(old_dpr);\n this._renderer.setSize(old_width, old_height, false);\n\n CameraManager.current.aspect = OScreen.aspect_ratio;\n CameraManager.current.updateMatrix();\n CameraManager.current.updateMatrixWorld(true);\n }\n\n download_screenshot(blob)\n {\n const link = document.createElement('a');\n link.download = 'Snapshot.png';\n\n link.href = URL.createObjectURL(blob);\n link.click();\n\n link.onclick = function()\n {\n requestAnimationFrame(function()\n {\n URL.revokeObjectURL(link.href);\n });\n link.removeAttribute('href');\n };\n }\n\n dispose()\n {\n this._renderer.dispose();\n this.current_render_mode.dispose();\n this.blitter.dispose();\n }\n\n is_floating_point_texture_available()\n {\n const RT = new WebGLRenderTarget(1, 1, {\n minFilter: NearestFilter,\n magFilter: NearestFilter,\n format: RGBAFormat,\n encoding: LinearEncoding,\n type: FloatType,\n stencilBuffer: false,\n depthBuffer: false\n });\n\n const vert = `\n void main()\n {\n gl_Position = vec4(uv * 2.0 - 1.0, 1.0, 1.0);\n }\n `;\n const frag = `\n void main()\n {\n gl_FragColor = vec4(0.0, 4865.35, 0.0, 1.0);\n }\n `;\n\n const mat = new ShaderMaterial({\n vertexShader: vert,\n fragmentShader: frag,\n depthWrite: false,\n blending: NoBlending,\n depthTest: false,\n depthFunc: AlwaysDepth\n });\n\n this.material_pass(mat, RT);\n\n const output = new Float32Array(4);\n this._renderer.readRenderTargetPixels(RT, 0, 0, 1, 1, output);\n\n return Math.abs(output[1] - 4865.35) < 0.001;\n }\n}\n\nconst graphics = new Graphics();\nexport { graphics as Graphics };\n","import frag from '../shaders/normal/normal.frag';\nimport vert from '../shaders/normal/normal.vert';\n\nimport { ShaderMaterial } from 'three';\n\nclass NormalMaterial extends ShaderMaterial\n{\n constructor()\n {\n super({\n uniforms: {\n },\n vertexShader: vert,\n fragmentShader: frag\n });\n }\n}\n\nexport { NormalMaterial };\n","import { CameraManager } from '../CameraManager';\nimport { SceneManager } from '../SceneManager';\nimport { BaseRender } from '../render_mode/BaseRender';\nimport { Graphics } from '../Graphics';\nimport { NormalMaterial } from '../materials/NormalMaterial';\n\nclass DebugNormalsRender extends BaseRender\n{\n constructor()\n {\n super();\n }\n\n render()\n {\n Graphics.clear(undefined, CameraManager.current, true, true);\n\n Graphics.render(SceneManager.current, CameraManager.current, undefined, new NormalMaterial());\n }\n}\n\nexport { DebugNormalsRender };\n","class KeyboardInput\n{\n init(container)\n {\n this.ctrlz_pressed = false;\n this.ctrlz_fired = false;\n\n this.keys = {};\n this.keys_keys = [];\n this.container = container;\n\n this.container.addEventListener('keydown', this.on_key_down.bind(this), false);\n this.container.addEventListener('keyup', this.on_key_up.bind(this), false);\n }\n\n on_key_down(e)\n {\n if (e.keyCode === 90 && e.ctrlKey && !this.ctrlz_fired)\n {\n this.ctrlz_pressed = true;\n this.ctrlz_fired = true;\n }\n\n if (e.code)\n {\n this.press_key(e.code);\n }\n }\n\n on_key_up(e)\n {\n this.release_key(e.code);\n }\n\n clear()\n {\n this.ctrlz_pressed = false;\n\n for (let i = 0; i < this.keys_keys.length; i++)\n {\n this.keys[this.keys_keys[i]].pressed = false;\n this.keys[this.keys_keys[i]].released = false;\n }\n }\n\n release_key(key_name)\n {\n const key = this.keys[key_name];\n if (key)\n {\n key.fired = false;\n key.down = false;\n key.released = true;\n }\n }\n\n release_keys()\n {\n this.ctrlz_fired = false;\n\n for (let i = 0; i < this.keys_keys.length; i++)\n {\n this.keys[this.keys_keys[i]].fired = false;\n this.keys[this.keys_keys[i]].down = false;\n }\n }\n\n press_key(key_name)\n {\n const key = this.keys[key_name];\n if (key)\n {\n if (key.down === false)\n {\n key.pressed = true;\n }\n key.down = true;\n key.fired = true;\n }\n }\n\n is_key_pressed(key_name)\n {\n const key = this.keys[key_name];\n if (key)\n {\n return key.pressed;\n }\n return false;\n }\n\n is_key_down(key_name)\n {\n const key = this.keys[key_name];\n if (key)\n {\n return key.down;\n }\n return false;\n }\n\n is_key_released(key_name)\n {\n const key = this.keys[key_name];\n if (key)\n {\n return key.released;\n }\n\n return false;\n }\n\n register_key(key)\n {\n this.keys[key] =\n {\n key_name: key,\n pressed: false,\n down: false,\n fired: false\n };\n\n this.keys_keys = Object.keys(this.keys);\n }\n\n unregister_key(key_name)\n {\n delete this.keys[key_name];\n }\n\n dispose()\n {\n this.container.removeEventListener('keydown', this.on_key_down.bind(this), false);\n this.container.removeEventListener('keyup', this.on_key_up.bind(this), false);\n }\n}\n\nexport { KeyboardInput };\n","\nclass OS\n{\n init()\n {\n this.operating_systems = {\n ANDROID: 'android',\n IOS: 'ios',\n LINUX: 'linux',\n MAC: 'mac',\n WINDOWS: 'windows'\n };\n\n this.is_mobile = !!(navigator.userAgent.match(/(iPhone|iPod|iPad|Android|playbook|silk|BlackBerry|BB10|Windows Phone|Tizen|Bada|webOS|IEMobile|Opera Mini)/));\n this.is_ipad = !!(navigator.userAgent.match(/Mac/) && navigator.maxTouchPoints && navigator.maxTouchPoints > 2);\n this.is_ios = !!navigator.userAgent.match(/(iPhone|iPod|iPad)/) || this.is_ipad;\n\n this.is_android = this.get_os() === this.operating_systems.ANDROID;\n this.is_linux = this.get_os() === this.operating_systems.LINUX;\n this.is_mac = this.get_os() === this.operating_systems.MAC;\n this.is_windows = this.get_os() === this.operating_systems.WINDOWS;\n }\n\n get_os()\n {\n const userAgent = window.navigator.userAgent;\n const platform = window.navigator.platform;\n const macosPlatforms = ['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K'];\n const windowsPlatforms = ['Win32', 'Win64', 'Windows', 'WinCE'];\n const iosPlatforms = ['iPhone', 'iPad', 'iPod'];\n let os = null;\n\n if (macosPlatforms.indexOf(platform) !== -1)\n {\n os = this.operating_systems.MAC;\n }\n else if (iosPlatforms.indexOf(platform) !== -1)\n {\n os = this.operating_systems.IOS;\n }\n else if (windowsPlatforms.indexOf(platform) !== -1)\n {\n os = this.operating_systems.WINDOWS;\n }\n else if (/Android/.test(userAgent))\n {\n os = this.operating_systems.ANDROID;\n }\n else if (!os && /Linux/.test(platform))\n {\n os = this.operating_systems.LINUX;\n }\n\n return os;\n }\n}\n\nconst os = new OS();\nexport { os as OS };\n","import { Vector3 } from 'three';\n\nclass ReflectionPlaneContext\n{\n init()\n {\n this.target_geometry = undefined;\n this.target_position = new Vector3();\n }\n\n set_target_geometry(geometry)\n {\n this.target_geometry = geometry;\n }\n}\n\nconst reflection_plane_context = new ReflectionPlaneContext();\nexport { reflection_plane_context as ReflectionPlaneContext };\n","import { Vector2 } from 'three';\nimport { ShaderMaterial } from 'three';\nimport { Mesh } from 'three';\nimport { DataTexture } from 'three';\nimport { RGBAFormat } from 'three';\nimport { RGBFormat } from 'three';\nimport { FloatType } from 'three';\n\nclass GeometryBatch\n{\n constructor(geometry, batch_width)\n {\n this.geometry = geometry;\n\n this.material = undefined;\n this.uniforms = {};\n this.batch_width = batch_width;\n\n this.data_textures = [];\n\n this.object_names = undefined;\n\n this.zero_offset = new Vector2();\n this.write_offset = new Vector2();\n\n this.uniform_dirty_count = 0;\n\n this.tmp_uploaded_data_count = 0;\n }\n\n init(object_names, vert_shader, frag_shader)\n {\n this.material = new ShaderMaterial({\n uniforms: this.uniforms,\n vertexShader: vert_shader,\n fragmentShader: frag_shader\n });\n this.object_names = object_names;\n }\n\n add_global_uniform(name, data)\n {\n this.uniforms[name] = { value: data };\n this.material.needsUpdate = true;\n }\n\n set_global_uniform(name, data)\n {\n this.uniforms[name].value = data;\n }\n\n add_object_uniform_v3(uniform_name, default_value_v3)\n {\n const src_tex = this.__create_rgb_texture(this.batch_width);\n const dst_tex = this.__create_rgb_texture(this.batch_width);\n const one_pixel_tex = this.__create_rgb_texture(1);\n\n const new_data_tex = this.__add_data_texture(uniform_name, src_tex, dst_tex, one_pixel_tex);\n\n if (default_value_v3)\n {\n this.__flood_data_texture_rgb(new_data_tex, default_value_v3);\n }\n }\n\n add_object_uniform_v4(uniform_name, default_value_v4)\n {\n const src_tex = this.__create_rgba_texture(this.batch_width);\n const dst_tex = this.__create_rgba_texture(this.batch_width);\n const one_pixel_tex = this.__create_rgba_texture(1);\n\n const new_data_tex = this.__add_data_texture(uniform_name, src_tex, dst_tex, one_pixel_tex);\n\n if (default_value_v4)\n {\n this.__flood_data_texture_rgba(new_data_tex, default_value_v4);\n }\n }\n\n add_object_uniform_v4_float(uniform_name, default_value_v4)\n {\n const src_tex = this.__create_rgba_float_texture(this.batch_width);\n const dst_tex = this.__create_rgba_float_texture(this.batch_width);\n const one_pixel_tex = this.__create_rgba_float_texture(1);\n\n const new_data_tex = this.__add_data_texture(uniform_name, src_tex, dst_tex, one_pixel_tex);\n\n if (default_value_v4)\n {\n this.__flood_data_texture_rgba(new_data_tex, default_value_v4);\n }\n }\n\n set_object_uniform_v3(object_name, uniform_name, vector3, use_r, use_g, use_b)\n {\n const obj_index = this.__get_object_index(object_name);\n const data_texture = this.__get_data_texture(uniform_name);\n\n this.__set_pixel_rgb(data_texture.src, obj_index, vector3, use_r, use_g, use_b);\n this.__set_pixel_rgb(data_texture.one_pixel, 0, vector3, use_r, use_g, use_b);\n\n data_texture.last_accessed_index = obj_index;\n\n data_texture.dirty_count++;\n }\n\n set_object_uniform_v4(object_name, uniform_name, vector4, use_r, use_g, use_b, use_a)\n {\n const obj_index = this.__get_object_index(object_name);\n const data_texture = this.__get_data_texture(uniform_name);\n\n this.__set_pixel_rgba(data_texture.src, obj_index, vector4, use_r, use_g, use_b, use_a);\n this.__set_pixel_rgba(data_texture.one_pixel, 0, vector4, use_r, use_g, use_b, use_a);\n data_texture.last_accessed_index = obj_index;\n\n data_texture.dirty_count++;\n }\n\n upload_texture_data(renderer, upload_budget)\n {\n for (let i = 0; i < this.data_textures.length; i++)\n {\n if (upload_budget > 0 && this.data_textures[i].dirty_count > 0)\n {\n if (this.data_textures[i].dirty_count === 1)\n {\n this.__partial_texture_data_upload(renderer, this.data_textures[i]);\n }\n if (this.data_textures[i].dirty_count > 1)\n {\n this.__full_texture_data_upload(renderer, this.data_textures[i]);\n }\n\n this.data_textures[i].dirty_count = 0;\n\n upload_budget--;\n }\n }\n }\n\n get_uniform_dirty_count()\n {\n this.uniform_dirty_count = 0;\n for (let i = 0; i < this.data_textures.length; i++)\n {\n if (this.data_textures[i].dirty_count > 0)\n {\n this.uniform_dirty_count++;\n }\n }\n return this.uniform_dirty_count;\n }\n\n __full_texture_data_upload(renderer, texture_data)\n {\n // console.log(\"full texture update of\"+ texture_data.name);\n texture_data.dst.needsUpdate = true;\n renderer.copyTextureToTexture(\n this.zero_offset,\n texture_data.src,\n texture_data.dst\n );\n }\n\n __partial_texture_data_upload(renderer, texture_data)\n {\n // console.log(\"partial texture update\"+ texture_data.name);\n const index = texture_data.last_accessed_index;\n if (index === -1)\n {\n return;\n }\n\n this.write_offset.y = Math.floor(index / this.batch_width);\n this.write_offset.x = index - this.batch_width * this.write_offset.y;\n renderer.copyTextureToTexture(\n this.write_offset,\n texture_data.one_pixel,\n texture_data.dst\n );\n }\n\n get_mesh()\n {\n return new Mesh(this.geometry, this.material);\n }\n\n __set_pixel_rgb(data_texture, index, vector3, use_r, use_g, use_b)\n {\n if (use_r)\n {\n data_texture.image.data[index * 3 + 0] = vector3.x;\n }\n if (use_g)\n {\n data_texture.image.data[index * 3 + 1] = vector3.y;\n }\n if (use_b)\n {\n data_texture.image.data[index * 3 + 2] = vector3.z;\n }\n }\n\n __set_pixel_rgba(data_texture, index, vector4, use_r, use_g, use_b, use_a)\n {\n if (use_r)\n {\n data_texture.image.data[index * 4 + 0] = vector4.x;\n }\n if (use_g)\n {\n data_texture.image.data[index * 4 + 1] = vector4.y;\n }\n if (use_b)\n {\n data_texture.image.data[index * 4 + 2] = vector4.z;\n }\n if (use_a)\n {\n data_texture.image.data[index * 4 + 3] = vector4.w;\n }\n }\n\n __flood_data_texture_rgb(data_texture, v3)\n {\n for (let i = 0; i < this.batch_width * this.batch_width; i++)\n {\n this.__set_pixel_rgb(data_texture.src, i, v3, true, true, true);\n data_texture.dirty_count++;\n }\n }\n\n __flood_data_texture_rgba(data_texture, v4)\n {\n for (let i = 0; i < this.batch_width * this.batch_width; i++)\n {\n this.__set_pixel_rgba(data_texture.src, i, v4, true, true, true, true);\n data_texture.dirty_count++;\n }\n }\n\n __create_rgb_texture(width)\n {\n const data = new Uint8Array(3 * width * width);\n return new DataTexture(data, width, width, RGBFormat);\n }\n\n __create_rgba_texture(width)\n {\n const data = new Uint8Array(4 * width * width);\n return new DataTexture(data, width, width, RGBAFormat);\n }\n\n __create_rgba_float_texture(width)\n {\n const data = new Float32Array(4 * width * width);\n return new DataTexture(data, width, width, RGBAFormat, FloatType);\n }\n\n __get_data_texture(uniform_name)\n {\n for (let i = 0; i < this.data_textures.length; i++)\n {\n if (this.data_textures[i].name === uniform_name)\n {\n return this.data_textures[i];\n }\n }\n console.error('Data texture ' + uniform_name + ' does not exist');\n return undefined;\n }\n\n __get_object_index(name)\n {\n for (let i = 0; i < this.object_names.length; i++)\n {\n if (this.object_names[i] === name)\n {\n return i;\n }\n }\n console.error('the name ' + name + ' is not contained in this batch');\n return undefined;\n }\n\n __add_data_texture(uniform_name, src_texture, dst_texture, one_pixel_text)\n {\n dst_texture.needsUpdate = true;\n\n this.data_textures.push({\n name: uniform_name,\n src: src_texture,\n dst: dst_texture,\n one_pixel: one_pixel_text,\n last_accessed_index: -1,\n dirty_count: 0\n });\n\n this.uniforms[uniform_name] = { value: dst_texture };\n return this.data_textures[this.data_textures.length - 1];\n }\n\n dispose()\n {\n for (let i = 0; i < this.data_textures.length; i++)\n {\n this.data_textures[i].src.dispose();\n this.data_textures[i].dst.dispose();\n this.data_textures[i].one_pixel.dispose();\n }\n }\n}\n\nexport { GeometryBatch };\n","import { GeometryBatch } from './GeometryBatch';\n\nimport * as BufferGeometryUtils from 'three/examples/jsm/utils/BufferGeometryUtils.js';\n\nimport { BufferAttribute } from 'three';\nimport { OMath } from '../utilities/OMath';\n\nclass GeometryBatcher\n{\n init()\n {\n this.batches = [];\n }\n\n batch(buffer_geometries)\n {\n const attr_accessor_uvs = [];\n const texture_width = OMath.ceilPowerOfTwo(Math.sqrt(buffer_geometries.length));\n // console.log(\"Store count: \" + buffer_geometries.length + \", Texture size: \" +texture_width);\n\n this.__init_uv_array(attr_accessor_uvs, texture_width);\n\n let uv_index = 0;\n\n for (let i = 0; i < buffer_geometries.length; i++)\n {\n const vertex_count = buffer_geometries[i].getAttribute('position').count;\n const y = Math.floor(i / texture_width);\n const x = i - texture_width * y;\n for (let count = 0; count < vertex_count; count++)\n {\n attr_accessor_uvs[uv_index] = (x / texture_width) + 0.5 / texture_width;\n attr_accessor_uvs[uv_index + 1] = (y / texture_width) + 0.5 / texture_width;\n uv_index += 2;\n }\n }\n\n const buffer_attribute = new BufferAttribute(new Float32Array(attr_accessor_uvs), 2);\n const buffer_geometry = BufferGeometryUtils.mergeBufferGeometries(buffer_geometries);\n buffer_geometry.setAttribute('attr_accessor_uv', buffer_attribute);\n\n this.batches.push(new GeometryBatch(buffer_geometry, texture_width));\n return this.batches[this.batches.length - 1];\n }\n\n upload_texture_data(renderer)\n {\n for (let i = 0; i < this.batches.length; i++)\n {\n this.batches[i].upload_texture_data(renderer, 1);\n }\n }\n\n __init_uv_array(uvs, texture_width)\n {\n for (let i = 0; i < texture_width * texture_width * 2; i++)\n {\n uvs.push(0);\n }\n }\n}\n\nconst geometry_batcher = new GeometryBatcher();\nexport { geometry_batcher as GeometryBatcher };\n","import { CameraManager } from './CameraManager';\nimport { Graphics } from './Graphics';\n\nimport { Vector2 } from 'three';\nimport { Scene } from 'three';\nimport { OrthographicCamera } from 'three';\n\nclass UI\n{\n init(input)\n {\n this.input = input;\n this.ui_elements = [];\n this._tmp_normalized_pos = new Vector2();\n this.ss_scene = new Scene();\n this.ss_scene.matrixWorldAutoUpdate = false;\n this.ss_scene.frustumCulled = false;\n\n this.ws_scene = new Scene();\n this.ws_scene.matrixWorldAutoUpdate = false;\n this.ws_scene.frustumCulled = false;\n\n this.ss_camera = new OrthographicCamera(-1, 1, 1, -1, -100, 100);\n }\n\n delete_element(elem)\n {\n const index = this.ui_elements.indexOf(elem);\n if (index > -1)\n {\n this.ui_elements.splice(index, 1);\n }\n\n this.ss_scene.remove(elem);\n this.ws_scene.remove(elem);\n\n elem.dispose();\n }\n\n add_screen_space_element(elem)\n {\n this.ui_elements.push(elem);\n this.ss_scene.add(elem);\n\n elem.set_screen_space_coordinate_system();\n }\n\n add_world_space_element(elem)\n {\n this.ui_elements.push(elem);\n this.ws_scene.add(elem);\n\n elem.set_world_space_coordinate_system();\n }\n\n update()\n {\n // this.ss_camera.left = -OScreen.width / 2;\n // this.ss_camera.right = OScreen.width / 2;\n // this.ss_camera.top = OScreen.top / 2;\n // this.ss_camera.right = -OScreen.bottom / 2;\n this.ss_camera.updateProjectionMatrix();\n\n this._tmp_normalized_pos.copy(this.input.NDC);\n for (let i = 0; i < this.ui_elements.length; i++)\n {\n this.ui_elements[i].update_state(this._tmp_normalized_pos);\n }\n }\n\n render(renderer)\n {\n // renderer.render_ui(this.scene);\n if (this.ss_scene.children.length > 0)\n {\n Graphics.render(this.ss_scene, this.ss_camera);\n }\n if (this.ws_scene.children.length > 0)\n {\n Graphics.render(this.ws_scene, CameraManager.current);\n }\n }\n\n clear()\n {\n this.current_clicked_element = undefined;\n }\n}\n\nconst ui = new UI();\nexport { ui as UI };\n","import { Vector3, Plane, Quaternion, Sphere, Line3 } from 'three';\nimport { OMath } from './OMath';\n\nclass PerspectiveFrustumPointFitter\n{\n constructor()\n {\n this.sphere = new Sphere();\n }\n\n fit_points(points, camera_quaternion, vertical_fov, aspect)\n {\n this.sphere.setFromPoints(points);\n\n const v_fov = OMath.degToRad(vertical_fov / 2);\n const h_fov = (2 * Math.atan(Math.tan(v_fov) * aspect)) / 2;\n\n const up_plane_normal = this.get_up_plane_normal(camera_quaternion, v_fov);\n const down_plane_normal = this.get_down_plane_normal(camera_quaternion, v_fov);\n const left_plane_normal = this.get_left_plane_normal(camera_quaternion, h_fov);\n const right_plane_normal = this.get_right_plane_normal(camera_quaternion, h_fov);\n\n const camera_forward_dir = new Vector3(0, 0, -1).applyQuaternion(camera_quaternion);\n\n const sphere_center = this.sphere.center.clone();\n\n const pull_back_distance = this.get_distance_to_fit_rect(this.sphere.radius * 2, this.sphere.radius * 2, vertical_fov, aspect);\n const far_pos = sphere_center.clone().add(camera_forward_dir.clone().multiplyScalar(pull_back_distance * -1));\n\n const up_plane = new Plane().setFromNormalAndCoplanarPoint(up_plane_normal, far_pos);\n const down_plane = new Plane().setFromNormalAndCoplanarPoint(down_plane_normal, far_pos);\n\n const left_plane = new Plane().setFromNormalAndCoplanarPoint(left_plane_normal, far_pos);\n const right_plane = new Plane().setFromNormalAndCoplanarPoint(right_plane_normal, far_pos);\n\n this.apply_center_correction_to_pos(far_pos, points, camera_quaternion, up_plane, down_plane, left_plane, right_plane);\n\n up_plane.setFromNormalAndCoplanarPoint(up_plane_normal, far_pos);\n down_plane.setFromNormalAndCoplanarPoint(down_plane_normal, far_pos);\n\n left_plane.setFromNormalAndCoplanarPoint(left_plane_normal, far_pos);\n right_plane.setFromNormalAndCoplanarPoint(right_plane_normal, far_pos);\n\n let closest_distance = Infinity;\n\n const inverse_dir = camera_forward_dir.clone().multiplyScalar(pull_back_distance * -2);\n for (let i = 0; i < points.length; i++)\n {\n const line = new Line3(points[i].clone(), points[i].clone().add(inverse_dir));\n\n const up_line_intersection = new Vector3();\n const down_line_intersection = new Vector3();\n\n const left_line_intersection = new Vector3();\n const right_line_intersection = new Vector3();\n\n up_plane.intersectLine(line, up_line_intersection);\n down_plane.intersectLine(line, down_line_intersection);\n\n left_plane.intersectLine(line, left_line_intersection);\n right_plane.intersectLine(line, right_line_intersection);\n\n if (up_line_intersection.length() < 0.0001)\n {\n console.log('up intersection not found', i);\n }\n if (down_line_intersection.length() < 0.0001)\n {\n console.log('down intersection not found', i);\n }\n if (left_line_intersection.length() < 0.0001)\n {\n console.log('left intersection not found', i);\n }\n if (right_line_intersection.length() < 0.0001)\n {\n console.log('right intersection not found', i);\n }\n\n const new_up_distance = points[i].clone().sub(up_line_intersection).length();\n const new_down_distance = points[i].clone().sub(down_line_intersection).length();\n\n const new_left_distance = points[i].clone().sub(left_line_intersection).length();\n const new_right_distance = points[i].clone().sub(right_line_intersection).length();\n\n const vertical_min = Math.min(new_up_distance, new_down_distance);\n const horizontal_min = Math.min(new_left_distance, new_right_distance);\n\n const min = Math.min(vertical_min, horizontal_min);\n\n if (min < closest_distance)\n {\n closest_distance = min;\n }\n }\n\n const forward_correction = camera_forward_dir.clone().multiplyScalar(closest_distance);\n const closest_position = far_pos.clone().add(forward_correction);\n\n return closest_position;\n }\n\n apply_center_correction_to_pos(target_pos, points, camera_quaternion, up_plane, down_plane, left_plane, right_plane)\n {\n const vertical_offset = this.get_vertical_correction(points, down_plane, up_plane, camera_quaternion);\n const horizontal_offset = this.get_horizontal_correction(points, left_plane, right_plane, camera_quaternion);\n\n target_pos.add(vertical_offset);\n target_pos.add(horizontal_offset);\n }\n\n get_vertical_correction(points, down_plane, up_plane, camera_quaternion)\n {\n let closest_distance_to_up_plane = Infinity;\n let closest_distance_to_down_plane = Infinity;\n // let closest_up_point = undefined;\n // let closest_down_point = undefined;\n\n const up_dir = new Vector3(0, 1, 0).applyQuaternion(camera_quaternion);\n for (let i = 0; i < points.length; i++)\n {\n const down_line = new Line3(points[i].clone(), points[i].clone().add(up_dir.clone().multiplyScalar(-5000000)));\n const up_line = new Line3(points[i].clone(), points[i].clone().add(up_dir.clone().multiplyScalar(5000000)));\n\n const down_line_intersection = new Vector3();\n const up_line_intersection = new Vector3();\n\n down_plane.intersectLine(down_line, down_line_intersection);\n up_plane.intersectLine(up_line, up_line_intersection);\n\n const down_dist = down_line_intersection.distanceTo(points[i]);\n const up_dist = up_line_intersection.distanceTo(points[i]);\n\n if (up_line_intersection.length() < 0.0001)\n {\n console.log('vertical up intersection not found', i);\n }\n if (down_line_intersection.length() < 0.0001)\n {\n console.log('vertical down intersection not found', i);\n }\n\n if (down_dist < closest_distance_to_down_plane)\n {\n closest_distance_to_down_plane = down_dist;\n // closest_down_point = points[i];\n }\n if (up_dist < closest_distance_to_up_plane)\n {\n closest_distance_to_up_plane = up_dist;\n // closest_up_point = points[i];\n }\n }\n\n const correction = (closest_distance_to_up_plane - closest_distance_to_down_plane) / 2;\n\n // console.log(\"vertical_correction\", correction)\n return up_dir.clone().multiplyScalar(-correction);\n }\n\n get_horizontal_correction(points, left_plane, right_plane, camera_quaternion)\n {\n let closest_distance_to_right_plane = Infinity;\n let closest_distance_to_left_plane = Infinity;\n // let closest_right_point = undefined;\n // let closest_left_point = undefined;\n\n const right_dir = new Vector3(1, 0, 0).applyQuaternion(camera_quaternion);\n\n for (let i = 0; i < points.length; i++)\n {\n const left_line = new Line3(points[i].clone(), points[i].clone().add(right_dir.clone().multiplyScalar(-5000000)));\n const right_line = new Line3(points[i].clone(), points[i].clone().add(right_dir.clone().multiplyScalar(5000000)));\n\n const left_line_intersection = new Vector3();\n const right_line_intersection = new Vector3();\n\n left_plane.intersectLine(left_line, left_line_intersection);\n right_plane.intersectLine(right_line, right_line_intersection);\n\n const left_dist = left_line_intersection.distanceTo(points[i]);\n const right_dist = right_line_intersection.distanceTo(points[i]);\n\n if (left_line_intersection.length() < 0.0001)\n {\n console.log('left intersection not found', i);\n }\n if (right_line_intersection.length() < 0.0001)\n {\n console.log('right intersection not found', i);\n }\n\n if (left_dist < closest_distance_to_left_plane)\n {\n closest_distance_to_left_plane = left_dist;\n // closest_left_point = points[i];\n }\n if (right_dist < closest_distance_to_right_plane)\n {\n closest_distance_to_right_plane = right_dist;\n // closest_right_point = points[i];\n }\n }\n\n const correction = (closest_distance_to_right_plane - closest_distance_to_left_plane) / 2;\n // console.log(\"horizontal_correction\", correction)\n\n return right_dir.clone().multiplyScalar(-correction);\n }\n\n get_up_plane_normal(camera_quaternion, v_fov)\n {\n const up_plane_normal = new Vector3(0, -1, 0);\n up_plane_normal.applyQuaternion(new Quaternion().setFromAxisAngle(new Vector3(1, 0, 0), v_fov));\n up_plane_normal.applyQuaternion(camera_quaternion);\n return up_plane_normal;\n }\n\n get_down_plane_normal(camera_quaternion, v_fov)\n {\n const down_plane_normal = new Vector3(0, 1, 0);\n down_plane_normal.applyQuaternion(new Quaternion().setFromAxisAngle(new Vector3(1, 0, 0), -v_fov));\n down_plane_normal.applyQuaternion(camera_quaternion);\n return down_plane_normal;\n }\n\n get_left_plane_normal(camera_quaternion, h_fov)\n {\n const left_plane_normal = new Vector3(1, 0, 0);\n left_plane_normal.applyQuaternion(new Quaternion().setFromAxisAngle(new Vector3(0, 1, 0), h_fov));\n left_plane_normal.applyQuaternion(camera_quaternion);\n return left_plane_normal;\n }\n\n get_right_plane_normal(camera_quaternion, h_fov)\n {\n const right_plane_normal = new Vector3(-1, 0, 0);\n right_plane_normal.applyQuaternion(new Quaternion().setFromAxisAngle(new Vector3(0, 1, 0), -h_fov));\n right_plane_normal.applyQuaternion(camera_quaternion);\n return right_plane_normal;\n }\n\n get_distance_to_fit_rect(width, height, vertical_fov, aspect)\n {\n const v_fov = (vertical_fov / 2) * Math.PI / 180;\n const h_fov = (2 * Math.atan(Math.tan(v_fov) * aspect)) / 2;\n\n const distV = height / Math.tan(v_fov);\n const distH = width / Math.tan(h_fov);\n return Math.max(Math.abs(distH), Math.abs(distV));\n }\n}\n\nexport { PerspectiveFrustumPointFitter };\n","import { Vector3, Box3 } from 'three';\n\nclass OrthographicFrustumPointFitter\n{\n constructor()\n {\n\n }\n\n fit_points(points, camera_quaternion, vertical_fov, aspect)\n {\n const inverse_camera_quat = camera_quaternion.clone().inverse();\n\n const inverted_points = [];\n\n for (let i = 0; i < points.length; i++)\n {\n inverted_points.push(points[i].clone().applyQuaternion(inverse_camera_quat));\n }\n\n const box = new Box3().setFromPoints(inverted_points);\n const size = new Vector3();\n box.getSize(size);\n\n const distance = this.get_distance_to_fit_rect(size.x / 2, size.y / 2, vertical_fov, aspect);\n\n const center = new Vector3();\n box.getCenter(center);\n\n center.applyQuaternion(camera_quaternion);\n\n return {\n center: center,\n distance_to_center: distance\n };\n }\n\n get_distance_to_fit_rect(width, height, vertical_fov, aspect)\n {\n const v_fov = (vertical_fov / 2) * Math.PI / 180;\n const h_fov = (2 * Math.atan(Math.tan(v_fov) * aspect)) / 2;\n\n const distV = height / Math.tan(v_fov);\n const distH = width / Math.tan(h_fov);\n return Math.max(Math.abs(distH), Math.abs(distV));\n }\n}\n\nexport { OrthographicFrustumPointFitter };\n","import { CameraManager } from '../CameraManager';\nimport { OMath } from '../utilities/OMath';\nimport { OScreen } from '../OScreen';\n\nimport { Vector3 } from 'three';\nimport { Matrix4 } from 'three';\nimport { Plane } from 'three';\nimport { Ray } from 'three';\nimport { Sphere } from 'three';\nimport { Box3 } from 'three';\nimport { PerspectiveFrustumPointFitter } from './PerspectiveFrustumPointFitter';\nimport { OrthographicFrustumPointFitter } from './OrthographicFrustumPointFitter';\n\nclass CameraUtilities\n{\n init(input)\n {\n this.tmp_mat = new Matrix4();\n this.plane = new Plane();\n this.ray = new Ray();\n\n this.tmp_size = new Vector3();\n this.tmp_unproj = new Vector3();\n\n this.input = input;\n }\n\n get_up_dir(camera)\n {\n camera = camera || CameraManager.current;\n const tmp_vec = new Vector3();\n\n tmp_vec.set(0, 1, 0);\n tmp_vec.applyQuaternion(camera.quaternion);\n\n return tmp_vec;\n }\n\n get_forward_dir(camera)\n {\n camera = camera || CameraManager.current;\n const tmp_vec = new Vector3();\n\n tmp_vec.set(0, 0, -1);\n tmp_vec.applyQuaternion(camera.quaternion);\n\n return tmp_vec;\n }\n\n get_right_dir(camera)\n {\n camera = camera || CameraManager.current;\n const tmp_vec = new Vector3();\n\n tmp_vec.set(1, 0, 0);\n tmp_vec.applyQuaternion(camera.quaternion);\n return tmp_vec;\n }\n\n unproject_mouse_position(NDC, camera)\n {\n camera = camera || CameraManager.current;\n const tmp_vec = new Vector3();\n\n const v_fov = (camera.fov / 2) * Math.PI / 180;\n const h_fov = (2 * Math.atan(Math.tan(v_fov) * camera.aspect)) / 2;\n\n const distV = Math.tan(v_fov) * camera.far;\n const distH = Math.tan(h_fov) * camera.far;\n\n tmp_vec.set(distH * NDC.x, distV * NDC.y, -camera.far).normalize();\n\n return tmp_vec.applyQuaternion(camera.quaternion);\n }\n\n get_plane_intersection(plane_position, plane_normal, NDC, camera)\n {\n camera = camera || CameraManager.current;\n NDC = NDC || this.input.NDC;\n\n const tmp_vec = new Vector3();\n\n this.plane.setFromNormalAndCoplanarPoint(plane_normal || this.get_forward_dir(camera), plane_position);\n if (camera.isPerspectiveCamera)\n {\n this.ray.set(camera.position, this.unproject_mouse_position(NDC, camera));\n }\n else\n {\n this.tmp_unproj.set(NDC.x, NDC.y, 1).unproject(camera);\n this.ray.set(camera.position, this.tmp_unproj);\n }\n\n this.ray.intersectPlane(this.plane, tmp_vec);\n return tmp_vec;\n }\n\n fit_points_on_camera(points, zoom_scale = 1)\n {\n const points_sphere = new Sphere().setFromPoints(points);\n const world_space_center = points_sphere.center;\n const camera_forward = this.get_forward_dir(CameraManager.current).clone();\n\n const plane = new Plane().setFromNormalAndCoplanarPoint(camera_forward, world_space_center);\n\n const points_on_plane = OMath.project_points_on_plane(points, plane);\n\n const projected_points_center = new Vector3();\n let box = new Box3().setFromPoints(points_on_plane);\n box.getCenter(projected_points_center);\n\n const up = new Vector3(0, 1, 0).applyQuaternion(CameraManager.current.quaternion);\n const right = up.clone().cross(camera_forward).normalize();\n const mat = new Matrix4().set(right.x, up.x, camera_forward.x, world_space_center.x,\n right.y, up.y, camera_forward.y, world_space_center.y,\n right.z, up.z, camera_forward.z, world_space_center.z,\n 0, 0, 0, 1);\n\n const inverse_mat = new Matrix4().getInverse(mat);\n for (let i = 0; i < points_on_plane.length; i++)\n {\n points_on_plane[i].applyMatrix4(inverse_mat);\n }\n\n const size = new Vector3();\n box = new Box3().setFromPoints(points_on_plane);\n box.getSize(size);\n size.multiplyScalar(zoom_scale);\n const projected_center = new Vector3();\n box.getCenter(projected_center);\n\n return {\n position: projected_points_center,\n zoom: this.get_zoom_to_fit_rect(size.x / 2, size.y / 2)\n };\n }\n\n get_zoom_to_fit_rect(width, height)\n {\n const v_fov = (CameraManager.current.fov / 2) * Math.PI / 180;\n const h_fov = (2 * Math.atan(Math.tan(v_fov) * CameraManager.current.aspect)) / 2;\n\n const distV = height / Math.tan(v_fov);\n const distH = width / Math.tan(h_fov);\n\n return Math.max(Math.abs(distH), Math.abs(distV));\n }\n\n get_zoom_to_fit_box(bb, camera)\n {\n if (camera.isOrthographicCamera)\n {\n bb.getSize(this.tmp_size);\n\n const obj_x = this.tmp_size.x;\n const obj_y = this.tmp_size.y;\n const object_aspect = obj_x / obj_y;\n if (OScreen.aspect_ratio / object_aspect > 1)\n {\n return OScreen.height / obj_y;\n }\n else\n {\n return OScreen.width / obj_x;\n }\n }\n else\n {\n // return this.fit_points_on_camera([bb.min, bb.max], 1).zoom;\n const size = new Vector3();\n bb.getSize(size);\n return this.get_zoom_to_fit_rect(size.x, size.y);\n }\n }\n\n get_html_screen_pos(object, camera)\n {\n camera = camera || CameraManager.current;\n const tmp_vec = new Vector3();\n\n object.getWorldPosition(tmp_vec);\n tmp_vec.project(camera);\n\n tmp_vec.x = (tmp_vec.x * 0.5 + 0.5) * (OScreen.width);\n tmp_vec.y = (1 - (tmp_vec.y * 0.5 + 0.5)) * OScreen.height;\n return tmp_vec;\n }\n\n world_pos_to_screen(pos, camera)\n {\n camera = camera || CameraManager.current;\n const tmp_vec = new Vector3();\n\n tmp_vec.copy(pos);\n tmp_vec.project(camera);\n\n tmp_vec.x = (tmp_vec.x * 0.5 + 0.5) * (OScreen.width);\n tmp_vec.y = (1 - (tmp_vec.y * 0.5 + 0.5)) * OScreen.height;\n return tmp_vec;\n }\n\n update_projection(camera)\n {\n camera.left = -OScreen.width / 2;\n camera.right = OScreen.width / 2;\n camera.top = OScreen.height / 2;\n camera.bottom = -OScreen.height / 2;\n camera.aspect = OScreen.aspect_ratio;\n camera.updateProjectionMatrix(true);\n }\n\n fit_bounding_box_points(camera, bb, scale = 1)\n {\n const dir = new Vector3();\n dir.copy(bb.max).sub(bb.min);\n\n const p1 = bb.min.clone();\n\n const p2 = p1.clone().add(new Vector3(dir.x, 0, 0));\n const p3 = p1.clone().add(new Vector3(0, dir.y, 0));\n const p4 = p1.clone().add(new Vector3(0, 0, dir.z));\n\n const p5 = p1.clone().add(new Vector3(dir.x, 0, dir.z));\n const p6 = p1.clone().add(new Vector3(0, dir.y, dir.z));\n const p7 = bb.max.clone();\n const p8 = p1.clone().add(new Vector3(dir.x, dir.y, 0));\n return this.fit_points(camera, [p1, p2, p3, p4, p5, p6, p7, p8], scale);\n }\n\n fit_points(camera, points, zoom_scale = 1)\n {\n if (camera.isPerspectiveCamera)\n {\n const camera_forward_dir = new Vector3(0, 0, -1).applyQuaternion(camera.quaternion);\n const camera_backward_dir = camera_forward_dir.clone().multiplyScalar(-1);\n\n const fitter = new PerspectiveFrustumPointFitter();\n\n const aspect_ratio = OScreen.aspect_ratio;\n\n const camera_pos = fitter.fit_points(points, camera.quaternion, camera.fov * zoom_scale, aspect_ratio);\n const box = new Box3().setFromPoints(points);\n const center = new Vector3();\n box.getCenter(center);\n\n const reference_position_plane = new Plane().setFromNormalAndCoplanarPoint(camera_backward_dir, center);\n\n const camera_ray = new Ray(camera_pos, camera_forward_dir);\n\n const reference_position = new Vector3();\n camera_ray.intersectPlane(reference_position_plane, reference_position);\n\n const zoom = camera_pos.distanceTo(reference_position);\n\n return {\n zoom: zoom,\n reference_position: reference_position,\n camera_position: camera_pos\n };\n }\n else\n {\n const fitter = new OrthographicFrustumPointFitter();\n const result = fitter.fit_points(points, this.reference_rotation, camera.fov * zoom_scale, OScreen.aspect_ratio);\n\n this.reference_position.copy(result.center);\n this.reference_zoom = result.distance_to_center;\n\n const forward = new Vector3(0, 0, 1).applyQuaternion(camera.quaternion);\n return {\n zoom: result.distance_to_center,\n reference_position: result.center,\n camera_position: forward.multiplyScalar(result.distance_to_center)\n };\n }\n }\n}\n\nconst camera_utilities = new CameraUtilities();\nexport { camera_utilities as CameraUtilities };\n","import { Browser } from './Browser';\nimport { CameraManager } from './CameraManager';\nimport { Capabilities } from './Capabilities';\nimport { Configuration } from './Configuration';\nimport { Debug } from './Debug';\nimport { EventManager } from './EventManager';\nimport { Graphics } from './Graphics';\nimport { OS } from './OS';\nimport { OScreen } from './OScreen';\nimport { ReflectionPlaneContext } from './ReflectionPlaneContext';\nimport { ResourceContainer } from './ResourceContainer';\nimport { SceneManager } from './SceneManager';\nimport { GeometryBatcher } from './static_batcher/GeometryBatcher';\nimport { Time } from './Time';\nimport { UI } from './UI';\nimport { CameraUtilities } from './utilities/CameraUtilities';\n\nclass Initializer\n{\n constructor()\n {\n }\n\n init(input)\n {\n CameraManager.init();\n CameraUtilities.init(input);\n Capabilities.init();\n Configuration.init();\n EventManager.init();\n GeometryBatcher.init();\n\n OS.init();\n Browser.init();\n ReflectionPlaneContext.init();\n ResourceContainer.init();\n SceneManager.init();\n OScreen.init();\n Time.init();\n UI.init(input);\n\n Debug.init();\n }\n\n dispose(render_loop)\n {\n Graphics.dispose();\n SceneManager.dispose();\n\n render_loop.dispose();\n }\n}\n\nconst initializer = new Initializer();\nexport { initializer as Initializer };\n","import { BlitMaterial } from '../materials/BlitMaterial';\n\nimport frag from '../shaders/ssao/ssao.frag';\nimport vert from '../shaders/ssao/ssao.vert';\n\nimport { Matrix4 } from 'three';\nimport { Vector3 } from 'three';\nimport { DataTexture } from 'three';\nimport { RGBFormat } from 'three';\nimport { RepeatWrapping } from 'three';\n\nimport { OMath } from '../utilities/OMath';\nclass SSAOMaterial extends BlitMaterial\n{\n constructor()\n {\n super(frag, vert);\n\n this.uniforms._InverseProjMatrix = { value: new Matrix4() };\n this.uniforms._ProjectionMatrix = { value: new Matrix4() };\n\n this.uniforms._Bias = { value: 0.0125 };\n this.uniforms._Radius = { value: 0.3 };\n this.uniforms._FarPlane = { value: 100 };\n\n this.uniforms._SampleKernel = { value: this.__get_sample_kernel() };\n this.uniforms._RandomRotation = { value: this.__get_rotation_kernel() };\n }\n\n __get_sample_kernel()\n {\n const sample_kernel = [];\n const kernel_size = 64;\n\n for (let i = 0; i < kernel_size; i++)\n {\n const dir = new Vector3(Math.random() * 2 - 1,\n Math.random() * 2 - 1,\n Math.random());\n dir.normalize();\n let scale = i / kernel_size;\n scale = OMath.lerp(0.1, 1.0, scale * scale);\n dir.multiplyScalar(scale);\n\n sample_kernel.push(dir);\n }\n return sample_kernel;\n }\n\n __get_rotation_kernel()\n {\n const rotation_kernel = new Uint8Array(3 * 16);\n for (let i = 0; i < 16; i++)\n {\n rotation_kernel[i * 3 + 1] = Math.floor(Math.random() * 255);\n rotation_kernel[i * 3 + 2] = Math.floor(Math.random() * 255);\n rotation_kernel[i * 3 + 3] = 0;\n }\n\n const rotation_texture = new DataTexture(rotation_kernel, 4, 4, RGBFormat);\n rotation_texture.wrapS = RepeatWrapping;\n rotation_texture.wrapT = RepeatWrapping;\n\n rotation_texture.needsUpdate = true;\n return rotation_texture;\n }\n}\n\nexport { SSAOMaterial };\n","import { BlitMaterial } from '../materials/BlitMaterial';\n\nimport frag from '../shaders/ssao/ssao_compose.frag';\n\nclass SSAOComposeMaterial extends BlitMaterial\n{\n constructor()\n {\n super(frag);\n this.uniforms._AO = { value: undefined };\n }\n}\n\nexport { SSAOComposeMaterial };\n","import { BlitMaterial } from '../materials/BlitMaterial';\n\nimport frag from '../shaders/depth_normals/debug_normals.frag';\nimport depth_normals_vert from '../shaders/ssao/ssao.vert';\n\nimport { Matrix4 } from 'three';\n\nclass DisplayNormalTextureMaterial extends BlitMaterial\n{\n constructor()\n {\n super(frag, depth_normals_vert);\n this.uniforms._FarPlane = { value: 1 };\n this.uniforms._InverseProjMatrix = { value: new Matrix4() };\n }\n}\n\nexport { DisplayNormalTextureMaterial };\n","import { BlitMaterial } from '../materials/BlitMaterial';\n\nimport frag from '../shaders/box_blur/box_blur.frag';\n\nimport { Vector2 } from 'three';\n\nclass BoxBlurMaterial extends BlitMaterial\n{\n constructor()\n {\n super(frag);\n this.uniforms._SampleDir = { value: new Vector2() };\n }\n}\n\nexport { BoxBlurMaterial };\n","import { BoxBlurMaterial } from '../materials/BoxBlurMaterial';\nimport { Graphics } from '../Graphics';\n\nimport { WebGLRenderTarget } from 'three';\n\nclass Blurrer\n{\n constructor(renderer)\n {\n this.RT1 = new WebGLRenderTarget(1, 1);\n this.RT2 = new WebGLRenderTarget(1, 1);\n this.box_blur_mat = new BoxBlurMaterial();\n }\n\n blur(RT)\n {\n if (RT.width !== this.RT1.width || RT.height !== this.RT1.height)\n {\n this.RT1.setSize(RT.width, RT.height);\n this.RT2.setSize(RT.width, RT.height);\n }\n\n this.box_blur_mat.uniforms._SampleDir.value.set(1, 0);\n Graphics.blit(RT, this.RT1, this.box_blur_mat);\n this.box_blur_mat.uniforms._SampleDir.value.set(0, 1);\n Graphics.blit(this.RT1, RT, this.box_blur_mat);\n // return this.RT2;\n }\n}\n\nexport { Blurrer };\n","import { CameraManager } from '../CameraManager';\nimport { SceneManager } from '../SceneManager';\nimport { OScreen } from '../OScreen';\nimport { BaseRender } from '../render_mode/BaseRender';\nimport { Configuration } from '../Configuration';\nimport { SSAOMaterial } from '../materials/SSAOMaterial';\nimport { SSAOComposeMaterial } from '../materials/SSAOComposeMaterial';\nimport { DisplayNormalTextureMaterial } from '../materials/DisplayNormalTextureMaterial';\nimport { Blurrer } from '../render_utilities/Blurrer';\nimport { Graphics } from '../Graphics';\n\nimport { WebGLRenderTarget } from 'three';\n\nclass NormalAORender extends BaseRender\n{\n constructor()\n {\n super();\n\n this.ssao_mat = new SSAOMaterial();\n this.ssao_compose_mat = new SSAOComposeMaterial();\n this.debug_normals = new DisplayNormalTextureMaterial();\n\n this.ssaa = Configuration.use_ssaa ? 2 : 1;\n\n this.main_RT = new WebGLRenderTarget(OScreen.width * this.ssaa, OScreen.height * this.ssaa);\n\n this.SSAO_RT = new WebGLRenderTarget(OScreen.width, OScreen.height);\n\n this.blurrer = new Blurrer();\n Graphics.generateDepthNormalTexture = true;\n }\n\n render()\n {\n this.__check_RT_size();\n\n Graphics.clear(this.main_RT, CameraManager.current, true, false);\n Graphics.render(SceneManager.current, CameraManager.current, this.main_RT);\n\n this.__update_uniforms();\n\n Graphics.blit(Graphics.depth_normals_RT, this.SSAO_RT, this.ssao_mat);\n\n // // BLUR\n this.blurrer.blur(this.SSAO_RT);\n Graphics.blit(this.SSAO_RT, undefined);\n\n // // COMPOSE\n this.ssao_compose_mat.uniforms._AO.value = this.SSAO_RT.texture;\n Graphics.blit(this.main_RT, undefined, this.ssao_compose_mat);\n\n // Graphics.blit(this.SSAO_RT, undefined);\n }\n\n __update_uniforms()\n {\n this.ssao_mat.uniforms._InverseProjMatrix.value.getInverse(CameraManager.current.projectionMatrix);\n this.ssao_mat.uniforms._ProjectionMatrix.value.copy(CameraManager.current.projectionMatrix);\n this.ssao_mat.uniforms._FarPlane.value = CameraManager.current.far;\n }\n\n __check_RT_size()\n {\n if (this.main_RT.width !== OScreen.width * this.ssaa || this.main_RT.height !== OScreen.height * this.ssaa)\n {\n this.main_RT.setSize(OScreen.width * this.ssaa, OScreen.height * this.ssaa);\n this.SSAO_RT.setSize(OScreen.width, OScreen.height);\n }\n }\n}\n\nexport { NormalAORender };\n","import { CameraManager } from '../CameraManager';\nimport { SceneManager } from '../SceneManager';\nimport { BaseRender } from '../render_mode/BaseRender';\nimport { Graphics } from '../Graphics';\n\nclass NormalRender extends BaseRender\n{\n constructor()\n {\n super();\n }\n\n render()\n {\n Graphics.clear(undefined, CameraManager.current, true, true);\n\n if (SceneManager.current.on_pre_render)\n {\n SceneManager.current.on_pre_render();\n }\n\n if (SceneManager.current.render)\n {\n SceneManager.current.render();\n }\n else\n {\n Graphics.render(SceneManager.current, CameraManager.current);\n }\n\n if (SceneManager.current.on_post_render)\n {\n SceneManager.current.on_post_render();\n }\n }\n}\n\nexport { NormalRender };\n","import { CameraManager } from '../CameraManager';\nimport { SceneManager } from '../SceneManager';\nimport { BaseRender } from '../render_mode/BaseRender';\nimport { Graphics } from '../Graphics';\n\nclass VRRender extends BaseRender\n{\n constructor()\n {\n super();\n }\n\n render()\n {\n // Graphics.clear(undefined, CameraManager.current, true, true);\n\n if (SceneManager.current.on_pre_render)\n {\n SceneManager.current.on_pre_render();\n }\n\n if (SceneManager.current.render)\n {\n SceneManager.current.render();\n }\n else\n {\n Graphics.render(SceneManager.current, CameraManager.current, Graphics._renderer.getRenderTarget());\n }\n\n this.render_spectator_camera();\n\n if (SceneManager.current.on_post_render)\n {\n SceneManager.current.on_post_render();\n }\n }\n\n render_spectator_camera()\n {\n const spectator_camera = CameraManager.spectator;\n\n if (spectator_camera && Graphics._renderer.xr.isPresenting)\n {\n // Copy the XR Camera's position and rotation, but use your\n // main camera's projection matrix\n const xrCam = Graphics._renderer.xr.getCamera(CameraManager.current);\n\n spectator_camera.projectionMatrix.copy(CameraManager.current.projectionMatrix);\n\n spectator_camera.position.copy(xrCam.position);\n spectator_camera.quaternion.copy(xrCam.quaternion);\n\n // we'll restore this later\n const currentRenderTarget = Graphics._renderer.getRenderTarget();\n\n // turn off the WebXR rendering\n Graphics._renderer.xr.isPresenting = false;\n\n // render to the canvas on our main display\n Graphics._renderer.setRenderTarget(null);\n Graphics._renderer.render(SceneManager.current, spectator_camera);\n\n // reset back to enable WebXR\n Graphics._renderer.setRenderTarget(currentRenderTarget);\n Graphics._renderer.xr.isPresenting = true;\n }\n }\n}\n\nexport { VRRender };\n","import { BlitMaterial } from './BlitMaterial';\n\nimport frag from '../shaders/gaussian_blur/gaussian_blur.frag';\n\nimport { Vector2 } from 'three';\n\nclass GaussianBlurMaterial extends BlitMaterial\n{\n constructor(kernel_radius)\n {\n super(frag, undefined, {\n KERNEL_RADIUS: kernel_radius,\n SIGMA: kernel_radius\n });\n\n this.uniforms.texSize = { value: new Vector2(0.5, 0.5) };\n this.uniforms.direction = { value: new Vector2(0.5, 0.5) };\n }\n\n set_size(w, h)\n {\n this.uniforms.texSize.value.x = w;\n this.uniforms.texSize.value.y = h;\n }\n\n set_direction(x, y)\n {\n this.uniforms.direction.value.set(x, y);\n }\n}\n\nexport { GaussianBlurMaterial };\n","import { BlitMaterial } from './BlitMaterial';\n\nimport frag from '../shaders/luminosity_high_pass/luminosity_high_pass.frag';\n\nimport { Color } from 'three';\nclass LuminosityHighPassMaterial extends BlitMaterial\n{\n constructor(kernel_radius)\n {\n super(frag);\n\n this.uniforms.luminosityThreshold = { value: 0.23 };\n this.uniforms.smoothWidth = { value: 0.01 };\n this.uniforms.defaultColor = { value: new Color('#000000') };\n this.uniforms.defaultOpacity = { value: 0.0 };\n }\n}\n\nexport { LuminosityHighPassMaterial };\n","import { GaussianBlurMaterial } from '../materials/GaussianBlurMaterial';\nimport { LuminosityHighPassMaterial } from '../materials/LuminosityHighPassMaterial';\nimport { Graphics } from '../Graphics';\n\nimport { WebGLRenderTarget, LinearFilter, RGBAFormat } from 'three';\n\nclass GaussianBlurrer\n{\n constructor(nMips = 5)\n {\n this.current_width = 1;\n this.current_height = 1;\n\n this.separableBlurMaterials = [];\n this.renderTargetsHorizontal = [];\n this.renderTargetsVertical = [];\n\n this.nMips = nMips;\n this.kernelSizeArray = [3, 5, 7, 9, 11];\n this.rt_pars = { minFilter: LinearFilter, magFilter: LinearFilter, format: RGBAFormat };\n\n this.renderTargetBright = new WebGLRenderTarget(1, 1, this.rt_pars);\n this.renderTargetBright.texture.generateMipmaps = false;\n\n this.init_materials();\n this.init_RT();\n\n this.luminosity_high_pass_mat = new LuminosityHighPassMaterial();\n }\n\n blur(RT, use_luminosity_high_pass)\n {\n this.resize_RT(RT.width, RT.height);\n\n if (use_luminosity_high_pass)\n {\n Graphics.blit(RT, this.renderTargetBright, this.luminosity_high_pass_mat);\n }\n else\n {\n Graphics.blit(RT, this.renderTargetBright);\n }\n\n let inputRenderTarget = this.renderTargetBright;\n\n for (let i = 0; i < this.nMips; i++)\n {\n const mat = this.separableBlurMaterials[i];\n\n mat.set_direction(1, 0);\n Graphics.blit(inputRenderTarget, this.renderTargetsHorizontal[i], mat);\n\n mat.set_direction(0, 1);\n Graphics.blit(this.renderTargetsHorizontal[i], this.renderTargetsVertical[i], mat);\n\n inputRenderTarget = this.renderTargetsVertical[i];\n }\n }\n\n get_blurred_texture()\n {\n return this.renderTargetsHorizontal[0].texture;\n }\n\n get_blurred_RT()\n {\n return this.renderTargetsHorizontal[0];\n }\n\n init_RT()\n {\n this.dispose_RT();\n\n this.renderTargetBright.setSize(1, 1);\n\n for (let i = 0; i < this.nMips; i++)\n {\n const hor = new WebGLRenderTarget(1, 1, this.rt_pars);\n const ver = new WebGLRenderTarget(1, 1, this.rt_pars);\n\n hor.texture.generateMipmaps = false;\n ver.texture.generateMipmaps = false;\n\n this.renderTargetsHorizontal.push(hor);\n this.renderTargetsVertical.push(ver);\n }\n }\n\n resize_RT(texture_width, texture_height)\n {\n if (this.current_width === texture_width && this.current_height === texture_height)\n {\n return;\n }\n\n this.current_width = texture_width;\n this.current_height = texture_height;\n\n let width = Math.round(texture_width / 2);\n let height = Math.round(texture_height / 2);\n\n this.renderTargetBright.setSize(width, height);\n\n for (let i = 0; i < this.nMips; i++)\n {\n this.renderTargetsVertical[i].setSize(width, height);\n this.renderTargetsHorizontal[i].setSize(width, height);\n this.separableBlurMaterials[i].set_size(width, height);\n\n width = Math.round(width / 2);\n height = Math.round(height / 2);\n }\n }\n\n init_materials(texture_width, texture_height)\n {\n this.dispose_materials();\n\n for (let i = 0; i < this.nMips; i++)\n {\n this.separableBlurMaterials.push(new GaussianBlurMaterial(this.kernelSizeArray[i]));\n }\n }\n\n dispose_materials()\n {\n for (let i = 0; i < this.separableBlurMaterials.length; i++)\n {\n this.separableBlurMaterials[i].dispose();\n }\n this.separableBlurMaterials.length = 0;\n }\n\n dispose_RT()\n {\n for (let i = 0; i < this.renderTargetsVertical.length; i++)\n {\n this.renderTargetsHorizontal[i].dispose();\n this.renderTargetsVertical[i].dispose();\n }\n this.renderTargetBright.dispose();\n\n this.renderTargetsHorizontal.length = 0;\n this.renderTargetsVertical.length = 0;\n }\n}\n\nexport { GaussianBlurrer };\n","import { OScreen } from '../OScreen';\nimport { BaseRender } from '../render_mode/BaseRender';\nimport { UnrealBloomComposeMaterial } from '../materials/UnrealBloomComposeMaterial';\nimport { AddMaterial } from '../materials/AddMaterial';\n\nimport { WebGLRenderTarget } from 'three';\n\nimport { GaussianBlurrer } from '../render_utilities/GaussianBlurrer';\nimport { Graphics } from '../Graphics';\nimport { CameraManager } from '../CameraManager';\nimport { SceneManager } from '../SceneManager';\n\nclass UnrealBloomRender extends BaseRender\n{\n constructor()\n {\n super();\n\n this.bloom_compose_mat = undefined;\n\n this.main_RT = undefined;\n this.blur_RT = undefined;\n this.blurrer = undefined;\n\n this.add_mat = new AddMaterial();\n }\n\n on_enter()\n {\n this.blurrer = new GaussianBlurrer();\n this.main_RT = new WebGLRenderTarget(OScreen.width, OScreen.height);\n this.blur_RT = new WebGLRenderTarget(OScreen.width, OScreen.height);\n\n this.bloom_compose_mat = new UnrealBloomComposeMaterial(5);\n this.blurrer = new GaussianBlurrer(5);\n\n this.bloom_compose_mat.set_RT_0(this.blurrer.renderTargetsVertical[0].texture);\n this.bloom_compose_mat.set_RT_1(this.blurrer.renderTargetsVertical[1].texture);\n this.bloom_compose_mat.set_RT_2(this.blurrer.renderTargetsVertical[2].texture);\n this.bloom_compose_mat.set_RT_3(this.blurrer.renderTargetsVertical[3].texture);\n this.bloom_compose_mat.set_RT_4(this.blurrer.renderTargetsVertical[4].texture);\n\n this.bloom_compose_mat.set_bloom_strength(1);\n this.bloom_compose_mat.set_bloom_radius(1);\n\n this.add_mat.set_add_texture(this.blurrer.renderTargetsHorizontal[0].texture);\n }\n\n set_bloom_strength(val)\n {\n this.bloom_compose_mat.set_bloom_strength(val);\n }\n\n set_bloom_radius(val)\n {\n this.bloom_compose_mat.set_bloom_radius(val);\n }\n\n set_tint_color_0(col_string)\n {\n this.bloom_compose_mat.set_tint_color_0(col_string);\n }\n\n set_tint_color_1(col_string)\n {\n this.bloom_compose_mat.set_tint_color_1(col_string);\n }\n\n set_tint_color_2(col_string)\n {\n this.bloom_compose_mat.set_tint_color_2(col_string);\n }\n\n set_tint_color_3(col_string)\n {\n this.bloom_compose_mat.set_tint_color_3(col_string);\n }\n\n set_tint_color_4(col_string)\n {\n this.bloom_compose_mat.set_tint_color_4(col_string);\n }\n\n render()\n {\n this.__check_RT_size();\n\n Graphics.clear(this.main_RT, CameraManager.current, true, false);\n Graphics.render(SceneManager.current, CameraManager.current, this.main_RT);\n\n // // BLUR\n this.blurrer.blur(this.main_RT, true);\n\n // Blur compose\n Graphics.material_pass(this.bloom_compose_mat, this.blurrer.renderTargetsHorizontal[0]);\n\n // Additive blend\n Graphics.blit(this.main_RT, undefined, this.add_mat);\n }\n\n __check_RT_size()\n {\n if (this.main_RT.width !== OScreen.width || this.main_RT.height !== OScreen.height)\n {\n this.main_RT.setSize(OScreen.width, OScreen.height);\n this.blur_RT.setSize(OScreen.width, OScreen.height);\n }\n }\n}\n\nexport { UnrealBloomRender };\n","import { Color } from 'three';\nimport { OrthographicCamera as TOrthographicCamera } from 'three';\n\nclass OrthographicCamera extends TOrthographicCamera\n{\n constructor(left, right, top, bottom, near, far)\n {\n super(left, right, top, bottom, near, far);\n\n this.clear_color = new Color('#000000');\n this.clear_alpha = 1;\n }\n\n copy(camera)\n {\n super.copy(camera);\n this.clear_color.copy(camera.clear_color);\n this.clear_alpha = camera.clear_alpha;\n return this;\n }\n}\n\nexport { OrthographicCamera };\n","import { ViewManager } from './ViewManager';\n\nclass ViewComponentManager\n{\n constructor()\n {\n this.components = [];\n this.enabled_components = new Set();\n }\n\n update()\n {\n this.__set_components_opacities();\n\n for (const component of this.enabled_components)\n {\n component.update(ViewManager.transition_handler.current_state_data);\n }\n }\n\n register_component(component)\n {\n this.components.push(component);\n }\n\n enable_component(component)\n {\n // const component_to_enable = this.get_component_by_name(component_name);\n\n this.enabled_components.add(component);\n }\n\n disable_component(component)\n {\n // const component_to_disable = this.get_component_by_name(component_name);\n\n this.enabled_components.delete(component);\n }\n\n get_component_by_name(component_name)\n {\n console.warn('DEPRECATED. Use ViewComponentManager.get instead');\n this.get(component_name);\n }\n\n get(component_name)\n {\n for (let i = 0; i < this.components.length; i++)\n {\n if (this.components[i].name === component_name)\n {\n return this.components[i];\n }\n }\n console.error('[ViewComponentManager.get] no component found for: ', component_name);\n return undefined;\n }\n\n __set_components_opacities()\n {\n for (let i = 0; i < this.components.length; i++)\n {\n this.components[i].set_opacity(ViewManager.transition_handler.current_state_data);\n }\n }\n}\n\nconst view_component_manager = new ViewComponentManager();\nexport { view_component_manager as ViewComponentManager };\n","import { Time } from './Time';\nimport { UI } from './UI';\nimport { Debug } from './Debug';\nimport { BaseApplication } from './BaseApplication';\nimport { ViewManager } from './view_components/ViewManager';\nimport { ViewComponentManager } from './view_components/ViewComponentManager';\n\nclass RenderLoop\n{\n constructor(target_application, graphics, input)\n {\n target_application = target_application || new BaseApplication();\n\n this.target_application = target_application;\n this.graphics = graphics;\n this.input = input;\n\n this.is_running = false;\n this.frames_passed = 0;\n }\n\n update()\n {\n if (!this.is_running)\n {\n return;\n }\n Time.__update();\n\n // ###### START CYCLE ######\n if (this.frames_passed === 1)\n {\n this.target_application.on_post_start();\n }\n\n this.input.update();\n\n this.target_application.update();\n ViewManager.update();\n ViewComponentManager.update();\n\n this.target_application.on_pre_render();\n\n this.graphics.update(); // render scene\n UI.update(); // update after new camera matrix has been calculated\n UI.render(this.graphics); // render ui layer on top\n this.target_application.on_post_render();\n\n Debug.render(this.graphics); // render debug layer\n\n // ###### END CYCLE #######\n\n this.target_application.on_frame_end();\n this.frames_passed++;\n\n this.input.clear();\n UI.clear();\n Debug.clear();\n }\n\n start()\n {\n if (this.is_running) return; // sanity check\n\n if (this.frames_passed === 0)\n {\n this.target_application.on_enter();\n }\n\n this.is_running = true;\n\n this.graphics._renderer.setAnimationLoop(this.update.bind(this));\n }\n\n stop()\n {\n if (this.is_running === false) return; // sanity check\n\n this.is_running = false;\n this.target_application.on_exit();\n\n this.graphics._renderer.setAnimationLoop(null);\n }\n\n set_state(new_state)\n {\n this.target_application.on_exit(this);\n this.target_application = new_state;\n this.target_application.on_enter(this);\n }\n\n dispose()\n {\n this.stop();\n this.frames_passed = 0;\n }\n}\n\nexport { RenderLoop };\n","import { OScreen } from './OScreen';\n\nclass Screen\n{\n init()\n {\n console.warn('Screen Singleton is deprecated. Please use OScreen.');\n OScreen.init();\n }\n\n update_position(x, y)\n {\n console.warn('Screen Singleton is deprecated. Please use OScreen.');\n OScreen.update_position(x, y);\n }\n\n update()\n {\n console.warn('Screen Singleton is deprecated. Please use OScreen.');\n OScreen.update();\n }\n\n update_size(width, height)\n {\n console.warn('Screen Singleton is deprecated. Please use OScreen.');\n OScreen.update_size(width, height);\n }\n\n apply_pixel_density_v2(vector2)\n {\n console.warn('Screen Singleton is deprecated. Please use OScreen.');\n return OScreen.apply_pixel_density_v2(vector2);\n }\n\n apply_pixel_density(value)\n {\n console.warn('Screen Singleton is deprecated. Please use OScreen.');\n return OScreen.apply_pixel_density(value);\n }\n\n get_pixel_size()\n {\n console.warn('Screen Singleton is deprecated. Please use OScreen.');\n return OScreen.get_pixel_size();\n }\n\n get aspect_ratio()\n {\n console.warn('Screen Singleton is deprecated. Please use OScreen.');\n return OScreen.aspect_ratio;\n }\n}\n\nconst screen = new Screen();\nexport { screen as Screen };\n","\nimport { CanvasDrawer } from './CanvasDrawer';\n\nimport { Vector2 } from 'three';\n\nclass SimpleTextDrawer extends CanvasDrawer\n{\n constructor()\n {\n super();\n this.text_margin = new Vector2(2, 0);\n }\n\n __draw(text, ctxOptions, canvas, ctx)\n {\n ctx.font = ctxOptions.font;\n\n const text_size = this.get_text_size(text, ctxOptions.font);\n // canvas.width = Math.ceilPowerOfTwo(text_size.x+this.text_margin.x*2);\n // canvas.height = Math.ceilPowerOfTwo(text_size.y+ this.text_margin.y*2);\n canvas.width = Math.ceil(text_size.x + this.text_margin.x * 2);\n canvas.height = Math.ceil(text_size.y + this.text_margin.y * 2);\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n\n // turn this on for debugging\n ctx.globalAlpha = 0.0;\n ctx.fillStyle = ctxOptions.font_color || '#000000';\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n ctx.globalAlpha = 1;\n\n ctx.globalAlpha = 1;\n\n ctx.font = ctxOptions.font;\n ctx.fillStyle = ctxOptions.font_color || '#000000';\n ctx.textBaseline = 'middle';\n\n ctx.textAlign = ctxOptions.textAlign || 'center';\n if (ctx.textAlign === 'center')\n {\n ctx.fillText(text, canvas.width / 2, canvas.height / 2);\n }\n else\n {\n ctx.fillText(text, 0, canvas.height / 2);\n }\n }\n}\n\nexport { SimpleTextDrawer };\n","import { HTMLUtilities } from '../utilities/HTMLUtilities';\nimport { ViewComponentManager } from './ViewComponentManager';\n\nclass ViewComponent\n{\n constructor({ name, container })\n {\n this.name = name;\n this.container = container;\n this.hidden = true;\n\n ViewComponentManager.register_component(this);\n }\n\n start()\n {\n }\n\n on_enter()\n {\n this.container.classList.remove('hidden');\n ViewComponentManager.enable_component(this);\n\n this.hidden = false;\n }\n\n update()\n {\n }\n\n on_exit()\n {\n this.container.classList.add('hidden');\n ViewComponentManager.disable_component(this);\n\n this.hidden = true;\n }\n\n set_opacity(current_state_data)\n {\n this.container.style.opacity = current_state_data[`${this.name}_opacity`];\n this.toggle_hidden();\n }\n\n toggle_hidden()\n {\n if (this.container.style.opacity > 0.001)\n {\n if (this.hidden)\n {\n this.on_enter();\n }\n }\n else\n {\n if (!this.hidden)\n {\n this.on_exit();\n }\n }\n }\n\n load_html_images()\n {\n HTMLUtilities.load_images(this.container);\n }\n\n load_html_videos()\n {\n HTMLUtilities.load_videos(this.container);\n }\n}\n\nexport { ViewComponent };\n","import { Mesh } from 'three';\nimport { MeshBasicMaterial } from 'three';\nimport { PlaneGeometry } from 'three';\n\nclass HorizontalPlane extends Mesh\n{\n constructor(width, height, color, material)\n {\n width = width || 1;\n height = height || 1;\n color = color || '#FF0000';\n material = material || new MeshBasicMaterial({ color: color });\n\n const geometry = new PlaneGeometry(width, height);\n geometry.rotateX(-3.14 / 2);\n super(geometry, material);\n }\n}\n\nexport { HorizontalPlane };\n","import { Mesh } from 'three';\nimport { PlaneGeometry } from 'three';\nimport { MeshBasicMaterial } from 'three';\n\nclass VerticalPlane extends Mesh\n{\n constructor(width, height, color, material)\n {\n width = width || 1;\n height = height || 1;\n color = color || '#FF0000';\n material = material || new MeshBasicMaterial({ color: color });\n\n const geometry = new PlaneGeometry(width, height);\n super(geometry, material);\n }\n}\n\nexport { VerticalPlane };\n","class ArrayUtilities\n{\n constructor()\n {}\n\n static merge_from_to(source, target)\n {\n target.push.apply(target, source);\n }\n\n static expand_vec3_array(array, size)\n {\n const items_left_count = size - array.length;\n\n for (let i = 0; i < items_left_count; i++)\n {\n array.push(array[i].clone());\n }\n }\n\n static remove_elem(array, elem)\n {\n const index = array.indexOf(elem);\n if (index > -1)\n {\n array.splice(index, 1);\n }\n }\n\n static get_closest_point(points, target)\n {\n let closest_point = points[0];\n let closest_distance = closest_point.distanceTo(target);\n for (let i = 1; i < points.length; i++)\n {\n if (points[i].distanceTo(target) < closest_distance)\n {\n closest_point = points[i];\n closest_distance = points[i].distanceTo(target);\n }\n }\n return closest_point;\n }\n\n static object_values_to_array(obj)\n {\n const ids = Object.keys(obj);\n const arr = [];\n for (let i = 0; i < ids.length; i++)\n {\n arr.push(obj[ids[i]]);\n }\n return arr;\n }\n}\n\nexport { ArrayUtilities };\n","import { Line3, Plane, Quaternion, Sphere, Vector3 } from 'three';\n\nclass FrustumPointFitter\n{\n constructor()\n {\n this.sphere = new Sphere();\n }\n\n fit_points(points, camera_quaternion, vertical_fov, aspect)\n {\n this.sphere.setFromPoints(points);\n\n const v_fov = Math.degToRad(vertical_fov / 2);\n const h_fov = (2 * Math.atan(Math.tan(v_fov) * aspect)) / 2;\n\n const up_plane_normal = this.get_up_plane_normal(camera_quaternion, v_fov);\n const down_plane_normal = this.get_down_plane_normal(camera_quaternion, v_fov);\n const left_plane_normal = this.get_left_plane_normal(camera_quaternion, h_fov);\n const right_plane_normal = this.get_right_plane_normal(camera_quaternion, h_fov);\n\n const camera_forward_dir = new Vector3(0, 0, -1).applyQuaternion(camera_quaternion);\n\n const sphere_center = this.sphere.center.clone();\n\n const pull_back_distance = this.get_distance_to_fit_rect(this.sphere.radius * 2, this.sphere.radius * 2, vertical_fov, aspect);\n const far_pos = sphere_center.clone().add(camera_forward_dir.clone().multiplyScalar(pull_back_distance * -1));\n\n const up_plane = new Plane().setFromNormalAndCoplanarPoint(up_plane_normal, far_pos);\n const down_plane = new Plane().setFromNormalAndCoplanarPoint(down_plane_normal, far_pos);\n\n const left_plane = new Plane().setFromNormalAndCoplanarPoint(left_plane_normal, far_pos);\n const right_plane = new Plane().setFromNormalAndCoplanarPoint(right_plane_normal, far_pos);\n\n this.apply_center_correction_to_pos(far_pos, points, camera_quaternion, up_plane, down_plane, left_plane, right_plane);\n\n up_plane.setFromNormalAndCoplanarPoint(up_plane_normal, far_pos);\n down_plane.setFromNormalAndCoplanarPoint(down_plane_normal, far_pos);\n\n left_plane.setFromNormalAndCoplanarPoint(left_plane_normal, far_pos);\n right_plane.setFromNormalAndCoplanarPoint(right_plane_normal, far_pos);\n\n let closest_distance = Infinity;\n\n const inverse_dir = camera_forward_dir.clone().multiplyScalar(pull_back_distance * -2);\n for (let i = 0; i < points.length; i++)\n {\n const line = new Line3(points[i].clone(), points[i].clone().add(inverse_dir));\n\n const up_line_intersection = new Vector3();\n const down_line_intersection = new Vector3();\n\n const left_line_intersection = new Vector3();\n const right_line_intersection = new Vector3();\n\n up_plane.intersectLine(line, up_line_intersection);\n down_plane.intersectLine(line, down_line_intersection);\n\n left_plane.intersectLine(line, left_line_intersection);\n right_plane.intersectLine(line, right_line_intersection);\n\n if (up_line_intersection.length() < 0.0001)\n {\n console.log('up intersection not found', i);\n }\n if (down_line_intersection.length() < 0.0001)\n {\n console.log('down intersection not found', i);\n }\n if (left_line_intersection.length() < 0.0001)\n {\n console.log('left intersection not found', i);\n }\n if (right_line_intersection.length() < 0.0001)\n {\n console.log('right intersection not found', i);\n }\n\n const new_up_distance = points[i].clone().sub(up_line_intersection).length();\n const new_down_distance = points[i].clone().sub(down_line_intersection).length();\n\n const new_left_distance = points[i].clone().sub(left_line_intersection).length();\n const new_right_distance = points[i].clone().sub(right_line_intersection).length();\n\n const vertical_min = Math.min(new_up_distance, new_down_distance);\n const horizontal_min = Math.min(new_left_distance, new_right_distance);\n\n const min = Math.min(vertical_min, horizontal_min);\n\n if (min < closest_distance)\n {\n closest_distance = min;\n }\n }\n\n const forward_correction = camera_forward_dir.clone().multiplyScalar(closest_distance);\n const closest_position = far_pos.clone().add(forward_correction);\n\n return closest_position;\n }\n\n apply_center_correction_to_pos(target_pos, points, camera_quaternion, up_plane, down_plane, left_plane, right_plane)\n {\n const vertical_offset = this.get_vertical_correction(points, down_plane, up_plane, camera_quaternion);\n const horizontal_offset = this.get_hozirontal_correction(points, left_plane, right_plane, camera_quaternion);\n\n target_pos.add(vertical_offset);\n target_pos.add(horizontal_offset);\n }\n\n get_vertical_correction(points, down_plane, up_plane, camera_quaternion)\n {\n let closest_distance_to_up_plane = Infinity;\n let closest_distance_to_down_plane = Infinity;\n let closest_up_point = undefined;\n let closest_down_point = undefined;\n\n const up_dir = new Vector3(0, 1, 0).applyQuaternion(camera_quaternion);\n for (let i = 0; i < points.length; i++)\n {\n const down_line = new Line3(points[i].clone(), points[i].clone().add(up_dir.clone().multiplyScalar(-5000000)));\n const up_line = new Line3(points[i].clone(), points[i].clone().add(up_dir.clone().multiplyScalar(5000000)));\n\n const down_line_intersection = new Vector3();\n const up_line_intersection = new Vector3();\n\n down_plane.intersectLine(down_line, down_line_intersection);\n up_plane.intersectLine(up_line, up_line_intersection);\n\n const down_dist = down_line_intersection.distanceTo(points[i]);\n const up_dist = up_line_intersection.distanceTo(points[i]);\n\n if (up_line_intersection.length() < 0.0001)\n {\n console.log('vertical up intersection not found', i);\n }\n if (down_line_intersection.length() < 0.0001)\n {\n console.log('vertical down intersection not found', i);\n }\n\n if (down_dist < closest_distance_to_down_plane)\n {\n closest_distance_to_down_plane = down_dist;\n closest_down_point = points[i];\n }\n if (up_dist < closest_distance_to_up_plane)\n {\n closest_distance_to_up_plane = up_dist;\n closest_up_point = points[i];\n }\n }\n\n console.log(closest_up_point, closest_down_point);\n\n const correction = (closest_distance_to_up_plane - closest_distance_to_down_plane) / 2;\n\n // console.log(\"vertical_correction\", correction)\n return up_dir.clone().multiplyScalar(-correction);\n }\n\n get_hozirontal_correction(points, left_plane, right_plane, camera_quaternion)\n {\n let closest_distance_to_right_plane = Infinity;\n let closest_distance_to_left_plane = Infinity;\n let closest_right_point = undefined;\n let closest_left_point = undefined;\n\n const right_dir = new Vector3(1, 0, 0).applyQuaternion(camera_quaternion);\n\n for (let i = 0; i < points.length; i++)\n {\n const left_line = new Line3(points[i].clone(), points[i].clone().add(right_dir.clone().multiplyScalar(-5000000)));\n const right_line = new Line3(points[i].clone(), points[i].clone().add(right_dir.clone().multiplyScalar(5000000)));\n\n const left_line_intersection = new Vector3();\n const right_line_intersection = new Vector3();\n\n left_plane.intersectLine(left_line, left_line_intersection);\n right_plane.intersectLine(right_line, right_line_intersection);\n\n const left_dist = left_line_intersection.distanceTo(points[i]);\n const right_dist = right_line_intersection.distanceTo(points[i]);\n\n if (left_line_intersection.length() < 0.0001)\n {\n console.log('left intersection not found', i);\n }\n if (right_line_intersection.length() < 0.0001)\n {\n console.log('right intersection not found', i);\n }\n\n if (left_dist < closest_distance_to_left_plane)\n {\n closest_distance_to_left_plane = left_dist;\n closest_left_point = points[i];\n }\n if (right_dist < closest_distance_to_right_plane)\n {\n closest_distance_to_right_plane = right_dist;\n closest_right_point = points[i];\n }\n }\n\n const correction = (closest_distance_to_right_plane - closest_distance_to_left_plane) / 2;\n // console.log(\"horizontal_correction\", correction)\n\n console.log(closest_right_point, closest_left_point);\n\n return right_dir.clone().multiplyScalar(-correction);\n }\n\n get_up_plane_normal(camera_quaternion, v_fov)\n {\n const up_plane_normal = new Vector3(0, -1, 0);\n up_plane_normal.applyQuaternion(new Quaternion().setFromAxisAngle(new Vector3(1, 0, 0), v_fov));\n up_plane_normal.applyQuaternion(camera_quaternion);\n return up_plane_normal;\n }\n\n get_down_plane_normal(camera_quaternion, v_fov)\n {\n const down_plane_normal = new Vector3(0, 1, 0);\n down_plane_normal.applyQuaternion(new Quaternion().setFromAxisAngle(new Vector3(1, 0, 0), -v_fov));\n down_plane_normal.applyQuaternion(camera_quaternion);\n return down_plane_normal;\n }\n\n get_left_plane_normal(camera_quaternion, h_fov)\n {\n const left_plane_normal = new Vector3(1, 0, 0);\n left_plane_normal.applyQuaternion(new Quaternion().setFromAxisAngle(new Vector3(0, 1, 0), h_fov));\n left_plane_normal.applyQuaternion(camera_quaternion);\n return left_plane_normal;\n }\n\n get_right_plane_normal(camera_quaternion, h_fov)\n {\n const right_plane_normal = new Vector3(-1, 0, 0);\n right_plane_normal.applyQuaternion(new Quaternion().setFromAxisAngle(new Vector3(0, 1, 0), -h_fov));\n right_plane_normal.applyQuaternion(camera_quaternion);\n return right_plane_normal;\n }\n\n get_distance_to_fit_rect(width, height, vertical_fov, aspect)\n {\n const v_fov = (vertical_fov / 2) * Math.PI / 180;\n const h_fov = (2 * Math.atan(Math.tan(v_fov) * aspect)) / 2;\n\n const distV = height / Math.tan(v_fov);\n const distH = width / Math.tan(h_fov);\n return Math.max(Math.abs(distH), Math.abs(distV));\n }\n}\n\nexport { FrustumPointFitter };\n","import { BufferAttribute } from 'three';\nimport { BufferGeometry } from 'three';\n\nclass GeometryUtilities\n{\n static convert_to_non_indexed_geometry(geometry_buffer)\n {\n const indices = geometry_buffer.index;\n const positions = geometry_buffer.getAttribute('position');\n\n const bar_coordinates = [];\n const vertices = [];\n\n for (let i = 0; i < indices.count; i += 3)\n {\n // VERTEX 1\n vertices.push(positions.getX(indices.array[i + 0]));\n vertices.push(positions.getY(indices.array[i + 0]));\n vertices.push(positions.getZ(indices.array[i + 0]));\n\n bar_coordinates.push(1);\n bar_coordinates.push(0);\n bar_coordinates.push(0);\n\n // VERTEX 2\n\n vertices.push(positions.getX(indices.array[i + 1]));\n vertices.push(positions.getY(indices.array[i + 1]));\n vertices.push(positions.getZ(indices.array[i + 1]));\n\n bar_coordinates.push(0);\n bar_coordinates.push(1);\n bar_coordinates.push(0);\n\n // VERTEX 3\n\n vertices.push(positions.getX(indices.array[i + 2]));\n vertices.push(positions.getY(indices.array[i + 2]));\n vertices.push(positions.getZ(indices.array[i + 2]));\n\n bar_coordinates.push(0);\n bar_coordinates.push(0);\n bar_coordinates.push(1);\n }\n\n const geometry = new BufferGeometry();\n // geometry.setAttribute('barycentric', new BufferAttribute( new Float32Array(bar_coordinates), 3 ));\n geometry.setAttribute('position', new BufferAttribute(new Float32Array(vertices), 3));\n GeometryUtilities.add_barycentric_attribute(geometry);\n return geometry;\n }\n\n static add_barycentric_attribute(non_indexed_geometry_buffer)\n {\n const bar_coordinates = [];\n const positions = non_indexed_geometry_buffer.getAttribute('position');\n\n for (let i = 0; i < positions.count; i += 3)\n {\n bar_coordinates.push(1);\n bar_coordinates.push(0);\n bar_coordinates.push(0);\n\n bar_coordinates.push(0);\n bar_coordinates.push(1);\n bar_coordinates.push(0);\n\n bar_coordinates.push(0);\n bar_coordinates.push(0);\n bar_coordinates.push(1);\n }\n non_indexed_geometry_buffer.setAttribute('barycentric', new BufferAttribute(new Float32Array(bar_coordinates), 3));\n }\n}\n\nexport { GeometryUtilities };\n","import { Vector4 } from 'three';\n\nclass ImageUtilities\n{\n constructor()\n { }\n\n static get_image_data(image)\n {\n const canvas = document.createElement('canvas');\n canvas.width = image.width;\n canvas.height = image.height;\n\n const context = canvas.getContext('2d');\n context.drawImage(image, 0, 0);\n\n return context.getImageData(0, 0, image.width, image.height);\n }\n\n static get_pixel(imagedata, x, y)\n {\n const position = (x + imagedata.width * y) * 4;\n const data = imagedata.data;\n return new Vector4(data[position + 0], data[position + 1], data[position + 2], data[position + 3]);\n }\n}\n\nexport { ImageUtilities };\n","import { Vector3 } from 'three';\nimport { Vector2 } from 'three';\nclass MeshSampler\n{\n constructor()\n {\n\n }\n\n sample(buffer_geometry, sample_count)\n {\n const face_areas = [];\n\n let min_area = 99999999;\n\n const vertices = buffer_geometry.getAttribute('position');\n const normals = buffer_geometry.getAttribute('normal');\n const tangents = buffer_geometry.getAttribute('tangent');\n const uvs = buffer_geometry.getAttribute('uv');\n const indices = buffer_geometry.index;\n\n const faces = [];\n\n for (let i = 0; i < indices.count; i += 3)\n {\n const index_0 = indices.array[i + 0];\n const index_1 = indices.array[i + 1];\n const index_2 = indices.array[i + 2];\n\n const v1 = new Vector3();\n v1.x = vertices.getX(index_0);\n v1.y = vertices.getY(index_0);\n v1.z = vertices.getZ(index_0);\n\n const v2 = new Vector3();\n v2.x = vertices.getX(index_1);\n v2.y = vertices.getY(index_1);\n v2.z = vertices.getZ(index_1);\n\n const v3 = new Vector3();\n v3.x = vertices.getX(index_2);\n v3.y = vertices.getY(index_2);\n v3.z = vertices.getZ(index_2);\n\n const face = {\n a: v1,\n b: v2,\n c: v3\n };\n\n if (normals)\n {\n const n1 = new Vector3();\n n1.x = normals.getX(index_0);\n n1.y = normals.getY(index_0);\n n1.z = normals.getZ(index_0);\n\n const n2 = new Vector3();\n n2.x = normals.getX(index_1);\n n2.y = normals.getY(index_1);\n n2.z = normals.getZ(index_1);\n\n const n3 = new Vector3();\n n3.x = normals.getX(index_2);\n n3.y = normals.getY(index_2);\n n3.z = normals.getZ(index_2);\n\n const normal = n1.clone().add(n2).add(n3).normalize();\n face.normal = normal;\n }\n\n if (tangents)\n {\n const n1 = new Vector3();\n n1.x = tangents.getX(index_0);\n n1.y = tangents.getY(index_0);\n n1.z = tangents.getZ(index_0);\n\n const n2 = new Vector3();\n n2.x = tangents.getX(index_1);\n n2.y = tangents.getY(index_1);\n n2.z = tangents.getZ(index_1);\n\n const n3 = new Vector3();\n n3.x = tangents.getX(index_2);\n n3.y = tangents.getY(index_2);\n n3.z = tangents.getZ(index_2);\n\n const tangent = n1.clone().add(n2).add(n3).normalize();\n face.tangent = tangent;\n }\n if (uvs)\n {\n const uv_a = new Vector2();\n uv_a.x = uvs.getX(index_0);\n uv_a.y = uvs.getY(index_0);\n\n const uv_b = new Vector2();\n uv_b.x = uvs.getX(index_1);\n uv_b.y = uvs.getY(index_1);\n\n const uv_c = new Vector2();\n uv_c.x = uvs.getX(index_2);\n uv_c.y = uvs.getY(index_2);\n\n face.uv_a = uv_a;\n face.uv_b = uv_b;\n face.uv_c = uv_c;\n }\n\n faces.push(face);\n\n const area = this.get_face_area(face);\n min_area = Math.min(area, min_area);\n face_areas.push(area);\n }\n\n const normalized_faces_array = this.get_uniform_face_distribution(face_areas, min_area, faces);\n const selected_faces = this.select_random_faces(normalized_faces_array, sample_count);\n const sampled_data = this.sample_data_from_faces(selected_faces);\n return sampled_data;\n }\n\n sample_data_from_faces(faces)\n {\n const sampled_points = [];\n const sampled_normals = [];\n const sampled_tangents = [];\n const sampled_uvs = [];\n\n for (let i = 0; i < faces.length; i++)\n {\n const face = faces[i];\n\n const w1 = Math.random();\n const w2 = Math.random();\n\n sampled_points.push(this.sample_point_in_face(w1, w2, face.a, face.b, face.c).clone());\n if (face.normal)\n {\n sampled_normals.push(face.normal.clone());\n }\n if (face.tangent)\n {\n sampled_tangents.push(face.tangent.clone());\n }\n if (face.uv_a)\n {\n sampled_uvs.push(this.sample_point_in_face(w1, w2, face.uv_a, face.uv_b, face.uv_c).clone());\n }\n }\n return { points: sampled_points, normals: sampled_normals, tangents: sampled_tangents, uvs: sampled_uvs };\n }\n\n select_random_faces(faces, amount)\n {\n const selected_faces = [];\n for (let i = 0; i < amount; i++)\n {\n const random = Math.floor(Math.random() * faces.length);\n const selected_face = faces[random];\n\n selected_faces.push(selected_face);\n }\n\n return selected_faces;\n }\n\n get_uniform_face_distribution(face_areas, minimum_area, faces)\n {\n const extended_triangle_indices = [];\n for (let i = 0; i < face_areas.length; i++)\n {\n face_areas[i] /= minimum_area;\n const repetitions_needed = Math.floor(Math.round(face_areas[i]));\n for (let j = 0; j < repetitions_needed; j++)\n {\n extended_triangle_indices.push(faces[i]);\n }\n }\n return extended_triangle_indices;\n }\n\n get_face_area(face)\n {\n const vec1 = face.b.clone().sub(face.a);\n const vec2 = face.c.clone().sub(face.a);\n return vec1.cross(vec2).length() / 2;\n }\n\n sample_point_in_face(w1, w2, v1, v2, v3)\n {\n if (w1 + w2 > 1)\n {\n w1 = 1.0 - w1;\n w2 = 1.0 - w2;\n }\n\n const w3 = 1.0 - (w1 + w2);\n\n return v1.clone().multiplyScalar(w1).add(v2.clone().multiplyScalar(w2)).add(v3.clone().multiplyScalar(w3));\n }\n}\n\nconst mesh_sampler = new MeshSampler();\nexport { mesh_sampler as MeshSampler };\n","import { Mesh } from 'three';\nimport { BufferGeometry } from 'three';\nimport { Skeleton } from 'three';\n\nclass ModelUtilities\n{\n get_mesh(scene, result_callback)\n {\n scene.traverse((child) =>\n {\n if (child instanceof Mesh)\n {\n if (child.geometry)\n {\n child.geometry = new BufferGeometry().fromGeometry(child.geometry);\n }\n result_callback(child);\n }\n });\n }\n\n get_geometries(scene)\n {\n const geometries = [];\n\n this.get_mesh(scene, (child) =>\n {\n geometries.push(child.geometry);\n });\n return geometries;\n }\n\n assign_material(scene, material, name)\n {\n scene.traverse((child) =>\n {\n if (child instanceof Mesh)\n {\n // assign to all if no name is given\n if (name === undefined)\n {\n child.material = material;\n }\n else\n {\n // if name is given, assign only to that\n if (child.name === name)\n {\n child.material = material;\n }\n }\n }\n });\n }\n\n clone_animated_gltf(gltf)\n {\n const clone = {\n animations: gltf.animations,\n scene: gltf.scene.clone(true)\n };\n\n const skinnedMeshes = {};\n\n gltf.scene.traverse(node =>\n {\n if (node.isSkinnedMesh)\n {\n skinnedMeshes[node.name] = node;\n }\n });\n\n const cloneBones = {};\n const cloneSkinnedMeshes = {};\n\n clone.scene.traverse(node =>\n {\n if (node.isBone)\n {\n cloneBones[node.name] = node;\n }\n\n if (node.isSkinnedMesh)\n {\n cloneSkinnedMeshes[node.name] = node;\n }\n });\n\n for (const name in skinnedMeshes)\n {\n const skinnedMesh = skinnedMeshes[name];\n const skeleton = skinnedMesh.skeleton;\n const cloneSkinnedMesh = cloneSkinnedMeshes[name];\n\n const orderedCloneBones = [];\n\n for (let i = 0; i < skeleton.bones.length; ++i)\n {\n const cloneBone = cloneBones[skeleton.bones[i].name];\n orderedCloneBones.push(cloneBone);\n }\n\n cloneSkinnedMesh.bind(\n new Skeleton(orderedCloneBones, skeleton.boneInverses),\n cloneSkinnedMesh.matrixWorld);\n }\n\n return clone;\n }\n\n set_shadow_config(scene, cast, receive)\n {\n scene.traverse((child) =>\n {\n if (child instanceof Mesh)\n {\n child.castShadow = cast;\n child.receiveShadow = receive;\n }\n });\n }\n\n __find_object(scene, object_name, result_callback)\n {\n scene.traverse((obj) =>\n {\n if (obj.name === object_name)\n {\n result_callback(obj);\n }\n });\n }\n\n get_object(scene, object_name)\n {\n let object = undefined;\n scene.traverse((obj) =>\n {\n if (obj.name === object_name)\n {\n object = obj;\n }\n });\n return object;\n }\n\n get_object_by_type(scene, object_type)\n {\n let object = undefined;\n scene.traverse((obj) =>\n {\n if (obj.constructor.name === object_type)\n {\n object = obj;\n }\n });\n return object;\n }\n}\n\nconst model_utilities = new ModelUtilities();\nexport { model_utilities as ModelUtilities };\n","class ObjectUtilities\r\n{\r\n static is_object(item)\r\n {\r\n return (item && typeof item === 'object' && !Array.isArray(item));\r\n }\r\n\r\n static merge_deep(target, ...sources)\r\n {\r\n if (!sources.length) return target;\r\n const source = sources.shift();\r\n\r\n if (ObjectUtilities.is_object(target) && ObjectUtilities.is_object(source))\r\n {\r\n for (const key in source)\r\n {\r\n if (ObjectUtilities.is_object(source[key]))\r\n {\r\n if (!target[key]) Object.assign(target, { [key]: {} });\r\n ObjectUtilities.merge_deep(target[key], source[key]);\r\n }\r\n else\r\n {\r\n Object.assign(target, { [key]: source[key] });\r\n }\r\n }\r\n }\r\n\r\n return ObjectUtilities.merge_deep(target, ...sources);\r\n }\r\n\r\n static xml_to_json(xml)\r\n {\r\n // Create the return object\r\n let obj = {};\r\n\r\n if (xml.nodeType === 1)\r\n { // element\r\n // do attributes\r\n if (xml.attributes.length > 0)\r\n {\r\n obj['@attributes'] = {};\r\n for (let j = 0; j < xml.attributes.length; j++)\r\n {\r\n const attribute = xml.attributes.item(j);\r\n obj['@attributes'][attribute.nodeName] = attribute.nodeValue;\r\n }\r\n }\r\n }\r\n else if (xml.nodeType === 3)\r\n { // text\r\n obj = xml.nodeValue;\r\n }\r\n\r\n // do children\r\n if (xml.hasChildNodes())\r\n {\r\n for (let i = 0; i < xml.childNodes.length; i++)\r\n {\r\n const item = xml.childNodes.item(i);\r\n const nodeName = item.nodeName;\r\n if (typeof (obj[nodeName]) === 'undefined')\r\n {\r\n obj[nodeName] = this.xml_to_json(item);\r\n }\r\n else\r\n {\r\n if (typeof (obj[nodeName].push) === 'undefined')\r\n {\r\n const old = obj[nodeName];\r\n obj[nodeName] = [];\r\n obj[nodeName].push(old);\r\n }\r\n obj[nodeName].push(this.xml_to_json(item));\r\n }\r\n }\r\n }\r\n return obj;\r\n }\r\n}\r\n\r\nexport { ObjectUtilities };\r\n","class StringUtilities\n{\n constructor()\n {}\n\n static get_random_color()\n {\n const hexValues = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C', 'D', 'E', 'F'];\n let hex = '#';\n\n for (let i = 0; i < 6; i++)\n {\n const index = Math.floor(Math.random() * hexValues.length);\n hex += hexValues[index];\n }\n\n return hex;\n }\n\n static capitalize(string)\n {\n const words = string.split(' ');\n\n for (let i = 0; i < words.length; i++)\n {\n words[i] = words[i][0].toUpperCase() + words[i].substr(1);\n }\n\n return words.join(' ');\n }\n\n static capitalize_first_letter(string)\n {\n return string.charAt(0).toUpperCase() + string.slice(1);\n }\n\n static snake_to_camelcase(string)\n {\n return string.toLowerCase().replace(/[-_][a-z0-9]/g, (group) => group.slice(-1).toUpperCase());\n }\n}\n\nexport { StringUtilities };\n","class TimeUtilities\n{\n constructor()\n {}\n\n // Converts a time string (00:00:00.45) into miliseconds\n time_str_to_ms(time_str)\n {\n time_str = time_str.split(':');\n\n let hours = Number(time_str[0]);\n hours = hours * 60 * 60 * 1000;\n\n let minutes = Number(time_str[1]);\n minutes = minutes * 60 * 1000;\n\n let seconds = Number(time_str[2]);\n seconds = seconds * 1000;\n\n return hours + minutes + seconds;\n }\n}\n\nexport { TimeUtilities };\n","import grid_frag from '../shaders/grid/grid.frag';\nimport grid_vert from '../shaders/grid/grid.vert';\n\nimport { GeometryUtilities } from '../utilities/GeometryUtilities';\n\nimport { Mesh } from 'three';\nimport { ShaderMaterial } from 'three';\nimport { Color } from 'three';\nimport { PlaneGeometry } from 'three';\n\nclass Grid extends Mesh\n{\n constructor()\n {\n const material = new ShaderMaterial({\n uniforms: {\n _Color: { value: new Color('#919191') }\n },\n vertexShader: grid_vert,\n fragmentShader: grid_frag,\n extensions: { derivatives: true },\n transparent: true,\n depthWrite: false\n });\n\n const plane_geometry = new PlaneGeometry(100, 100, 100, 100);\n\n const non_indexed_geometry = GeometryUtilities.convert_to_non_indexed_geometry(plane_geometry);\n\n super(non_indexed_geometry, material);\n\n this.rotation.x = -3.14 / 2;\n }\n}\n\nexport { Grid };\n","import line_vs from '../shaders/basic_line/basic_line.vert';\nimport line_fs from '../shaders/basic_line/basic_line.frag';\n\nimport { Mesh } from 'three';\nimport { BufferAttribute } from 'three';\nimport { BufferGeometry } from 'three';\nimport { ShaderMaterial } from 'three';\nimport { Color } from 'three';\n\nclass Line extends Mesh\n{\n constructor(points)\n {\n const geometry = new BufferGeometry();\n geometry.setAttribute('position', new BufferAttribute(new Float32Array([]), 3));\n geometry.setAttribute('next_position', new BufferAttribute(new Float32Array([]), 3));\n geometry.setAttribute('previous_position', new BufferAttribute(new Float32Array([]), 3));\n geometry.setAttribute('orientation', new BufferAttribute(new Float32Array([]), 1));\n geometry.setAttribute('coverage', new BufferAttribute(new Float32Array([]), 1));\n\n const material = new ShaderMaterial({\n uniforms: {\n _Thickness: { value: 0.2 },\n _Length: { value: 0 },\n _ElapsedTime: { value: 0 },\n _Color: { value: new Color('#FF0000') }\n },\n vertexShader: line_vs,\n fragmentShader: line_fs,\n transparent: true,\n depthWrite: false,\n extensions: { derivatives: true }\n\n });\n\n super(geometry, material);\n\n if (points)\n {\n this.setup(points);\n }\n }\n\n setup(points)\n {\n const vertices = [];\n const next_position = [];\n const previous_position = [];\n const orientation = [];\n const coverage = [];\n let accumulated_length = 0;\n\n for (let i = 0; i < points.length; i++)\n {\n vertices.push(points[i].x);\n vertices.push(points[i].y);\n vertices.push(points[i].z);\n orientation.push(1);\n\n vertices.push(points[i].x);\n vertices.push(points[i].y);\n vertices.push(points[i].z);\n orientation.push(-1);\n\n const next_point = this.__get_next_position(points, i);\n next_position.push(next_point.x);\n next_position.push(next_point.y);\n next_position.push(next_point.z);\n\n next_position.push(next_point.x);\n next_position.push(next_point.y);\n next_position.push(next_point.z);\n\n const previous_point = this.__get_previous_position(points, i);\n previous_position.push(previous_point.x);\n previous_position.push(previous_point.y);\n previous_position.push(previous_point.z);\n\n previous_position.push(previous_point.x);\n previous_position.push(previous_point.y);\n previous_position.push(previous_point.z);\n\n coverage.push(accumulated_length);\n coverage.push(accumulated_length);\n\n if (i < points.length - 1)\n {\n accumulated_length += points[i].distanceTo(next_point);\n }\n }\n const vertexList = new Float32Array(vertices);\n const nextPositionList = new Float32Array(next_position);\n const previousPositionList = new Float32Array(previous_position);\n const orientationList = new Float32Array(orientation);\n const coverageList = new Float32Array(coverage);\n\n const indices = [];\n for (let i = 0; i < ((vertexList.length / 3) - 2) / 2; i++)\n {\n const index = (i * 2) + 1;\n indices.push(index);\n indices.push(index + 1);\n indices.push(index - 1);\n\n indices.push(index);\n indices.push(index + 2);\n indices.push(index + 1);\n }\n\n this.geometry.setIndex(indices);\n this.geometry.getAttribute('position').copy(new BufferAttribute(vertexList, 3));\n this.geometry.getAttribute('next_position').copy(new BufferAttribute(nextPositionList, 3));\n this.geometry.getAttribute('previous_position').copy(new BufferAttribute(previousPositionList, 3));\n this.geometry.getAttribute('orientation').copy(new BufferAttribute(orientationList, 1));\n this.geometry.getAttribute('coverage').copy(new BufferAttribute(coverageList, 1));\n\n this.geometry.getAttribute('position').needsUpdate = true;\n this.geometry.getAttribute('next_position').needsUpdate = true;\n this.geometry.getAttribute('previous_position').needsUpdate = true;\n this.geometry.getAttribute('orientation').needsUpdate = true;\n this.geometry.getAttribute('coverage').needsUpdate = true;\n\n this.material.uniforms._Length.value = accumulated_length;\n this._length = accumulated_length;\n }\n\n set thickness(value)\n {\n this.material.uniforms._Thickness.value = value;\n }\n\n get thickness()\n {\n return this.material.uniforms._Thickness.value;\n }\n\n __get_previous_position(points, i)\n {\n if (i === 0)\n {\n return points[1].clone().sub(points[0]).multiplyScalar(-1).add(points[0]);\n }\n else\n {\n return points[i - 1];\n }\n }\n\n __get_next_position(points, i)\n {\n if (i === points.length - 1)\n {\n return points[points.length - 2].clone().sub(points[points.length - 1]).multiplyScalar(-1).add(points[points.length - 1]);\n }\n else\n {\n return points[i + 1];\n }\n }\n\n update()\n {\n }\n\n distance()\n {\n return this.accumulated_length;\n }\n\n total_length()\n {\n return this.accumulated_length;\n }\n\n dispose()\n {\n this.geometry.dispose();\n this.material.dispose();\n if (this.parent)\n {\n this.parent.remove(this);\n }\n }\n\n set color(col)\n {\n this.material.uniforms._Color.value.set(col);\n }\n\n get color()\n {\n return this.material.uniforms._Color.value;\n }\n\n copy_color(col)\n {\n this.material.uniforms._Color.value.copy(col);\n }\n}\n\nexport { Line };\n","import basic_texture_vert from '../shaders/basic_texture/basic_texture.vert';\nimport basic_texture_frag from '../shaders/basic_texture/basic_texture.frag';\n\nimport { Mesh } from 'three';\nimport { Vector2 } from 'three';\nimport { ShaderMaterial } from 'three';\nimport { DoubleSide } from 'three';\nimport { PlaneGeometry } from 'three';\nimport { Vector3 } from 'three';\n\nclass WorldImage extends Mesh\n{\n constructor(texture, pivot)\n {\n pivot = pivot || new Vector2(0, 0);\n const material = new ShaderMaterial({\n uniforms: {\n _MainTex: { value: texture },\n _ScreenAligned: { value: 0 },\n _Scale: { value: 1 },\n _Opacity: { value: 1 }\n },\n vertexShader: basic_texture_vert,\n fragmentShader: basic_texture_frag,\n transparent: true,\n depthWrite: false,\n side: DoubleSide\n });\n const geometry = new PlaneGeometry(1, 1, 1);\n geometry.translate(-pivot.x / 2, -pivot.y / 2, 0);\n const current_scale = texture.image.width / texture.image.height;\n geometry.scale(current_scale, 1, 1);\n super(geometry, material);\n this.current_scale = current_scale;\n this.geometry.computeBoundingBox();\n\n this.tmp_bb_size = new Vector3();\n this.geometry.boundingBox.getSize(this.tmp_bb_size);\n }\n\n update_texture()\n {\n this.material.uniforms._MainTex.value.needsUpdate = true;\n const img = this.material.uniforms._MainTex.value.image;\n\n this.geometry.scale(1 / this.current_scale, 1, 1);\n this.current_scale = img.width / img.height;\n this.geometry.scale(this.current_scale, 1, 1);\n this.geometry.computeBoundingBox();\n this.geometry.boundingBox.getSize(this.tmp_bb_size);\n }\n\n get size()\n {\n return this.tmp_bb_size.clone().multiplyScalar(this.scale.x);\n }\n\n set size(value)\n {\n this.scale.set(value, value, value);\n this.material.uniforms._Scale.value = value;\n }\n\n set screen_aligned(boolean)\n {\n this.material.uniforms._ScreenAligned.value = boolean === true ? 1 : 0;\n }\n\n get screen_aligned()\n {\n return this.material.uniforms._ScreenAligned.value === 1;\n }\n\n set opacity(opacity)\n {\n this.material.uniforms._Opacity.value = opacity;\n }\n\n get opacity()\n {\n return this.material.uniforms._Opacity.value;\n }\n\n dispose()\n {\n this.geometry.dispose();\n this.parent.remove(this);\n this.material.uniforms._MainTex.value.dispose();\n this.material.dispose();\n }\n}\n\nexport { WorldImage };\n","import { WorldImage } from './WorldImage';\nimport { SimpleTextDrawer } from '../canvas_drawer/SimpleTextDrawer';\n\nimport { LinearMipMapLinearFilter } from 'three';\nimport { LinearFilter } from 'three';\n\nclass Text2D extends WorldImage\n{\n constructor(text, font, color, pivot, is_static)\n {\n const simple_text_drawer = new SimpleTextDrawer(is_static);\n\n const draw_settings = {\n font: font,\n font_color: color || '#000000'\n };\n const canvas_texture = simple_text_drawer.draw_on_texture(text, draw_settings);\n\n canvas_texture.minFilter = LinearMipMapLinearFilter;\n canvas_texture.minFilter = LinearFilter;\n canvas_texture.needsUpdate = true;\n super(canvas_texture, pivot);\n\n this.simple_text_drawer = simple_text_drawer;\n this.canvas_texture = canvas_texture;\n this.draw_settings = draw_settings;\n }\n\n set text(value)\n {\n this.simple_text_drawer.draw_canvas(value, this.draw_settings);\n this.update_texture();\n }\n\n get text()\n {\n return 'not implemented';\n }\n}\n\nexport { Text2D };\n","import vert from '../shaders/ui_element/ui_element.vert';\nimport frag from '../shaders/ui_element/ui_element.frag';\n\nimport { BaseShaderMaterial } from '../materials/BaseShaderMaterial';\n\nimport { Vector2 } from 'three';\nimport { Vector3 } from 'three';\n\nimport { OScreen } from '../OScreen';\n\nclass UIElementMaterial extends BaseShaderMaterial\n{\n constructor(intensity = 1)\n {\n super(vert, frag, {\n _MainTex: { value: undefined },\n _ScreenSize: { value: new Vector2(OScreen.width, OScreen.height) },\n _TextureSize: { value: new Vector2() },\n _PixelOffset: { value: new Vector2(0, 0) },\n _NDC: { value: new Vector3() },\n _PivotPoint: { value: new Vector2() },\n _DepthOffset: { value: 0 }\n });\n this.transparent = true;\n this.depthWrite = false;\n this.depthTest = false;\n }\n}\n\nexport { UIElementMaterial };\n","import { Vector2 } from 'three';\n\nclass ScreenSpacePosition\n{\n constructor()\n {\n this.tmp_vec = new Vector2();\n }\n\n get_pos_NDC(position)\n {\n return this.tmp_vec.set(position.x, position.y);\n }\n}\n\nexport { ScreenSpacePosition };\n","import { CameraManager } from '../../CameraManager';\n\nimport { Vector2 } from 'three';\nimport { Vector3 } from 'three';\n\nclass WorldSpacePosition\n{\n constructor()\n {\n this.tmp_vec3 = new Vector3();\n this.tmp_vec2 = new Vector2();\n }\n\n get_pos_NDC(position)\n {\n this.tmp_vec3.copy(position);\n this.tmp_vec3.project(CameraManager.current);\n\n return this.tmp_vec2.set(this.tmp_vec3.x, this.tmp_vec3.y);\n }\n}\n\nexport { WorldSpacePosition };\n","class UIElementState\n{\n constructor()\n {\n\n }\n\n update(ui_element, normalized_mouse_position)\n {\n\n }\n\n on_enter(ui_element)\n {}\n\n on_exit(ui_element)\n {}\n}\n\nexport { UIElementState };\n","import { UIElementState } from './UIElementState';\n\nclass OnIdle extends UIElementState\n{\n constructor()\n {\n super();\n }\n\n update(ui_element, normalized_mouse_position)\n {\n if (ui_element.is_mouse_over(normalized_mouse_position))\n {\n ui_element.set_state(ui_element._on_enter_state);\n }\n }\n}\n\nexport { OnIdle };\n","import { UIElementState } from './UIElementState';\n\nclass OnMouseEnter extends UIElementState\n{\n constructor()\n {\n super();\n }\n\n on_enter(ui_element)\n {\n ui_element.on_mouse_enter();\n }\n\n update(ui_element, normalized_mouse_position)\n {\n if (ui_element.is_mouse_over(normalized_mouse_position))\n {\n ui_element.set_state(ui_element._on_hover_state);\n }\n else\n {\n ui_element.set_state(ui_element._on_exit_state);\n }\n }\n}\n\nexport { OnMouseEnter };\n","import { UIElementState } from './UIElementState';\n\nclass OnMouseExit extends UIElementState\n{\n constructor()\n {\n super();\n }\n\n on_enter(ui_element)\n {\n ui_element.on_mouse_exit();\n ui_element.set_state(ui_element._on_idle_state);\n }\n}\n\nexport { OnMouseExit };\n","import { UIElementState } from './UIElementState';\n\nclass OnMouseHover extends UIElementState\n{\n constructor()\n {\n super();\n }\n\n on_enter(ui_element)\n {\n this.__trigger_on_hover(ui_element);\n }\n\n update(ui_element, normalized_mouse_position)\n {\n if (ui_element.is_mouse_over(normalized_mouse_position))\n {\n this.__trigger_on_hover(ui_element);\n }\n else\n {\n ui_element.set_state(ui_element._on_exit_state);\n }\n }\n\n __trigger_on_hover(ui_element)\n {\n ui_element.on_mouse_hover();\n }\n}\n\nexport { OnMouseHover };\n","\nimport { OScreen } from '../OScreen';\n\nimport { UIElementMaterial } from '../materials/UIElementMaterial';\n\nimport { ScreenSpacePosition } from '../ui/ui_element_position/ScreenSpacePosition';\nimport { WorldSpacePosition } from '../ui/ui_element_position/WorldSpacePosition';\n\nimport { OnIdle } from '../ui/ui_element_state/OnIdle';\nimport { OnMouseEnter } from '../ui/ui_element_state/OnMouseEnter';\nimport { OnMouseExit } from '../ui/ui_element_state/OnMouseExit';\nimport { OnMouseHover } from '../ui/ui_element_state/OnMouseHover';\n\nimport { Mesh } from 'three';\nimport { PlaneGeometry } from 'three';\nimport { Vector2 } from 'three';\nimport { Vector3 } from 'three';\nimport { NearestFilter } from 'three';\nimport { Box2 } from 'three';\n\nclass UIElement extends Mesh\n{\n constructor(vert, frag)\n {\n super(new PlaneGeometry(1, 1), new UIElementMaterial());\n\n this.is_clickable = false;\n\n this.position_strategy = new WorldSpacePosition();\n this.current_state = new OnIdle();\n\n this._position = new Vector3();\n\n this._on_idle_state = new OnIdle();\n this._on_enter_state = new OnMouseEnter();\n this._on_exit_state = new OnMouseExit();\n this._on_hover_state = new OnMouseHover();\n\n this.on_enter = undefined;\n this.on_exit = undefined;\n this.on_hover = undefined;\n\n this.mouse_pos_tmp = new Vector2();\n this.cached_NDC_position = new Vector2();\n this.screen_pos_tmp = new Vector2();\n\n this.texture_size = new Vector2(1, 1);\n\n this.frustumCulled = false;\n this.matrixAutoUpdate = false;\n this.renderOrder = 0;\n\n this.size = 1;\n this.pixel_offset = new Vector2();\n }\n\n set_render_order(value)\n {\n this.renderOrder = value;\n }\n\n get pivot_point()\n {\n return this.material.uniforms._PivotPoint.value;\n }\n\n set_pixel_offset(offset)\n {\n this.pixel_offset.copy(offset);\n this.material.uniforms._PixelOffset.value.copy(offset);\n }\n\n set_state(new_state)\n {\n this.current_state.on_exit(this);\n this.current_state = new_state;\n this.current_state.on_enter(this);\n }\n\n get position()\n {\n return this._position;\n }\n\n set use_depth(boolean)\n {\n this.material.depthTest = boolean;\n }\n\n get use_depth()\n {\n return this.material.depthTest;\n }\n\n set depth_offset(value)\n {\n this.material.uniforms._DepthOffset.value = value;\n }\n\n get depth_offset()\n {\n return this.material.uniforms._DepthOffset.value;\n }\n\n clear_state()\n {\n this.visible = false;\n }\n\n set_world_space_coordinate_system()\n {\n this.position_strategy = new WorldSpacePosition();\n }\n\n set_screen_space_coordinate_system()\n {\n this.position_strategy = new ScreenSpacePosition();\n }\n\n set_texture(texture)\n {\n texture.minFilter = NearestFilter;\n texture.magFilter = NearestFilter;\n texture.needsUpdate = true;\n\n this.texture_size.set(texture.image.width, texture.image.height);\n\n this.material.uniforms._MainTex.value = texture;\n this.get_size(this.material.uniforms._TextureSize.value);\n this.visible = true;\n }\n\n update_state(normalized_mouse_pos)\n {\n this.material.uniforms._ScreenSize.value.set(OScreen.width, OScreen.height);\n this.get_size(this.material.uniforms._TextureSize.value);\n\n this.cached_NDC_position.copy(this.position_strategy.get_pos_NDC(this.position));\n this.material.uniforms._NDC.value.copy(this.position);\n this.current_state.update(this, normalized_mouse_pos);\n }\n\n is_mouse_over(normalized_mouse_pos)\n {\n this.screen_pos_tmp.copy(this.cached_NDC_position);\n this.to_screen_position(this.screen_pos_tmp);\n this.screen_pos_tmp.x += this.pixel_offset.x;\n this.screen_pos_tmp.y += this.pixel_offset.y;\n\n const rect = new Box2().setFromCenterAndSize(this.screen_pos_tmp, this.get_size());\n\n this.mouse_pos_tmp.copy(normalized_mouse_pos);\n this.to_screen_position(this.mouse_pos_tmp);\n\n return rect.containsPoint(this.mouse_pos_tmp);\n }\n\n to_screen_position(projected_pos)\n {\n projected_pos.x = (projected_pos.x * 0.5 + 0.5) * OScreen.width + this.pixel_offset.x;\n projected_pos.y = (projected_pos.y * 0.5 + 0.5) * OScreen.height + this.pixel_offset.y;\n }\n\n get_screen_space_position()\n {\n const pos = this.cached_NDC_position.clone();\n this.to_screen_position(pos);\n return pos;\n }\n\n set_screen_space_position(screen_pos)\n {\n this.position.x = (screen_pos.x / OScreen.width) * 2 - 1;\n this.position.y = (screen_pos.y / OScreen.height) * 2 - 1;\n }\n\n dispose()\n {\n if (this.material.uniforms._MainTex.value)\n {\n this.material.uniforms._MainTex.value.dispose();\n }\n // OScreen.remove_screen_material(this.material);\n this.geometry.dispose();\n this.material.dispose();\n }\n\n get_size(vector2)\n {\n if (vector2)\n {\n return vector2.copy(this.texture_size).multiplyScalar(this.size / OScreen.dpr);\n }\n else\n {\n return new Vector2().copy(this.texture_size).multiplyScalar(this.size / OScreen.dpr);\n }\n }\n\n on_mouse_enter()\n {}\n\n on_mouse_exit()\n {}\n\n on_mouse_hover()\n {}\n}\n\nexport { UIElement };\n","import { Mesh } from 'three';\n\nclass UpdatableMaterialMesh extends Mesh\n{\n constructor(geometry, material)\n {\n super(geometry, material);\n\n const self = this;\n\n this.onBeforeRender = () =>\n {\n self.material.update();\n };\n }\n}\n\nexport { UpdatableMaterialMesh };\n","import { Vector2, Vector4 } from 'three';\n\nclass TextGlyph\n{\n constructor(offset, plane_bounds, atlas_bounds)\n {\n const width = plane_bounds.right - plane_bounds.left;\n const height = plane_bounds.top - plane_bounds.bottom;\n\n this.scale = new Vector2(width, height);\n this.position = new Vector2(offset + plane_bounds.left, plane_bounds.bottom);\n\n this.atlas_bounds = new Vector4(atlas_bounds.left, atlas_bounds.right, atlas_bounds.top, atlas_bounds.bottom);\n }\n}\n\nexport { TextGlyph };\n","import { Vector3, Quaternion, Matrix4, Color, Box2, Vector2 } from 'three';\nimport { TextGlyph } from './TextGlyph';\n\nclass SDFText\n{\n constructor(glyph_layout, text = '')\n {\n this.glyph_layout = glyph_layout;\n\n this.glyphs = [];\n\n this.glyph_is_dirty = true;\n this.matrix_is_dirty = true;\n this.color_is_dirty = true;\n\n this.position = new Vector3();\n this.quaternion = new Quaternion();\n this.scale = new Vector3(1, 1, 1);\n this.matrix = new Matrix4();\n\n this.color = new Color('#FFFFFF');\n\n this.pivot_point = new Vector2();\n this.__opacity = 1;\n\n this.__text = text;\n\n this.__generate_glyphs(text);\n }\n\n set text(value)\n {\n this.__text = value;\n this.__generate_glyphs(value);\n this.matrix_is_dirty = true;\n }\n\n get text()\n {\n return this.__text;\n }\n\n update_matrix()\n {\n this.matrix.compose(this.position, this.quaternion, this.scale);\n this.matrix_is_dirty = false;\n this.glyph_is_dirty = true;\n }\n\n clear_glyph_dirty()\n {\n this.glyph_is_dirty = false;\n }\n\n clear_color_dirty()\n {\n this.color_is_dirty = false;\n }\n\n set_rotation(orientation = 0, tilt = 0) // 0..360, -90..0..90\n {\n const new_orientation = new Quaternion().setFromAxisAngle(new Vector3(0, 1, 0), (orientation / 360) * Math.PI * 2);\n const new_tilt = new Quaternion().setFromAxisAngle(new Vector3(1, 0, 0), (-tilt / 360) * Math.PI * 2);\n\n this.quaternion.copy(new_orientation.multiply(new_tilt));\n this.matrix_is_dirty = true;\n }\n\n set_position(pos)\n {\n this.position.copy(pos);\n this.matrix_is_dirty = true;\n }\n\n set_size(size)\n {\n this.scale.set(size, size, size);\n this.matrix_is_dirty = true;\n }\n\n set_color(col)\n {\n this.color.set(col);\n this.color_is_dirty = true;\n }\n\n set_pivot(pivot)\n {\n this.pivot_point.copy(pivot);\n this.update_glyphs();\n }\n\n set opacity(op)\n {\n this.__opacity = op;\n this.color_is_dirty = true;\n }\n\n get opacity()\n {\n return this.__opacity;\n }\n\n update_glyphs()\n {\n this.__generate_glyphs(this.text);\n }\n\n __generate_glyphs(text)\n {\n let cursor = 0;\n\n this.glyphs.length = 0;\n\n for (let i = 0; i < text.length; i++)\n {\n const unicode = text.charCodeAt(i);\n const glyph = this.glyph_layout.find(element => element.unicode === unicode);\n if (glyph)\n {\n if (glyph.planeBounds)\n {\n const text_glyph = new TextGlyph(cursor, glyph.planeBounds, glyph.atlasBounds);\n this.glyphs.push(text_glyph);\n }\n cursor += glyph.advance;\n }\n }\n\n const box2 = new Box2();\n const first_glyph = this.glyphs[0];\n box2.setFromCenterAndSize(first_glyph.position.clone().add(new Vector2(first_glyph.scale.x / 2, first_glyph.scale.y / 2)), first_glyph.scale);\n\n for (let i = 1; i < this.glyphs.length; i++)\n {\n const g = this.glyphs[i];\n const box = new Box2().setFromCenterAndSize(g.position.clone().add(new Vector2(g.scale.x / 2, g.scale.y / 2)), g.scale);\n box2.union(box);\n }\n\n const box2_size = new Vector2();\n box2.getSize(box2_size);\n for (let i = 0; i < this.glyphs.length; i++)\n {\n this.glyphs[i].position.x -= box2_size.x / 2;\n this.glyphs[i].position.y -= box2_size.y / 2;\n\n this.glyphs[i].position.x += (box2_size.x / 2) * this.pivot_point.x;\n this.glyphs[i].position.y += (box2_size.y / 2) * this.pivot_point.y;\n }\n\n this.glyph_is_dirty = true;\n }\n}\n\nexport { SDFText };\n","import { BaseShaderMaterial } from './BaseShaderMaterial';\n\nimport frag from '../shaders/sdf_text/sdf_text.frag';\nimport vert from '../shaders/sdf_text/sdf_text.vert';\n\nimport { Vector2, DoubleSide, LinearFilter } from 'three';\nimport { OMath } from '../utilities/OMath';\n\nclass SDFTextMaterial extends BaseShaderMaterial\n{\n constructor(texture)\n {\n super(vert, frag, {\n _Texture: { value: texture },\n _Boldness: { value: 0.5 },\n _AtlasSize: { value: new Vector2(1, 1) }\n });\n\n this.transparent = true;\n this.extensions = {\n derivatives: true\n };\n this.depthWrite = false;\n this.side = DoubleSide;\n texture.minFilter = LinearFilter;\n texture.magFilter = LinearFilter;\n texture.generateMipMaps = false;\n }\n\n set_atlas_size(size)\n {\n this.uniforms._AtlasSize.value.copy(size);\n }\n\n set_boldness(value)\n {\n this.uniforms._Boldness.value = OMath.lerp(0.5, 0.2, value);\n }\n}\n\nexport { SDFTextMaterial };\n","import { SDFText } from './SDFText';\nimport { SDFTextMaterial } from '../../materials/SDFTextMaterial';\nimport { ArrayUtilities } from '../../utilities/ArrayUtilities';\n\nimport {\n PlaneGeometry,\n Mesh,\n Vector2,\n InstancedBufferGeometry,\n InstancedBufferAttribute,\n Float32BufferAttribute,\n DynamicDrawUsage\n} from 'three';\n\nclass SDFTextBatch extends Mesh\n{\n constructor(font_layout, atlas_texture)\n {\n const max_allocations = 2000;\n\n const instanced_geometry = new InstancedBufferGeometry();\n instanced_geometry.instanceCount = 0;\n\n const geometry = new PlaneGeometry(1, 1);\n geometry.translate(0.5, 0.5, 0);\n instanced_geometry.setAttribute('position', new Float32BufferAttribute(geometry.getAttribute('position').array, 3));\n instanced_geometry.setAttribute('uv', new Float32BufferAttribute(geometry.getAttribute('uv').array, 2));\n instanced_geometry.index = geometry.index;\n\n const transformsCol0 = new InstancedBufferAttribute(new Float32Array(max_allocations * 4), 4, false);\n const transformsCol1 = new InstancedBufferAttribute(new Float32Array(max_allocations * 4), 4, false);\n const transformsCol2 = new InstancedBufferAttribute(new Float32Array(max_allocations * 4), 4, false);\n const transformsCol3 = new InstancedBufferAttribute(new Float32Array(max_allocations * 4), 4, false);\n\n const glyph_bounds = new InstancedBufferAttribute(new Float32Array(max_allocations * 4), 4, false);\n const plane_bounds = new InstancedBufferAttribute(new Float32Array(max_allocations * 4), 4, false);\n\n const color = new InstancedBufferAttribute(new Float32Array(max_allocations * 4), 4, false);\n\n transformsCol0.usage = DynamicDrawUsage;\n transformsCol1.usage = DynamicDrawUsage;\n transformsCol2.usage = DynamicDrawUsage;\n transformsCol3.usage = DynamicDrawUsage;\n glyph_bounds.usage = DynamicDrawUsage;\n plane_bounds.usage = DynamicDrawUsage;\n color.usage = DynamicDrawUsage;\n\n instanced_geometry.setAttribute('transformsCol0', transformsCol0);\n instanced_geometry.setAttribute('transformsCol1', transformsCol1);\n instanced_geometry.setAttribute('transformsCol2', transformsCol2);\n instanced_geometry.setAttribute('transformsCol3', transformsCol3);\n\n instanced_geometry.setAttribute('glyph_bounds', glyph_bounds);\n instanced_geometry.setAttribute('plane_bounds', plane_bounds);\n instanced_geometry.setAttribute('color', color);\n\n super(instanced_geometry, new SDFTextMaterial(atlas_texture));\n\n this.text_elements = [];\n this.font_layout = font_layout;\n\n this.material.set_atlas_size(new Vector2(font_layout.atlas.width, font_layout.atlas.height));\n\n this.frustumCulled = false;\n }\n\n set_boldness(value)\n {\n this.material.set_boldness(value);\n }\n\n add_text(text_str)\n {\n const elem = new SDFText(this.font_layout.glyphs, text_str);\n this.text_elements.push(elem);\n return elem;\n }\n\n remove_text(text_elem)\n {\n ArrayUtilities.remove_elem(this.text_elements, text_elem);\n this.update(true);\n }\n\n update(force_update)\n {\n const glyph_bounds_atr = this.geometry.getAttribute('glyph_bounds');\n const plane_bounds_atr = this.geometry.getAttribute('plane_bounds');\n\n const transformsCol0 = this.geometry.getAttribute('transformsCol0');\n const transformsCol1 = this.geometry.getAttribute('transformsCol1');\n const transformsCol2 = this.geometry.getAttribute('transformsCol2');\n const transformsCol3 = this.geometry.getAttribute('transformsCol3');\n\n const color_atr = this.geometry.getAttribute('color');\n\n let matrix_needs_update = force_update === true;\n let glyph_needs_update = force_update === true;\n let color_needs_update = force_update === true;\n\n let glyph_count = 0;\n for (let i = 0; i < this.text_elements.length; i++)\n {\n const text = this.text_elements[i];\n\n if (text.matrix_is_dirty)\n {\n matrix_needs_update = true;\n text.update_matrix();\n }\n\n if (text.glyph_is_dirty)\n {\n glyph_needs_update = true;\n text.clear_glyph_dirty();\n }\n\n if (text.color_is_dirty)\n {\n color_needs_update = true;\n text.clear_color_dirty();\n }\n\n const matrix = text.matrix;\n const color = text.color;\n const opacity = text.opacity;\n\n for (let glyph_i = 0; glyph_i < text.glyphs.length; glyph_i++)\n {\n const glyph = text.glyphs[glyph_i];\n\n const buffer_i = glyph_count;\n\n glyph_bounds_atr.setXYZW(buffer_i, glyph.atlas_bounds.x, glyph.atlas_bounds.y, glyph.atlas_bounds.z, glyph.atlas_bounds.w);\n plane_bounds_atr.setXYZW(buffer_i, glyph.position.x, glyph.position.y, glyph.scale.x, glyph.scale.y);\n\n transformsCol0.setXYZW(buffer_i, matrix.elements[0],\n matrix.elements[1],\n matrix.elements[2],\n matrix.elements[3]);\n\n transformsCol1.setXYZW(buffer_i, matrix.elements[4],\n matrix.elements[5],\n matrix.elements[6],\n matrix.elements[7]);\n\n transformsCol2.setXYZW(buffer_i, matrix.elements[8],\n matrix.elements[9],\n matrix.elements[10],\n matrix.elements[11]);\n\n transformsCol3.setXYZW(buffer_i, matrix.elements[12],\n matrix.elements[13],\n matrix.elements[14],\n matrix.elements[15]);\n\n color_atr.setXYZW(buffer_i, color.r, color.g, color.b, opacity);\n\n glyph_count++;\n }\n }\n\n this.geometry.instanceCount = glyph_count;\n\n if (glyph_count > this.max_allocations)\n {\n console.error('SDFTextBatch exceeded maximum glyph allocations(max/current): ', this.max_allocations, glyph_count, this);\n }\n\n if (matrix_needs_update)\n {\n transformsCol0.needsUpdate = true;\n transformsCol1.needsUpdate = true;\n transformsCol2.needsUpdate = true;\n transformsCol3.needsUpdate = true;\n }\n if (glyph_needs_update)\n {\n glyph_bounds_atr.needsUpdate = true;\n plane_bounds_atr.needsUpdate = true;\n }\n if (color_needs_update)\n {\n color_atr.needsUpdate = true;\n }\n }\n\n dispose()\n {\n this.geometry.dispose();\n this.material.dispose();\n }\n}\n\nexport { SDFTextBatch };\n","import { ActionInterpolator } from './ActionInterpolator';\n\nclass VectorInterpolator extends ActionInterpolator\n{\n constructor(attribute_name, from = 0, to = 1, easing_function = 'linear')\n {\n super(easing_function);\n\n this.attribute_name = attribute_name;\n this.from = from;\n this.to = to;\n }\n\n update(context, t)\n {\n const tmp = this.from.clone();\n tmp.lerp(this.to, this.easing_function(t));\n context[this.attribute_name].copy(tmp);\n }\n}\n\nexport { VectorInterpolator };\n","import { BlitMaterial } from '../materials/BlitMaterial';\n\nimport frag from '../shaders/median_filter/median_filter.frag';\n\nimport { Vector2 } from 'three';\n\nclass MedianFilterMaterial extends BlitMaterial\n{\n constructor()\n {\n super(frag, undefined, {\n kernel3x3: true\n });\n\n this.uniforms._SourceTex = { value: undefined };\n this.uniforms._SourceTexSize = { value: new Vector2(1, 1) };\n }\n\n set_texture(tex)\n {\n this.uniforms._SourceTex.value = tex;\n\n const size = this.get_size(tex);\n this.uniforms._SourceTexSize.value.copy(size);\n }\n\n get_size(tex)\n {\n if (tex.isVideoTexture)\n {\n return new Vector2(Math.max(1, tex.image.videoWidth), Math.max(1, tex.image.videoHeight));\n }\n if (tex.isWebGLRenderTarget)\n {\n return new Vector2(tex.width, tex.height);\n }\n if (tex.isTexture)\n {\n return new Vector2(tex.image.width, tex.image.height);\n }\n return new Vector2(1, 1);\n }\n}\n\nexport { MedianFilterMaterial };\n","import { MedianFilterMaterial } from '../materials/MedianFilterMaterial';\nimport { Graphics } from '../Graphics';\n\nimport { WebGLRenderTarget, Vector2, RGBAFormat, FloatType, NearestFilter } from 'three';\n\nclass MedianFilter\n{\n constructor(renderer)\n {\n this.RT = new WebGLRenderTarget(1, 1, {\n type: FloatType,\n format: RGBAFormat,\n minFilter: NearestFilter,\n magFilter: NearestFilter\n });\n this.RT1 = new WebGLRenderTarget(1, 1, {\n type: FloatType,\n format: RGBAFormat,\n minFilter: NearestFilter,\n magFilter: NearestFilter\n });\n\n this.median_filter_mat = new MedianFilterMaterial();\n }\n\n filter(texture)\n {\n const tex_size = this.get_size(texture);\n if (tex_size.x !== this.RT.width || tex_size.y !== this.RT.height)\n {\n this.RT.setSize(tex_size.x, tex_size.y);\n this.RT1.setSize(tex_size.x, tex_size.y);\n }\n\n this.median_filter_mat.set_texture(texture);\n Graphics.material_pass(this.median_filter_mat, this.RT);\n\n for (let i = 0; i < 0; i++)\n {\n this.median_filter_mat.set_texture(this.RT.texture);\n Graphics.material_pass(this.median_filter_mat, this.RT1);\n\n this.median_filter_mat.set_texture(this.RT1.texture);\n Graphics.material_pass(this.median_filter_mat, this.RT);\n }\n\n return this.RT;\n }\n\n get_size(tex)\n {\n if (tex.isVideoTexture)\n {\n return new Vector2(Math.max(1, tex.image.videoWidth), Math.max(1, tex.image.videoHeight));\n }\n if (tex.isWebGLRenderTarget)\n {\n return new Vector2(tex.width, tex.height);\n }\n if (tex.isTexture)\n {\n return new Vector2(tex.image.width, tex.image.height);\n }\n return new Vector2(1, 1);\n }\n}\n\nexport { MedianFilter };\n","import { BlitMaterial } from './BlitMaterial';\n\nimport downsample_frag from '../shaders/dual_filter_blur/downsample.frag';\nimport upsample_frag from '../shaders/dual_filter_blur/upsample.frag';\n\nclass DualFilteringBlurMaterial extends BlitMaterial\n{\n constructor(upsample)\n {\n super(upsample ? upsample_frag : downsample_frag);\n }\n}\n\nexport { DualFilteringBlurMaterial };\n","import { BlitMaterial } from './BlitMaterial';\n\nimport frag from '../shaders/dual_filter_blur/alpha_filter.frag';\n\nclass AlphaFilterMaterial extends BlitMaterial\n{\n constructor(use_alpha_mask, upsample)\n {\n super(frag);\n }\n\n set offset(value)\n {\n this.uniforms._Offset.value = value;\n }\n\n get offset()\n {\n return this.uniforms._Offset.value;\n }\n}\n\nexport { AlphaFilterMaterial };\n","import { DualFilteringBlurMaterial } from '../materials/DualFilteringBlurMaterial';\nimport { AlphaFilterMaterial } from '../materials/AlphaFilterMaterial';\nimport { Graphics } from '../Graphics';\nimport { WebGLRenderTarget } from 'three';\nclass DualFilteringBlurrer\n{\n constructor(use_alpha_mask)\n {\n this.current_width = 1;\n this.current_height = 1;\n this.RT0 = new WebGLRenderTarget(1, 1);\n this.RT1 = new WebGLRenderTarget(1, 1);\n this.RT2 = new WebGLRenderTarget(1, 1);\n this.RT3 = new WebGLRenderTarget(1, 1);\n this.RT4 = new WebGLRenderTarget(1, 1);\n\n this.upscale_blur_mat = new DualFilteringBlurMaterial(true);\n this.downscale_blur_mat = new DualFilteringBlurMaterial(false);\n\n this.alpha_filter_mat = new AlphaFilterMaterial();\n }\n\n blur(RT)\n {\n this.check_RT_resize(RT.width, RT.height);\n Graphics.blit(RT, this.RT1, this.alpha_filter_mat);\n\n // Graphics.blit(this.RT0, this.RT1, this.downscale_blur_mat);\n Graphics.blit(this.RT1, this.RT2, this.downscale_blur_mat);\n Graphics.blit(this.RT2, this.RT3, this.downscale_blur_mat);\n Graphics.blit(this.RT3, this.RT4, this.downscale_blur_mat);\n\n // Graphics.blit(this.RT4, this.RT3, this.upscale_blur_mat);\n // Graphics.blit(this.RT3, this.RT4, this.upscale_blur_mat);\n Graphics.blit(this.RT4, this.RT3, this.upscale_blur_mat);\n Graphics.blit(this.RT3, this.RT2, this.upscale_blur_mat);\n Graphics.blit(this.RT2, RT, this.upscale_blur_mat);\n // Graphics.blit(this.RT1, RT, this.upscale_blur_mat);\n\n // return this.RT2;\n }\n\n check_RT_resize(width, height)\n {\n if (this.current_width !== width || this.current_height !== height)\n {\n this.current_width = width;\n this.current_height = height;\n this.RT0.setSize(this.current_width / 2, this.current_height / 2);\n this.RT1.setSize(this.current_width / 2, this.current_height / 2);\n this.RT2.setSize(this.current_width / 4, this.current_height / 4);\n this.RT3.setSize(this.current_width / 8, this.current_height / 8);\n this.RT4.setSize(this.current_width / 16, this.current_height / 16);\n }\n }\n}\n\nexport { DualFilteringBlurrer };\n","import { Graphics } from '../Graphics';\n\nimport { NearestFilter } from 'three';\nimport { RGBAFormat } from 'three';\nimport { LinearEncoding } from 'three';\nimport { HalfFloatType } from 'three';\nimport { FloatType } from 'three';\nimport { WebGLRenderTarget } from 'three';\nimport { Capabilities } from '../Capabilities';\n\nclass ParticleAttribute\n{\n constructor(attr_name, update_material)\n {\n this.read = undefined;\n this.write = undefined;\n\n this.name = attr_name;\n\n this.update_material = update_material;\n }\n\n init_from_geometry(geometry)\n {\n // overrided by inheritance\n }\n\n init_from_attribute(particle_attribute)\n {\n\n }\n\n build_RT(particle_count)\n {\n const resolution = ParticleAttribute.calculate_resolution(particle_count);\n const options = {\n minFilter: NearestFilter,\n magFilter: NearestFilter,\n format: RGBAFormat,\n encoding: LinearEncoding,\n type: Capabilities.fp_textures_available ? FloatType : HalfFloatType,\n stencilBuffer: false,\n depthBuffer: false\n };\n\n return new WebGLRenderTarget(resolution.width, resolution.height, options);\n }\n\n static calculate_resolution(particle_count)\n {\n const width = Math.min(particle_count, 512);\n const height = Math.max(1, Math.ceil(particle_count / width));\n return { width, height };\n }\n\n swap_RT()\n {\n const tmp = this.read;\n this.read = this.write;\n this.write = tmp;\n }\n\n update(attribute_writter_scene)\n {\n if (this.update_material)\n {\n this.update_material.update();\n attribute_writter_scene.children[0].material = this.update_material;\n this.update_material.uniforms._MainTex.value = this.read.texture;\n Graphics.render(attribute_writter_scene, undefined, this.write);\n attribute_writter_scene.children[0].material = undefined;\n\n this.swap_RT();\n }\n }\n\n store_geometry_attribute_in_RT(attribute, RT, storage_material, attribute_writter_scene)\n {\n attribute_writter_scene.children[0].geometry.setAttribute('data', attribute);\n attribute_writter_scene.children[0].material = storage_material;\n\n Graphics.render(attribute_writter_scene, undefined, RT);\n\n attribute_writter_scene.children[0].geometry.deleteAttribute('data');\n attribute_writter_scene.children[0].material = undefined;\n }\n\n get_texture()\n {\n return this.read.texture;\n }\n}\n\nexport { ParticleAttribute };\n","import { Object3D } from 'three';\nimport { BufferAttribute } from 'three';\nimport { PlaneGeometry } from 'three';\nimport { Mesh } from 'three';\nimport { BufferGeometry } from 'three';\nimport { Scene } from 'three';\nimport { Points } from 'three';\nimport { InstancedBufferGeometry } from 'three';\nimport { InstancedBufferAttribute } from 'three';\nimport { ParticleAttribute } from './ParticleAttribute';\n\nclass GPUParticleSystem extends Object3D\n{\n constructor(particle_count, material)\n {\n super();\n this.attributes = [];\n\n this.mesh = this.build_point_mesh(particle_count, material);\n this.add(this.mesh);\n\n this.attribute_writter_mesh = this.build_attribute_writter_mesh(particle_count);\n this.attribute_writter_scene = new Scene();\n this.attribute_writter_scene.add(this.attribute_writter_mesh);\n }\n\n add_texture_attribute(buffer_attribute)\n {\n this.attributes.push(buffer_attribute);\n }\n\n add_update_attribute_array(name, array, item_size)\n {\n this.attribute_writter_mesh.geometry.setAttribute(name, new BufferAttribute(array, item_size, false));\n }\n\n add_attribute_array(name, array, item_size)\n {\n this.mesh.geometry.setAttribute(name, new InstancedBufferAttribute(array, item_size, false));\n }\n\n update()\n {\n this.mesh.material.update();\n for (let i = 0; i < this.attributes.length; i++)\n {\n this.attributes[i].update(this.attribute_writter_scene);\n }\n }\n\n dispose()\n {\n this.mesh.geometry.dispose();\n this.mesh.material.dispose();\n }\n\n build_point_mesh(instance_count = 1, material)\n {\n const geo = new PlaneGeometry();\n\n const instanced_geo = new InstancedBufferGeometry();\n instanced_geo.setAttribute('position', geo.getAttribute('position'));\n instanced_geo.index = geo.index;\n\n instanced_geo.setAttribute('storage_uv', this.build_uv_storage_attribute(instance_count));\n instanced_geo.instanceCount = instance_count;\n const mesh = new Mesh(instanced_geo, material);\n mesh.frustumCulled = false;\n return mesh;\n }\n\n build_attribute_writter_mesh(particle_count)\n {\n const { width, height } = ParticleAttribute.calculate_resolution(particle_count);\n\n const uvs = new Float32Array(particle_count * 3);\n\n for (let i = 0; i < particle_count; i++)\n {\n const x = i % width;\n const y = Math.floor(i / width);\n uvs[i * 3 + 0] = (x + 0.5) / width;\n uvs[i * 3 + 1] = (y + 0.5) / height;\n uvs[i * 3 + 2] = i;\n }\n const geo = new BufferGeometry();\n geo.setAttribute('position', new BufferAttribute(uvs, 3, false));\n\n const points = new Points(geo);\n points.frustumCulled = false;\n return points;\n }\n\n build_uv_storage_attribute(particle_count)\n {\n const { width, height } = ParticleAttribute.calculate_resolution(particle_count);\n\n const uvs = new Float32Array(particle_count * 2);\n\n for (let i = 0; i < particle_count; i++)\n {\n const x = i % width;\n const y = Math.floor(i / width);\n uvs[i * 2 + 0] = (x + 0.5) / width;\n uvs[i * 2 + 1] = (y + 0.5) / height;\n }\n return new InstancedBufferAttribute(uvs, 2, false);\n }\n}\n\nexport { GPUParticleSystem };\n","import frag from '../../shaders/gpu_particles/generic_storage.frag';\n\nimport { ShaderMaterial } from 'three';\nimport { NoBlending } from 'three';\nimport { AlwaysDepth } from 'three';\n\nclass ParticleStorageMaterial extends ShaderMaterial\n{\n constructor()\n {\n const vert = `\n varying vec4 value;\n attribute vec4 data;\n\n void main()\n {\n gl_Position = vec4(position.xy * 2.0 - 1.0, 1.0,1.0);\n gl_PointSize = 1.0;\n\n value = data;\n }\n `;\n super({\n uniforms: {\n\n },\n vertexShader: vert,\n fragmentShader: frag,\n depthWrite: false,\n blending: NoBlending,\n depthTest: false,\n depthFunc: AlwaysDepth\n });\n }\n}\n\nexport { ParticleStorageMaterial };\n","import { BufferAttribute } from 'three';\n\nimport { ParticleAttribute } from '../gpu_particles/ParticleAttribute';\nimport { ParticleStorageMaterial } from '../materials/gpu_particles/ParticleStorageMaterial';\n\nclass ParticlePositionAttribute extends ParticleAttribute\n{\n constructor(update_material)\n {\n super('_Position', update_material);\n }\n\n store_geometry(geometry, attribute_writter_scene)\n {\n const pos_attr = geometry.getAttribute('position');\n this.read = this.build_RT(pos_attr.count);\n this.write = this.build_RT(pos_attr.count);\n\n const mat = new ParticleStorageMaterial();\n this.store_geometry_attribute_in_RT(geometry.getAttribute('position'), this.read, mat, attribute_writter_scene);\n }\n\n store_positions(positions, attribute_writter_scene)\n {\n this.read = this.build_RT(positions.length);\n this.write = this.build_RT(positions.length);\n\n const arr = new Float32Array(positions.length * 4);\n\n for (let i = 0; i < positions.length; i++)\n {\n arr[i * 4 + 0] = positions[i].x;\n arr[i * 4 + 1] = positions[i].y;\n arr[i * 4 + 2] = positions[i].z;\n arr[i * 4 + 3] = (Math.random() * 2 - 1) * 10;\n }\n const mat = new ParticleStorageMaterial();\n this.store_geometry_attribute_in_RT(new BufferAttribute(arr, 4), this.read, mat, attribute_writter_scene);\n }\n}\n\nexport { ParticlePositionAttribute };\n","import { DataTexture } from 'three';\n\nclass CustomDataTexture extends DataTexture\n{\n constructor(data, width, height, format, type)\n {\n super(data, width, height, format, type);\n this.multiplier = 1;\n }\n\n set_rgba(index, r, g, b, a)\n {\n this.data[index * 3 + 0] = r * this.multiplier;\n this.data[index * 3 + 1] = g * this.multiplier;\n this.data[index * 3 + 2] = b * this.multiplier;\n this.data[index * 3 + 3] = a * this.multiplier;\n this.needsUpdate = true;\n }\n\n set_rgb(index, r, g, b)\n {\n this.data[index * 3 + 0] = r * this.multiplier;\n this.data[index * 3 + 1] = g * this.multiplier;\n this.data[index * 3 + 2] = b * this.multiplier;\n this.needsUpdate = true;\n }\n\n set_r(index, value)\n {\n this.data[index * 3 + 0] = value * this.multiplier;\n this.needsUpdate = true;\n }\n\n set_g(index, value)\n {\n this.data[index * 3 + 1] = value * this.multiplier;\n this.needsUpdate = true;\n }\n\n set_b(index, value)\n {\n this.data[index * 3 + 2] = value * this.multiplier;\n this.needsUpdate = true;\n }\n\n set_a(index, value)\n {\n this.data[index * 3 + 2] = value * this.multiplier;\n this.needsUpdate = true;\n }\n}\n\nexport { CustomDataTexture };\n","import { CustomDataTexture } from './CustomDataTexture';\nimport { RGBFormat } from 'three';\n\nclass RGBDataTexture extends CustomDataTexture\n{\n constructor(width, height)\n {\n const data = new Uint8Array(width * height * 3);\n super(data, width, height, RGBFormat);\n this.multiplier = 255;\n }\n}\n\nexport { RGBDataTexture };\n","import { CustomDataTexture } from './CustomDataTexture';\nimport { RGBAFormat } from 'three';\n\nclass RGBADataTexture extends CustomDataTexture\n{\n constructor(width, height)\n {\n const data = new Uint8Array(width * height * 4);\n super(data, width, height, RGBAFormat);\n this.multiplier = 255;\n }\n}\n\nexport { RGBADataTexture };\n","import { CustomDataTexture } from './CustomDataTexture';\nimport { FloatType } from 'three';\nimport { RGBFormat } from 'three';\n\nclass RGBFloatDataTexture extends CustomDataTexture\n{\n constructor(width, height)\n {\n const data = new Float32Array(width * height * 3);\n super(data, width, height, RGBFormat, FloatType);\n }\n}\n\nexport { RGBFloatDataTexture };\n","import { CustomDataTexture } from './CustomDataTexture';\nimport { FloatType } from 'three';\nimport { RGBAFormat } from 'three';\n\nclass RGBAFloatDataTexture extends CustomDataTexture\n{\n constructor(width, height)\n {\n const data = new Float32Array(width * height * 4);\n super(data, width, height, RGBAFormat, FloatType);\n }\n}\n\nexport { RGBAFloatDataTexture };\n","import { Mesh } from 'three';\nimport { RGBDataTexture } from '../data_textures/RGBDataTexture';\nimport { RGBADataTexture } from '../data_textures/RGBADataTexture';\nimport { RGBFloatDataTexture } from '../data_textures/RGBFloatDataTexture';\nimport { RGBAFloatDataTexture } from '../data_textures/RGBAFloatDataTexture';\n\nclass BatchedMesh extends Mesh\n{\n constructor(id_table, geometry, material, max_texture_width)\n {\n super(geometry, material);\n\n this.id_table = id_table;\n this.batched_count = Object.keys(id_table).length;\n this.max_texture_width = max_texture_width;\n this.batch_width = this.batched_count % max_texture_width;\n this.batch_height = Math.ceil(this.batched_count / max_texture_width);\n }\n\n attach_rgb_texture(uniform_name)\n {\n this.material.uniforms[uniform_name].value = new RGBDataTexture(this.batch_width, this.batch_height);\n }\n\n attach_rgba_texture(uniform_name)\n {\n this.material.uniforms[uniform_name].value = new RGBADataTexture(this.batch_width, this.batch_height);\n }\n\n attach_rgb_float_texture(uniform_name)\n {\n this.material.uniforms[uniform_name].value = new RGBFloatDataTexture(this.batch_width, this.batch_height);\n }\n\n attach_rgba_float_texture(uniform_name)\n {\n this.material.uniforms[uniform_name].value = new RGBAFloatDataTexture(this.batch_width, this.batch_height);\n }\n\n get_mesh_index(name)\n {\n return this.id_table[name];\n }\n\n set_rgb_value(uniform_name, mesh_name, r, g, b)\n {\n this.material.uniforms[uniform_name].set_rgb(this.get_mesh_index(mesh_name), r, g, b);\n }\n\n set_rgba_value(uniform_name, mesh_name, r, g, b, a)\n {\n this.material.uniforms[uniform_name].set_rgba(this.get_mesh_index(mesh_name), r, g, b, a);\n }\n}\n\nexport { BatchedMesh };\n","import { BatchedMesh } from './BatchedMesh';\n\nimport * as BufferGeometryUtils from 'three/examples/jsm/utils/BufferGeometryUtils.js';\n\nimport { BufferAttribute } from 'three';\n\nclass MeshBatcher\n{\n batch(meshes, material)\n {\n const max_texture_width = 2048;\n // let texture_width = meshes.length % max_texture_width;\n // let texture_height = Math.ceil(meshes.length / max_texture_width);\n\n // console.log(\"Store count: \" + buffer_geometries.length + \", Texture size: \" +texture_width);\n\n const geometries = [];\n const id_table = {};\n\n const attr_mesh_id = [];\n\n for (let i = 0; i < meshes.length; i++)\n {\n const mesh = meshes[i];\n const vertex_count = mesh.geometry.getAttribute('position').count;\n\n for (let count = 0; count < vertex_count; count++)\n {\n attr_mesh_id.push(i);\n }\n\n geometries.push(mesh.geometry);\n\n if (id_table[mesh.name] === undefined)\n {\n id_table[mesh.name] = i;\n }\n else\n {\n console.error('Mesh name is duplicated when trying to merge meshes. Non-unique id error.', mesh.name, id_table);\n }\n }\n\n const buffer_geometry = BufferGeometryUtils.mergeBufferGeometries(geometries);\n\n const buffer_attribute = new BufferAttribute(new Float32Array(attr_mesh_id), 1);\n buffer_geometry.setAttribute('mesh_id', buffer_attribute);\n\n return this.create_batched_mesh(id_table, buffer_geometry, material, max_texture_width);\n }\n\n create_batched_mesh(id_table, buffer_geometry, material, max_texture_width)\n {\n return new BatchedMesh(id_table, buffer_geometry, material, max_texture_width);\n }\n}\n\nexport { MeshBatcher };\n","import { Audio as TAudio } from 'three';\nimport { PositionalAudio as TPositionalAudio } from 'three';\n\nclass AudioClip\n{\n constructor(buffer, loop = true, volume = 1, positional = false)\n {\n this.buffer = buffer;\n this.loop = loop;\n this.volume = volume;\n this.positional = positional;\n\n this.audio = undefined;\n }\n\n init(audio_listener)\n {\n if (this.positional)\n {\n this.audio = new TPositionalAudio(audio_listener);\n }\n else\n {\n this.audio = new TAudio(audio_listener);\n }\n\n this.audio.setBuffer(this.buffer);\n this.audio.setLoop(this.loop);\n\n // This prevents undesired volume at the beginning of playing\n this.audio.gain.gain.value = 0;\n\n this.audio.setVolume(this.loop ? 0 : this.volume);\n }\n\n play()\n {\n this.audio.play();\n }\n\n pause()\n {\n this.audio.pause();\n }\n\n stop()\n {\n this.audio.stop();\n }\n\n get is_playing()\n {\n return this.audio.isPlaying;\n }\n}\n\nexport { AudioClip };\n","import { AudioContext } from 'three';\r\n\r\nimport { AudioClip } from '../components/AudioClip';\r\nimport { AbstractLoader } from './AbstractLoader';\r\n\r\nclass AudioLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, loop = true, volume = 0, size, positional = false)\r\n {\r\n super(resource_id, url, size);\r\n this.loop = loop;\r\n this.volume = volume;\r\n this.positional = positional;\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n // if (!window.user_interaction_for_audio)\r\n // {\r\n // setTimeout(this.on_preloaded_finished.bind(this, resource_container), 100);\r\n // }\r\n // else\r\n // {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n this.instantiate_audio(resource_container);\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n // }\r\n }\r\n\r\n instantiate_audio(resource_container)\r\n {\r\n const context = AudioContext.getContext();\r\n\r\n const buffer = context.createBuffer(2, 22050, 44100);\r\n\r\n fetch(this.url).then(r => r.blob()).then((response) =>\r\n {\r\n if (response.arrayBuffer)\r\n {\r\n response.arrayBuffer().then((array_buffer) =>\r\n {\r\n context.decodeAudioData(array_buffer, (audio_buffer) =>\r\n {\r\n resource_container.set_resource(\r\n this.resource_id,\r\n this.url,\r\n new AudioClip(audio_buffer, this.loop, this.volume, this.positional)\r\n );\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n });\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(\r\n this.resource_id,\r\n this.url,\r\n new AudioClip(buffer, this.loop, this.volume, this.positional)\r\n );\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n });\r\n }\r\n}\r\n\r\nexport { AudioLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\n\n// import { sRGBEncoding } from 'three';\n\nclass BasisLoader extends AbstractLoader\n{\n constructor(resource_id, url, loader, size)\n {\n super(resource_id, url, size);\n\n this.loader = loader;\n }\n\n on_preloaded_finished(resource_container)\n {\n if (resource_container.resources_by_url[this.url] === undefined)\n {\n this.loader.load(this.url, (basis) =>\n {\n // basis.encoding = sRGBEncoding;\n\n resource_container.set_resource(this.resource_id, this.url, basis);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n },\n (xhr) =>\n {\n // if (xhr)\n // {\n // let total = xhr.total || this.total_bytes;\n // this.__update_downloaded_bytes(xhr.loaded, total);\n // }\n },\n (msg) =>\n {\n this.__set_error(msg + '\\n\\n\\t If the error says something about unexpected token < in JSON then the probably the problem is related to the file not being found. Check the name and path of the resource');\n this.__loading_ended();\n });\n }\n else\n {\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n }\n }\n}\n\nexport { BasisLoader };\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { CubeTextureLoader } from 'three';\r\n\r\nclass CubemapLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, extension, size)\r\n {\r\n super(resource_id, url, size);\r\n this.loader = new CubeTextureLoader();\r\n this.loader.setPath(url + '/');\r\n this.urls = [\r\n `px.${extension}`,\r\n `nx.${extension}`,\r\n `py.${extension}`,\r\n `ny.${extension}`,\r\n `pz.${extension}`,\r\n `nz.${extension}`\r\n ];\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n this.loader.load(this.urls, (image) =>\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, image);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n },\r\n (xhr) =>\r\n {\r\n // if (xhr)\r\n // {\r\n // let total = xhr.total || this.total_bytes;\r\n // this.__update_downloaded_bytes(xhr.loaded, total);\r\n // }\r\n },\r\n (error) =>\r\n {\r\n this.__set_error('Image could not be loaded. Maybe wrong name or path, I don\\'t know' + '¯\\\\_(ツ)_/¯', error);\r\n this.__loading_ended();\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { CubemapLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { ColladaLoader } from 'three/examples/jsm/loaders/ColladaLoader.js';\r\n\r\nclass DAELoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, size)\r\n {\r\n super(resource_id, url, size);\r\n this.loader = new ColladaLoader();\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n this.loader.load(this.url, (gltf) =>\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, gltf);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n },\r\n (xhr) =>\r\n {\r\n // if (xhr)\r\n // {\r\n // let total = xhr.total || this.total_bytes;\r\n // this.__update_downloaded_bytes(xhr.loaded, total);\r\n // }\r\n },\r\n (msg) =>\r\n {\r\n this.__set_error(msg + '\\n\\n\\t If the error says something about unexpected token < in JSON then the probably the problem is related to the file not being found. Check the name and path of the resource');\r\n this.__loading_ended();\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { DAELoader };\r\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { FileLoader as TFileLoader } from 'three';\r\n\r\nclass FileLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, size)\r\n {\r\n super(resource_id, url, size);\r\n this.loader = new TFileLoader();\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n this.loader.load(this.url, (file) =>\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, file);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n },\r\n (xhr) =>\r\n {\r\n // if (xhr)\r\n // {\r\n // let total = xhr.total || this.total_bytes;\r\n // this.__update_downloaded_bytes(xhr.loaded, total);\r\n // }\r\n },\r\n (msg) =>\r\n {\r\n this.__set_error(msg);\r\n this.__loading_ended();\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { FileLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\n\nimport { FontLoader as TFontLoader } from 'three/examples/jsm/loaders/FontLoader.js';\n\nclass FontLoader extends AbstractLoader\n{\n constructor(resource_id, url, size)\n {\n super(resource_id, url, size);\n this.loader = new TFontLoader();\n }\n\n on_preloaded_finished(resource_container)\n {\n if (resource_container.resources_by_url[this.url] === undefined)\n {\n this.loader.load(this.url, (font) =>\n {\n resource_container.set_resource(this.resource_id, this.url, font);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n },\n (xhr) =>\n {\n // if (xhr)\n // {\n // let total = xhr.total || this.total_bytes;\n // this.__update_downloaded_bytes(xhr.loaded, total);\n // }\n },\n (msg) =>\n {\n this.__set_error(msg + '\\n\\n\\t If the error says something about unexpected token < in JSON then probably the problem is related to the file not being found. Check the name and path of the resource');\n this.__loading_ended();\n });\n }\n else\n {\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n }\n }\n}\n\nexport { FontLoader };\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { GLTFLoader as TGLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';\r\n\r\nclass GLTFLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, size)\r\n {\r\n super(resource_id, url, size);\r\n this.loader = new TGLTFLoader();\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n this.loader.load(this.url, (gltf) =>\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, gltf);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n },\r\n (xhr) =>\r\n {\r\n // if (xhr)\r\n // {\r\n // let total = xhr.total || this.total_bytes;\r\n\r\n // this.__update_downloaded_bytes(xhr.loaded, total);\r\n // }\r\n },\r\n (msg) =>\r\n {\r\n this.__set_error(msg + '\\n\\n\\t If the error says something about unexpected token < in JSON then the probably the problem is related to the file not being found. Check the name and path of the resource');\r\n this.__loading_ended();\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { GLTFLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';\r\n\r\nclass GLTFDRACOLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, loader, size)\r\n {\r\n super(resource_id, url, size);\r\n this.loader = new GLTFLoader();\r\n\r\n this.loader.setDRACOLoader(loader);\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n this.loader.load(this.url, (gltf) =>\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, gltf);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n },\r\n (xhr) =>\r\n {\r\n // if (xhr)\r\n // {\r\n // let total = xhr.total || this.total_bytes;\r\n // this.__update_downloaded_bytes(xhr.loaded, total);\r\n // }\r\n },\r\n (msg) =>\r\n {\r\n this.__set_error(msg + '\\n\\n\\t If the error says something about unexpected token < in JSON then the probably the problem is related to the file not being found. Check the name and path of the resource');\r\n this.__loading_ended();\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { GLTFDRACOLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { HDRCubeTextureLoader as THDRCubeTextureLoader } from 'three/examples/jsm/loaders/HDRCubeTextureLoader.js';\r\nimport { UnsignedByteType } from 'three';\r\n\r\nclass HDRCubeTextureLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, size)\r\n {\r\n super(resource_id, url, size);\r\n this.loader = new THDRCubeTextureLoader();\r\n this.url_suffix = ['/px.hdr', '/nx.hdr', '/py.hdr', '/ny.hdr', '/pz.hdr', '/nz.hdr'];\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n this.loader.setPath(this.url)\r\n .setDataType(UnsignedByteType)\r\n .load(this.url_suffix, (hdr) =>\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, hdr);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n },\r\n (xhr) =>\r\n {\r\n // if (xhr)\r\n // {\r\n // let total = xhr.total || this.total_bytes;\r\n // this.__update_downloaded_bytes(xhr.loaded, total);\r\n // }\r\n },\r\n (msg) =>\r\n {\r\n this.__set_error(msg + '\\n\\n\\t If the error says something about unexpected token < in JSON then the probably the problem is related to the file not being found. Check the name and path of the resource');\r\n this.__loading_ended();\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { HDRCubeTextureLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\n\nclass JSONLoader extends AbstractLoader\n{\n constructor(resource_id, url, size)\n {\n super(resource_id, url, size);\n }\n\n on_preloaded_finished(resource_container, response)\n {\n if (resource_container.resources_by_url[this.url] === undefined)\n {\n response.json().then((json) =>\n {\n resource_container.set_resource(this.resource_id, this.url, json);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n });\n }\n else\n {\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n }\n }\n}\n\nexport { JSONLoader };\n","import { AbstractLoader } from './AbstractLoader';\n\nimport { OBJLoader as TOBJLoader } from 'three/examples/jsm/loaders/OBJLoader.js';\n\nclass OBJLoader extends AbstractLoader\n{\n constructor(resource_id, url, size)\n {\n super(resource_id, url, size);\n this.loader = new TOBJLoader();\n }\n\n on_preloaded_finished(resource_container)\n {\n if (resource_container.resources_by_url[this.url] === undefined)\n {\n this.loader.load(this.url, (obj) =>\n {\n resource_container.set_resource(this.resource_id, this.url, obj);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n },\n (xhr) =>\n {\n // if (xhr)\n // {\n // let total = xhr.total || this.total_bytes;\n // this.__update_downloaded_bytes(xhr.loaded, total);\n // }\n },\n (msg) =>\n {\n this.__set_error(msg + '\\n\\n\\t If the error says something about unexpected token < in JSON then probably the problem is related to the file not being found. Check the name and path of the resource');\n this.__loading_ended();\n });\n }\n else\n {\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n }\n }\n}\n\nexport { OBJLoader };\n","import { AbstractLoader } from './AbstractLoader';\n\nimport { Vector3 } from 'three';\nimport { FileLoader } from 'three';\n\nclass PointArrayLoader extends AbstractLoader\n{\n constructor(resource_id, url, size)\n {\n super(resource_id, url, size);\n this.loader = new FileLoader();\n }\n\n on_preloaded_finished(resource_container)\n {\n if (resource_container.resources_by_url[this.url] === undefined)\n {\n this.loader.load(this.url, (text) =>\n {\n resource_container.set_resource(this.resource_id, this.url, this.parse_path(text));\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n },\n (xhr) =>\n {\n // if (xhr)\n // {\n // let total = xhr.total || this.total_bytes;\n // this.__update_downloaded_bytes(xhr.loaded, total);\n // }\n },\n (msg) =>\n {\n this.__set_error(msg);\n this.__loading_ended();\n });\n }\n else\n {\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n }\n }\n\n parse_path(raw_data)\n {\n const string_array = raw_data.split('\\n');\n\n if (string_array[string_array.length - 1] === '')\n {\n string_array.pop();\n }\n\n const positions = [];\n\n for (let i = 0; i < string_array.length; i += 3)\n {\n const x = parseFloat(string_array[i + 0]);\n const y = parseFloat(string_array[i + 1]);\n const z = parseFloat(string_array[i + 2]);\n positions.push(new Vector3(x, y, z));\n }\n return positions;\n // let curve = new THREE.CatmullRomCurve3(positions);\n // return curve.getPoints(100);\n }\n}\n\nexport { PointArrayLoader };\n","import { AbstractLoader } from './AbstractLoader';\n\nimport { RGBELoader } from 'three/examples/jsm/loaders/RGBELoader.js';\n\nclass RGBETextureLoader extends AbstractLoader\n{\n constructor(resource_id, url, size)\n {\n super(resource_id, url, size);\n this.loader = new RGBELoader();\n }\n\n on_preloaded_finished(resource_container)\n {\n if (resource_container.resources_by_url[this.url] === undefined)\n {\n this.loader.load(this.url, (hdr) =>\n {\n resource_container.set_resource(this.resource_id, this.url, hdr);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n },\n (xhr) =>\n {\n // if (xhr)\n // {\n // let total = xhr.total || this.total_bytes;\n // this.__update_downloaded_bytes(xhr.loaded, total);\n // }\n },\n (msg) =>\n {\n this.__set_error(msg + '\\n\\n\\t If the error says something about unexpected token < in JSON then the probably the problem is related to the file not being found. Check the name and path of the resource');\n this.__loading_ended();\n });\n }\n else\n {\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n }\n }\n}\n\nexport { RGBETextureLoader };\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { FileLoader as TFileLoader } from 'three';\r\n\r\nclass TextLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, size)\r\n {\r\n super(resource_id, url, size);\r\n this.loader = new TFileLoader();\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n this.loader.load(this.url, (gltf) =>\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, gltf);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n },\r\n (xhr) =>\r\n {\r\n // if (xhr)\r\n // {\r\n // let total = xhr.total || this.total_bytes;\r\n // this.__update_downloaded_bytes(xhr.loaded, total);\r\n // }\r\n },\r\n (msg) =>\r\n {\r\n this.__set_error(msg);\r\n this.__loading_ended();\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { TextLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { Texture } from 'three';\r\nimport { Browser } from '../Browser';\r\n\r\nclass AsyncTextureLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, size)\r\n {\r\n super(resource_id, url, size);\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n if (Browser.is_safari && Browser.version < 15)\r\n {\r\n this.load_with_old_method(resource_container);\r\n }\r\n else\r\n {\r\n this.load_with_new_method(resource_container);\r\n }\r\n }\r\n\r\n load_with_old_method(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n const texture = new Texture();\r\n const image = new Image();\r\n\r\n image.src = this.url;\r\n\r\n image.onload = () =>\r\n {\r\n texture.image = image;\r\n texture.needsUpdate = true;\r\n\r\n resource_container.set_resource(this.resource_id, this.url, texture);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n };\r\n\r\n image.onerror = () =>\r\n {\r\n console.error('Error loading texture. Maybe the resource is not an image?', this.url, this.original_url);\r\n };\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n\r\n load_with_new_method(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n const fetchOptions = {};\r\n fetchOptions.credentials = 'same-origin';\r\n // fetchOptions.headers = this.requestHeader;\r\n\r\n fetch(this.url, fetchOptions).then((res) =>\r\n {\r\n return res.blob();\r\n }).then((blob) =>\r\n {\r\n return createImageBitmap(blob, { colorSpaceConversion: 'none' });\r\n }).then((imageBitmap) =>\r\n {\r\n const texture = new Texture(imageBitmap);\r\n texture.needsUpdate = true;\r\n\r\n resource_container.set_resource(this.resource_id, this.url, texture);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }).catch(function(e)\r\n {\r\n console.error(e);\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { AsyncTextureLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { Texture } from 'three';\r\n\r\nclass TextureLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, size)\r\n {\r\n super(resource_id, url, size);\r\n }\r\n\r\n on_preloaded_finished(resource_container, response)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n response.blob().then((blob) =>\r\n {\r\n const texture = new Texture();\r\n\r\n const url = URL.createObjectURL(blob);\r\n\r\n const image = new Image();\r\n image.src = url;\r\n\r\n image.onload = () =>\r\n {\r\n texture.image = image;\r\n texture.needsUpdate = true;\r\n\r\n resource_container.set_resource(this.resource_id, this.url, texture);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n };\r\n\r\n image.onerror = () =>\r\n {\r\n console.error('Error loading texture. Maybe the resource is not an image?', this.url);\r\n };\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { TextureLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\n\nclass VideoLoader extends AbstractLoader\n{\n constructor(resource_id, url, size)\n {\n super(resource_id, url, size);\n }\n\n on_preloaded_finished(resource_container, response)\n {\n if (resource_container.resources_by_url[this.url] === undefined)\n {\n response.blob().then((blob) =>\n {\n resource_container.set_resource(this.resource_id, this.url, URL.createObjectURL(blob));\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n });\n }\n else\n {\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n }\n }\n}\n\nexport { VideoLoader };\n","import { ResourceContainer } from '../ResourceContainer';\r\n\r\nclass ResourceBatch\r\n{\r\n constructor(batch_name)\r\n {\r\n this.resource_loaders = [];\r\n this.batch_name = batch_name || 'unnamed batch';\r\n }\r\n\r\n add_loader(loader)\r\n {\r\n this.resource_loaders.push(loader);\r\n }\r\n\r\n load(resource_container)\r\n {\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n this.resource_loaders[i].load(resource_container || ResourceContainer);\r\n }\r\n }\r\n\r\n get loading_finished()\r\n {\r\n let finished = true;\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n finished = finished && this.resource_loaders[i].has_finished;\r\n }\r\n return finished;\r\n }\r\n\r\n get has_errors()\r\n {\r\n let has_error = false;\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n has_error = has_error || this.resource_loaders[i].has_error;\r\n }\r\n return has_error;\r\n }\r\n\r\n print_errors()\r\n {\r\n console.error('Batch <' + this.batch_name + '> could not load successfully');\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n if (this.resource_loaders[i].has_error)\r\n {\r\n this.resource_loaders[i].print_error();\r\n }\r\n }\r\n }\r\n\r\n get_progress()\r\n {\r\n return this.get_loaded_bytes() / this.get_total_bytes();\r\n }\r\n\r\n get_loaded_bytes()\r\n {\r\n let loaded_bytes = 1;\r\n\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n loaded_bytes += this.resource_loaders[i].loaded_bytes;\r\n }\r\n\r\n return loaded_bytes;\r\n }\r\n\r\n get_total_bytes()\r\n {\r\n let total_bytes = 1;\r\n\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n total_bytes += this.resource_loaders[i].total_bytes;\r\n }\r\n\r\n return total_bytes;\r\n }\r\n}\r\n\r\nexport { ResourceBatch };\r\n"],"names":["browser","init","this","browser_name","agent","window","navigator","userAgent","toLowerCase","indexOf","opr","chrome","version","get_version","name","is_safari","is_chrome","is_edge","is_edge_chromium","has_webm","is_firefox","has_hvec","preferred_video_extension","ua","tem","M","match","test","exec","slice","join","replace","appName","appVersion","splice","Number","split","Validation","constructor","static","n","is_int","is_float","str","JSON","parse","e","AbstractLoader","resource_id","url","size","loaded_bytes","total_bytes","has_finished","has_error","error_message","__update_downloaded_bytes","loaded","total","is_number","console","warn","__loading_ended","__set_error","message","print_error","error","load","resource_container","undefined","resources_by_url","cache","Browser","fetch","method","mode","credentials","redirect","then","on_progress","bind","catch","__on_error","set_resource","async","response","response_clone","clone","reader","body","getReader","contentLength","headers","get","receivedLength","done","value","read","length","on_preloaded_finished","data","OMath","from_range_start_value","from_range_end_value","to_range_start_value","to_range_end_value","min","max","number","divisor","rgb","r","Math","round","toString","g","b","points","plane","projected_point","Vector3","points_on_plane","i","projectPoint","push","from","to","target","t","elements","lerp","x1","x2","abs","x","y","m","euclideanModulo","degrees","PI","radians","v","w","z","center","add","multiplyScalar","arr","col","floor","random","clamp","ActionSequencer","context","elapsed_time","playback_speed","__get_playback_speed","playing","action_events","initial_context","stringify","tmp_t","channels","channel_names","Object","keys","duration","play","stop","reset","skip","get_duration","__play_clips","update","delta_time","set_progress","time","set_normalized_progress","get_progress","is_finished","add_action_event","trigger_time","action","add_action_interpolator","interpolator","use_dynamic_from_value","keyframes","attribute_name","keyframe","get_current_target_value","__get_current_keyframe","evaluate","get_current_starting_value","get_current_progress","__linear_map_01","easing_function","EPSILON","trigger","evaluate_keyframe","get_keyframes","channel_name","is_channel_redefined","initial","saturate","current","Infinity","distance","transitions_velocity","URLSearchParams","location","search","EasingFunctions","cos","sin","pow","sqrt","c4","ease_out_bounce","n1","d1","sign","ActionInterpolator","NumberInterpolator","super","view_context","app","set_app","ActionEvent","args","ViewContext","DrawIOAnimationSheet","xml_document","animation_nodes","DOMParser","parseFromString","querySelectorAll","animation_tracks","triggers","node","parent_node","parentElement","getAttribute","get_node_x_position","parseFloat","includes","split_data","trigger_name","trigger_method","at_time","value_data","to_value","from_time","to_time","sort","a","x_pos","ActionSequencerBuilder","default_state_data","from_animation_sheet","animation_data","current_context","tracks","initial_tracks","state_to_tracks","get_longest_time","find","element","sequencer","action_event","state","longest_time","from_draw_io","xml","transition_data","track_time","event_manager","queue","zoom_changed_evt","store_clickd_evt","point_selected_evt","config_changed","path_substep_completed","path_completed","go_to_store_requested_evt","resource_loaded_evt","service_clicked_evt","unit_pos_updated_evt","floor_changed_evt","on_enter_floor_navigation","on_exit_floor_navigation","on_enter_floor_selection","on_exit_floor_selection","on_enter_outside_navigation","on_exit_outside_navigation","step_selected_evt","fire","event","payload","on","callback","fire_zoom_changed","zoom","fire_store_selected","store_id","fire_point_selected","hit_data","fire_config_changed","fire_path_substep_completed","step_number","fire_path_completed","fire_step_selected","step_index","fire_go_to_store_requested","fire_resource_loaded","resource","fire_service_clicked","service","fire_unit_position_updated","unit_data","fire_floor_switched","floor_id","fire_on_enter_floor_navigation","fire_on_exit_floor_navigation","fire_on_enter_floor_selection","fire_on_exit_floor_selection","fire_on_enter_outside_navigation","fire_on_exit_outside_navigation","resources","EventManager","get_resource","HTMLUtilities","container","images","image","dataset","src","image_objects","image_object","videos","video","TransitionTable","transitions","from_state_name","to_state_name","add_transitions","set_transitions","set_default_state_data","delta_buffer","___time","Clock","__raw_delta_time","__elapsed_time","__allocated_time","Vector2","shader_time","__update","getDelta","getElapsedTime","shift","__calculate_delta_time","ViewState","start","show","hide","before_enter","on_enter","update_enter_transition","global_view_data","transition_progress","action_sequencer","update_transition","update_exit_transition","before_exit","on_exit","ViewStateTransitionHandler","transition_table","last_state","current_state","current_state_data","transitioning","go_to_state","__exit_last_state","__update_transitions","set_state","assign","Time","view_manager","views","transition_handler","view_change_subscribers","browser_title_suffix","__set_views_opacities","go_to_view","view_name","change_url","__change_browser_url","__change_browser_title","notify_view_change","go_to_scene","scene_name","next_view","transition_view","set_next_view","subscribe_to_view_change","subscriber","on_view_change","register_view","view","has_view","set_view","set_browser_title_suffix","title_suffix","get_current_view","get_view_by_name","get_view_by_url","get_by_url","history","pushState","title","__capitalize","document","set_opacity","string","aux_string","toUpperCase","__snake_to_whitespace","group","ApplicationView","ResourceContainer","ViewManager","classList","remove","load_html_images","load_images","load_html_videos","load_videos","style","opacity","BaseApplication","on_post_start","on_post_render","on_pre_render","on_frame_end","BaseRender","render","renderer","resize","dispose","BaseShaderMaterial","ShaderMaterial","vert","frag","uniforms","vertexShader","basic_vert","fragmentShader","basic_frag","_Color","Color","BlitMaterial","frag_shader","vert_shader","defines","_MainTex","_Resolution","_TargetResolution","depthWrite","blending","NoBlending","depthTest","depthFunc","AlwaysDepth","AddMaterial","nMips","_SecondTex","set_add_texture","tex","UnrealBloomComposeMaterial","NUM_MIPS","_BlurredTex","_BloomStrength","blurTexture1","blurTexture2","blurTexture3","blurTexture4","blurTexture5","bloomStrength","bloomFactors","bloomRadius","bloomTintColors","set_RT_0","rt","set_RT_1","set_RT_2","set_RT_3","set_RT_4","set_bloom_strength","set_bloom_radius","set_tint_color_0","col_string","set","set_tint_color_1","set_tint_color_2","set_tint_color_3","set_tint_color_4","camera_manager","_current","_spectator","camera","spectator","capabilities","max_anisotropy","vertex_texture_sampler_available","fp_textures_available","CanvasDrawer","uses_dynamic_font","__textHeight","canvas","createElement","ctx","getContext","getFontHeight","fontStyle","getElementsByTagName","dummy","dummyText","createTextNode","appendChild","setAttribute","offsetHeight","removeChild","get_text_size","text","font","ceil","measureText","width","draw_canvas","ctxOptions","font_color","__draw","draw_on_texture","canvas_texture","CanvasTexture","UVMapping","ClampToEdgeWrapping","NearestFilter","generateMipMaps","needsUpdate","roundRect","height","radius","fill","stroke","tl","tr","br","bl","defaultRadius","side","beginPath","moveTo","lineTo","quadraticCurveTo","closePath","configuration","parameters","dpr","from_json","json","Idle","is_animating","Animating","easing_function_t","animator","set_property_value","set_current_state","finished_callback","CSSAnimator","css_property","value_prefix","value_suffix","ease_in_out_cubic","animate","AxisHelper","Object3D","scale","blue_points","blue_axis_mat","LineBasicMaterial","color","blue_axis_geo","BufferGeometry","setFromPoints","blue_axis_line","Line","renderOrder","green_points","green_axis_mat","green_axis_geo","green_axis_line","red_points","red_axis_mat","red_axis_geo","red_axis_line","scene_manager","Scene","add_scene","scene","traverse","child","geometry","material","children","Cube","Mesh","segments","BoxGeometry","MeshBasicMaterial","Sphere","SphereBufferGeometry","Arrow","dir","cylinder_height","cylinder_geo","CylinderBufferGeometry","translate","cone_geometry","ConeBufferGeometry","cone_height","buffer_geometry","BufferGeometryUtils","mergeBufferGeometries","rotateX","quaternion","setFromUnitVectors","_dir","oscreen","position","render_width","render_height","width_height","pixel_size","update_position","size_changed","update_size","apply_pixel_density_v2","vector2","apply_pixel_density","get_pixel_size","aspect_ratio","portrait","ScreenSpaceTextureMaterial","h","_ScreenSpacePosition","_ScreenSize","_TextureSize","set_position","set_texture","set_screen_size","PerspectiveCamera","TPerspectiveCamera","fov","aspect","near","far","clear_color","clear_alpha","copy","debug","Vector3_one","Vector3_zero","canvas_renderer","display_texture_meshes","draw_arrow","origin","arrow","normalize","SceneManager","draw_axis","axis","set_debug_RT","RT","rt_debug","draw_rectangle","position_2d","fillStyle","fillRect","clear","clearRect","draw_line_2D","strokeStyle","draw_line","line","frustumCulled","draw_cube","pos","cube","draw_oriented_cube","depth","distanceTo","sub","forward_dir","draw_plane","PlaneGeometry","Vector4","basic_color_vert","basic_color_frag","transparent","draw_empty_cube","box","Box3","setFromCenterAndSize","helper","Box3Helper","draw_sphere","sphere","draw_point_array","input_points","open","catmull","CatmullRomCurve3","updateArcLengths","getSpacedPoints","draw_sphere_helper","SphereGeometry","sphere_mesh","draw_math_sphere","sphere1","draw_bounding_box","bb","draw_curve","curve","options","offset","draw_texture","mesh","graphics","OScreen","ClearDepthNormalMaterial","clear_depth","clear_normal","_DepthNormal","DepthNormalMaterial","_FarPlane","far_plane","DepthAndNormalsRenderer","WebGLRenderTarget","clear_depth_normal_mat","depth_normal_material","__resize_RT_if_necessary","blit_clear_with_material","CameraManager","setSize","render_target","Blitter","_blit_scene","_blit_material","_blit_quad","_blit_camera","OrthographicCamera","blit","dst","src_texture","isWebGLRenderTarget","texture","src_width","src_height","getSize","__render","material_pass","mat","blit_with_material","dst_RT","current_rt","getRenderTarget","setRenderTarget","core_attributes","context_attributes","threejs_attributes","_renderer","blitter","no_render","current_render_mode","generateDepthNormalTexture","depth_and_normals_renderer","is_webgl2","canvas_context","force_webgl2","xr_enabled","alpha","antialias","desynchronized","failIfMajorPerformanceCaveat","powerPreference","premultipliedAlpha","preserveDrawingBuffer","stencil","logarithmicDepthBuffer","WebGLRenderer","xr","enabled","autoClear","setPixelRatio","Configuration","extensions","domElement","Capabilities","getMaxAnisotropy","maxVertexTextures","is_floating_point_texture_available","resize_observer","ResizeObserver","on_resize","observe","dom_element","depth_normals_RT","new_state","__update_current_camera","updateProjectionMatrix","updateMatrix","updateMatrixWorld","override_mat","__apply_override_material","render_scene","overrideMaterial","readback_RT","buffer","readRenderTargetPixels","clear_stencil","setClearColor","entries","entry","contentRect","setViewport","src_RT","take_screenshot","blob_callback","old_width","old_height","new_width","new_height","tile_width","tile_height","divisions_x","parseInt","divisions_y","old_dpr","getPixelRatio","ctx_2D","setViewOffset","drawImage","toBlob","clearViewOffset","download_screenshot","blob","link","download","href","URL","createObjectURL","click","onclick","requestAnimationFrame","revokeObjectURL","removeAttribute","minFilter","magFilter","format","RGBAFormat","encoding","LinearEncoding","type","FloatType","stencilBuffer","depthBuffer","output","Float32Array","NormalMaterial","DebugNormalsRender","Graphics","KeyboardInput","ctrlz_pressed","ctrlz_fired","keys_keys","addEventListener","on_key_down","on_key_up","keyCode","ctrlKey","code","press_key","release_key","pressed","released","key_name","key","fired","down","release_keys","is_key_pressed","is_key_down","is_key_released","register_key","unregister_key","removeEventListener","os","operating_systems","ANDROID","IOS","LINUX","MAC","WINDOWS","is_mobile","is_ipad","maxTouchPoints","is_ios","is_android","get_os","is_linux","is_mac","is_windows","platform","reflection_plane_context","target_geometry","target_position","set_target_geometry","GeometryBatch","batch_width","data_textures","object_names","zero_offset","write_offset","uniform_dirty_count","tmp_uploaded_data_count","add_global_uniform","set_global_uniform","add_object_uniform_v3","uniform_name","default_value_v3","src_tex","__create_rgb_texture","dst_tex","one_pixel_tex","new_data_tex","__add_data_texture","__flood_data_texture_rgb","add_object_uniform_v4","default_value_v4","__create_rgba_texture","__flood_data_texture_rgba","add_object_uniform_v4_float","__create_rgba_float_texture","set_object_uniform_v3","object_name","vector3","use_r","use_g","use_b","obj_index","__get_object_index","data_texture","__get_data_texture","__set_pixel_rgb","one_pixel","last_accessed_index","dirty_count","set_object_uniform_v4","vector4","use_a","__set_pixel_rgba","upload_texture_data","upload_budget","__partial_texture_data_upload","__full_texture_data_upload","get_uniform_dirty_count","texture_data","copyTextureToTexture","index","get_mesh","v3","v4","Uint8Array","DataTexture","RGBFormat","dst_texture","one_pixel_text","geometry_batcher","batches","batch","buffer_geometries","attr_accessor_uvs","texture_width","ceilPowerOfTwo","__init_uv_array","uv_index","vertex_count","count","buffer_attribute","BufferAttribute","uvs","ui","input","ui_elements","_tmp_normalized_pos","ss_scene","matrixWorldAutoUpdate","ws_scene","ss_camera","delete_element","elem","add_screen_space_element","set_screen_space_coordinate_system","add_world_space_element","set_world_space_coordinate_system","NDC","update_state","current_clicked_element","PerspectiveFrustumPointFitter","fit_points","camera_quaternion","vertical_fov","v_fov","degToRad","h_fov","atan","tan","up_plane_normal","get_up_plane_normal","down_plane_normal","get_down_plane_normal","left_plane_normal","get_left_plane_normal","right_plane_normal","get_right_plane_normal","camera_forward_dir","applyQuaternion","sphere_center","pull_back_distance","get_distance_to_fit_rect","far_pos","up_plane","Plane","setFromNormalAndCoplanarPoint","down_plane","left_plane","right_plane","apply_center_correction_to_pos","closest_distance","inverse_dir","Line3","up_line_intersection","down_line_intersection","left_line_intersection","right_line_intersection","intersectLine","log","new_up_distance","new_down_distance","new_left_distance","new_right_distance","vertical_min","horizontal_min","forward_correction","target_pos","vertical_offset","get_vertical_correction","horizontal_offset","get_horizontal_correction","closest_distance_to_up_plane","closest_distance_to_down_plane","up_dir","down_line","up_line","down_dist","up_dist","correction","closest_distance_to_right_plane","closest_distance_to_left_plane","right_dir","left_line","right_line","left_dist","right_dist","Quaternion","setFromAxisAngle","distV","distH","OrthographicFrustumPointFitter","inverse_camera_quat","inverse","inverted_points","getCenter","distance_to_center","camera_utilities","tmp_mat","Matrix4","ray","Ray","tmp_size","tmp_unproj","get_up_dir","tmp_vec","get_forward_dir","get_right_dir","unproject_mouse_position","get_plane_intersection","plane_position","plane_normal","isPerspectiveCamera","unproject","intersectPlane","fit_points_on_camera","zoom_scale","world_space_center","camera_forward","project_points_on_plane","projected_points_center","up","right","cross","inverse_mat","getInverse","applyMatrix4","projected_center","get_zoom_to_fit_rect","get_zoom_to_fit_box","isOrthographicCamera","obj_x","obj_y","object_aspect","get_html_screen_pos","object","getWorldPosition","project","world_pos_to_screen","update_projection","left","top","bottom","fit_bounding_box_points","p1","p2","p3","p4","p5","p6","p7","p8","camera_backward_dir","fitter","camera_pos","reference_position_plane","camera_ray","reference_position","camera_position","result","reference_rotation","reference_zoom","forward","initializer","CameraUtilities","GeometryBatcher","OS","ReflectionPlaneContext","UI","Debug","render_loop","SSAOMaterial","_InverseProjMatrix","_ProjectionMatrix","_Bias","_Radius","_SampleKernel","__get_sample_kernel","_RandomRotation","__get_rotation_kernel","sample_kernel","rotation_kernel","rotation_texture","wrapS","RepeatWrapping","wrapT","SSAOComposeMaterial","_AO","DisplayNormalTextureMaterial","depth_normals_vert","BoxBlurMaterial","_SampleDir","Blurrer","RT1","RT2","box_blur_mat","blur","NormalAORender","ssao_mat","ssao_compose_mat","debug_normals","ssaa","use_ssaa","main_RT","SSAO_RT","blurrer","__check_RT_size","__update_uniforms","projectionMatrix","NormalRender","VRRender","render_spectator_camera","spectator_camera","isPresenting","xrCam","getCamera","currentRenderTarget","GaussianBlurMaterial","kernel_radius","KERNEL_RADIUS","SIGMA","texSize","direction","set_size","set_direction","LuminosityHighPassMaterial","luminosityThreshold","smoothWidth","defaultColor","defaultOpacity","GaussianBlurrer","current_width","current_height","separableBlurMaterials","renderTargetsHorizontal","renderTargetsVertical","kernelSizeArray","rt_pars","LinearFilter","renderTargetBright","generateMipmaps","init_materials","init_RT","luminosity_high_pass_mat","use_luminosity_high_pass","resize_RT","inputRenderTarget","get_blurred_texture","get_blurred_RT","dispose_RT","hor","ver","texture_height","dispose_materials","UnrealBloomRender","bloom_compose_mat","blur_RT","add_mat","val","TOrthographicCamera","view_component_manager","components","enabled_components","Set","__set_components_opacities","component","register_component","enable_component","disable_component","delete","get_component_by_name","component_name","RenderLoop","target_application","is_running","frames_passed","ViewComponentManager","setAnimationLoop","screen","SimpleTextDrawer","text_margin","text_size","globalAlpha","textBaseline","textAlign","fillText","ViewComponent","hidden","toggle_hidden","HorizontalPlane","VerticalPlane","ArrayUtilities","source","apply","array","items_left_count","closest_point","obj","ids","FrustumPointFitter","get_hozirontal_correction","closest_up_point","closest_down_point","closest_right_point","closest_left_point","GeometryUtilities","geometry_buffer","indices","positions","vertices","getX","getY","getZ","add_barycentric_attribute","non_indexed_geometry_buffer","bar_coordinates","ImageUtilities","getImageData","imagedata","mesh_sampler","sample","sample_count","face_areas","min_area","normals","tangents","faces","index_0","index_1","index_2","v1","v2","face","c","n2","n3","normal","tangent","uv_a","uv_b","uv_c","area","get_face_area","normalized_faces_array","get_uniform_face_distribution","selected_faces","select_random_faces","sample_data_from_faces","sampled_points","sampled_normals","sampled_tangents","sampled_uvs","w1","w2","sample_point_in_face","amount","selected_face","minimum_area","extended_triangle_indices","repetitions_needed","j","vec1","vec2","w3","model_utilities","result_callback","fromGeometry","get_geometries","geometries","assign_material","clone_animated_gltf","gltf","animations","skinnedMeshes","isSkinnedMesh","cloneBones","cloneSkinnedMeshes","isBone","skeleton","cloneSkinnedMesh","orderedCloneBones","bones","cloneBone","Skeleton","boneInverses","matrixWorld","set_shadow_config","cast","receive","castShadow","receiveShadow","__find_object","get_object","get_object_by_type","object_type","ObjectUtilities","item","Array","isArray","sources","is_object","merge_deep","nodeType","attributes","attribute","nodeName","nodeValue","hasChildNodes","childNodes","xml_to_json","old","StringUtilities","hexValues","hex","words","substr","charAt","TimeUtilities","time_str_to_ms","time_str","hours","minutes","seconds","Grid","derivatives","plane_geometry","convert_to_non_indexed_geometry","rotation","_Thickness","_Length","_ElapsedTime","setup","next_position","previous_position","orientation","coverage","accumulated_length","next_point","__get_next_position","previous_point","__get_previous_position","vertexList","nextPositionList","previousPositionList","orientationList","coverageList","setIndex","_length","thickness","total_length","parent","copy_color","WorldImage","pivot","_ScreenAligned","_Scale","_Opacity","DoubleSide","current_scale","computeBoundingBox","tmp_bb_size","boundingBox","update_texture","img","screen_aligned","boolean","Text2D","is_static","simple_text_drawer","draw_settings","LinearMipMapLinearFilter","UIElementMaterial","intensity","_PixelOffset","_NDC","_PivotPoint","_DepthOffset","ScreenSpacePosition","get_pos_NDC","WorldSpacePosition","tmp_vec3","tmp_vec2","UIElementState","ui_element","normalized_mouse_position","OnIdle","is_mouse_over","_on_enter_state","OnMouseEnter","on_mouse_enter","_on_hover_state","_on_exit_state","OnMouseExit","on_mouse_exit","_on_idle_state","OnMouseHover","__trigger_on_hover","on_mouse_hover","UIElement","is_clickable","position_strategy","_position","on_hover","mouse_pos_tmp","cached_NDC_position","screen_pos_tmp","texture_size","matrixAutoUpdate","pixel_offset","set_render_order","pivot_point","set_pixel_offset","use_depth","depth_offset","clear_state","visible","get_size","normalized_mouse_pos","to_screen_position","rect","Box2","containsPoint","projected_pos","get_screen_space_position","set_screen_space_position","screen_pos","UpdatableMaterialMesh","self","onBeforeRender","TextGlyph","plane_bounds","atlas_bounds","SDFText","glyph_layout","glyphs","glyph_is_dirty","matrix_is_dirty","color_is_dirty","matrix","__opacity","__text","__generate_glyphs","update_matrix","compose","clear_glyph_dirty","clear_color_dirty","set_rotation","tilt","new_orientation","new_tilt","multiply","set_color","set_pivot","update_glyphs","op","cursor","unicode","charCodeAt","glyph","planeBounds","text_glyph","atlasBounds","advance","box2","first_glyph","union","box2_size","SDFTextMaterial","_Texture","_Boldness","_AtlasSize","set_atlas_size","set_boldness","SDFTextBatch","font_layout","atlas_texture","instanced_geometry","InstancedBufferGeometry","instanceCount","Float32BufferAttribute","transformsCol0","InstancedBufferAttribute","max_allocations","transformsCol1","transformsCol2","transformsCol3","glyph_bounds","usage","DynamicDrawUsage","text_elements","atlas","add_text","text_str","remove_text","text_elem","remove_elem","force_update","glyph_bounds_atr","plane_bounds_atr","color_atr","matrix_needs_update","glyph_needs_update","color_needs_update","glyph_count","glyph_i","buffer_i","setXYZW","VectorInterpolator","tmp","MedianFilterMaterial","kernel3x3","_SourceTex","_SourceTexSize","isVideoTexture","videoWidth","videoHeight","isTexture","MedianFilter","median_filter_mat","filter","tex_size","DualFilteringBlurMaterial","upsample","AlphaFilterMaterial","use_alpha_mask","_Offset","DualFilteringBlurrer","RT0","RT3","RT4","upscale_blur_mat","downscale_blur_mat","alpha_filter_mat","check_RT_resize","ParticleAttribute","attr_name","update_material","write","init_from_geometry","init_from_attribute","particle_attribute","build_RT","particle_count","resolution","calculate_resolution","HalfFloatType","swap_RT","attribute_writter_scene","store_geometry_attribute_in_RT","storage_material","deleteAttribute","get_texture","GPUParticleSystem","build_point_mesh","attribute_writter_mesh","build_attribute_writter_mesh","add_texture_attribute","add_update_attribute_array","item_size","add_attribute_array","instance_count","geo","instanced_geo","build_uv_storage_attribute","Points","ParticleStorageMaterial","ParticlePositionAttribute","store_geometry","pos_attr","store_positions","CustomDataTexture","multiplier","set_rgba","set_rgb","set_r","set_g","set_b","set_a","RGBDataTexture","RGBADataTexture","RGBFloatDataTexture","RGBAFloatDataTexture","BatchedMesh","id_table","max_texture_width","batched_count","batch_height","attach_rgb_texture","attach_rgba_texture","attach_rgb_float_texture","attach_rgba_float_texture","get_mesh_index","set_rgb_value","mesh_name","set_rgba_value","MeshBatcher","meshes","attr_mesh_id","create_batched_mesh","AudioClip","loop","volume","positional","audio","audio_listener","TPositionalAudio","TAudio","setBuffer","setLoop","gain","setVolume","pause","is_playing","isPlaying","AudioLoader","instantiate_audio","AudioContext","createBuffer","arrayBuffer","array_buffer","decodeAudioData","audio_buffer","BasisLoader","loader","basis","xhr","msg","CubemapLoader","extension","CubeTextureLoader","setPath","urls","DAELoader","ColladaLoader","FileLoader","TFileLoader","file","FontLoader","TFontLoader","GLTFLoader","TGLTFLoader","GLTFDRACOLoader","setDRACOLoader","HDRCubeTextureLoader","THDRCubeTextureLoader","url_suffix","setDataType","UnsignedByteType","hdr","JSONLoader","OBJLoader","TOBJLoader","PointArrayLoader","parse_path","raw_data","string_array","pop","RGBETextureLoader","RGBELoader","TextLoader","AsyncTextureLoader","load_with_old_method","load_with_new_method","Texture","Image","onload","onerror","original_url","fetchOptions","res","createImageBitmap","colorSpaceConversion","imageBitmap","TextureLoader","VideoLoader","ResourceBatch","batch_name","resource_loaders","add_loader","loading_finished","finished","has_errors","print_errors","get_loaded_bytes","get_total_bytes"],"mappings":"qqDA2GK,MAACA,GAAU,IA1GhB,MAEEC,OAKE,OAHAC,KAAKC,aAAe,GACpBD,KAAKE,MAAQC,OAAOC,UAAUC,UAAUC,eAEhC,GAER,KAAKN,KAAKE,MAAMK,Q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nD,EAAI,EAAGA,EAAIxH,KAAK4uD,iBAAiB5oD,OAAQwB,IAEhDunD,EAAWA,GAAY/uD,KAAK4uD,iBAAiBpnD,GAAGrE,aAElD,OAAO4rD,CACR,CAEGC,iBAEF,IAAI5rD,GAAY,EAChB,IAAK,IAAIoE,EAAI,EAAGA,EAAIxH,KAAK4uD,iBAAiB5oD,OAAQwB,IAEhDpE,EAAYA,GAAapD,KAAK4uD,iBAAiBpnD,GAAGpE,UAEpD,OAAOA,CACR,CAED6rD,eAEEvrD,QAAQM,MAAM,UAAYhE,KAAK2uD,WAAa,iCAC5C,IAAK,IAAInnD,EAAI,EAAGA,EAAIxH,KAAK4uD,iBAAiB5oD,OAAQwB,IAE5CxH,KAAK4uD,iBAAiBpnD,GAAGpE,WAE3BpD,KAAK4uD,iBAAiBpnD,GAAGzD,aAG9B,CAEDiH,eAEE,OAAOhL,KAAKkvD,mBAAqBlvD,KAAKmvD,iBACvC,CAEDD,mBAEE,IAAIjsD,EAAe,EAEnB,IAAK,IAAIuE,EAAI,EAAGA,EAAIxH,KAAK4uD,iBAAiB5oD,OAAQwB,IAEhDvE,GAAgBjD,KAAK4uD,iBAAiBpnD,GAAGvE,aAG3C,OAAOA,CACR,CAEDksD,kBAEE,IAAIjsD,EAAc,EAElB,IAAK,IAAIsE,EAAI,EAAGA,EAAIxH,KAAK4uD,iBAAiB5oD,OAAQwB,IAEhDtE,GAAelD,KAAK4uD,iBAAiBpnD,GAAGtE,YAG1C,OAAOA,CACR"}
1
+ {"version":3,"file":"index.module.js","sources":["../src/Browser.js","../src/utilities/Validation.js","../src/resource_loader/AbstractLoader.js","../src/utilities/OMath.js","../src/action_sequencer/ActionSequencer.js","../src/utilities/EasingFunctions.js","../src/action_sequencer/ActionInterpolator.js","../src/action_sequencer/NumberInterpolator.js","../src/view_components/ViewContext.js","../src/action_sequencer/ActionEvent.js","../src/view_components/transition/DrawIOAnimationSheet.js","../src/view_components/transition/ActionSequencerBuilder.js","../src/EventManager.js","../src/ResourceContainer.js","../src/utilities/HTMLUtilities.js","../src/view_components/transition/TransitionTable.js","../src/Time.js","../src/view_components/ViewState.js","../src/view_components/transition/ViewStateTransitionHandler.js","../src/view_components/ViewManager.js","../src/view_components/ApplicationView.js","../src/BaseApplication.js","../src/render_mode/BaseRender.js","../src/materials/BaseShaderMaterial.js","../src/materials/BlitMaterial.js","../src/materials/AddMaterial.js","../src/materials/UnrealBloomComposeMaterial.js","../src/CameraManager.js","../src/Capabilities.js","../src/canvas_drawer/CanvasDrawer.js","../src/Configuration.js","../src/html_utilities/css_animator_states/Idle.js","../src/html_utilities/css_animator_states/Animating.js","../src/html_utilities/CSSAnimator.js","../src/components/AxisHelper.js","../src/SceneManager.js","../src/primitives/Cube.js","../src/primitives/Sphere.js","../src/primitives/Arrow.js","../src/OScreen.js","../src/materials/ScreenSpaceTextureMaterial.js","../src/PerspectiveCamera.js","../src/Debug.js","../src/materials/ClearDepthNormalMaterial.js","../src/materials/DepthNormalMaterial.js","../src/render_utilities/DepthAndNormalsRenderer.js","../src/render_utilities/Blitter.js","../src/Graphics.js","../src/materials/NormalMaterial.js","../src/render_mode/DebugNormalsRender.js","../src/KeyboardInput.js","../src/OS.js","../src/ReflectionPlaneContext.js","../src/static_batcher/GeometryBatch.js","../src/static_batcher/GeometryBatcher.js","../src/UI.js","../src/utilities/PerspectiveFrustumPointFitter.js","../src/utilities/OrthographicFrustumPointFitter.js","../src/utilities/CameraUtilities.js","../src/Initializer.js","../src/materials/SSAOMaterial.js","../src/materials/SSAOComposeMaterial.js","../src/materials/DisplayNormalTextureMaterial.js","../src/materials/BoxBlurMaterial.js","../src/render_utilities/Blurrer.js","../src/render_mode/NormalAORender.js","../src/render_mode/NormalRender.js","../src/render_mode/VRRender.js","../src/materials/GaussianBlurMaterial.js","../src/materials/LuminosityHighPassMaterial.js","../src/render_utilities/GaussianBlurrer.js","../src/render_mode/UnrealBloomRender.js","../src/OrthographicCamera.js","../src/view_components/ViewComponentManager.js","../src/RenderLoop.js","../src/Screen.js","../src/canvas_drawer/SimpleTextDrawer.js","../src/view_components/ViewComponent.js","../src/primitives/HorizontalPlane.js","../src/primitives/VerticalPlane.js","../src/utilities/ArrayUtilities.js","../src/utilities/FrustumPointFitter.js","../src/utilities/GeometryUtilities.js","../src/utilities/ImageUtilities.js","../src/utilities/MeshSampler.js","../src/utilities/ModelUtilities.js","../src/utilities/ObjectUtilities.js","../src/utilities/StringUtilities.js","../src/utilities/TimeUtilities.js","../src/components/Grid.js","../src/components/Line.js","../src/components/WorldImage.js","../src/components/Text2D.js","../src/materials/UIElementMaterial.js","../src/ui/ui_element_position/ScreenSpacePosition.js","../src/ui/ui_element_position/WorldSpacePosition.js","../src/ui/ui_element_state/UIElementState.js","../src/ui/ui_element_state/OnIdle.js","../src/ui/ui_element_state/OnMouseEnter.js","../src/ui/ui_element_state/OnMouseExit.js","../src/ui/ui_element_state/OnMouseHover.js","../src/components/UIElement.js","../src/components/UpdatableMaterialMesh.js","../src/components/sdf_text/TextGlyph.js","../src/components/sdf_text/SDFText.js","../src/materials/SDFTextMaterial.js","../src/components/sdf_text/SDFTextBatch.js","../src/action_sequencer/VectorInterpolator.js","../src/materials/MedianFilterMaterial.js","../src/render_utilities/MedianFilter.js","../src/materials/DualFilteringBlurMaterial.js","../src/materials/AlphaFilterMaterial.js","../src/render_utilities/DualFilteringBlurrer.js","../src/gpu_particles/ParticleAttribute.js","../src/gpu_particles/GPUParticleSystem.js","../src/materials/gpu_particles/ParticleStorageMaterial.js","../src/gpu_particles/ParticlePositionAttribute.js","../src/data_textures/CustomDataTexture.js","../src/data_textures/RGBDataTexture.js","../src/data_textures/RGBADataTexture.js","../src/data_textures/RGBFloatDataTexture.js","../src/data_textures/RGBAFloatDataTexture.js","../src/static_batcher/BatchedMesh.js","../src/static_batcher/MeshBatcher.js","../src/components/AudioClip.js","../src/resource_loader/AudioLoader.js","../src/resource_loader/BasisLoader.js","../src/resource_loader/CubemapLoader.js","../src/resource_loader/DAELoader.js","../src/resource_loader/FileLoader.js","../src/resource_loader/FontLoader.js","../src/resource_loader/GLTFLoader.js","../src/resource_loader/GLTFDRACOLoader.js","../src/resource_loader/HDRCubeTextureLoader.js","../src/resource_loader/JSONLoader.js","../src/resource_loader/OBJLoader.js","../src/resource_loader/PointArrayLoader.js","../src/resource_loader/RGBETextureLoader.js","../src/resource_loader/TextLoader.js","../src/resource_loader/AsyncTextureLoader.js","../src/resource_loader/TextureLoader.js","../src/resource_loader/VideoLoader.js","../src/resource_loader/ResourceBatch.js"],"sourcesContent":["\nclass Browser\n{\n init()\n {\n this.browser_name = '';\n this.agent = window.navigator.userAgent.toLowerCase();\n\n switch (true)\n {\n case this.agent.indexOf('edge') > -1:\n this.browser_name = 'edge_ie';\n break;\n case this.agent.indexOf('edg') > -1:\n this.browser_name = 'edge_chromium';\n break;\n case this.agent.indexOf('opr') > -1 && !!window.opr:\n this.browser_name = 'opera';\n break;\n case this.agent.indexOf('chrome') > -1 && !!window.chrome:\n this.browser_name = 'chrome';\n break;\n case this.agent.indexOf('trident') > -1:\n this.browser_name = 'iexplorer';\n break;\n case this.agent.indexOf('firefox') > -1:\n this.browser_name = 'firefox';\n break;\n case this.agent.indexOf('safari') > -1:\n this.browser_name = 'safari';\n break;\n default:\n this.browser_name = 'other';\n break;\n }\n\n this.version = this.get_version();\n }\n\n get name()\n {\n return this.browser_name;\n }\n\n get is_safari()\n {\n return this.browser_name === 'safari';\n }\n\n get is_chrome()\n {\n return this.browser_name === 'chrome';\n }\n\n get is_edge()\n {\n return this.browser_name === 'edge_ie';\n }\n\n get is_edge_chromium()\n {\n return this.browser_name === 'edge_chromium';\n }\n\n get has_webm()\n {\n return !!(this.is_chrome || this.is_firefox || this.is_edge_chromium);\n }\n\n get has_hvec()\n {\n return this.is_safari;\n }\n\n get preferred_video_extension()\n {\n return this.has_webm ? 'webm' : this.has_hvec ? 'hvec.mp4' : 'mp4';\n }\n\n get_version()\n {\n const ua = navigator.userAgent;\n let tem = '';\n let version = 0;\n\n let M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\\/))\\/?\\s*(\\d+)/i) || [];\n\n if (/trident/i.test(M[1]))\n {\n tem = /\\brv[ :]+(\\d+)/g.exec(ua) || [];\n version = 'IE ' + (tem[1] || '');\n }\n if (M[1] === 'Chrome')\n {\n tem = ua.match(/\\b(OPR|Edge)\\/(\\d+)/);\n if (tem != null) version = tem.slice(1).join(' ').replace('OPR', 'Opera');\n }\n\n M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, '-?'];\n if ((tem = ua.match(/version\\/(\\d+(\\.\\d+)?)/i)) != null) M.splice(1, 1, tem[1]);\n\n version = M.join(' ');\n\n return Number(version.split(' ')[1]);\n }\n}\n\nconst browser = new Browser();\nexport { browser as Browser };\n","class Validation\n{\n constructor()\n {}\n\n static is_int(n)\n {\n return Number(n) === n && n % 1 === 0;\n }\n\n static is_float(n)\n {\n return Number(n) === n && n % 1 !== 0;\n }\n\n static is_number(n)\n {\n return this.is_int(n) || this.is_float(n);\n }\n\n static is_json(str)\n {\n try\n {\n JSON.parse(str);\n }\n catch (e)\n {\n return false;\n }\n\n return true;\n }\n}\n\nexport { Validation };\n","import { Browser } from '../Browser';\r\nimport { Validation } from '../utilities/Validation';\r\n\r\nclass AbstractLoader\r\n{\r\n constructor(resource_id, url, size = 1)\r\n {\r\n this.resource_id = resource_id;\r\n this.url = url;\r\n this.loaded_bytes = 0;\r\n this.total_bytes = size;\r\n\r\n this.has_finished = false;\r\n this.has_error = false;\r\n this.error_message = 'none';\r\n }\r\n\r\n __update_downloaded_bytes(loaded, total)\r\n {\r\n loaded = Validation.is_number(loaded) ? loaded : 1;\r\n total = Validation.is_number(total) ? total : 1;\r\n\r\n this.loaded_bytes = loaded;\r\n\r\n if (total > 0)\r\n {\r\n this.total_bytes = total;\r\n }\r\n\r\n if (this.loaded_bytes > this.total_bytes)\r\n {\r\n console.warn('Total bytes is smaller than loaded ones. Please set total bytes by hand to:', this.url);\r\n }\r\n }\r\n\r\n __loading_ended()\r\n {\r\n this.has_finished = true;\r\n }\r\n\r\n __set_error(message)\r\n {\r\n this.has_error = true;\r\n this.error_message = message;\r\n }\r\n\r\n print_error()\r\n {\r\n console.error('Error while loading ' + this.resource_id + '\\n\\t path: ' + this.url + '\\n\\t\\t' + this.error_message);\r\n }\r\n\r\n load(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n const cache = Browser.is_safari ? 'no-cache' : 'default';\r\n\r\n fetch(this.url, {\r\n method: 'GET', // *GET, POST, PUT, DELETE, etc.\r\n mode: 'cors', // no-cors, *cors, same-origin\r\n cache: cache, // *default, no-cache, reload, force-cache, only-if-cached\r\n credentials: 'same-origin', // include, *same-origin, omit\r\n redirect: 'follow' // manual, *follow, error\r\n })\r\n .then(this.on_progress.bind(this, resource_container))\r\n .catch(this.__on_error.bind(this));\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n\r\n async on_progress(resource_container, response)\r\n {\r\n const response_clone = response.clone();\r\n const reader = response.body.getReader();\r\n\r\n // Step 2: get total length\r\n const contentLength = +response.headers.get('Content-Length');\r\n\r\n // Step 3: read the data\r\n let receivedLength = 0; // received that many bytes at the moment\r\n\r\n while (true)\r\n {\r\n const { done, value } = await reader.read();\r\n\r\n if (done)\r\n {\r\n break;\r\n }\r\n\r\n receivedLength += value.length;\r\n\r\n this.__update_downloaded_bytes(receivedLength, contentLength);\r\n // console.log(`Received ${receivedLength} of ${contentLength}`);\r\n }\r\n\r\n this.on_preloaded_finished(resource_container, response_clone);\r\n }\r\n\r\n on_preloaded_finished(resource_container, response)\r\n {\r\n }\r\n\r\n __on_error(data)\r\n {\r\n console.error(data);\r\n }\r\n}\r\n\r\nexport { AbstractLoader };\r\n","import { Vector3 } from 'three';\n\nclass OMath\n{\n constructor()\n {}\n\n static linear_map(value,\n from_range_start_value,\n from_range_end_value,\n to_range_start_value,\n to_range_end_value)\n {\n return ((value - from_range_start_value) / (from_range_end_value - from_range_start_value)) * (to_range_end_value - to_range_start_value) + to_range_start_value;\n }\n\n static between(value, min, max)\n {\n return (value >= min && value <= max);\n }\n\n static mod(number, divisor)\n {\n return ((number % divisor) + divisor) % divisor;\n }\n\n static rgb_to_hex(rgb)\n {\n rgb.r = Math.round(rgb.r * 255).toString(16);\n rgb.g = Math.round(rgb.g * 255).toString(16);\n rgb.b = Math.round(rgb.b * 255).toString(16);\n\n if (rgb.r.length === 1)\n {\n rgb.r = '0' + rgb.r;\n }\n if (rgb.g.length === 1)\n {\n rgb.g = '0' + rgb.g;\n }\n if (rgb.b.length === 1)\n {\n rgb.b = '0' + rgb.b;\n }\n\n return '#' + rgb.r + rgb.g + rgb.b;\n }\n\n static project_points_on_plane(points, plane)\n {\n const projected_point = new Vector3();\n const points_on_plane = [];\n for (let i = 0; i < points.length; i++)\n {\n plane.projectPoint(points[i], projected_point);\n points_on_plane.push(projected_point.clone());\n }\n\n return points_on_plane;\n }\n\n static matrix4_lerp(from, to, target, t)\n {\n for (let i = 0; i < 16; i++)\n {\n target.elements[i] = this.lerp(from.elements[i], to.elements[i], t);\n }\n }\n\n static equals(x1, x2)\n {\n return Math.abs(x1 - x2) < 0.000001;\n }\n\n static lerp(x, y, t)\n {\n return (1 - t) * x + t * y;\n }\n\n static clamp(value, min, max)\n {\n return Math.max(min, Math.min(max, value));\n }\n\n static euclideanModulo(n, m)\n {\n return ((n % m) + m) % m;\n }\n\n static pingpong(x, length = 1)\n {\n return length - Math.abs(OMath.euclideanModulo(x, length * 2) - length);\n }\n\n static degToRad(degrees)\n {\n return degrees * (Math.PI / 180);\n }\n\n static radToDeg(radians)\n {\n return radians * (180 / Math.PI);\n }\n\n static deg_to_rad(degrees)\n {\n return degrees * (Math.PI / 180);\n }\n\n static rad_to_deg(radians)\n {\n return radians * (180 / Math.PI);\n }\n\n static perspective_divide(v)\n {\n v.x /= v.w;\n v.y /= v.w;\n v.z /= v.w;\n return v;\n }\n\n static points_average(points)\n {\n const center = points[0].clone();\n for (let i = 1; i < points.length; i++)\n {\n center.add(points[i]);\n }\n center.multiplyScalar(1 / points.length);\n return center;\n }\n\n static get_random_color()\n {\n const arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'a', 'b', 'c', 'd', 'e', 'f'];\n\n let col = '#';\n col += arr[Math.floor(Math.random() * 16)];\n col += arr[Math.floor(Math.random() * 16)];\n\n col += arr[Math.floor(Math.random() * 16)];\n col += arr[Math.floor(Math.random() * 16)];\n\n col += arr[Math.floor(Math.random() * 16)];\n col += arr[Math.floor(Math.random() * 16)];\n return col;\n }\n\n static saturate(x)\n {\n return OMath.clamp(x, 0, 1);\n }\n}\n\nexport { OMath };\n","\nimport { OMath } from '../utilities/OMath';\n\nclass ActionSequencer\n{\n constructor(context)\n {\n this.elapsed_time = -0.00001;\n this.playback_speed = this.__get_playback_speed();\n this.playing = false;\n\n this.action_events = [];\n this.context = context;\n\n this.initial_context = JSON.parse(JSON.stringify(context));\n\n this.tmp_t = 0;\n\n this.channels = {};\n\n const channel_names = Object.keys(context);\n for (let i = 0; i < channel_names.length; i++)\n {\n this.channels[channel_names[i]] = [];\n }\n\n this.duration = 0;\n }\n\n play()\n {\n this.playing = true;\n }\n\n stop()\n {\n this.playing = false;\n }\n\n reset()\n {\n this.elapsed_time = -0.00001;\n }\n\n skip()\n {\n const duration = this.get_duration();\n this.__play_clips(this.elapsed_time, duration + 0.0001);\n this.elapsed_time = duration;\n }\n\n update(delta_time)\n {\n if (this.playing)\n {\n this.__play_clips(this.elapsed_time, this.elapsed_time + delta_time * this.playback_speed);\n this.elapsed_time = this.elapsed_time + delta_time * this.playback_speed;\n }\n }\n\n set_progress(time)\n {\n this.elapsed_time = OMath.clamp(time, 0, this.duration);\n this.__play_clips(this.elapsed_time, this.elapsed_time);\n }\n\n set_normalized_progress(t)\n {\n this.elapsed_time = OMath.clamp(t, 0, 1) * this.duration;\n this.__play_clips(this.elapsed_time, this.elapsed_time);\n }\n\n get_progress()\n {\n return OMath.clamp(this.elapsed_time / this.get_duration(), 0, 1);\n }\n\n is_finished()\n {\n return this.elapsed_time > this.get_duration();\n }\n\n add_action_event(trigger_time, action)\n {\n this.action_events.push({\n trigger_time: trigger_time,\n action: action\n });\n\n this.duration = Math.max(this.duration, trigger_time);\n }\n\n add_action_interpolator(from, to, interpolator, use_dynamic_from_value = false)\n {\n if (use_dynamic_from_value)\n {\n const keyframes = this.channels[interpolator.attribute_name];\n\n if (keyframes === undefined)\n {\n console.error(`${interpolator.attribute_name} missing in initial state data.`);\n }\n\n if (keyframes.length === 0)\n {\n interpolator.from = this.initial_context[interpolator.attribute_name];\n }\n else\n {\n interpolator.from = keyframes[keyframes.length - 1].interpolator.to;\n }\n }\n\n const keyframe = {\n from: from,\n to: to,\n interpolator: interpolator\n };\n\n this.duration = Math.max(this.duration, to);\n this.channels[interpolator.attribute_name].push(keyframe);\n }\n\n get_current_target_value(name)\n {\n const keyframe = this.__get_current_keyframe(name, this.elapsed_time);\n\n if (this.elapsed_time < keyframe.from)\n {\n return keyframe.interpolator.evaluate(0);\n }\n\n return keyframe.interpolator.evaluate(1);\n }\n\n get_current_starting_value(name)\n {\n const keyframe = this.__get_current_keyframe(name, this.elapsed_time);\n\n return keyframe.interpolator.evaluate(0);\n }\n\n get_current_progress(name)\n {\n const keyframe = this.__get_current_keyframe(name, this.elapsed_time);\n const t = this.__linear_map_01(this.elapsed_time, keyframe.from, keyframe.to);\n\n return keyframe.interpolator.easing_function(t);\n }\n\n get_duration()\n {\n return this.duration;\n }\n\n __play_clips(from, to)\n {\n for (let i = 0; i < this.action_events.length; i++)\n {\n if (this.action_events[i].trigger_time > from - Number.EPSILON &&\n this.action_events[i].trigger_time < to + Number.EPSILON)\n {\n // console.log(\"Play event: \" + this.action_events[i].action.constructor.name + \" at \"+ this.action_events[i].trigger_time);\n this.action_events[i].action.trigger();\n }\n }\n const channel_names = Object.keys(this.initial_context);\n\n for (let i = 0; i < channel_names.length; i++)\n {\n const name = channel_names[i];\n const keyframe = this.__get_current_keyframe(name, from);\n\n this.context[name] = this.evaluate_keyframe(keyframe, from);\n }\n }\n\n evaluate_keyframe(keyframe, time)\n {\n this.tmp_t = this.__linear_map_01(time, keyframe.from, keyframe.to);\n\n return keyframe.interpolator.evaluate(OMath.clamp(this.tmp_t, 0, 1));\n }\n\n get_keyframes(channel_name)\n {\n return this.channels[channel_name];\n }\n\n is_channel_redefined(channel_name)\n {\n for (let i = 0; i < this.channels[channel_name].length; i++)\n {\n const keyframe = this.channels[channel_name][i];\n\n if (keyframe.interpolator.initial)\n {\n return false;\n }\n }\n\n return true;\n }\n\n __linear_map_01(value,\n from_range_start_value,\n from_range_end_value)\n {\n return OMath.saturate(((value - from_range_start_value) / (from_range_end_value - from_range_start_value)) * (1 - 0) + 0);\n }\n\n __get_current_keyframe(channel_name, time)\n {\n let current = undefined;\n\n const keyframes = this.channels[channel_name];\n\n for (let i = 0; i < keyframes.length; i++)\n {\n const keyframe = keyframes[i];\n\n if (time >= keyframe.from && time <= keyframe.to)\n {\n current = keyframe;\n return current;\n }\n }\n\n let min = Infinity;\n\n for (let i = 0; i < keyframes.length; i++)\n {\n const keyframe = keyframes[i];\n const distance = Math.abs(keyframe.to - time);\n\n if (distance < min)\n {\n current = keyframe;\n min = distance;\n }\n }\n\n return current;\n }\n\n __get_playback_speed()\n {\n const url_params = new URLSearchParams(window.location.search);\n\n const transitions_velocity = url_params.get('transitions_velocity');\n\n if (transitions_velocity)\n {\n return Number(transitions_velocity);\n }\n else\n {\n return 1;\n }\n }\n}\n\nexport { ActionSequencer };\n","class EasingFunctions\n{\n constructor()\n {}\n\n static linear(x)\n {\n return x;\n }\n\n static triangular(x)\n {\n return 1 - Math.abs((x * 2) % (1 * 2) - 1);\n }\n\n static ease_in_sine(x)\n {\n return 1 - Math.cos(x * 3.1415926 / 2);\n }\n\n static ease_out_sine(x)\n {\n return Math.sin(x * 3.1415926 / 2);\n }\n\n static ease_in_out_sine(x)\n {\n return -(Math.cos(3.1415926 * x) - 1) / 2;\n }\n\n static ease_in_cubic(x)\n {\n return x * x * x;\n }\n\n static ease_out_cubic(x)\n {\n return 1 - Math.pow(1 - x, 3);\n }\n\n static ease_in_out_cubic(x)\n {\n return x < 0.5\n ? 4 * x * x * x\n : 1 - Math.pow(-2 * x + 2, 3) / 2;\n }\n\n static ease_in_quad(x)\n {\n return x * x;\n }\n\n static ease_out_quad(x)\n {\n return 1 - (1 - x) * (1 - x);\n }\n\n static ease_in_out_quad(x)\n {\n return x < 0.5\n ? 2 * x * x\n : 1 - Math.pow(-2 * x + 2, 2) / 2;\n }\n\n static ease_in_quart(x)\n {\n return x * x * x * x;\n }\n\n static ease_out_quart(x)\n {\n return 1 - Math.pow(1 - x, 4);\n }\n\n static ease_in_out_quart(x)\n {\n return x < 0.5\n ? 8 * x * x * x * x\n : 1 - Math.pow(-2 * x + 2, 4) / 2;\n }\n\n static ease_in_quint(x)\n {\n return x * x * x * x * x;\n }\n\n static ease_out_quint(x)\n {\n return 1 - Math.pow(1 - x, 5);\n }\n\n static ease_in_out_quint(x)\n {\n return x < 0.5\n ? 16 * x * x * x * x * x\n : 1 - Math.pow(-2 * x + 2, 5) / 2;\n }\n\n static ease_in_expo(x)\n {\n return x === 0 ? 0 : Math.pow(2, 10 * x - 10);\n }\n\n static ease_out_expo(x)\n {\n return x === 1 ? 1 : 1 - Math.pow(2, -10 * x);\n }\n\n static ease_in_out_expo(x)\n {\n return x === 0\n ? 0\n : x === 1\n ? 1\n : x < 0.5\n ? Math.pow(2, 20 * x - 10) / 2\n : (2 - Math.pow(2, -20 * x + 10)) / 2;\n }\n\n static ease_in_circ(x)\n {\n return 1 - Math.sqrt(1 - Math.pow(x, 2));\n }\n\n static ease_out_circ(x)\n {\n return Math.sqrt(1 - Math.pow(x - 1, 2));\n }\n\n static ease_in_out_circ(x)\n {\n return x < 0.5\n ? (1 - Math.sqrt(1 - Math.pow(2 * x, 2))) / 2\n : (Math.sqrt(1 - Math.pow(-2 * x + 2, 2)) + 1) / 2;\n }\n\n static ease_in_back(x)\n {\n return 2.7015 * x * x * x - 1.7015 * x * x;\n }\n\n static ease_out_back(x)\n {\n return 1 + 2.7015 * Math.pow(x - 1, 3) + 1.7015 * Math.pow(x - 1, 2);\n }\n\n static ease_in_out_back(x)\n {\n return x < 0.5\n ? (Math.pow(2 * x, 2) * ((2.5949095 + 1) * 2 * x - 2.5949095)) / 2\n : (Math.pow(2 * x - 2, 2) * ((2.5949095 + 1) * (x * 2 - 2) + 2.5949095) + 2) / 2;\n }\n\n static ease_in_elastic(x)\n {\n const c4 = (2 * Math.PI) / 3;\n\n return x === 0\n ? 0\n : x === 1\n ? 1\n : -Math.pow(2, 10 * x - 10) * Math.sin((x * 10 - 10.75) * c4);\n }\n\n static ease_out_elastic(x)\n {\n return x === 0\n ? 0\n : x === 1\n ? 1\n : Math.pow(2, -10 * x) * Math.sin((x * 10 - 0.75) * 2.0943950) + 1;\n }\n\n static ease_in_out_elastic(x)\n {\n return x === 0\n ? 0\n : x === 1\n ? 1\n : x < 0.5\n ? -(Math.pow(2, 20 * x - 10) * Math.sin((20 * x - 11.125) * 1.3962633)) / 2\n : Math.pow(2, -20 * x + 10) * Math.sin((20 * x - 11.125) * 1.3962633) / 2 + 1;\n }\n\n static ease_in_bounce(x)\n {\n return 1 - this.ease_out_bounce(1 - x);\n }\n\n static ease_out_bounce(x)\n {\n const n1 = 7.5625;\n const d1 = 2.75;\n\n if (x < 1 / d1)\n {\n return n1 * x * x;\n }\n else if (x < 2 / d1)\n {\n return n1 * (x -= 1.5 / d1) * x + 0.75;\n }\n else if (x < 2.5 / d1)\n {\n return n1 * (x -= 2.25 / d1) * x + 0.9375;\n }\n else\n {\n return n1 * (x -= 2.625 / d1) * x + 0.984375;\n }\n }\n\n static ease_in_out_bounce(x)\n {\n return x < 0.5\n ? (1 - this.ease_out_bounce(1 - 2 * x)) / 2\n : (1 + this.ease_out_bounce(2 * x - 1)) / 2;\n }\n\n static heartbeat(t)\n {\n return 1.0 - Math.pow(Math.abs(Math.sin(t + 1.0)), 63.0) * Math.sign(Math.sin(t)) * Math.sin(t + 1.5 + 1.0) * 0.8;\n }\n}\n\nexport { EasingFunctions };\n","import { EasingFunctions } from '../utilities/EasingFunctions';\n\nclass ActionInterpolator\n{\n constructor(easing_function = 'linear')\n {\n this.easing_function = undefined;\n\n if (typeof easing_function === 'string')\n {\n this.easing_function = EasingFunctions[easing_function];\n }\n else\n {\n this.easing_function = easing_function;\n }\n }\n\n update(context, t)\n {\n\n }\n}\n\nexport { ActionInterpolator };\n","import { ActionInterpolator } from './ActionInterpolator';\nimport { OMath } from '../utilities/OMath';\n\nclass NumberInterpolator extends ActionInterpolator\n{\n constructor(attribute_name, from = 0, to = 1, initial = false, easing_function = 'linear')\n {\n super(easing_function);\n\n this.attribute_name = attribute_name;\n this.from = from;\n this.to = to;\n this.initial = initial;\n }\n\n update(context, t)\n {\n context[this.attribute_name] = OMath.lerp(this.from, this.to, this.easing_function(t));\n }\n\n evaluate(t)\n {\n return OMath.lerp(this.from, this.to, this.easing_function(t));\n }\n}\n\nexport { NumberInterpolator };\n","class ViewContext\n{\n constructor()\n {\n this.app = undefined;\n }\n\n set_app(app)\n {\n this.app = app;\n }\n}\n\nconst view_context = new ViewContext();\nexport { view_context as ViewContext };\n","import { ViewContext } from '../view_components/ViewContext';\n\nclass ActionEvent\n{\n constructor(name, method, args)\n {\n this.name = name;\n this.method = method;\n this.args = args;\n }\n\n trigger()\n {\n ViewContext.app[this.name][this.method](...this.args.split(','));\n }\n}\n\nexport { ActionEvent };\n","class DrawIOAnimationSheet\n{\n constructor()\n {\n\n }\n\n parse(xml_document)\n {\n const doc = new DOMParser().parseFromString(xml_document, 'text/xml');\n\n const animation_nodes = doc.querySelectorAll('mxGeometry');\n\n const animation_tracks = [];\n const triggers = [];\n\n for (let i = 0; i < animation_nodes.length; i++)\n {\n const node = animation_nodes[i];\n const parent_node = node.parentElement;\n const data = parent_node.getAttribute('value');\n\n const x_pos = this.get_node_x_position(node);\n\n const from = x_pos / 100;\n const duration = parseFloat(node.getAttribute('width')) / 100;\n\n // is trigger\n if (parent_node.getAttribute('style').includes('rhombus;'))\n {\n const split_data = data.split('.');\n const trigger_name = split_data[0];\n const trigger_method = split_data[1];\n\n triggers.push({\n name: trigger_name,\n method: trigger_method,\n at_time: from + duration * 0.5\n });\n }\n\n const valid_element = parent_node.getAttribute('style').includes('rounded=0;') &&\n !parent_node.getAttribute('style').includes('text;');\n\n if (valid_element && data !== '' && !data.includes(' '))\n {\n const split_data = data.split('=');\n\n const attribute_name = split_data[0];\n\n const value_data = split_data[1].split('--');\n const to_value = parseFloat(value_data[0]);\n const easing_function = value_data[1];\n\n if (split_data.length !== 2)\n {\n console.error('DrawIO data is malformed:', data);\n }\n\n if (value_data.length !== 2)\n {\n console.error('DrawIO data is malformed:', data);\n }\n\n animation_tracks.push({\n attribute_name: attribute_name,\n from_time: from,\n to_time: from + duration,\n to_value: to_value,\n easing_function: easing_function\n });\n }\n }\n\n animation_tracks.sort((a, b) =>\n {\n return a.from_time - b.from_time;\n });\n return {\n animation_tracks: animation_tracks,\n triggers: triggers\n };\n }\n\n get_node_x_position(node)\n {\n const x_pos = node.getAttribute('x');\n return x_pos === null ? 0 : parseFloat(x_pos);\n }\n}\n\nexport { DrawIOAnimationSheet };\n","import { ActionSequencer } from '../../action_sequencer/ActionSequencer';\nimport { NumberInterpolator } from '../../action_sequencer/NumberInterpolator';\nimport { ActionEvent } from '../../action_sequencer/ActionEvent';\nimport { DrawIOAnimationSheet } from './DrawIOAnimationSheet';\n\nclass ActionSequencerBuilder\n{\n constructor(default_state_data)\n {\n this.default_state_data = default_state_data;\n }\n\n from_animation_sheet(animation_data, current_context, initial_context)\n {\n initial_context = initial_context || this.default_state_data;\n const tracks = animation_data.animation_tracks;\n const triggers = animation_data.triggers;\n\n const initial_tracks = this.state_to_tracks(this.default_state_data, this.get_longest_time(animation_data.animation_tracks));\n\n for (let i = 0; i < initial_tracks.length; i++)\n {\n if (tracks.find(element => element.attribute_name === initial_tracks[i].attribute_name) === undefined)\n {\n tracks.push(initial_tracks[i]);\n }\n }\n\n const sequencer = new ActionSequencer(current_context);\n\n for (let i = 0; i < tracks.length; i++)\n {\n const t = tracks[i];\n const interpolator = new NumberInterpolator(\n t.attribute_name,\n current_context[t.attribute_name],\n t.to_value,\n t.initial,\n t.easing_function\n );\n\n sequencer.add_action_interpolator(t.from_time, t.to_time, interpolator, true);\n }\n\n for (let i = 0; i < triggers.length; i++)\n {\n const t = triggers[i];\n const action_event = new ActionEvent(t.name, t.method, t.args);\n sequencer.add_action_event(t.at_time, action_event);\n }\n\n return sequencer;\n }\n\n state_to_tracks(state, longest_time)\n {\n const tracks = [];\n\n const keys = Object.keys(state);\n\n for (let i = 0; i < keys.length; i++)\n {\n tracks.push({\n attribute_name: keys[i],\n from_time: 0,\n to_time: longest_time < 1 ? longest_time : 1,\n to_value: state[keys[i]],\n initial: true,\n easing_function: 'ease_in_out_cubic'\n });\n }\n\n return tracks;\n }\n\n from_draw_io(xml, context)\n {\n const transition_data = (new DrawIOAnimationSheet()).parse(xml);\n const tracks = transition_data.animation_tracks;\n const triggers = transition_data.triggers;\n const sequencer = new ActionSequencer(context);\n\n for (let i = 0; i < tracks.length; i++)\n {\n const t = tracks[i];\n const interpolator = new NumberInterpolator(\n t.attribute_name,\n context[t.attribute_name],\n t.to_value,\n t.initial,\n t.easing_function\n );\n\n sequencer.add_action_interpolator(t.from_time, t.to_time, interpolator, true);\n }\n\n for (let i = 0; i < triggers.length; i++)\n {\n const t = triggers[i];\n const action_event = new ActionEvent(t.name, t.method);\n sequencer.add_action_event(t.at_time, action_event);\n }\n\n return sequencer;\n }\n\n get_longest_time(tracks)\n {\n let longest_time = -1;\n\n for (let i = 0; i < tracks.length; i++)\n {\n const track = tracks[i];\n\n const track_time = track.to_time;\n\n longest_time = track_time > longest_time ? track_time : longest_time;\n }\n\n return longest_time;\n }\n}\n\nexport { ActionSequencerBuilder };\n","class EventManager\n{\n init()\n {\n this.queue = {};\n\n this.zoom_changed_evt = 'zoom_changed';\n this.store_clickd_evt = 'store_clicked';\n this.point_selected_evt = 'point_selected';\n this.config_changed = 'config_changed';\n\n this.path_substep_completed = 'path_substep_completed';\n this.path_completed = 'path_completed';\n this.go_to_store_requested_evt = 'go_to_store_requested';\n\n this.resource_loaded_evt = 'resource_loaded';\n this.service_clicked_evt = 'service_clicked';\n this.unit_pos_updated_evt = 'unit_position_updated';\n\n this.floor_changed_evt = 'floor_changed';\n\n this.on_enter_floor_navigation = 'on_enter_floor_navigation';\n this.on_exit_floor_navigation = 'on_exit_floor_navigation';\n\n this.on_enter_floor_selection = 'on_enter_floor_selection';\n this.on_exit_floor_selection = 'on_exit_floor_selection';\n\n this.on_enter_outside_navigation = 'on_enter_outside_navigation';\n this.on_exit_outside_navigation = 'on_exit_outside_navigation';\n\n this.step_selected_evt = 'step_selected';\n }\n\n fire(event, payload)\n {\n const queue = this.queue[event];\n\n if (queue === undefined)\n {\n return;\n }\n let i = queue.length;\n while (i--)\n {\n queue[i](payload);\n }\n }\n\n on(event, callback)\n {\n if (typeof this.queue[event] === 'undefined')\n {\n this.queue[event] = [];\n }\n\n this.queue[event].push(callback);\n }\n\n fire_zoom_changed(zoom)\n {\n this.fire(this.zoom_changed_evt, zoom);\n }\n\n fire_store_selected(store_id)\n {\n this.fire(this.store_clickd_evt, store_id);\n }\n\n fire_point_selected(hit_data)\n {\n this.fire(this.point_selected_evt, hit_data);\n }\n\n fire_config_changed()\n {\n this.fire(this.config_changed);\n }\n\n fire_path_substep_completed(step_number)\n {\n this.fire(this.path_substep_completed, step_number);\n }\n\n fire_path_completed()\n {\n this.fire(this.path_completed);\n }\n\n fire_step_selected(step_index)\n {\n this.fire(this.step_selected_evt, step_index);\n }\n\n fire_go_to_store_requested(store_id)\n {\n this.fire(this.go_to_store_requested_evt, store_id);\n }\n\n fire_resource_loaded(resource)\n {\n this.fire(this.resource_loaded_evt, resource);\n }\n\n fire_service_clicked(service)\n {\n this.fire(this.service_clicked_evt, service);\n }\n\n fire_unit_position_updated(unit_data)\n {\n this.fire(this.unit_pos_updated_evt, unit_data);\n }\n\n fire_floor_switched(floor_id)\n {\n this.fire(this.floor_changed_evt, floor_id);\n }\n\n fire_on_enter_floor_navigation(state)\n {\n this.fire(this.on_enter_floor_navigation, state);\n }\n\n fire_on_exit_floor_navigation(state)\n {\n this.fire(this.on_exit_floor_navigation, state);\n }\n\n fire_on_enter_floor_selection(state)\n {\n this.fire(this.on_enter_floor_selection, state);\n }\n\n fire_on_exit_floor_selection(state)\n {\n this.fire(this.on_exit_floor_selection, state);\n }\n\n fire_on_enter_outside_navigation(state)\n {\n this.fire(this.on_enter_outside_navigation, state);\n }\n\n fire_on_exit_outside_navigation(state)\n {\n this.fire(this.on_exit_outside_navigation, state);\n }\n}\n\nconst event_manager = new EventManager();\nexport { event_manager as EventManager };\n","import { EventManager } from './EventManager';\n\nclass ResourceContainer\n{\n init()\n {\n this.resources = {};\n this.resources_by_url = {};\n }\n\n set_resource(name, url, resource)\n {\n const urls = Object.keys(this.resources_by_url);\n\n if (urls.includes(url))\n {\n this.resources[name] = this.resources_by_url[url];\n }\n else\n {\n this.resources[name] = resource;\n this.resources_by_url[url] = resource;\n }\n\n EventManager.fire_resource_loaded({ name: name, value: resource });\n }\n\n get_resource(name)\n {\n return this.resources[name];\n }\n\n get(name)\n {\n return this.resources[name];\n }\n}\n\nconst resource_container = new ResourceContainer();\nexport { resource_container as ResourceContainer };\n","class HTMLUtilities\n{\n static load_images(container)\n {\n const images = container.querySelectorAll('img');\n\n for (let i = 0; i < images.length; i++)\n {\n const image = images[i];\n\n if (image.dataset.src)\n {\n image.src = image.dataset.src;\n }\n }\n\n const image_objects = container.querySelectorAll('object');\n\n for (let i = 0; i < image_objects.length; i++)\n {\n const image_object = image_objects[i];\n\n if (image_object.dataset.src)\n {\n image_object.data = image_object.dataset.src;\n }\n }\n }\n\n static load_videos(container)\n {\n const videos = container.querySelectorAll('video');\n\n for (let i = 0; i < videos.length; i++)\n {\n const video = videos[i];\n\n if (video.dataset.src)\n {\n video.src = video.dataset.src;\n }\n }\n }\n}\n\nexport { HTMLUtilities };\n","import { ActionSequencerBuilder } from './ActionSequencerBuilder';\n\nclass TransitionTable\n{\n constructor()\n {\n this.transitions = [];\n this.default_state_data = {};\n }\n\n get(from_state_name, to_state_name, current_context)\n {\n for (let i = 0; i < this.transitions.length; i++)\n {\n if (this.transitions[i].from === from_state_name && this.transitions[i].to === to_state_name)\n {\n const action_sequencer = new ActionSequencerBuilder(this.default_state_data).from_animation_sheet(this.transitions[i].data, current_context);\n return action_sequencer;\n }\n }\n\n for (let i = 0; i < this.transitions.length; i++)\n {\n if (this.transitions[i].to === to_state_name && this.transitions[i].from === undefined)\n {\n const action_sequencer = new ActionSequencerBuilder(this.default_state_data).from_animation_sheet(this.transitions[i].data, current_context);\n return action_sequencer;\n }\n }\n\n console.error('TransitionTable.get no data found for: ', from_state_name, to_state_name);\n return undefined;\n }\n\n add_transitions(transitions)\n {\n for (let i = 0; i < transitions.length; i++)\n {\n this.transitions.push(transitions[i]);\n }\n }\n\n set_transitions(transitions)\n {\n this.transitions = transitions;\n }\n\n set_default_state_data(default_state_data)\n {\n this.default_state_data = default_state_data;\n }\n}\n\nexport { TransitionTable };\n","import { Vector2 } from 'three';\nimport { Clock } from 'three';\n\nclass Time\n{\n constructor()\n {\n this.delta_buffer = [0.016, 0.016, 0.016, 0.016, 0.016, 0.016, 0.016, 0.016, 0.016, 0.016];\n }\n\n init()\n {\n this.___time = new Clock();\n this.__raw_delta_time = 0;\n this.__elapsed_time = 0;\n this.__allocated_time = new Vector2(0, 0);\n\n this.delta_time = 0.016;\n }\n\n get elapsed_time()\n {\n return this.__elapsed_time;\n }\n\n get shader_time()\n {\n this.__allocated_time.x = this.delta_time;\n this.__allocated_time.y = this.elapsed_time;\n return this.__allocated_time;\n }\n\n __update()\n {\n this.__raw_delta_time = this.___time.getDelta();\n this.__elapsed_time = this.___time.getElapsedTime();\n\n this.delta_buffer.shift();\n this.delta_buffer.push(this.__raw_delta_time < 0.32 ? this.__raw_delta_time : 0.032);\n\n this.__calculate_delta_time();\n }\n\n __calculate_delta_time()\n {\n this.delta_time = 0;\n\n for (let i = 0; i < this.delta_buffer.length; i++)\n {\n this.delta_time += this.delta_buffer[i];\n }\n\n this.delta_time = this.delta_time / this.delta_buffer.length;\n }\n}\n\nconst time = new Time();\nexport { time as Time };\n","class ViewState\n{\n constructor(name)\n {\n this.name = name;\n }\n\n start()\n {\n }\n\n show()\n {\n }\n\n hide()\n {\n }\n\n before_enter()\n {\n }\n\n on_enter()\n {\n }\n\n update()\n {\n }\n\n update_enter_transition(global_view_data, transition_progress, action_sequencer)\n {\n // Backward compatibility. It will be removed in future releases.\n this.update_transition(global_view_data, transition_progress, action_sequencer);\n }\n\n update_exit_transition(global_view_data, transition_progress, action_sequencer)\n {\n }\n\n // Deprecated\n update_transition(global_view_data, transition_progress, action_sequencer)\n {\n }\n\n before_exit()\n {\n }\n\n on_exit()\n {\n }\n}\n\nexport { ViewState };\n","import { Time } from '../../Time';\nimport { ViewState } from '../ViewState';\n\nclass ViewStateTransitionHandler\n{\n constructor(transition_table)\n {\n this.last_state = new ViewState();\n this.current_state = new ViewState();\n\n this.default_state_data = {};\n this.current_state_data = {};\n\n this.transition_table = transition_table;\n\n this.transitioning = false;\n }\n\n go_to_state(state, skip = false)\n {\n if (this.transitioning)\n {\n this.__exit_last_state();\n }\n\n this.last_state = this.current_state;\n this.current_state = state;\n\n this.last_state.before_exit();\n this.current_state.show();\n\n this.action_sequencer = this.transition_table.get(this.last_state.name, this.current_state.name, this.current_state_data);\n this.current_state.before_enter();\n\n this.action_sequencer.play();\n\n this.transitioning = true;\n\n if (skip)\n {\n this.action_sequencer.skip();\n this.update();\n }\n }\n\n update()\n {\n if (this.transitioning)\n {\n this.__update_transitions();\n\n if (this.action_sequencer.is_finished())\n {\n this.transitioning = false;\n\n this.__update_transitions();\n\n this.__exit_last_state();\n\n this.current_state.on_enter();\n }\n }\n else\n {\n this.current_state.update();\n }\n }\n\n set_state(state)\n {\n this.current_state = state;\n }\n\n set_default_state_data(default_state_data)\n {\n Object.assign(this.default_state_data, default_state_data);\n Object.assign(this.current_state_data, default_state_data);\n }\n\n __update_transitions()\n {\n this.action_sequencer.update(Time.delta_time);\n this.last_state.update_exit_transition(this.current_state_data, this.action_sequencer.get_progress(), this.action_sequencer);\n this.current_state.update_enter_transition(this.current_state_data, this.action_sequencer.get_progress(), this.action_sequencer);\n }\n\n __exit_last_state()\n {\n if (this.last_state.name !== this.current_state.name)\n {\n this.last_state.hide();\n }\n\n this.last_state.on_exit();\n }\n}\n\nexport { ViewStateTransitionHandler };\n","import { TransitionTable } from './transition/TransitionTable';\nimport { ViewStateTransitionHandler } from './transition/ViewStateTransitionHandler';\n\nclass ViewManager\n{\n constructor()\n {\n this.views = [];\n\n this.transition_table = new TransitionTable();\n this.transition_handler = new ViewStateTransitionHandler(this.transition_table);\n\n this.view_change_subscribers = [];\n\n this.browser_title_suffix = '';\n }\n\n update()\n {\n this.transition_handler.update();\n\n this.__set_views_opacities();\n }\n\n go_to_view(view_name, change_url = true, skip = false)\n {\n const v = this.get(view_name);\n this.transition_handler.go_to_state(v, skip);\n\n if (change_url)\n {\n this.__change_browser_url(v.url);\n this.__change_browser_title(v.url);\n }\n\n this.notify_view_change(view_name);\n }\n\n go_to_scene(scene_name, change_url = false, skip = false)\n {\n const next_view = this.get(scene_name);\n const transition_view = this.get('transition');\n\n transition_view.set_next_view(next_view);\n this.go_to_view(transition_view.name, change_url, skip);\n }\n\n subscribe_to_view_change(subscriber)\n {\n this.view_change_subscribers.push(subscriber);\n }\n\n notify_view_change(view_name)\n {\n for (let i = 0; i < this.view_change_subscribers.length; i++)\n {\n const subscriber = this.view_change_subscribers[i];\n subscriber.on_view_change(view_name);\n }\n }\n\n register_view(view)\n {\n this.views.push(view);\n }\n\n has_view(view_name)\n {\n for (let i = 0; i < this.views.length; i++)\n {\n if (this.views[i].name === view_name)\n {\n return true;\n }\n }\n return false;\n }\n\n add_transitions(transitions)\n {\n this.transition_table.add_transitions(transitions);\n }\n\n set_transitions(transitions)\n {\n this.transition_table.set_transitions(transitions);\n }\n\n set_view(view_name)\n {\n const view = this.get(view_name);\n\n this.transition_handler.set_state(view);\n }\n\n set_browser_title_suffix(title_suffix)\n {\n this.browser_title_suffix = title_suffix;\n }\n\n get_current_view()\n {\n return this.transition_handler.current_state;\n }\n\n get_view_by_name(view_name)\n {\n console.warn('DEPRECATED. Use ViewManager.get instead');\n this.get(view_name);\n }\n\n get(view_name)\n {\n for (let i = 0; i < this.views.length; i++)\n {\n if (this.views[i].name === view_name)\n {\n return this.views[i];\n }\n }\n console.error('[ViewManager.get] no view found for: ', view_name);\n return undefined;\n }\n\n get_view_by_url(url)\n {\n console.warn('DEPRECATED. Use ViewManager.get_by_url instead');\n this.get_by_url(url);\n }\n\n get_by_url(url)\n {\n for (let i = 0; i < this.views.length; i++)\n {\n if (this.views[i].url === url)\n {\n return this.views[i];\n }\n }\n console.error('[ViewManager.get_by_url] no view found for: ', url);\n return undefined;\n }\n\n set_default_state_data(default_state_data)\n {\n this.transition_table.set_default_state_data(default_state_data);\n this.transition_handler.set_default_state_data(default_state_data);\n }\n\n __change_browser_url(url)\n {\n window.history.pushState('', '', url);\n }\n\n __change_browser_title(name)\n {\n const title = this.__capitalize(name);\n\n document.title = title ? `${title} | ${this.browser_title_suffix}` : this.browser_title_suffix;\n }\n\n __set_views_opacities()\n {\n for (let i = 0; i < this.views.length; i++)\n {\n this.views[i].set_opacity(this.transition_handler.current_state_data);\n }\n }\n\n __capitalize(string)\n {\n let aux_string = string.toUpperCase().replace('/', '');\n aux_string = this.__snake_to_whitespace(aux_string);\n\n return aux_string;\n }\n\n __snake_to_whitespace(string)\n {\n return string.replace(\n /([-_][A-Z])/g,\n (group) => group\n .replace('-', ' ')\n .replace('_', ' ')\n );\n }\n}\n\nconst view_manager = new ViewManager();\nexport { view_manager as ViewManager };\n","import { ResourceContainer } from '../ResourceContainer';\nimport { HTMLUtilities } from '../utilities/HTMLUtilities';\nimport { ViewManager } from './ViewManager';\nimport { ViewState } from './ViewState';\n\nclass ApplicationView extends ViewState\n{\n constructor({ name, url, container })\n {\n super(name);\n\n this.container = container;\n this.url = url;\n\n let transition_data = ResourceContainer.get(`${name}_data`);\n\n transition_data = transition_data || {\n animation_tracks: [],\n triggers: []\n };\n\n const transitions = [\n {\n to: name,\n data: transition_data\n }\n ];\n\n ViewManager.register_view(this);\n ViewManager.add_transitions(transitions);\n }\n\n show()\n {\n this.container.classList.add('before_enter');\n this.container.classList.remove('before_exit');\n this.container.classList.remove('hidden');\n }\n\n on_enter()\n {\n this.container.classList.remove('before_enter');\n this.container.classList.remove('before_exit');\n this.container.classList.remove('hidden');\n }\n\n before_exit()\n {\n this.container.classList.add('before_exit');\n this.container.classList.remove('before_enter');\n this.container.classList.remove('hidden');\n }\n\n hide()\n {\n this.container.classList.add('hidden');\n this.container.classList.remove('before_enter');\n this.container.classList.remove('before_exit');\n }\n\n load_html_images()\n {\n HTMLUtilities.load_images(this.container);\n }\n\n load_html_videos()\n {\n HTMLUtilities.load_videos(this.container);\n }\n\n set_opacity(current_state_data)\n {\n this.container.style.opacity = current_state_data[`${this.name}_opacity`];\n }\n}\n\nexport { ApplicationView };\n","class BaseApplication\n{\n on_post_start()\n {}\n\n on_enter()\n {}\n\n on_exit()\n {}\n\n update()\n {}\n\n on_post_render()\n {}\n\n on_pre_render()\n {}\n\n on_frame_end()\n {}\n}\n\nexport { BaseApplication };\n","class BaseRender\n{\n constructor()\n {\n\n }\n\n render()\n {\n\n }\n\n on_enter(context, renderer)\n {\n\n }\n\n on_exit(context, renderer)\n {\n\n }\n\n resize()\n {\n\n }\n\n dispose()\n {\n\n }\n}\n\nexport { BaseRender };\n","import basic_vert from '../shaders/basic_color/basic_color.vert';\nimport basic_frag from '../shaders/basic_color/basic_color.frag';\n\nimport { ShaderMaterial } from 'three';\nimport { Color } from 'three';\n\nclass BaseShaderMaterial extends ShaderMaterial\n{\n constructor(vert, frag, uniforms)\n {\n super({\n vertexShader: vert || basic_vert,\n fragmentShader: frag || basic_frag,\n uniforms: uniforms || {\n _Color: { value: new Color('#FF0000') }\n }\n });\n }\n}\n\nexport { BaseShaderMaterial };\n","import vert from '../shaders/copy/copy.vert';\nimport frag from '../shaders/copy/copy.frag';\n\nimport { ShaderMaterial } from 'three';\nimport { Vector2 } from 'three';\nimport { NoBlending } from 'three';\nimport { AlwaysDepth } from 'three';\n\nclass BlitMaterial extends ShaderMaterial\n{\n constructor(frag_shader, vert_shader, defines)\n {\n super({\n uniforms: {\n _MainTex: { value: null },\n _Resolution: { value: new Vector2(0, 0) },\n _TargetResolution: { value: new Vector2(0, 0) }\n },\n defines: defines || {},\n vertexShader: vert_shader || vert,\n fragmentShader: frag_shader || frag,\n depthWrite: false,\n blending: NoBlending,\n depthTest: false,\n depthFunc: AlwaysDepth\n });\n }\n}\n\nexport { BlitMaterial };\n","import { BlitMaterial } from './BlitMaterial';\n\nimport frag from '../shaders/add/add.frag';\n\nclass AddMaterial extends BlitMaterial\n{\n constructor(nMips)\n {\n super(frag);\n\n this.uniforms._SecondTex = { value: undefined };\n }\n\n set_add_texture(tex)\n {\n this.uniforms._SecondTex.value = tex;\n }\n}\n\nexport { AddMaterial };\n","import { BlitMaterial } from './BlitMaterial';\n\nimport frag from '../shaders/gaussian_blur/unreal_bloom_compose.frag';\n\nimport { Color } from 'three';\nclass UnrealBloomComposeMaterial extends BlitMaterial\n{\n constructor(nMips)\n {\n super(frag, undefined, {\n NUM_MIPS: nMips\n });\n this.uniforms._MainTex = { value: undefined };\n this.uniforms._BlurredTex = { value: undefined };\n this.uniforms._BloomStrength = { value: 1 };\n\n this.uniforms.blurTexture1 = { value: null };\n this.uniforms.blurTexture2 = { value: null };\n this.uniforms.blurTexture3 = { value: null };\n this.uniforms.blurTexture4 = { value: null };\n this.uniforms.blurTexture5 = { value: null };\n\n this.uniforms.bloomStrength = { value: 1.0 };\n this.uniforms.bloomFactors = { value: [1.0, 0.8, 0.6, 0.4, 0.2] };\n this.uniforms.bloomRadius = { value: 0.0 };\n\n const bloomTintColors = [\n new Color('#FFFFFF'),\n new Color('#FFFFFF'),\n new Color('#FFFFFF'),\n new Color('#FFFFFF'),\n new Color('#FFFFFF')\n ];\n\n this.uniforms.bloomTintColors = { value: bloomTintColors };\n }\n\n set_RT_0(rt)\n {\n this.uniforms.blurTexture1.value = rt;\n }\n\n set_RT_1(rt)\n {\n this.uniforms.blurTexture2.value = rt;\n }\n\n set_RT_2(rt)\n {\n this.uniforms.blurTexture3.value = rt;\n }\n\n set_RT_3(rt)\n {\n this.uniforms.blurTexture4.value = rt;\n }\n\n set_RT_4(rt)\n {\n this.uniforms.blurTexture5.value = rt;\n }\n\n set_bloom_strength(value)\n {\n this.uniforms.bloomStrength.value = value;\n }\n\n set_bloom_radius(value)\n {\n this.uniforms.bloomRadius.value = value;\n }\n\n set_tint_color_0(col_string)\n {\n this.uniforms.bloomTintColors.value[0].set(col_string);\n }\n\n set_tint_color_1(col_string)\n {\n this.uniforms.bloomTintColors.value[1].set(col_string);\n }\n\n set_tint_color_2(col_string)\n {\n this.uniforms.bloomTintColors.value[2].set(col_string);\n }\n\n set_tint_color_3(col_string)\n {\n this.uniforms.bloomTintColors.value[3].set(col_string);\n }\n\n set_tint_color_4(col_string)\n {\n this.uniforms.bloomTintColors.value[4].set(col_string);\n }\n}\n\nexport { UnrealBloomComposeMaterial };\n","class CameraManager\n{\n init()\n {\n this._current = undefined;\n // VR Spectator\n this._spectator = undefined;\n }\n\n set current(camera)\n {\n this._current = camera;\n }\n\n get current()\n {\n return this._current;\n }\n\n set spectator(camera)\n {\n this._spectator = camera;\n }\n\n get spectator()\n {\n return this._spectator;\n }\n}\n\nconst camera_manager = new CameraManager();\nexport { camera_manager as CameraManager };\n","class Capabilities\n{\n init()\n {\n this.max_anisotropy = 0;\n this.vertex_texture_sampler_available = false;\n this.fp_textures_available = false;\n }\n}\n\nconst capabilities = new Capabilities();\nexport { capabilities as Capabilities };\n","import { CanvasTexture } from 'three';\nimport { Vector2 } from 'three';\nimport { UVMapping } from 'three';\nimport { ClampToEdgeWrapping } from 'three';\nimport { NearestFilter } from 'three';\n\nclass CanvasDrawer\n{\n constructor(uses_dynamic_font)\n {\n this.uses_dynamic_font = uses_dynamic_font;\n this.__textHeight = null;\n\n this.canvas = document.createElement('canvas');\n this.ctx = this.canvas.getContext('2d');\n }\n\n getFontHeight(fontStyle = 'Arial')\n {\n if (this.__textHeight == null || this.uses_dynamic_font)\n {\n const body = document.getElementsByTagName('body')[0];\n const dummy = document.createElement('div');\n const dummyText = document.createTextNode('MÉqgOLAKTAL');\n dummy.appendChild(dummyText);\n dummy.setAttribute('style', `font:${fontStyle};position:absolute;top:0;left:0`);\n body.appendChild(dummy);\n this.__textHeight = dummy.offsetHeight;\n body.removeChild(dummy);\n }\n return this.__textHeight;\n }\n\n get_text_size(text, font = '24px Arial')\n {\n const size = new Vector2();\n this.ctx.font = font;\n size.x = Math.ceil(this.ctx.measureText(text).width);\n size.y = Math.ceil(this.getFontHeight(font));\n return size;\n }\n\n draw_canvas(text, ctxOptions = {})\n {\n ctxOptions.font = ctxOptions.font || '24px Arial';\n ctxOptions.font_color = ctxOptions.font_color || '#000000';\n\n this.__draw(text, ctxOptions, this.canvas, this.ctx);\n return this.canvas;\n }\n\n draw_on_texture(text, ctxOptions)\n {\n const canvas = this.draw_canvas(text, ctxOptions);\n const canvas_texture = new CanvasTexture(canvas, UVMapping,\n ClampToEdgeWrapping,\n ClampToEdgeWrapping,\n NearestFilter,\n NearestFilter);\n canvas_texture.generateMipMaps = false;\n canvas_texture.needsUpdate = true;\n\n return canvas_texture;\n }\n\n __draw(text, ctxOptions)\n {}\n\n roundRect(ctx, x, y, width, height, radius, fill, stroke)\n {\n if (typeof stroke === 'undefined')\n {\n stroke = true;\n }\n if (typeof radius === 'undefined')\n {\n radius = 5;\n }\n if (typeof radius === 'number')\n {\n radius = { tl: radius, tr: radius, br: radius, bl: radius };\n }\n else\n {\n const defaultRadius = { tl: 0, tr: 0, br: 0, bl: 0 };\n for (const side in defaultRadius)\n {\n radius[side] = radius[side] || defaultRadius[side];\n }\n }\n ctx.beginPath();\n ctx.moveTo(x + radius.tl, y);\n ctx.lineTo(x + width - radius.tr, y);\n ctx.quadraticCurveTo(x + width, y, x + width, y + radius.tr);\n ctx.lineTo(x + width, y + height - radius.br);\n ctx.quadraticCurveTo(x + width, y + height, x + width - radius.br, y + height);\n ctx.lineTo(x + radius.bl, y + height);\n ctx.quadraticCurveTo(x, y + height, x, y + height - radius.bl);\n ctx.lineTo(x, y + radius.tl);\n ctx.quadraticCurveTo(x, y, x + radius.tl, y);\n ctx.closePath();\n if (fill)\n {\n ctx.fill();\n }\n if (stroke)\n {\n ctx.stroke();\n }\n }\n}\n\nexport { CanvasDrawer };\n","/*\n\n A configuration class used as a singleton\n\n*/\n\nclass Configuration\n{\n init(parameters = {})\n {\n this.dpr = 1;\n\n this.app = {}; // for arbitrary use in end application\n }\n\n from_json(json)\n {\n\n }\n}\n\nconst configuration = new Configuration();\nexport { configuration as Configuration };\n","class Idle\n{\n constructor()\n {\n }\n\n get is_animating()\n {\n return false;\n }\n\n on_enter(view)\n {\n\n }\n\n update(view)\n {\n }\n\n on_exit(view)\n {\n\n }\n}\n\nexport { Idle };\n","import { Time } from '../../Time';\nimport { Idle } from './Idle';\n\nimport { OMath } from '../../utilities/OMath';\nclass Animating\n{\n constructor()\n {\n this.t = 0;\n this.easing_function_t = 0;\n }\n\n get is_animating()\n {\n return true;\n }\n\n on_enter(animator)\n {\n }\n\n update(animator)\n {\n this.t += Time.delta_time / animator.duration;\n\n this.easing_function_t = animator.easing_function(this.t);\n this.easing_function_t = OMath.clamp(this.easing_function_t, 0, 1);\n\n animator.set_property_value(OMath.lerp(animator.from, animator.to, this.easing_function_t));\n\n if (this.easing_function_t >= 0.9999)\n {\n animator.set_property_value(animator.to);\n\n animator.set_current_state(new Idle());\n animator.finished_callback(animator);\n }\n }\n\n on_exit(view)\n {\n\n }\n}\n\nexport { Animating };\n","import { Animating } from './css_animator_states/Animating';\nimport { Idle } from './css_animator_states/Idle';\nimport { EasingFunctions } from '../utilities/EasingFunctions';\n\nclass CSSAnimator\n{\n constructor({\n element,\n css_property,\n from = 0,\n to = 1,\n duration = 1,\n value_prefix = '',\n value_suffix = '',\n easing_function = EasingFunctions.ease_in_out_cubic,\n finished_callback = () =>\n {}\n })\n {\n this.element = element;\n this.css_property = css_property;\n this.from = from;\n this.to = to;\n this.value_prefix = value_prefix;\n this.value_suffix = value_suffix;\n this.duration = duration;\n this.easing_function = easing_function;\n this.finished_callback = finished_callback;\n\n this.current_state = new Idle();\n }\n\n animate()\n {\n this.set_current_state(new Animating());\n }\n\n stop()\n {\n this.set_current_state(new Idle());\n }\n\n set_property_value(value)\n {\n this.element.style[this.css_property] = `${this.value_prefix}${value}${this.value_suffix}`;\n }\n\n update()\n {\n this.current_state.update(this);\n }\n\n get is_animating()\n {\n return this.current_state.is_animating;\n }\n\n set_current_state(state)\n {\n this.current_state.on_exit(this);\n this.current_state = state;\n this.current_state.on_enter(this);\n }\n}\n\nexport { CSSAnimator };\n","\nimport { Object3D } from 'three';\nimport { LineBasicMaterial } from 'three';\nimport { AlwaysDepth } from 'three';\nimport { BufferGeometry } from 'three';\nimport { Vector3 } from 'three';\nimport { Line } from 'three';\n\nclass AxisHelper extends Object3D\n{\n constructor(scale = 1.0)\n {\n super();\n\n const blue_points = [];\n blue_points.push(new Vector3(0, 0, 0));\n blue_points.push(new Vector3(0, 0, 1000));\n\n const blue_axis_mat = new LineBasicMaterial({ color: 0x4444ff, depthFunc: AlwaysDepth });\n const blue_axis_geo = new BufferGeometry().setFromPoints(blue_points);\n const blue_axis_line = new Line(blue_axis_geo, blue_axis_mat);\n blue_axis_line.renderOrder = 50000;\n\n const green_points = [];\n green_points.push(new Vector3(0, 0, 0));\n green_points.push(new Vector3(0, 1000, 0));\n\n const green_axis_mat = new LineBasicMaterial({ color: 0x44ff44, depthFunc: AlwaysDepth });\n const green_axis_geo = new BufferGeometry().setFromPoints(green_points);\n const green_axis_line = new Line(green_axis_geo, green_axis_mat);\n green_axis_line.renderOrder = 50000;\n\n const red_points = [];\n red_points.push(new Vector3(0, 0, 0));\n red_points.push(new Vector3(1000, 0, 0));\n\n const red_axis_mat = new LineBasicMaterial({ color: 0xff4444, depthFunc: AlwaysDepth });\n const red_axis_geo = new BufferGeometry().setFromPoints(red_points);\n const red_axis_line = new Line(red_axis_geo, red_axis_mat);\n red_axis_line.renderOrder = 50000;\n\n this.renderOrder = 100000;\n\n this.add(blue_axis_line);\n this.add(green_axis_line);\n this.add(red_axis_line);\n\n this.scale.set(scale, scale, scale);\n }\n\n update()\n {\n }\n\n dispose()\n {\n }\n}\n\nexport { AxisHelper };\n","import { Scene } from 'three';\n\nclass SceneManager\n{\n init()\n {\n this._current = new Scene();\n this._current.name = 'default_scene';\n }\n\n add_scene(name)\n {\n\n }\n\n get current()\n {\n return this._current;\n }\n\n set current(scene)\n {\n this._current = scene;\n }\n\n dispose()\n {\n this.current.traverse(child =>\n {\n if (child.geometry)\n {\n child.geometry.dispose();\n child.material.dispose();\n }\n });\n\n while (this.current.children.length > 0)\n {\n this.current.remove(this.current.children[0]);\n }\n }\n}\n\nconst scene_manager = new SceneManager();\nexport { scene_manager as SceneManager };\n","\nimport { Vector3, Mesh } from 'three';\nimport { BoxGeometry } from 'three';\nimport { MeshBasicMaterial } from 'three';\n\nclass Cube extends Mesh\n{\n constructor(size, segments, color)\n {\n size = size || new Vector3(1, 1, 1);\n segments = segments || new Vector3(1, 1, 1);\n color = color || 0xff0000;\n const geometry = new BoxGeometry(size.x, size.y, size.z, segments.x, segments.y, segments.z);\n const material = new MeshBasicMaterial({ color: color });\n super(geometry, material);\n }\n}\n\nexport { Cube };\n","import { Mesh } from 'three';\nimport { SphereBufferGeometry } from 'three';\nimport { MeshBasicMaterial } from 'three';\n\nclass Sphere extends Mesh\n{\n constructor(radius, color)\n {\n color = color || '#FF0000';\n radius = radius || 1;\n const geometry = new SphereBufferGeometry(radius, 64, 64);\n const material = new MeshBasicMaterial({ color: color });\n super(geometry, material);\n }\n}\n\nexport { Sphere };\n","import { CylinderBufferGeometry } from 'three';\nimport { ConeBufferGeometry } from 'three';\nimport { MeshBasicMaterial } from 'three';\nimport { Vector3, Mesh } from 'three';\n\nimport * as BufferGeometryUtils from 'three/examples/jsm/utils/BufferGeometryUtils.js';\n\nclass Arrow extends Mesh\n{\n constructor(color, length, dir)\n {\n color = color || '#FF0000';\n length = length || 1;\n\n const cone_height = 0.4;\n const cylinder_height = length - cone_height;\n const cylinder_geo = new CylinderBufferGeometry(0.01, 0.01, cylinder_height, 32);\n cylinder_geo.translate(0, cylinder_height / 2, 0);\n\n const cone_geometry = new ConeBufferGeometry(0.1, cone_height, 32);\n cone_geometry.translate(0, cylinder_height + cone_height / 2, 0);\n\n const buffer_geometry = BufferGeometryUtils.mergeBufferGeometries([cylinder_geo, cone_geometry]);\n buffer_geometry.rotateX(3.14 / 2);\n\n const material = new MeshBasicMaterial({ color: color });\n super(buffer_geometry, material);\n\n if (dir)\n {\n this.quaternion.setFromUnitVectors(new Vector3(0, 0, 1), dir);\n }\n\n this._dir = dir;\n }\n\n set dir(dir)\n {\n this.quaternion.setFromUnitVectors(new Vector3(0, 0, 1), dir);\n this._dir = dir;\n }\n\n get dir()\n {\n return this._dir;\n }\n\n set length(value)\n {\n this.scale.z = value;\n }\n\n get length()\n {\n return this.scale.z;\n }\n}\n\nexport { Arrow };\n","import { Vector2 } from 'three';\n\nclass OScreen\n{\n init()\n {\n this.width = 1;\n this.height = 1;\n\n this.position = new Vector2();\n\n this.render_width = 1;\n this.render_height = 1;\n this.width_height = new Vector2(this.width, this.height);\n\n this.dpr = 1;\n this.pixel_size = new Vector2(1 / this.width, 1 / this.height);\n }\n\n update_position(x, y)\n {\n this.position.set(x, y);\n }\n\n update()\n {\n this.size_changed = false;\n }\n\n update_size(width, height)\n {\n this.width = width;\n this.height = height;\n\n this.pixel_size = new Vector2(1 / this.width, 1 / this.height);\n\n this.width_height.x = width;\n this.width_height.y = height;\n\n this.render_width = width * this.dpr;\n this.render_height = height * this.dpr;\n\n this.size_changed = true;\n }\n\n apply_pixel_density_v2(vector2)\n {\n vector2.multiplyScalar(1 / this.dpr);\n\n return vector2;\n }\n\n apply_pixel_density(value)\n {\n return value * (1 / this.dpr);\n }\n\n get_pixel_size()\n {\n return this.pixel_size;\n }\n\n get aspect_ratio()\n {\n return this.width / this.height;\n }\n\n get portrait()\n {\n return this.width < this.height;\n }\n}\n\nconst oscreen = new OScreen();\nexport { oscreen as OScreen };\n","import { BaseShaderMaterial } from './BaseShaderMaterial';\nimport { Vector2 } from 'three';\nclass ScreenSpaceTextureMaterial extends BaseShaderMaterial\n{\n constructor(x, y, w, h)\n {\n const vert = `\n uniform vec2 _ScreenSpacePosition;\n uniform vec2 _ScreenSize;\n uniform vec2 _TextureSize;\n varying vec2 vUv;\n void main()\n {\n vec2 pos = uv * vec2(_TextureSize.x / _ScreenSize.x, _TextureSize.y / _ScreenSize.y);\n pos += vec2(_ScreenSpacePosition.x / _ScreenSize.x, _ScreenSpacePosition.y / _ScreenSize.y);\n\n pos.x = pos.x * 2.0 - 1.0;\n pos.y = pos.y * 2.0 - 1.0;\n\n gl_Position = vec4(pos, 0.0, 1.0);\n vUv = uv;\n }\n `;\n const frag = `\n uniform sampler2D _MainTex;\n varying vec2 vUv;\n\n void main()\n {\n gl_FragColor = texture2D(_MainTex, vUv);\n }\n `;\n super(vert, frag, {\n _MainTex: { value: undefined },\n _ScreenSpacePosition: { value: new Vector2() },\n _ScreenSize: { value: new Vector2() },\n _TextureSize: { value: new Vector2() }\n });\n }\n\n set_position(x, y)\n {\n this.uniforms._ScreenSpacePosition.value.set(x, y);\n }\n\n set_texture(tex, w, h)\n {\n this.uniforms._MainTex.value = tex;\n this.uniforms._TextureSize.value.set(tex.image.width, tex.image.height);\n\n if (w !== undefined)\n {\n this.uniforms._TextureSize.value.x = w;\n }\n if (h !== undefined)\n {\n this.uniforms._TextureSize.value.y = h;\n }\n }\n\n set_screen_size(w, h)\n {\n this.uniforms._ScreenSize.value.set(w, h);\n }\n}\n\nexport { ScreenSpaceTextureMaterial };\n","import { Color } from 'three';\nimport { PerspectiveCamera as TPerspectiveCamera } from 'three';\n\nclass PerspectiveCamera extends TPerspectiveCamera\n{\n constructor(fov, aspect, near, far)\n {\n super(fov, aspect, near, far);\n\n this.clear_color = new Color('#000000');\n this.clear_alpha = 1;\n }\n\n copy(camera)\n {\n super.copy(camera);\n this.clear_color.copy(camera.clear_color);\n this.clear_alpha = camera.clear_alpha;\n return this;\n }\n}\n\nexport { PerspectiveCamera };\n","import { AxisHelper } from './components/AxisHelper';\n\nimport { SceneManager } from './SceneManager';\nimport { Cube } from './primitives/Cube';\nimport { Sphere } from './primitives/Sphere';\nimport { Arrow } from './primitives/Arrow';\nimport { OScreen } from './OScreen';\nimport { ScreenSpaceTextureMaterial } from './materials/ScreenSpaceTextureMaterial';\nimport { PerspectiveCamera } from './PerspectiveCamera';\n\nimport { Vector3 } from 'three';\nimport { LineBasicMaterial } from 'three';\nimport { BufferGeometry } from 'three';\nimport { Line } from 'three';\nimport { PlaneGeometry } from 'three';\nimport { ShaderMaterial } from 'three';\nimport { Vector4 } from 'three';\nimport { Mesh } from 'three';\nimport { Box3 } from 'three';\nimport { Box3Helper } from 'three';\nimport { Scene } from 'three';\nimport { CatmullRomCurve3 } from 'three';\nimport { SphereGeometry } from 'three';\nimport { MeshBasicMaterial } from 'three';\n\nimport basic_color_vert from './shaders/basic_color/basic_color.vert';\nimport basic_color_frag from './shaders/basic_color/basic_color.frag';\n\nclass Debug\n{\n init()\n {\n this.Vector3_one = new Vector3(1, 1, 1);\n this.Vector3_zero = new Vector3(0, 0, 0);\n this.canvas_renderer = undefined;\n\n this.display_texture_meshes = [];\n\n this.ctx = undefined;\n this.scene = new Scene();\n this.camera = new PerspectiveCamera();\n // this.camera.clear_alpha = 0;\n }\n\n draw_arrow(origin, dir, color = 0xff0000)\n {\n const arrow = new Arrow(color, dir.length(), dir.clone().normalize());\n arrow.position.copy(origin);\n SceneManager.current.add(arrow);\n return arrow;\n }\n\n draw_axis()\n {\n const axis = new AxisHelper();\n SceneManager.current.add(axis);\n return axis;\n }\n\n set_debug_RT(RT)\n {\n this.rt_debug = RT;\n }\n\n draw_rectangle(position_2d, width, height, color)\n {\n width = width || 100;\n height = height || 100;\n this.ctx.fillStyle = color || 'rgba(255, 0, 0, 1)';\n this.ctx.fillRect(position_2d.x - width / 2,\n (this.ctx.canvas.height - position_2d.y) - height / 2, width, height);\n }\n\n clear()\n {\n if (this.ctx)\n {\n this.ctx.clearRect(0, 0, this.ctx.canvas.width, this.ctx.canvas.height);\n }\n }\n\n draw_line_2D(from, to, color)\n {\n this.ctx.strokeStyle = color || 'rgba(255, 0, 0, 1)';\n this.ctx.beginPath();\n this.ctx.moveTo(from.x, from.y);\n this.ctx.lineTo(to.x, to.y);\n this.ctx.closePath();\n this.ctx.stroke();\n }\n\n draw_line(points, color = 0xff0000)\n {\n const material = new LineBasicMaterial({\n color: color\n });\n\n const geometry = new BufferGeometry().setFromPoints(points);\n\n const line = new Line(geometry, material);\n line.frustumCulled = false;\n SceneManager.current.add(line);\n return line;\n }\n\n draw_cube(pos, size, color)\n {\n size = size || 1;\n color = color || 0xff0000;\n pos = pos || new Vector3();\n\n const cube = new Cube(new Vector3(size, size, size), undefined, color);\n cube.position.copy(pos);\n SceneManager.current.add(cube);\n return cube;\n }\n\n draw_oriented_cube(from, to, height = 1, color = '#FF0000', depth = 0.1)\n {\n const size = from.distanceTo(to);\n const cube = new Cube(new Vector3(depth, height, size), undefined, color);\n\n const center = to.clone().sub(from).multiplyScalar(0.5);\n const forward_dir = center.clone().normalize();\n center.add(from);\n\n cube.position.copy(center);\n\n // let up = new Vector3(0, 1, 0);\n // let forward = forward_dir.clone();\n // let right = forward.clone().cross(up);\n\n // cube.quaternion.setFromRotationMatrix(new Matrix4().makeBasis(right,up,forward));\n cube.quaternion.setFromUnitVectors(new Vector3(0, 0, -1), forward_dir);\n\n SceneManager.current.add(cube);\n return cube;\n }\n\n draw_plane(width, height, color)\n {\n const geometry = new PlaneGeometry(width, height);\n const material = new ShaderMaterial({\n uniforms: {\n _Color: { value: new Vector4(0, 1, 0, 0.2) }\n },\n vertexShader: basic_color_vert,\n fragmentShader: basic_color_frag,\n transparent: true,\n depthWrite: false\n });\n\n const plane = new Mesh(geometry, material);\n plane.renderOrder = -10000;\n SceneManager.current.add(plane);\n return plane;\n }\n\n draw_empty_cube(pos, size, color)\n {\n size = size || 1;\n color = color || 0xff0000;\n\n const box = new Box3().setFromCenterAndSize(new Vector3(), new Vector3(size, size, size));\n const helper = new Box3Helper(box, color);\n helper.position.copy(pos || new Vector3());\n return helper;\n }\n\n draw_sphere(pos, size, color)\n {\n size = size || 1;\n color = color || 0xff0000;\n pos = pos || new Vector3();\n\n const sphere = new Sphere(size, color);\n sphere.position.copy(pos);\n SceneManager.current.add(sphere);\n return sphere;\n }\n\n draw_point_array(input_points, open = false, color = 0xff0000)\n {\n const catmull = new CatmullRomCurve3(input_points, open);\n catmull.updateArcLengths();\n const points = catmull.getSpacedPoints(200);\n const line_helper = this.draw_line(points, 0x00ff00);\n // line_helper.position.y = 1.5;\n return line_helper;\n }\n\n draw_sphere_helper(sphere, color)\n {\n color = color || 0xff0000;\n const geometry = new SphereGeometry(sphere.radius, 32, 32);\n const material = new MeshBasicMaterial({ color: color });\n const sphere_mesh = new Mesh(geometry, material);\n sphere_mesh.position.copy(sphere.center);\n SceneManager.current.add(sphere_mesh);\n return sphere_mesh;\n }\n\n draw_math_sphere(sphere)\n {\n const geometry = new SphereGeometry(sphere.radius, 32, 32);\n const material = new ShaderMaterial({\n uniforms: {\n _Color: { value: new Vector4(1, 0, 0, 0.2) }\n },\n vertexShader: basic_color_vert,\n fragmentShader: basic_color_frag,\n transparent: true\n });\n // var material = new MeshBasicMaterial( {color: 0xff0000, transparent = true} );\n const sphere1 = new Mesh(geometry, material);\n sphere1.position.copy(sphere.center);\n SceneManager.current.add(sphere1);\n }\n\n draw_bounding_box(bb)\n {\n const helper = new Box3Helper(bb, 0xffff00);\n SceneManager.current.add(helper);\n }\n\n draw_curve(curve, options)\n {\n const offset = new Vector3(0, 0, 0);\n if (options)\n {\n offset.y = options.offset || 0;\n }\n\n for (let i = 0; i < curve.length - 1; i++)\n {\n this.draw_line(curve[i].clone().add(offset), curve[i + 1].clone().add(offset));\n }\n }\n\n draw_texture(tex, w, h)\n {\n const mesh = new Mesh(new PlaneGeometry(1, 1), new ScreenSpaceTextureMaterial());\n this.display_texture_meshes.push(mesh);\n this.scene.add(mesh);\n\n mesh.material.set_texture(tex, w, h);\n return mesh;\n }\n\n render(graphics)\n {\n for (let i = 0; i < this.display_texture_meshes.length; i++)\n {\n this.display_texture_meshes[i].material.set_screen_size(OScreen.width, OScreen.height);\n }\n if (this.scene.children.length > 0)\n {\n graphics.render(this.scene, this.camera);\n }\n }\n}\n\nconst debug = new Debug();\nexport { debug as Debug };\n","import { BlitMaterial } from '../materials/BlitMaterial';\n\nimport frag from '../shaders/clear/clear_depth_normal.frag';\n\nimport { Vector4 } from 'three';\n\nclass ClearDepthNormalMaterial extends BlitMaterial\n{\n constructor(clear_depth, clear_normal)\n {\n super(frag);\n this.uniforms._DepthNormal = { value: new Vector4(clear_depth, clear_normal.x, clear_normal.y, clear_normal.z) };\n }\n}\n\nexport { ClearDepthNormalMaterial };\n","import vert from '../shaders/depth_normals/depth_normals.vert';\nimport frag from '../shaders/depth_normals/depth_normals.frag';\n\nimport { ShaderMaterial } from 'three';\n\nclass DepthNormalMaterial extends ShaderMaterial\n{\n constructor()\n {\n super({\n uniforms: {\n _FarPlane: { value: 1 }\n },\n vertexShader: vert,\n fragmentShader: frag\n });\n }\n\n set far_plane(value)\n {\n this.uniforms._FarPlane.value = value;\n }\n\n get far_plane()\n {\n return this.uniforms._FarPlane.value;\n }\n}\n\nexport { DepthNormalMaterial };\n","import { CameraManager } from '../CameraManager';\nimport { OScreen } from '../OScreen';\n\nimport { ClearDepthNormalMaterial } from '../materials/ClearDepthNormalMaterial';\nimport { DepthNormalMaterial } from '../materials/DepthNormalMaterial';\n\nimport { WebGLRenderTarget } from 'three';\nimport { Vector3 } from 'three';\n\nclass DepthAndNormalsRenderer\n{\n constructor()\n {\n this.RT = new WebGLRenderTarget(OScreen.width, OScreen.height);\n\n this.clear_depth_normal_mat = new ClearDepthNormalMaterial(1, new Vector3(0, 0, 1));\n this.depth_normal_material = new DepthNormalMaterial();\n }\n\n render(graphics)\n {\n this.__resize_RT_if_necessary();\n\n graphics.clear(this.RT, undefined, true, true);\n\n graphics.blit_clear_with_material(this.RT, this.clear_depth_normal_mat);\n\n this.depth_normal_material.far_plane = CameraManager.current.far;\n\n graphics.render(undefined, undefined, this.RT, this.depth_normal_material);\n }\n\n __resize_RT_if_necessary()\n {\n if (this.RT.width !== OScreen.width || this.RT.height !== OScreen.height)\n {\n this.RT.setSize(OScreen.width, OScreen.height);\n }\n }\n\n get render_target()\n {\n return this.RT;\n }\n}\n\nexport { DepthAndNormalsRenderer };\n","import { BlitMaterial } from '../materials/BlitMaterial';\n\nimport { Scene } from 'three';\nimport { Mesh } from 'three';\nimport { PlaneGeometry } from 'three';\nimport { OrthographicCamera } from 'three';\n\nclass Blitter\n{\n constructor(renderer)\n {\n this.renderer = renderer;\n this._blit_scene = new Scene();\n this._blit_material = new BlitMaterial();\n this._blit_quad = new Mesh(\n new PlaneGeometry(1, 1), this._blit_material);\n this._blit_scene.add(this._blit_quad);\n this._blit_camera = new OrthographicCamera(-1, 1, 1, -1, -10000, 10000);\n }\n\n blit(src, dst)\n {\n this._blit_quad.material = this._blit_material;\n\n const src_texture = src.isWebGLRenderTarget === true ? src.texture : src;\n const src_width = src.isWebGLRenderTarget === true ? src.width : src.image.width;\n const src_height = src.isWebGLRenderTarget === true ? src.height : src.image.height;\n\n this._blit_quad.material.uniforms._MainTex.value = src_texture;\n this._blit_quad.material.uniforms._Resolution.value.set(src_width, src_height);\n\n if (dst)\n {\n this._blit_quad.material.uniforms._TargetResolution.value.set(dst.width, dst.height);\n }\n else\n {\n this.renderer.getSize(this._blit_quad.material.uniforms._TargetResolution.value);\n }\n\n this.__render(dst);\n }\n\n material_pass(mat, dst)\n {\n this._blit_quad.material = mat;\n // this._blit_quad.material.uniforms._MainTex.value = undefined;\n // this._blit_quad.material.uniforms._Resolution.value.set(1, 1);\n\n this.__render(dst);\n }\n\n blit_with_material(src, dst, mat)\n {\n const src_texture = src.isWebGLRenderTarget === true ? src.texture : src;\n const src_width = src.isWebGLRenderTarget === true ? src.width : src.image.width;\n const src_height = src.isWebGLRenderTarget === true ? src.height : src.image.height;\n\n this._blit_quad.material = mat;\n this._blit_quad.material.uniforms._MainTex.value = src_texture;\n this._blit_quad.material.uniforms._Resolution.value.set(src_width, src_height);\n\n if (dst)\n {\n this._blit_quad.material.uniforms._TargetResolution.value.set(dst.width, dst.height);\n }\n else\n {\n this.renderer.getSize(this._blit_quad.material.uniforms._TargetResolution.value);\n }\n\n this.__render(dst);\n }\n\n blit_clear_with_material(dst_RT, mat)\n {\n this._blit_quad.material = mat;\n\n this.__render(dst_RT);\n }\n\n dispose()\n {\n this._blit_quad.geometry.dispose();\n this._blit_quad.material.dispose();\n }\n\n __render(RT)\n {\n RT = RT === undefined ? null : RT;\n\n const current_rt = this.renderer.getRenderTarget();\n\n this.renderer.setRenderTarget(RT === undefined ? null : RT);\n this.renderer.render(this._blit_scene, this._blit_camera);\n\n this.renderer.setRenderTarget(current_rt);\n }\n}\n\nexport { Blitter };\n","import { Configuration } from './Configuration';\nimport { BaseRender } from './render_mode/BaseRender';\nimport { OScreen } from './OScreen';\nimport { CameraManager } from './CameraManager';\nimport { SceneManager } from './SceneManager';\nimport { Capabilities } from './Capabilities';\nimport { DepthAndNormalsRenderer } from './render_utilities/DepthAndNormalsRenderer';\nimport { Blitter } from './render_utilities/Blitter';\n\nimport {\n NearestFilter,\n RGBAFormat,\n LinearEncoding,\n FloatType,\n WebGLRenderTarget,\n ShaderMaterial,\n NoBlending,\n AlwaysDepth\n} from 'three';\n\nimport { WebGLRenderer } from 'three';\n\nclass Graphics\n{\n init(canvas, core_attributes, context_attributes, threejs_attributes)\n {\n this._renderer = undefined;\n this.blitter = undefined;\n this.canvas = undefined;\n this.no_render = undefined;\n this.current_render_mode = undefined;\n this.generateDepthNormalTexture = false;\n this.depth_and_normals_renderer = undefined;\n\n this.is_webgl2 = false;\n this.canvas_context = undefined;\n this.context_attributes = undefined;\n\n this.core_attributes = {\n force_webgl2: true,\n xr_enabled: false\n };\n\n this.context_attributes = {\n alpha: true,\n antialias: false,\n depth: true,\n desynchronized: false,\n failIfMajorPerformanceCaveat: false,\n powerPreference: 'high-performance',\n premultipliedAlpha: true,\n preserveDrawingBuffer: true,\n stencil: false\n };\n\n this.threejs_attributes = {\n logarithmicDepthBuffer: false\n };\n\n Object.assign(this.core_attributes, core_attributes);\n Object.assign(this.context_attributes, context_attributes);\n\n Object.assign(this.threejs_attributes, this.context_attributes);\n Object.assign(this.threejs_attributes, threejs_attributes);\n\n if (this.core_attributes.force_webgl2)\n {\n this.canvas_context = canvas.getContext('webgl2', this.context_attributes) ||\n canvas.getContext('webgl', this.context_attributes) ||\n canvas.getContext('experimental-webgl', this.context_attributes);\n }\n else\n {\n this.canvas_context = canvas.getContext('webgl', this.context_attributes) ||\n canvas.getContext('experimental-webgl', this.context_attributes);\n }\n\n this.is_webgl2 = this.canvas_context.constructor.name === 'WebGL2RenderingContext';\n\n // console.log(`Using WebGL ${this.is_webgl2 ? 2 : 1}`);\n\n this.threejs_attributes.canvas = canvas;\n this.threejs_attributes.context = this.canvas_context;\n\n this._renderer = new WebGLRenderer(this.threejs_attributes);\n\n if (this.core_attributes.xr_enabled)\n {\n this._renderer.xr.enabled = true;\n }\n else\n {\n this._renderer.autoClear = false;\n }\n\n this._renderer.setPixelRatio(1);\n\n OScreen.dpr = Configuration.dpr;\n\n if (!this.is_webgl2)\n {\n this._renderer.extensions.get('ANGLE_instanced_arrays');\n }\n\n this.blitter = new Blitter(this._renderer);\n\n this.canvas = this._renderer.domElement;\n\n this.no_render = new BaseRender();\n\n this.current_render_mode = this.no_render;\n Capabilities.max_anisotropy = this._renderer.capabilities.getMaxAnisotropy();\n Capabilities.vertex_texture_sampler_available = this._renderer.capabilities.maxVertexTextures > 0;\n Capabilities.fp_textures_available = this.is_floating_point_texture_available();\n\n this.generateDepthNormalTexture = false;\n\n this.depth_and_normals_renderer = new DepthAndNormalsRenderer();\n\n this.resize_observer = new ResizeObserver(this.on_resize.bind(this));\n this.resize_observer.observe(this.canvas);\n }\n\n get dom_element()\n {\n return this._renderer.domElement;\n }\n\n get depth_normals_RT()\n {\n return this.depth_and_normals_renderer.render_target;\n }\n\n set_state(new_state)\n {\n // console.log('VIEWAPI - map render mode switch to: ' + new_state.constructor.name);\n\n this.current_render_mode.on_exit(this, this._renderer);\n this.current_render_mode = new_state;\n this.current_render_mode.on_enter(this, this._renderer);\n }\n\n update()\n {\n if (this.generateDepthNormalTexture)\n {\n this.depth_and_normals_renderer.render(this);\n }\n\n this.__update_current_camera();\n\n if (CameraManager.current)\n {\n this.current_render_mode.render();\n }\n\n OScreen.update();\n }\n\n __update_current_camera()\n {\n if (CameraManager.current)\n {\n CameraManager.current.aspect = OScreen.aspect_ratio;\n CameraManager.current.updateProjectionMatrix();\n CameraManager.current.updateMatrix();\n CameraManager.current.updateMatrixWorld(true);\n }\n }\n\n render(scene, camera, RT, override_mat)\n {\n this.__apply_override_material(scene, override_mat);\n\n this._renderer.setRenderTarget(RT === undefined ? null : RT);\n this._renderer.render(scene || SceneManager.current,\n camera || CameraManager.current);\n\n this.__apply_override_material(scene, undefined);\n }\n\n render_scene(scene)\n {\n if (scene.on_pre_render)\n {\n scene.on_pre_render();\n }\n\n if (scene.render)\n {\n scene.render();\n }\n else\n {\n this.render(scene, undefined);\n }\n\n if (scene.on_post_render)\n {\n scene.on_post_render();\n }\n }\n\n __apply_override_material(scene, mat)\n {\n mat = mat === undefined ? null : mat;\n if (scene)\n {\n scene.overrideMaterial = mat;\n }\n else\n {\n SceneManager.current.overrideMaterial = mat;\n }\n }\n\n readback_RT(RT, buffer)\n {\n this._renderer.readRenderTargetPixels(RT, 0, 0, RT.width, RT.height, buffer);\n }\n\n clear(RT, camera, clear_depth, clear_stencil)\n {\n this._renderer.setRenderTarget(RT === undefined ? null : RT);\n\n if (camera)\n {\n this._renderer.setClearColor(camera.clear_color, camera.clear_alpha);\n }\n\n this._renderer.clear(!!camera, // clear color\n !!clear_depth,\n !!clear_stencil);\n }\n\n on_resize(entries)\n {\n for (const entry of entries)\n {\n OScreen.dpr = Configuration.dpr;\n OScreen.update_position(entry.contentRect.x, entry.contentRect.y);\n OScreen.update_size(entry.contentRect.width, entry.contentRect.height);\n\n this.canvas.width = OScreen.render_width;\n this.canvas.height = OScreen.render_height;\n\n this._renderer.setViewport(0, 0, OScreen.render_width, OScreen.render_height);\n\n this.__update_current_camera();\n }\n }\n\n material_pass(mat, dst)\n {\n this.blitter.material_pass(mat, dst);\n }\n\n blit(src_RT, dst_RT, mat)\n {\n if (mat)\n {\n this.blitter.blit_with_material(src_RT, dst_RT, mat);\n }\n else\n {\n this.blitter.blit(src_RT, dst_RT);\n }\n }\n\n blit_clear_with_material(dst_RT, mat)\n {\n this.blitter.blit_clear_with_material(dst_RT, mat);\n }\n\n take_screenshot(blob_callback, width = OScreen.width, height = OScreen.height)\n {\n // const ctx = this;\n\n const old_width = OScreen.width;\n const old_height = OScreen.height;\n\n const new_width = width;\n const new_height = height;\n\n const tile_width = 1024;\n const tile_height = 1024;\n\n const divisions_x = parseInt(Math.ceil(new_width / tile_width));\n const divisions_y = parseInt(Math.ceil(new_height / tile_height));\n\n OScreen.update_size(tile_width, tile_height);\n const old_dpr = this._renderer.getPixelRatio();\n this._renderer.setPixelRatio(1);\n\n this._renderer.setSize(tile_width, tile_height, false);\n\n const canvas_2d = document.createElement('canvas');\n const ctx_2D = canvas_2d.getContext('2d');\n\n ctx_2D.canvas.width = new_width;\n ctx_2D.canvas.height = new_height;\n\n CameraManager.current.aspect = OScreen.aspect_ratio;\n CameraManager.current.updateMatrix();\n CameraManager.current.updateMatrixWorld(true);\n\n for (let x = 0; x < divisions_x; x++)\n {\n for (let y = 0; y < divisions_y; y++)\n {\n CameraManager.current.setViewOffset(new_width, new_height,\n OScreen.width * x, OScreen.height * y,\n OScreen.width, OScreen.height);\n this.current_render_mode.render();\n\n ctx_2D.drawImage(this._renderer.domElement, OScreen.width * x, OScreen.height * y);\n }\n }\n\n // transform the result canvas into a blob\n // } from them the callback turns into a ULR and download it\n ctx_2D.canvas.toBlob(blob_callback, 'image/png;base64;');\n\n CameraManager.current.clearViewOffset();\n\n OScreen.update_size(old_width, old_height);\n this._renderer.setPixelRatio(old_dpr);\n this._renderer.setSize(old_width, old_height, false);\n\n CameraManager.current.aspect = OScreen.aspect_ratio;\n CameraManager.current.updateMatrix();\n CameraManager.current.updateMatrixWorld(true);\n }\n\n download_screenshot(blob)\n {\n const link = document.createElement('a');\n link.download = 'Snapshot.png';\n\n link.href = URL.createObjectURL(blob);\n link.click();\n\n link.onclick = function()\n {\n requestAnimationFrame(function()\n {\n URL.revokeObjectURL(link.href);\n });\n link.removeAttribute('href');\n };\n }\n\n dispose()\n {\n this._renderer.dispose();\n this.current_render_mode.dispose();\n this.blitter.dispose();\n }\n\n is_floating_point_texture_available()\n {\n const RT = new WebGLRenderTarget(1, 1, {\n minFilter: NearestFilter,\n magFilter: NearestFilter,\n format: RGBAFormat,\n encoding: LinearEncoding,\n type: FloatType,\n stencilBuffer: false,\n depthBuffer: false\n });\n\n const vert = `\n void main()\n {\n gl_Position = vec4(uv * 2.0 - 1.0, 1.0, 1.0);\n }\n `;\n const frag = `\n void main()\n {\n gl_FragColor = vec4(0.0, 4865.35, 0.0, 1.0);\n }\n `;\n\n const mat = new ShaderMaterial({\n vertexShader: vert,\n fragmentShader: frag,\n depthWrite: false,\n blending: NoBlending,\n depthTest: false,\n depthFunc: AlwaysDepth\n });\n\n this.material_pass(mat, RT);\n\n const output = new Float32Array(4);\n this._renderer.readRenderTargetPixels(RT, 0, 0, 1, 1, output);\n\n return Math.abs(output[1] - 4865.35) < 0.001;\n }\n}\n\nconst graphics = new Graphics();\nexport { graphics as Graphics };\n","import frag from '../shaders/normal/normal.frag';\nimport vert from '../shaders/normal/normal.vert';\n\nimport { ShaderMaterial } from 'three';\n\nclass NormalMaterial extends ShaderMaterial\n{\n constructor()\n {\n super({\n uniforms: {\n },\n vertexShader: vert,\n fragmentShader: frag\n });\n }\n}\n\nexport { NormalMaterial };\n","import { CameraManager } from '../CameraManager';\nimport { SceneManager } from '../SceneManager';\nimport { BaseRender } from '../render_mode/BaseRender';\nimport { Graphics } from '../Graphics';\nimport { NormalMaterial } from '../materials/NormalMaterial';\n\nclass DebugNormalsRender extends BaseRender\n{\n constructor()\n {\n super();\n }\n\n render()\n {\n Graphics.clear(undefined, CameraManager.current, true, true);\n\n Graphics.render(SceneManager.current, CameraManager.current, undefined, new NormalMaterial());\n }\n}\n\nexport { DebugNormalsRender };\n","class KeyboardInput\n{\n init(container)\n {\n this.ctrlz_pressed = false;\n this.ctrlz_fired = false;\n\n this.keys = {};\n this.keys_keys = [];\n this.container = container;\n\n this.container.addEventListener('keydown', this.on_key_down.bind(this), false);\n this.container.addEventListener('keyup', this.on_key_up.bind(this), false);\n }\n\n on_key_down(e)\n {\n if (e.keyCode === 90 && e.ctrlKey && !this.ctrlz_fired)\n {\n this.ctrlz_pressed = true;\n this.ctrlz_fired = true;\n }\n\n if (e.code)\n {\n this.press_key(e.code);\n }\n }\n\n on_key_up(e)\n {\n this.release_key(e.code);\n }\n\n clear()\n {\n this.ctrlz_pressed = false;\n\n for (let i = 0; i < this.keys_keys.length; i++)\n {\n this.keys[this.keys_keys[i]].pressed = false;\n this.keys[this.keys_keys[i]].released = false;\n }\n }\n\n release_key(key_name)\n {\n const key = this.keys[key_name];\n if (key)\n {\n key.fired = false;\n key.down = false;\n key.released = true;\n }\n }\n\n release_keys()\n {\n this.ctrlz_fired = false;\n\n for (let i = 0; i < this.keys_keys.length; i++)\n {\n this.keys[this.keys_keys[i]].fired = false;\n this.keys[this.keys_keys[i]].down = false;\n }\n }\n\n press_key(key_name)\n {\n const key = this.keys[key_name];\n if (key)\n {\n if (key.down === false)\n {\n key.pressed = true;\n }\n key.down = true;\n key.fired = true;\n }\n }\n\n is_key_pressed(key_name)\n {\n const key = this.keys[key_name];\n if (key)\n {\n return key.pressed;\n }\n return false;\n }\n\n is_key_down(key_name)\n {\n const key = this.keys[key_name];\n if (key)\n {\n return key.down;\n }\n return false;\n }\n\n is_key_released(key_name)\n {\n const key = this.keys[key_name];\n if (key)\n {\n return key.released;\n }\n\n return false;\n }\n\n register_key(key)\n {\n this.keys[key] =\n {\n key_name: key,\n pressed: false,\n down: false,\n fired: false\n };\n\n this.keys_keys = Object.keys(this.keys);\n }\n\n unregister_key(key_name)\n {\n delete this.keys[key_name];\n }\n\n dispose()\n {\n this.container.removeEventListener('keydown', this.on_key_down.bind(this), false);\n this.container.removeEventListener('keyup', this.on_key_up.bind(this), false);\n }\n}\n\nexport { KeyboardInput };\n","\nclass OS\n{\n init()\n {\n this.operating_systems = {\n ANDROID: 'android',\n IOS: 'ios',\n LINUX: 'linux',\n MAC: 'mac',\n WINDOWS: 'windows'\n };\n\n this.is_mobile = !!(navigator.userAgent.match(/(iPhone|iPod|iPad|Android|playbook|silk|BlackBerry|BB10|Windows Phone|Tizen|Bada|webOS|IEMobile|Opera Mini)/));\n this.is_ipad = !!(navigator.userAgent.match(/Mac/) && navigator.maxTouchPoints && navigator.maxTouchPoints > 2);\n this.is_ios = !!navigator.userAgent.match(/(iPhone|iPod|iPad)/) || this.is_ipad;\n\n this.is_android = this.get_os() === this.operating_systems.ANDROID;\n this.is_linux = this.get_os() === this.operating_systems.LINUX;\n this.is_mac = this.get_os() === this.operating_systems.MAC;\n this.is_windows = this.get_os() === this.operating_systems.WINDOWS;\n }\n\n get_os()\n {\n const userAgent = window.navigator.userAgent;\n const platform = window.navigator.platform;\n const macosPlatforms = ['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K'];\n const windowsPlatforms = ['Win32', 'Win64', 'Windows', 'WinCE'];\n const iosPlatforms = ['iPhone', 'iPad', 'iPod'];\n let os = null;\n\n if (macosPlatforms.indexOf(platform) !== -1)\n {\n os = this.operating_systems.MAC;\n }\n else if (iosPlatforms.indexOf(platform) !== -1)\n {\n os = this.operating_systems.IOS;\n }\n else if (windowsPlatforms.indexOf(platform) !== -1)\n {\n os = this.operating_systems.WINDOWS;\n }\n else if (/Android/.test(userAgent))\n {\n os = this.operating_systems.ANDROID;\n }\n else if (!os && /Linux/.test(platform))\n {\n os = this.operating_systems.LINUX;\n }\n\n return os;\n }\n}\n\nconst os = new OS();\nexport { os as OS };\n","import { Vector3 } from 'three';\n\nclass ReflectionPlaneContext\n{\n init()\n {\n this.target_geometry = undefined;\n this.target_position = new Vector3();\n }\n\n set_target_geometry(geometry)\n {\n this.target_geometry = geometry;\n }\n}\n\nconst reflection_plane_context = new ReflectionPlaneContext();\nexport { reflection_plane_context as ReflectionPlaneContext };\n","import { Vector2 } from 'three';\nimport { ShaderMaterial } from 'three';\nimport { Mesh } from 'three';\nimport { DataTexture } from 'three';\nimport { RGBAFormat } from 'three';\nimport { RGBFormat } from 'three';\nimport { FloatType } from 'three';\n\nclass GeometryBatch\n{\n constructor(geometry, batch_width)\n {\n this.geometry = geometry;\n\n this.material = undefined;\n this.uniforms = {};\n this.batch_width = batch_width;\n\n this.data_textures = [];\n\n this.object_names = undefined;\n\n this.zero_offset = new Vector2();\n this.write_offset = new Vector2();\n\n this.uniform_dirty_count = 0;\n\n this.tmp_uploaded_data_count = 0;\n }\n\n init(object_names, vert_shader, frag_shader)\n {\n this.material = new ShaderMaterial({\n uniforms: this.uniforms,\n vertexShader: vert_shader,\n fragmentShader: frag_shader\n });\n this.object_names = object_names;\n }\n\n add_global_uniform(name, data)\n {\n this.uniforms[name] = { value: data };\n this.material.needsUpdate = true;\n }\n\n set_global_uniform(name, data)\n {\n this.uniforms[name].value = data;\n }\n\n add_object_uniform_v3(uniform_name, default_value_v3)\n {\n const src_tex = this.__create_rgb_texture(this.batch_width);\n const dst_tex = this.__create_rgb_texture(this.batch_width);\n const one_pixel_tex = this.__create_rgb_texture(1);\n\n const new_data_tex = this.__add_data_texture(uniform_name, src_tex, dst_tex, one_pixel_tex);\n\n if (default_value_v3)\n {\n this.__flood_data_texture_rgb(new_data_tex, default_value_v3);\n }\n }\n\n add_object_uniform_v4(uniform_name, default_value_v4)\n {\n const src_tex = this.__create_rgba_texture(this.batch_width);\n const dst_tex = this.__create_rgba_texture(this.batch_width);\n const one_pixel_tex = this.__create_rgba_texture(1);\n\n const new_data_tex = this.__add_data_texture(uniform_name, src_tex, dst_tex, one_pixel_tex);\n\n if (default_value_v4)\n {\n this.__flood_data_texture_rgba(new_data_tex, default_value_v4);\n }\n }\n\n add_object_uniform_v4_float(uniform_name, default_value_v4)\n {\n const src_tex = this.__create_rgba_float_texture(this.batch_width);\n const dst_tex = this.__create_rgba_float_texture(this.batch_width);\n const one_pixel_tex = this.__create_rgba_float_texture(1);\n\n const new_data_tex = this.__add_data_texture(uniform_name, src_tex, dst_tex, one_pixel_tex);\n\n if (default_value_v4)\n {\n this.__flood_data_texture_rgba(new_data_tex, default_value_v4);\n }\n }\n\n set_object_uniform_v3(object_name, uniform_name, vector3, use_r, use_g, use_b)\n {\n const obj_index = this.__get_object_index(object_name);\n const data_texture = this.__get_data_texture(uniform_name);\n\n this.__set_pixel_rgb(data_texture.src, obj_index, vector3, use_r, use_g, use_b);\n this.__set_pixel_rgb(data_texture.one_pixel, 0, vector3, use_r, use_g, use_b);\n\n data_texture.last_accessed_index = obj_index;\n\n data_texture.dirty_count++;\n }\n\n set_object_uniform_v4(object_name, uniform_name, vector4, use_r, use_g, use_b, use_a)\n {\n const obj_index = this.__get_object_index(object_name);\n const data_texture = this.__get_data_texture(uniform_name);\n\n this.__set_pixel_rgba(data_texture.src, obj_index, vector4, use_r, use_g, use_b, use_a);\n this.__set_pixel_rgba(data_texture.one_pixel, 0, vector4, use_r, use_g, use_b, use_a);\n data_texture.last_accessed_index = obj_index;\n\n data_texture.dirty_count++;\n }\n\n upload_texture_data(renderer, upload_budget)\n {\n for (let i = 0; i < this.data_textures.length; i++)\n {\n if (upload_budget > 0 && this.data_textures[i].dirty_count > 0)\n {\n if (this.data_textures[i].dirty_count === 1)\n {\n this.__partial_texture_data_upload(renderer, this.data_textures[i]);\n }\n if (this.data_textures[i].dirty_count > 1)\n {\n this.__full_texture_data_upload(renderer, this.data_textures[i]);\n }\n\n this.data_textures[i].dirty_count = 0;\n\n upload_budget--;\n }\n }\n }\n\n get_uniform_dirty_count()\n {\n this.uniform_dirty_count = 0;\n for (let i = 0; i < this.data_textures.length; i++)\n {\n if (this.data_textures[i].dirty_count > 0)\n {\n this.uniform_dirty_count++;\n }\n }\n return this.uniform_dirty_count;\n }\n\n __full_texture_data_upload(renderer, texture_data)\n {\n // console.log(\"full texture update of\"+ texture_data.name);\n texture_data.dst.needsUpdate = true;\n renderer.copyTextureToTexture(\n this.zero_offset,\n texture_data.src,\n texture_data.dst\n );\n }\n\n __partial_texture_data_upload(renderer, texture_data)\n {\n // console.log(\"partial texture update\"+ texture_data.name);\n const index = texture_data.last_accessed_index;\n if (index === -1)\n {\n return;\n }\n\n this.write_offset.y = Math.floor(index / this.batch_width);\n this.write_offset.x = index - this.batch_width * this.write_offset.y;\n renderer.copyTextureToTexture(\n this.write_offset,\n texture_data.one_pixel,\n texture_data.dst\n );\n }\n\n get_mesh()\n {\n return new Mesh(this.geometry, this.material);\n }\n\n __set_pixel_rgb(data_texture, index, vector3, use_r, use_g, use_b)\n {\n if (use_r)\n {\n data_texture.image.data[index * 3 + 0] = vector3.x;\n }\n if (use_g)\n {\n data_texture.image.data[index * 3 + 1] = vector3.y;\n }\n if (use_b)\n {\n data_texture.image.data[index * 3 + 2] = vector3.z;\n }\n }\n\n __set_pixel_rgba(data_texture, index, vector4, use_r, use_g, use_b, use_a)\n {\n if (use_r)\n {\n data_texture.image.data[index * 4 + 0] = vector4.x;\n }\n if (use_g)\n {\n data_texture.image.data[index * 4 + 1] = vector4.y;\n }\n if (use_b)\n {\n data_texture.image.data[index * 4 + 2] = vector4.z;\n }\n if (use_a)\n {\n data_texture.image.data[index * 4 + 3] = vector4.w;\n }\n }\n\n __flood_data_texture_rgb(data_texture, v3)\n {\n for (let i = 0; i < this.batch_width * this.batch_width; i++)\n {\n this.__set_pixel_rgb(data_texture.src, i, v3, true, true, true);\n data_texture.dirty_count++;\n }\n }\n\n __flood_data_texture_rgba(data_texture, v4)\n {\n for (let i = 0; i < this.batch_width * this.batch_width; i++)\n {\n this.__set_pixel_rgba(data_texture.src, i, v4, true, true, true, true);\n data_texture.dirty_count++;\n }\n }\n\n __create_rgb_texture(width)\n {\n const data = new Uint8Array(3 * width * width);\n return new DataTexture(data, width, width, RGBFormat);\n }\n\n __create_rgba_texture(width)\n {\n const data = new Uint8Array(4 * width * width);\n return new DataTexture(data, width, width, RGBAFormat);\n }\n\n __create_rgba_float_texture(width)\n {\n const data = new Float32Array(4 * width * width);\n return new DataTexture(data, width, width, RGBAFormat, FloatType);\n }\n\n __get_data_texture(uniform_name)\n {\n for (let i = 0; i < this.data_textures.length; i++)\n {\n if (this.data_textures[i].name === uniform_name)\n {\n return this.data_textures[i];\n }\n }\n console.error('Data texture ' + uniform_name + ' does not exist');\n return undefined;\n }\n\n __get_object_index(name)\n {\n for (let i = 0; i < this.object_names.length; i++)\n {\n if (this.object_names[i] === name)\n {\n return i;\n }\n }\n console.error('the name ' + name + ' is not contained in this batch');\n return undefined;\n }\n\n __add_data_texture(uniform_name, src_texture, dst_texture, one_pixel_text)\n {\n dst_texture.needsUpdate = true;\n\n this.data_textures.push({\n name: uniform_name,\n src: src_texture,\n dst: dst_texture,\n one_pixel: one_pixel_text,\n last_accessed_index: -1,\n dirty_count: 0\n });\n\n this.uniforms[uniform_name] = { value: dst_texture };\n return this.data_textures[this.data_textures.length - 1];\n }\n\n dispose()\n {\n for (let i = 0; i < this.data_textures.length; i++)\n {\n this.data_textures[i].src.dispose();\n this.data_textures[i].dst.dispose();\n this.data_textures[i].one_pixel.dispose();\n }\n }\n}\n\nexport { GeometryBatch };\n","import { GeometryBatch } from './GeometryBatch';\n\nimport * as BufferGeometryUtils from 'three/examples/jsm/utils/BufferGeometryUtils.js';\n\nimport { BufferAttribute } from 'three';\nimport { OMath } from '../utilities/OMath';\n\nclass GeometryBatcher\n{\n init()\n {\n this.batches = [];\n }\n\n batch(buffer_geometries)\n {\n const attr_accessor_uvs = [];\n const texture_width = OMath.ceilPowerOfTwo(Math.sqrt(buffer_geometries.length));\n // console.log(\"Store count: \" + buffer_geometries.length + \", Texture size: \" +texture_width);\n\n this.__init_uv_array(attr_accessor_uvs, texture_width);\n\n let uv_index = 0;\n\n for (let i = 0; i < buffer_geometries.length; i++)\n {\n const vertex_count = buffer_geometries[i].getAttribute('position').count;\n const y = Math.floor(i / texture_width);\n const x = i - texture_width * y;\n for (let count = 0; count < vertex_count; count++)\n {\n attr_accessor_uvs[uv_index] = (x / texture_width) + 0.5 / texture_width;\n attr_accessor_uvs[uv_index + 1] = (y / texture_width) + 0.5 / texture_width;\n uv_index += 2;\n }\n }\n\n const buffer_attribute = new BufferAttribute(new Float32Array(attr_accessor_uvs), 2);\n const buffer_geometry = BufferGeometryUtils.mergeBufferGeometries(buffer_geometries);\n buffer_geometry.setAttribute('attr_accessor_uv', buffer_attribute);\n\n this.batches.push(new GeometryBatch(buffer_geometry, texture_width));\n return this.batches[this.batches.length - 1];\n }\n\n upload_texture_data(renderer)\n {\n for (let i = 0; i < this.batches.length; i++)\n {\n this.batches[i].upload_texture_data(renderer, 1);\n }\n }\n\n __init_uv_array(uvs, texture_width)\n {\n for (let i = 0; i < texture_width * texture_width * 2; i++)\n {\n uvs.push(0);\n }\n }\n}\n\nconst geometry_batcher = new GeometryBatcher();\nexport { geometry_batcher as GeometryBatcher };\n","import { CameraManager } from './CameraManager';\nimport { Graphics } from './Graphics';\n\nimport { Vector2 } from 'three';\nimport { Scene } from 'three';\nimport { OrthographicCamera } from 'three';\n\nclass UI\n{\n init(input)\n {\n this.input = input;\n this.ui_elements = [];\n this._tmp_normalized_pos = new Vector2();\n this.ss_scene = new Scene();\n this.ss_scene.matrixWorldAutoUpdate = false;\n this.ss_scene.frustumCulled = false;\n\n this.ws_scene = new Scene();\n this.ws_scene.matrixWorldAutoUpdate = false;\n this.ws_scene.frustumCulled = false;\n\n this.ss_camera = new OrthographicCamera(-1, 1, 1, -1, -100, 100);\n }\n\n delete_element(elem)\n {\n const index = this.ui_elements.indexOf(elem);\n if (index > -1)\n {\n this.ui_elements.splice(index, 1);\n }\n\n this.ss_scene.remove(elem);\n this.ws_scene.remove(elem);\n\n elem.dispose();\n }\n\n add_screen_space_element(elem)\n {\n this.ui_elements.push(elem);\n this.ss_scene.add(elem);\n\n elem.set_screen_space_coordinate_system();\n }\n\n add_world_space_element(elem)\n {\n this.ui_elements.push(elem);\n this.ws_scene.add(elem);\n\n elem.set_world_space_coordinate_system();\n }\n\n update()\n {\n // this.ss_camera.left = -OScreen.width / 2;\n // this.ss_camera.right = OScreen.width / 2;\n // this.ss_camera.top = OScreen.top / 2;\n // this.ss_camera.right = -OScreen.bottom / 2;\n this.ss_camera.updateProjectionMatrix();\n\n this._tmp_normalized_pos.copy(this.input.NDC);\n for (let i = 0; i < this.ui_elements.length; i++)\n {\n this.ui_elements[i].update_state(this._tmp_normalized_pos);\n }\n }\n\n render(renderer)\n {\n // renderer.render_ui(this.scene);\n if (this.ss_scene.children.length > 0)\n {\n Graphics.render(this.ss_scene, this.ss_camera);\n }\n if (this.ws_scene.children.length > 0)\n {\n Graphics.render(this.ws_scene, CameraManager.current);\n }\n }\n\n clear()\n {\n this.current_clicked_element = undefined;\n }\n}\n\nconst ui = new UI();\nexport { ui as UI };\n","import { Vector3, Plane, Quaternion, Sphere, Line3 } from 'three';\nimport { OMath } from './OMath';\n\nclass PerspectiveFrustumPointFitter\n{\n constructor()\n {\n this.sphere = new Sphere();\n }\n\n fit_points(points, camera_quaternion, vertical_fov, aspect)\n {\n this.sphere.setFromPoints(points);\n\n const v_fov = OMath.degToRad(vertical_fov / 2);\n const h_fov = (2 * Math.atan(Math.tan(v_fov) * aspect)) / 2;\n\n const up_plane_normal = this.get_up_plane_normal(camera_quaternion, v_fov);\n const down_plane_normal = this.get_down_plane_normal(camera_quaternion, v_fov);\n const left_plane_normal = this.get_left_plane_normal(camera_quaternion, h_fov);\n const right_plane_normal = this.get_right_plane_normal(camera_quaternion, h_fov);\n\n const camera_forward_dir = new Vector3(0, 0, -1).applyQuaternion(camera_quaternion);\n\n const sphere_center = this.sphere.center.clone();\n\n const pull_back_distance = this.get_distance_to_fit_rect(this.sphere.radius * 2, this.sphere.radius * 2, vertical_fov, aspect);\n const far_pos = sphere_center.clone().add(camera_forward_dir.clone().multiplyScalar(pull_back_distance * -1));\n\n const up_plane = new Plane().setFromNormalAndCoplanarPoint(up_plane_normal, far_pos);\n const down_plane = new Plane().setFromNormalAndCoplanarPoint(down_plane_normal, far_pos);\n\n const left_plane = new Plane().setFromNormalAndCoplanarPoint(left_plane_normal, far_pos);\n const right_plane = new Plane().setFromNormalAndCoplanarPoint(right_plane_normal, far_pos);\n\n this.apply_center_correction_to_pos(far_pos, points, camera_quaternion, up_plane, down_plane, left_plane, right_plane);\n\n up_plane.setFromNormalAndCoplanarPoint(up_plane_normal, far_pos);\n down_plane.setFromNormalAndCoplanarPoint(down_plane_normal, far_pos);\n\n left_plane.setFromNormalAndCoplanarPoint(left_plane_normal, far_pos);\n right_plane.setFromNormalAndCoplanarPoint(right_plane_normal, far_pos);\n\n let closest_distance = Infinity;\n\n const inverse_dir = camera_forward_dir.clone().multiplyScalar(pull_back_distance * -2);\n for (let i = 0; i < points.length; i++)\n {\n const line = new Line3(points[i].clone(), points[i].clone().add(inverse_dir));\n\n const up_line_intersection = new Vector3();\n const down_line_intersection = new Vector3();\n\n const left_line_intersection = new Vector3();\n const right_line_intersection = new Vector3();\n\n up_plane.intersectLine(line, up_line_intersection);\n down_plane.intersectLine(line, down_line_intersection);\n\n left_plane.intersectLine(line, left_line_intersection);\n right_plane.intersectLine(line, right_line_intersection);\n\n if (up_line_intersection.length() < 0.0001)\n {\n console.log('up intersection not found', i);\n }\n if (down_line_intersection.length() < 0.0001)\n {\n console.log('down intersection not found', i);\n }\n if (left_line_intersection.length() < 0.0001)\n {\n console.log('left intersection not found', i);\n }\n if (right_line_intersection.length() < 0.0001)\n {\n console.log('right intersection not found', i);\n }\n\n const new_up_distance = points[i].clone().sub(up_line_intersection).length();\n const new_down_distance = points[i].clone().sub(down_line_intersection).length();\n\n const new_left_distance = points[i].clone().sub(left_line_intersection).length();\n const new_right_distance = points[i].clone().sub(right_line_intersection).length();\n\n const vertical_min = Math.min(new_up_distance, new_down_distance);\n const horizontal_min = Math.min(new_left_distance, new_right_distance);\n\n const min = Math.min(vertical_min, horizontal_min);\n\n if (min < closest_distance)\n {\n closest_distance = min;\n }\n }\n\n const forward_correction = camera_forward_dir.clone().multiplyScalar(closest_distance);\n const closest_position = far_pos.clone().add(forward_correction);\n\n return closest_position;\n }\n\n apply_center_correction_to_pos(target_pos, points, camera_quaternion, up_plane, down_plane, left_plane, right_plane)\n {\n const vertical_offset = this.get_vertical_correction(points, down_plane, up_plane, camera_quaternion);\n const horizontal_offset = this.get_horizontal_correction(points, left_plane, right_plane, camera_quaternion);\n\n target_pos.add(vertical_offset);\n target_pos.add(horizontal_offset);\n }\n\n get_vertical_correction(points, down_plane, up_plane, camera_quaternion)\n {\n let closest_distance_to_up_plane = Infinity;\n let closest_distance_to_down_plane = Infinity;\n // let closest_up_point = undefined;\n // let closest_down_point = undefined;\n\n const up_dir = new Vector3(0, 1, 0).applyQuaternion(camera_quaternion);\n for (let i = 0; i < points.length; i++)\n {\n const down_line = new Line3(points[i].clone(), points[i].clone().add(up_dir.clone().multiplyScalar(-5000000)));\n const up_line = new Line3(points[i].clone(), points[i].clone().add(up_dir.clone().multiplyScalar(5000000)));\n\n const down_line_intersection = new Vector3();\n const up_line_intersection = new Vector3();\n\n down_plane.intersectLine(down_line, down_line_intersection);\n up_plane.intersectLine(up_line, up_line_intersection);\n\n const down_dist = down_line_intersection.distanceTo(points[i]);\n const up_dist = up_line_intersection.distanceTo(points[i]);\n\n if (up_line_intersection.length() < 0.0001)\n {\n console.log('vertical up intersection not found', i);\n }\n if (down_line_intersection.length() < 0.0001)\n {\n console.log('vertical down intersection not found', i);\n }\n\n if (down_dist < closest_distance_to_down_plane)\n {\n closest_distance_to_down_plane = down_dist;\n // closest_down_point = points[i];\n }\n if (up_dist < closest_distance_to_up_plane)\n {\n closest_distance_to_up_plane = up_dist;\n // closest_up_point = points[i];\n }\n }\n\n const correction = (closest_distance_to_up_plane - closest_distance_to_down_plane) / 2;\n\n // console.log(\"vertical_correction\", correction)\n return up_dir.clone().multiplyScalar(-correction);\n }\n\n get_horizontal_correction(points, left_plane, right_plane, camera_quaternion)\n {\n let closest_distance_to_right_plane = Infinity;\n let closest_distance_to_left_plane = Infinity;\n // let closest_right_point = undefined;\n // let closest_left_point = undefined;\n\n const right_dir = new Vector3(1, 0, 0).applyQuaternion(camera_quaternion);\n\n for (let i = 0; i < points.length; i++)\n {\n const left_line = new Line3(points[i].clone(), points[i].clone().add(right_dir.clone().multiplyScalar(-5000000)));\n const right_line = new Line3(points[i].clone(), points[i].clone().add(right_dir.clone().multiplyScalar(5000000)));\n\n const left_line_intersection = new Vector3();\n const right_line_intersection = new Vector3();\n\n left_plane.intersectLine(left_line, left_line_intersection);\n right_plane.intersectLine(right_line, right_line_intersection);\n\n const left_dist = left_line_intersection.distanceTo(points[i]);\n const right_dist = right_line_intersection.distanceTo(points[i]);\n\n if (left_line_intersection.length() < 0.0001)\n {\n console.log('left intersection not found', i);\n }\n if (right_line_intersection.length() < 0.0001)\n {\n console.log('right intersection not found', i);\n }\n\n if (left_dist < closest_distance_to_left_plane)\n {\n closest_distance_to_left_plane = left_dist;\n // closest_left_point = points[i];\n }\n if (right_dist < closest_distance_to_right_plane)\n {\n closest_distance_to_right_plane = right_dist;\n // closest_right_point = points[i];\n }\n }\n\n const correction = (closest_distance_to_right_plane - closest_distance_to_left_plane) / 2;\n // console.log(\"horizontal_correction\", correction)\n\n return right_dir.clone().multiplyScalar(-correction);\n }\n\n get_up_plane_normal(camera_quaternion, v_fov)\n {\n const up_plane_normal = new Vector3(0, -1, 0);\n up_plane_normal.applyQuaternion(new Quaternion().setFromAxisAngle(new Vector3(1, 0, 0), v_fov));\n up_plane_normal.applyQuaternion(camera_quaternion);\n return up_plane_normal;\n }\n\n get_down_plane_normal(camera_quaternion, v_fov)\n {\n const down_plane_normal = new Vector3(0, 1, 0);\n down_plane_normal.applyQuaternion(new Quaternion().setFromAxisAngle(new Vector3(1, 0, 0), -v_fov));\n down_plane_normal.applyQuaternion(camera_quaternion);\n return down_plane_normal;\n }\n\n get_left_plane_normal(camera_quaternion, h_fov)\n {\n const left_plane_normal = new Vector3(1, 0, 0);\n left_plane_normal.applyQuaternion(new Quaternion().setFromAxisAngle(new Vector3(0, 1, 0), h_fov));\n left_plane_normal.applyQuaternion(camera_quaternion);\n return left_plane_normal;\n }\n\n get_right_plane_normal(camera_quaternion, h_fov)\n {\n const right_plane_normal = new Vector3(-1, 0, 0);\n right_plane_normal.applyQuaternion(new Quaternion().setFromAxisAngle(new Vector3(0, 1, 0), -h_fov));\n right_plane_normal.applyQuaternion(camera_quaternion);\n return right_plane_normal;\n }\n\n get_distance_to_fit_rect(width, height, vertical_fov, aspect)\n {\n const v_fov = (vertical_fov / 2) * Math.PI / 180;\n const h_fov = (2 * Math.atan(Math.tan(v_fov) * aspect)) / 2;\n\n const distV = height / Math.tan(v_fov);\n const distH = width / Math.tan(h_fov);\n return Math.max(Math.abs(distH), Math.abs(distV));\n }\n}\n\nexport { PerspectiveFrustumPointFitter };\n","import { Vector3, Box3 } from 'three';\n\nclass OrthographicFrustumPointFitter\n{\n constructor()\n {\n\n }\n\n fit_points(points, camera_quaternion, vertical_fov, aspect)\n {\n const inverse_camera_quat = camera_quaternion.clone().inverse();\n\n const inverted_points = [];\n\n for (let i = 0; i < points.length; i++)\n {\n inverted_points.push(points[i].clone().applyQuaternion(inverse_camera_quat));\n }\n\n const box = new Box3().setFromPoints(inverted_points);\n const size = new Vector3();\n box.getSize(size);\n\n const distance = this.get_distance_to_fit_rect(size.x / 2, size.y / 2, vertical_fov, aspect);\n\n const center = new Vector3();\n box.getCenter(center);\n\n center.applyQuaternion(camera_quaternion);\n\n return {\n center: center,\n distance_to_center: distance\n };\n }\n\n get_distance_to_fit_rect(width, height, vertical_fov, aspect)\n {\n const v_fov = (vertical_fov / 2) * Math.PI / 180;\n const h_fov = (2 * Math.atan(Math.tan(v_fov) * aspect)) / 2;\n\n const distV = height / Math.tan(v_fov);\n const distH = width / Math.tan(h_fov);\n return Math.max(Math.abs(distH), Math.abs(distV));\n }\n}\n\nexport { OrthographicFrustumPointFitter };\n","import { CameraManager } from '../CameraManager';\nimport { OMath } from '../utilities/OMath';\nimport { OScreen } from '../OScreen';\n\nimport { Vector3 } from 'three';\nimport { Matrix4 } from 'three';\nimport { Plane } from 'three';\nimport { Ray } from 'three';\nimport { Sphere } from 'three';\nimport { Box3 } from 'three';\nimport { PerspectiveFrustumPointFitter } from './PerspectiveFrustumPointFitter';\nimport { OrthographicFrustumPointFitter } from './OrthographicFrustumPointFitter';\n\nclass CameraUtilities\n{\n init(input)\n {\n this.tmp_mat = new Matrix4();\n this.plane = new Plane();\n this.ray = new Ray();\n\n this.tmp_size = new Vector3();\n this.tmp_unproj = new Vector3();\n\n this.input = input;\n }\n\n get_up_dir(camera)\n {\n camera = camera || CameraManager.current;\n const tmp_vec = new Vector3();\n\n tmp_vec.set(0, 1, 0);\n tmp_vec.applyQuaternion(camera.quaternion);\n\n return tmp_vec;\n }\n\n get_forward_dir(camera)\n {\n camera = camera || CameraManager.current;\n const tmp_vec = new Vector3();\n\n tmp_vec.set(0, 0, -1);\n tmp_vec.applyQuaternion(camera.quaternion);\n\n return tmp_vec;\n }\n\n get_right_dir(camera)\n {\n camera = camera || CameraManager.current;\n const tmp_vec = new Vector3();\n\n tmp_vec.set(1, 0, 0);\n tmp_vec.applyQuaternion(camera.quaternion);\n return tmp_vec;\n }\n\n unproject_mouse_position(NDC, camera)\n {\n camera = camera || CameraManager.current;\n const tmp_vec = new Vector3();\n\n const v_fov = (camera.fov / 2) * Math.PI / 180;\n const h_fov = (2 * Math.atan(Math.tan(v_fov) * camera.aspect)) / 2;\n\n const distV = Math.tan(v_fov) * camera.far;\n const distH = Math.tan(h_fov) * camera.far;\n\n tmp_vec.set(distH * NDC.x, distV * NDC.y, -camera.far).normalize();\n\n return tmp_vec.applyQuaternion(camera.quaternion);\n }\n\n get_plane_intersection(plane_position, plane_normal, NDC, camera)\n {\n camera = camera || CameraManager.current;\n NDC = NDC || this.input.NDC;\n\n const tmp_vec = new Vector3();\n\n this.plane.setFromNormalAndCoplanarPoint(plane_normal || this.get_forward_dir(camera), plane_position);\n if (camera.isPerspectiveCamera)\n {\n this.ray.set(camera.position, this.unproject_mouse_position(NDC, camera));\n }\n else\n {\n this.tmp_unproj.set(NDC.x, NDC.y, 1).unproject(camera);\n this.ray.set(camera.position, this.tmp_unproj);\n }\n\n this.ray.intersectPlane(this.plane, tmp_vec);\n return tmp_vec;\n }\n\n fit_points_on_camera(points, zoom_scale = 1)\n {\n const points_sphere = new Sphere().setFromPoints(points);\n const world_space_center = points_sphere.center;\n const camera_forward = this.get_forward_dir(CameraManager.current).clone();\n\n const plane = new Plane().setFromNormalAndCoplanarPoint(camera_forward, world_space_center);\n\n const points_on_plane = OMath.project_points_on_plane(points, plane);\n\n const projected_points_center = new Vector3();\n let box = new Box3().setFromPoints(points_on_plane);\n box.getCenter(projected_points_center);\n\n const up = new Vector3(0, 1, 0).applyQuaternion(CameraManager.current.quaternion);\n const right = up.clone().cross(camera_forward).normalize();\n const mat = new Matrix4().set(right.x, up.x, camera_forward.x, world_space_center.x,\n right.y, up.y, camera_forward.y, world_space_center.y,\n right.z, up.z, camera_forward.z, world_space_center.z,\n 0, 0, 0, 1);\n\n const inverse_mat = new Matrix4().getInverse(mat);\n for (let i = 0; i < points_on_plane.length; i++)\n {\n points_on_plane[i].applyMatrix4(inverse_mat);\n }\n\n const size = new Vector3();\n box = new Box3().setFromPoints(points_on_plane);\n box.getSize(size);\n size.multiplyScalar(zoom_scale);\n const projected_center = new Vector3();\n box.getCenter(projected_center);\n\n return {\n position: projected_points_center,\n zoom: this.get_zoom_to_fit_rect(size.x / 2, size.y / 2)\n };\n }\n\n get_zoom_to_fit_rect(width, height)\n {\n const v_fov = (CameraManager.current.fov / 2) * Math.PI / 180;\n const h_fov = (2 * Math.atan(Math.tan(v_fov) * CameraManager.current.aspect)) / 2;\n\n const distV = height / Math.tan(v_fov);\n const distH = width / Math.tan(h_fov);\n\n return Math.max(Math.abs(distH), Math.abs(distV));\n }\n\n get_zoom_to_fit_box(bb, camera)\n {\n if (camera.isOrthographicCamera)\n {\n bb.getSize(this.tmp_size);\n\n const obj_x = this.tmp_size.x;\n const obj_y = this.tmp_size.y;\n const object_aspect = obj_x / obj_y;\n if (OScreen.aspect_ratio / object_aspect > 1)\n {\n return OScreen.height / obj_y;\n }\n else\n {\n return OScreen.width / obj_x;\n }\n }\n else\n {\n // return this.fit_points_on_camera([bb.min, bb.max], 1).zoom;\n const size = new Vector3();\n bb.getSize(size);\n return this.get_zoom_to_fit_rect(size.x, size.y);\n }\n }\n\n get_html_screen_pos(object, camera)\n {\n camera = camera || CameraManager.current;\n const tmp_vec = new Vector3();\n\n object.getWorldPosition(tmp_vec);\n tmp_vec.project(camera);\n\n tmp_vec.x = (tmp_vec.x * 0.5 + 0.5) * (OScreen.width);\n tmp_vec.y = (1 - (tmp_vec.y * 0.5 + 0.5)) * OScreen.height;\n return tmp_vec;\n }\n\n world_pos_to_screen(pos, camera)\n {\n camera = camera || CameraManager.current;\n const tmp_vec = new Vector3();\n\n tmp_vec.copy(pos);\n tmp_vec.project(camera);\n\n tmp_vec.x = (tmp_vec.x * 0.5 + 0.5) * (OScreen.width);\n tmp_vec.y = (1 - (tmp_vec.y * 0.5 + 0.5)) * OScreen.height;\n return tmp_vec;\n }\n\n update_projection(camera)\n {\n camera.left = -OScreen.width / 2;\n camera.right = OScreen.width / 2;\n camera.top = OScreen.height / 2;\n camera.bottom = -OScreen.height / 2;\n camera.aspect = OScreen.aspect_ratio;\n camera.updateProjectionMatrix(true);\n }\n\n fit_bounding_box_points(camera, bb, scale = 1)\n {\n const dir = new Vector3();\n dir.copy(bb.max).sub(bb.min);\n\n const p1 = bb.min.clone();\n\n const p2 = p1.clone().add(new Vector3(dir.x, 0, 0));\n const p3 = p1.clone().add(new Vector3(0, dir.y, 0));\n const p4 = p1.clone().add(new Vector3(0, 0, dir.z));\n\n const p5 = p1.clone().add(new Vector3(dir.x, 0, dir.z));\n const p6 = p1.clone().add(new Vector3(0, dir.y, dir.z));\n const p7 = bb.max.clone();\n const p8 = p1.clone().add(new Vector3(dir.x, dir.y, 0));\n return this.fit_points(camera, [p1, p2, p3, p4, p5, p6, p7, p8], scale);\n }\n\n fit_points(camera, points, zoom_scale = 1)\n {\n if (camera.isPerspectiveCamera)\n {\n const camera_forward_dir = new Vector3(0, 0, -1).applyQuaternion(camera.quaternion);\n const camera_backward_dir = camera_forward_dir.clone().multiplyScalar(-1);\n\n const fitter = new PerspectiveFrustumPointFitter();\n\n const aspect_ratio = OScreen.aspect_ratio;\n\n const camera_pos = fitter.fit_points(points, camera.quaternion, camera.fov * zoom_scale, aspect_ratio);\n const box = new Box3().setFromPoints(points);\n const center = new Vector3();\n box.getCenter(center);\n\n const reference_position_plane = new Plane().setFromNormalAndCoplanarPoint(camera_backward_dir, center);\n\n const camera_ray = new Ray(camera_pos, camera_forward_dir);\n\n const reference_position = new Vector3();\n camera_ray.intersectPlane(reference_position_plane, reference_position);\n\n const zoom = camera_pos.distanceTo(reference_position);\n\n return {\n zoom: zoom,\n reference_position: reference_position,\n camera_position: camera_pos\n };\n }\n else\n {\n const fitter = new OrthographicFrustumPointFitter();\n const result = fitter.fit_points(points, this.reference_rotation, camera.fov * zoom_scale, OScreen.aspect_ratio);\n\n this.reference_position.copy(result.center);\n this.reference_zoom = result.distance_to_center;\n\n const forward = new Vector3(0, 0, 1).applyQuaternion(camera.quaternion);\n return {\n zoom: result.distance_to_center,\n reference_position: result.center,\n camera_position: forward.multiplyScalar(result.distance_to_center)\n };\n }\n }\n}\n\nconst camera_utilities = new CameraUtilities();\nexport { camera_utilities as CameraUtilities };\n","import { Browser } from './Browser';\nimport { CameraManager } from './CameraManager';\nimport { Capabilities } from './Capabilities';\nimport { Configuration } from './Configuration';\nimport { Debug } from './Debug';\nimport { EventManager } from './EventManager';\nimport { Graphics } from './Graphics';\nimport { OS } from './OS';\nimport { OScreen } from './OScreen';\nimport { ReflectionPlaneContext } from './ReflectionPlaneContext';\nimport { ResourceContainer } from './ResourceContainer';\nimport { SceneManager } from './SceneManager';\nimport { GeometryBatcher } from './static_batcher/GeometryBatcher';\nimport { Time } from './Time';\nimport { UI } from './UI';\nimport { CameraUtilities } from './utilities/CameraUtilities';\n\nclass Initializer\n{\n constructor()\n {\n }\n\n init(input)\n {\n CameraManager.init();\n CameraUtilities.init(input);\n Capabilities.init();\n Configuration.init();\n EventManager.init();\n GeometryBatcher.init();\n\n OS.init();\n Browser.init();\n ReflectionPlaneContext.init();\n ResourceContainer.init();\n SceneManager.init();\n OScreen.init();\n Time.init();\n UI.init(input);\n\n Debug.init();\n }\n\n dispose(render_loop)\n {\n Graphics.dispose();\n SceneManager.dispose();\n\n render_loop.dispose();\n }\n}\n\nconst initializer = new Initializer();\nexport { initializer as Initializer };\n","import { BlitMaterial } from '../materials/BlitMaterial';\n\nimport frag from '../shaders/ssao/ssao.frag';\nimport vert from '../shaders/ssao/ssao.vert';\n\nimport { Matrix4 } from 'three';\nimport { Vector3 } from 'three';\nimport { DataTexture } from 'three';\nimport { RGBFormat } from 'three';\nimport { RepeatWrapping } from 'three';\n\nimport { OMath } from '../utilities/OMath';\nclass SSAOMaterial extends BlitMaterial\n{\n constructor()\n {\n super(frag, vert);\n\n this.uniforms._InverseProjMatrix = { value: new Matrix4() };\n this.uniforms._ProjectionMatrix = { value: new Matrix4() };\n\n this.uniforms._Bias = { value: 0.0125 };\n this.uniforms._Radius = { value: 0.3 };\n this.uniforms._FarPlane = { value: 100 };\n\n this.uniforms._SampleKernel = { value: this.__get_sample_kernel() };\n this.uniforms._RandomRotation = { value: this.__get_rotation_kernel() };\n }\n\n __get_sample_kernel()\n {\n const sample_kernel = [];\n const kernel_size = 64;\n\n for (let i = 0; i < kernel_size; i++)\n {\n const dir = new Vector3(Math.random() * 2 - 1,\n Math.random() * 2 - 1,\n Math.random());\n dir.normalize();\n let scale = i / kernel_size;\n scale = OMath.lerp(0.1, 1.0, scale * scale);\n dir.multiplyScalar(scale);\n\n sample_kernel.push(dir);\n }\n return sample_kernel;\n }\n\n __get_rotation_kernel()\n {\n const rotation_kernel = new Uint8Array(3 * 16);\n for (let i = 0; i < 16; i++)\n {\n rotation_kernel[i * 3 + 1] = Math.floor(Math.random() * 255);\n rotation_kernel[i * 3 + 2] = Math.floor(Math.random() * 255);\n rotation_kernel[i * 3 + 3] = 0;\n }\n\n const rotation_texture = new DataTexture(rotation_kernel, 4, 4, RGBFormat);\n rotation_texture.wrapS = RepeatWrapping;\n rotation_texture.wrapT = RepeatWrapping;\n\n rotation_texture.needsUpdate = true;\n return rotation_texture;\n }\n}\n\nexport { SSAOMaterial };\n","import { BlitMaterial } from '../materials/BlitMaterial';\n\nimport frag from '../shaders/ssao/ssao_compose.frag';\n\nclass SSAOComposeMaterial extends BlitMaterial\n{\n constructor()\n {\n super(frag);\n this.uniforms._AO = { value: undefined };\n }\n}\n\nexport { SSAOComposeMaterial };\n","import { BlitMaterial } from '../materials/BlitMaterial';\n\nimport frag from '../shaders/depth_normals/debug_normals.frag';\nimport depth_normals_vert from '../shaders/ssao/ssao.vert';\n\nimport { Matrix4 } from 'three';\n\nclass DisplayNormalTextureMaterial extends BlitMaterial\n{\n constructor()\n {\n super(frag, depth_normals_vert);\n this.uniforms._FarPlane = { value: 1 };\n this.uniforms._InverseProjMatrix = { value: new Matrix4() };\n }\n}\n\nexport { DisplayNormalTextureMaterial };\n","import { BlitMaterial } from '../materials/BlitMaterial';\n\nimport frag from '../shaders/box_blur/box_blur.frag';\n\nimport { Vector2 } from 'three';\n\nclass BoxBlurMaterial extends BlitMaterial\n{\n constructor()\n {\n super(frag);\n this.uniforms._SampleDir = { value: new Vector2() };\n }\n}\n\nexport { BoxBlurMaterial };\n","import { BoxBlurMaterial } from '../materials/BoxBlurMaterial';\nimport { Graphics } from '../Graphics';\n\nimport { WebGLRenderTarget } from 'three';\n\nclass Blurrer\n{\n constructor(renderer)\n {\n this.RT1 = new WebGLRenderTarget(1, 1);\n this.RT2 = new WebGLRenderTarget(1, 1);\n this.box_blur_mat = new BoxBlurMaterial();\n }\n\n blur(RT)\n {\n if (RT.width !== this.RT1.width || RT.height !== this.RT1.height)\n {\n this.RT1.setSize(RT.width, RT.height);\n this.RT2.setSize(RT.width, RT.height);\n }\n\n this.box_blur_mat.uniforms._SampleDir.value.set(1, 0);\n Graphics.blit(RT, this.RT1, this.box_blur_mat);\n this.box_blur_mat.uniforms._SampleDir.value.set(0, 1);\n Graphics.blit(this.RT1, RT, this.box_blur_mat);\n // return this.RT2;\n }\n}\n\nexport { Blurrer };\n","import { CameraManager } from '../CameraManager';\nimport { SceneManager } from '../SceneManager';\nimport { OScreen } from '../OScreen';\nimport { BaseRender } from '../render_mode/BaseRender';\nimport { Configuration } from '../Configuration';\nimport { SSAOMaterial } from '../materials/SSAOMaterial';\nimport { SSAOComposeMaterial } from '../materials/SSAOComposeMaterial';\nimport { DisplayNormalTextureMaterial } from '../materials/DisplayNormalTextureMaterial';\nimport { Blurrer } from '../render_utilities/Blurrer';\nimport { Graphics } from '../Graphics';\n\nimport { WebGLRenderTarget } from 'three';\n\nclass NormalAORender extends BaseRender\n{\n constructor()\n {\n super();\n\n this.ssao_mat = new SSAOMaterial();\n this.ssao_compose_mat = new SSAOComposeMaterial();\n this.debug_normals = new DisplayNormalTextureMaterial();\n\n this.ssaa = Configuration.use_ssaa ? 2 : 1;\n\n this.main_RT = new WebGLRenderTarget(OScreen.width * this.ssaa, OScreen.height * this.ssaa);\n\n this.SSAO_RT = new WebGLRenderTarget(OScreen.width, OScreen.height);\n\n this.blurrer = new Blurrer();\n Graphics.generateDepthNormalTexture = true;\n }\n\n render()\n {\n this.__check_RT_size();\n\n Graphics.clear(this.main_RT, CameraManager.current, true, false);\n Graphics.render(SceneManager.current, CameraManager.current, this.main_RT);\n\n this.__update_uniforms();\n\n Graphics.blit(Graphics.depth_normals_RT, this.SSAO_RT, this.ssao_mat);\n\n // // BLUR\n this.blurrer.blur(this.SSAO_RT);\n Graphics.blit(this.SSAO_RT, undefined);\n\n // // COMPOSE\n this.ssao_compose_mat.uniforms._AO.value = this.SSAO_RT.texture;\n Graphics.blit(this.main_RT, undefined, this.ssao_compose_mat);\n\n // Graphics.blit(this.SSAO_RT, undefined);\n }\n\n __update_uniforms()\n {\n this.ssao_mat.uniforms._InverseProjMatrix.value.getInverse(CameraManager.current.projectionMatrix);\n this.ssao_mat.uniforms._ProjectionMatrix.value.copy(CameraManager.current.projectionMatrix);\n this.ssao_mat.uniforms._FarPlane.value = CameraManager.current.far;\n }\n\n __check_RT_size()\n {\n if (this.main_RT.width !== OScreen.width * this.ssaa || this.main_RT.height !== OScreen.height * this.ssaa)\n {\n this.main_RT.setSize(OScreen.width * this.ssaa, OScreen.height * this.ssaa);\n this.SSAO_RT.setSize(OScreen.width, OScreen.height);\n }\n }\n}\n\nexport { NormalAORender };\n","import { CameraManager } from '../CameraManager';\nimport { SceneManager } from '../SceneManager';\nimport { BaseRender } from '../render_mode/BaseRender';\nimport { Graphics } from '../Graphics';\n\nclass NormalRender extends BaseRender\n{\n constructor()\n {\n super();\n }\n\n render()\n {\n Graphics.clear(undefined, CameraManager.current, true, true);\n\n if (SceneManager.current.on_pre_render)\n {\n SceneManager.current.on_pre_render();\n }\n\n if (SceneManager.current.render)\n {\n SceneManager.current.render();\n }\n else\n {\n Graphics.render(SceneManager.current, CameraManager.current);\n }\n\n if (SceneManager.current.on_post_render)\n {\n SceneManager.current.on_post_render();\n }\n }\n}\n\nexport { NormalRender };\n","import { CameraManager } from '../CameraManager';\nimport { SceneManager } from '../SceneManager';\nimport { BaseRender } from '../render_mode/BaseRender';\nimport { Graphics } from '../Graphics';\n\nclass VRRender extends BaseRender\n{\n constructor()\n {\n super();\n }\n\n render()\n {\n // Graphics.clear(undefined, CameraManager.current, true, true);\n\n if (SceneManager.current.on_pre_render)\n {\n SceneManager.current.on_pre_render();\n }\n\n if (SceneManager.current.render)\n {\n SceneManager.current.render();\n }\n else\n {\n Graphics.render(SceneManager.current, CameraManager.current, Graphics._renderer.getRenderTarget());\n }\n\n this.render_spectator_camera();\n\n if (SceneManager.current.on_post_render)\n {\n SceneManager.current.on_post_render();\n }\n }\n\n render_spectator_camera()\n {\n const spectator_camera = CameraManager.spectator;\n\n if (spectator_camera && Graphics._renderer.xr.isPresenting)\n {\n // Copy the XR Camera's position and rotation, but use your\n // main camera's projection matrix\n const xrCam = Graphics._renderer.xr.getCamera(CameraManager.current);\n\n spectator_camera.projectionMatrix.copy(CameraManager.current.projectionMatrix);\n\n spectator_camera.position.copy(xrCam.position);\n spectator_camera.quaternion.copy(xrCam.quaternion);\n\n // we'll restore this later\n const currentRenderTarget = Graphics._renderer.getRenderTarget();\n\n // turn off the WebXR rendering\n Graphics._renderer.xr.isPresenting = false;\n\n // render to the canvas on our main display\n Graphics._renderer.setRenderTarget(null);\n Graphics._renderer.render(SceneManager.current, spectator_camera);\n\n // reset back to enable WebXR\n Graphics._renderer.setRenderTarget(currentRenderTarget);\n Graphics._renderer.xr.isPresenting = true;\n }\n }\n}\n\nexport { VRRender };\n","import { BlitMaterial } from './BlitMaterial';\n\nimport frag from '../shaders/gaussian_blur/gaussian_blur.frag';\n\nimport { Vector2 } from 'three';\n\nclass GaussianBlurMaterial extends BlitMaterial\n{\n constructor(kernel_radius)\n {\n super(frag, undefined, {\n KERNEL_RADIUS: kernel_radius,\n SIGMA: kernel_radius\n });\n\n this.uniforms.texSize = { value: new Vector2(0.5, 0.5) };\n this.uniforms.direction = { value: new Vector2(0.5, 0.5) };\n }\n\n set_size(w, h)\n {\n this.uniforms.texSize.value.x = w;\n this.uniforms.texSize.value.y = h;\n }\n\n set_direction(x, y)\n {\n this.uniforms.direction.value.set(x, y);\n }\n}\n\nexport { GaussianBlurMaterial };\n","import { BlitMaterial } from './BlitMaterial';\n\nimport frag from '../shaders/luminosity_high_pass/luminosity_high_pass.frag';\n\nimport { Color } from 'three';\nclass LuminosityHighPassMaterial extends BlitMaterial\n{\n constructor(kernel_radius)\n {\n super(frag);\n\n this.uniforms.luminosityThreshold = { value: 0.23 };\n this.uniforms.smoothWidth = { value: 0.01 };\n this.uniforms.defaultColor = { value: new Color('#000000') };\n this.uniforms.defaultOpacity = { value: 0.0 };\n }\n}\n\nexport { LuminosityHighPassMaterial };\n","import { GaussianBlurMaterial } from '../materials/GaussianBlurMaterial';\nimport { LuminosityHighPassMaterial } from '../materials/LuminosityHighPassMaterial';\nimport { Graphics } from '../Graphics';\n\nimport { WebGLRenderTarget, LinearFilter, RGBAFormat } from 'three';\n\nclass GaussianBlurrer\n{\n constructor(nMips = 5)\n {\n this.current_width = 1;\n this.current_height = 1;\n\n this.separableBlurMaterials = [];\n this.renderTargetsHorizontal = [];\n this.renderTargetsVertical = [];\n\n this.nMips = nMips;\n this.kernelSizeArray = [3, 5, 7, 9, 11];\n this.rt_pars = { minFilter: LinearFilter, magFilter: LinearFilter, format: RGBAFormat };\n\n this.renderTargetBright = new WebGLRenderTarget(1, 1, this.rt_pars);\n this.renderTargetBright.texture.generateMipmaps = false;\n\n this.init_materials();\n this.init_RT();\n\n this.luminosity_high_pass_mat = new LuminosityHighPassMaterial();\n }\n\n blur(RT, use_luminosity_high_pass)\n {\n this.resize_RT(RT.width, RT.height);\n\n if (use_luminosity_high_pass)\n {\n Graphics.blit(RT, this.renderTargetBright, this.luminosity_high_pass_mat);\n }\n else\n {\n Graphics.blit(RT, this.renderTargetBright);\n }\n\n let inputRenderTarget = this.renderTargetBright;\n\n for (let i = 0; i < this.nMips; i++)\n {\n const mat = this.separableBlurMaterials[i];\n\n mat.set_direction(1, 0);\n Graphics.blit(inputRenderTarget, this.renderTargetsHorizontal[i], mat);\n\n mat.set_direction(0, 1);\n Graphics.blit(this.renderTargetsHorizontal[i], this.renderTargetsVertical[i], mat);\n\n inputRenderTarget = this.renderTargetsVertical[i];\n }\n }\n\n get_blurred_texture()\n {\n return this.renderTargetsHorizontal[0].texture;\n }\n\n get_blurred_RT()\n {\n return this.renderTargetsHorizontal[0];\n }\n\n init_RT()\n {\n this.dispose_RT();\n\n this.renderTargetBright.setSize(1, 1);\n\n for (let i = 0; i < this.nMips; i++)\n {\n const hor = new WebGLRenderTarget(1, 1, this.rt_pars);\n const ver = new WebGLRenderTarget(1, 1, this.rt_pars);\n\n hor.texture.generateMipmaps = false;\n ver.texture.generateMipmaps = false;\n\n this.renderTargetsHorizontal.push(hor);\n this.renderTargetsVertical.push(ver);\n }\n }\n\n resize_RT(texture_width, texture_height)\n {\n if (this.current_width === texture_width && this.current_height === texture_height)\n {\n return;\n }\n\n this.current_width = texture_width;\n this.current_height = texture_height;\n\n let width = Math.round(texture_width / 2);\n let height = Math.round(texture_height / 2);\n\n this.renderTargetBright.setSize(width, height);\n\n for (let i = 0; i < this.nMips; i++)\n {\n this.renderTargetsVertical[i].setSize(width, height);\n this.renderTargetsHorizontal[i].setSize(width, height);\n this.separableBlurMaterials[i].set_size(width, height);\n\n width = Math.round(width / 2);\n height = Math.round(height / 2);\n }\n }\n\n init_materials(texture_width, texture_height)\n {\n this.dispose_materials();\n\n for (let i = 0; i < this.nMips; i++)\n {\n this.separableBlurMaterials.push(new GaussianBlurMaterial(this.kernelSizeArray[i]));\n }\n }\n\n dispose_materials()\n {\n for (let i = 0; i < this.separableBlurMaterials.length; i++)\n {\n this.separableBlurMaterials[i].dispose();\n }\n this.separableBlurMaterials.length = 0;\n }\n\n dispose_RT()\n {\n for (let i = 0; i < this.renderTargetsVertical.length; i++)\n {\n this.renderTargetsHorizontal[i].dispose();\n this.renderTargetsVertical[i].dispose();\n }\n this.renderTargetBright.dispose();\n\n this.renderTargetsHorizontal.length = 0;\n this.renderTargetsVertical.length = 0;\n }\n}\n\nexport { GaussianBlurrer };\n","import { OScreen } from '../OScreen';\nimport { BaseRender } from '../render_mode/BaseRender';\nimport { UnrealBloomComposeMaterial } from '../materials/UnrealBloomComposeMaterial';\nimport { AddMaterial } from '../materials/AddMaterial';\n\nimport { WebGLRenderTarget } from 'three';\n\nimport { GaussianBlurrer } from '../render_utilities/GaussianBlurrer';\nimport { Graphics } from '../Graphics';\nimport { CameraManager } from '../CameraManager';\nimport { SceneManager } from '../SceneManager';\n\nclass UnrealBloomRender extends BaseRender\n{\n constructor()\n {\n super();\n\n this.bloom_compose_mat = undefined;\n\n this.main_RT = undefined;\n this.blur_RT = undefined;\n this.blurrer = undefined;\n\n this.add_mat = new AddMaterial();\n }\n\n on_enter()\n {\n this.blurrer = new GaussianBlurrer();\n this.main_RT = new WebGLRenderTarget(OScreen.width, OScreen.height);\n this.blur_RT = new WebGLRenderTarget(OScreen.width, OScreen.height);\n\n this.bloom_compose_mat = new UnrealBloomComposeMaterial(5);\n this.blurrer = new GaussianBlurrer(5);\n\n this.bloom_compose_mat.set_RT_0(this.blurrer.renderTargetsVertical[0].texture);\n this.bloom_compose_mat.set_RT_1(this.blurrer.renderTargetsVertical[1].texture);\n this.bloom_compose_mat.set_RT_2(this.blurrer.renderTargetsVertical[2].texture);\n this.bloom_compose_mat.set_RT_3(this.blurrer.renderTargetsVertical[3].texture);\n this.bloom_compose_mat.set_RT_4(this.blurrer.renderTargetsVertical[4].texture);\n\n this.bloom_compose_mat.set_bloom_strength(1);\n this.bloom_compose_mat.set_bloom_radius(1);\n\n this.add_mat.set_add_texture(this.blurrer.renderTargetsHorizontal[0].texture);\n }\n\n set_bloom_strength(val)\n {\n this.bloom_compose_mat.set_bloom_strength(val);\n }\n\n set_bloom_radius(val)\n {\n this.bloom_compose_mat.set_bloom_radius(val);\n }\n\n set_tint_color_0(col_string)\n {\n this.bloom_compose_mat.set_tint_color_0(col_string);\n }\n\n set_tint_color_1(col_string)\n {\n this.bloom_compose_mat.set_tint_color_1(col_string);\n }\n\n set_tint_color_2(col_string)\n {\n this.bloom_compose_mat.set_tint_color_2(col_string);\n }\n\n set_tint_color_3(col_string)\n {\n this.bloom_compose_mat.set_tint_color_3(col_string);\n }\n\n set_tint_color_4(col_string)\n {\n this.bloom_compose_mat.set_tint_color_4(col_string);\n }\n\n render()\n {\n this.__check_RT_size();\n\n Graphics.clear(this.main_RT, CameraManager.current, true, false);\n Graphics.render(SceneManager.current, CameraManager.current, this.main_RT);\n\n // // BLUR\n this.blurrer.blur(this.main_RT, true);\n\n // Blur compose\n Graphics.material_pass(this.bloom_compose_mat, this.blurrer.renderTargetsHorizontal[0]);\n\n // Additive blend\n Graphics.blit(this.main_RT, undefined, this.add_mat);\n }\n\n __check_RT_size()\n {\n if (this.main_RT.width !== OScreen.width || this.main_RT.height !== OScreen.height)\n {\n this.main_RT.setSize(OScreen.width, OScreen.height);\n this.blur_RT.setSize(OScreen.width, OScreen.height);\n }\n }\n}\n\nexport { UnrealBloomRender };\n","import { Color } from 'three';\nimport { OrthographicCamera as TOrthographicCamera } from 'three';\n\nclass OrthographicCamera extends TOrthographicCamera\n{\n constructor(left, right, top, bottom, near, far)\n {\n super(left, right, top, bottom, near, far);\n\n this.clear_color = new Color('#000000');\n this.clear_alpha = 1;\n }\n\n copy(camera)\n {\n super.copy(camera);\n this.clear_color.copy(camera.clear_color);\n this.clear_alpha = camera.clear_alpha;\n return this;\n }\n}\n\nexport { OrthographicCamera };\n","import { ViewManager } from './ViewManager';\n\nclass ViewComponentManager\n{\n constructor()\n {\n this.components = [];\n this.enabled_components = new Set();\n }\n\n update()\n {\n this.__set_components_opacities();\n\n for (const component of this.enabled_components)\n {\n component.update(ViewManager.transition_handler.current_state_data);\n }\n }\n\n register_component(component)\n {\n this.components.push(component);\n }\n\n enable_component(component)\n {\n // const component_to_enable = this.get_component_by_name(component_name);\n\n this.enabled_components.add(component);\n }\n\n disable_component(component)\n {\n // const component_to_disable = this.get_component_by_name(component_name);\n\n this.enabled_components.delete(component);\n }\n\n get_component_by_name(component_name)\n {\n console.warn('DEPRECATED. Use ViewComponentManager.get instead');\n this.get(component_name);\n }\n\n get(component_name)\n {\n for (let i = 0; i < this.components.length; i++)\n {\n if (this.components[i].name === component_name)\n {\n return this.components[i];\n }\n }\n console.error('[ViewComponentManager.get] no component found for: ', component_name);\n return undefined;\n }\n\n __set_components_opacities()\n {\n for (let i = 0; i < this.components.length; i++)\n {\n this.components[i].set_opacity(ViewManager.transition_handler.current_state_data);\n }\n }\n}\n\nconst view_component_manager = new ViewComponentManager();\nexport { view_component_manager as ViewComponentManager };\n","import { Time } from './Time';\nimport { UI } from './UI';\nimport { Debug } from './Debug';\nimport { BaseApplication } from './BaseApplication';\nimport { ViewManager } from './view_components/ViewManager';\nimport { ViewComponentManager } from './view_components/ViewComponentManager';\n\nclass RenderLoop\n{\n constructor(target_application, graphics, input)\n {\n target_application = target_application || new BaseApplication();\n\n this.target_application = target_application;\n this.graphics = graphics;\n this.input = input;\n\n this.is_running = false;\n this.frames_passed = 0;\n }\n\n update()\n {\n if (!this.is_running)\n {\n return;\n }\n Time.__update();\n\n // ###### START CYCLE ######\n if (this.frames_passed === 1)\n {\n this.target_application.on_post_start();\n }\n\n this.input.update();\n\n this.target_application.update();\n ViewManager.update();\n ViewComponentManager.update();\n\n this.target_application.on_pre_render();\n\n this.graphics.update(); // render scene\n UI.update(); // update after new camera matrix has been calculated\n UI.render(this.graphics); // render ui layer on top\n this.target_application.on_post_render();\n\n Debug.render(this.graphics); // render debug layer\n\n // ###### END CYCLE #######\n\n this.target_application.on_frame_end();\n this.frames_passed++;\n\n this.input.clear();\n UI.clear();\n Debug.clear();\n }\n\n start()\n {\n if (this.is_running) return; // sanity check\n\n if (this.frames_passed === 0)\n {\n this.target_application.on_enter();\n }\n\n this.is_running = true;\n\n this.graphics._renderer.setAnimationLoop(this.update.bind(this));\n }\n\n stop()\n {\n if (this.is_running === false) return; // sanity check\n\n this.is_running = false;\n this.target_application.on_exit();\n\n this.graphics._renderer.setAnimationLoop(null);\n }\n\n set_state(new_state)\n {\n this.target_application.on_exit(this);\n this.target_application = new_state;\n this.target_application.on_enter(this);\n }\n\n dispose()\n {\n this.stop();\n this.frames_passed = 0;\n }\n}\n\nexport { RenderLoop };\n","import { OScreen } from './OScreen';\n\nclass Screen\n{\n init()\n {\n console.warn('Screen Singleton is deprecated. Please use OScreen.');\n OScreen.init();\n }\n\n update_position(x, y)\n {\n console.warn('Screen Singleton is deprecated. Please use OScreen.');\n OScreen.update_position(x, y);\n }\n\n update()\n {\n console.warn('Screen Singleton is deprecated. Please use OScreen.');\n OScreen.update();\n }\n\n update_size(width, height)\n {\n console.warn('Screen Singleton is deprecated. Please use OScreen.');\n OScreen.update_size(width, height);\n }\n\n apply_pixel_density_v2(vector2)\n {\n console.warn('Screen Singleton is deprecated. Please use OScreen.');\n return OScreen.apply_pixel_density_v2(vector2);\n }\n\n apply_pixel_density(value)\n {\n console.warn('Screen Singleton is deprecated. Please use OScreen.');\n return OScreen.apply_pixel_density(value);\n }\n\n get_pixel_size()\n {\n console.warn('Screen Singleton is deprecated. Please use OScreen.');\n return OScreen.get_pixel_size();\n }\n\n get aspect_ratio()\n {\n console.warn('Screen Singleton is deprecated. Please use OScreen.');\n return OScreen.aspect_ratio;\n }\n}\n\nconst screen = new Screen();\nexport { screen as Screen };\n","\nimport { CanvasDrawer } from './CanvasDrawer';\n\nimport { Vector2 } from 'three';\n\nclass SimpleTextDrawer extends CanvasDrawer\n{\n constructor()\n {\n super();\n this.text_margin = new Vector2(2, 0);\n }\n\n __draw(text, ctxOptions, canvas, ctx)\n {\n ctx.font = ctxOptions.font;\n\n const text_size = this.get_text_size(text, ctxOptions.font);\n // canvas.width = Math.ceilPowerOfTwo(text_size.x+this.text_margin.x*2);\n // canvas.height = Math.ceilPowerOfTwo(text_size.y+ this.text_margin.y*2);\n canvas.width = Math.ceil(text_size.x + this.text_margin.x * 2);\n canvas.height = Math.ceil(text_size.y + this.text_margin.y * 2);\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n\n // turn this on for debugging\n ctx.globalAlpha = 0.0;\n ctx.fillStyle = ctxOptions.font_color || '#000000';\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n ctx.globalAlpha = 1;\n\n ctx.globalAlpha = 1;\n\n ctx.font = ctxOptions.font;\n ctx.fillStyle = ctxOptions.font_color || '#000000';\n ctx.textBaseline = 'middle';\n\n ctx.textAlign = ctxOptions.textAlign || 'center';\n if (ctx.textAlign === 'center')\n {\n ctx.fillText(text, canvas.width / 2, canvas.height / 2);\n }\n else\n {\n ctx.fillText(text, 0, canvas.height / 2);\n }\n }\n}\n\nexport { SimpleTextDrawer };\n","import { HTMLUtilities } from '../utilities/HTMLUtilities';\nimport { ViewComponentManager } from './ViewComponentManager';\n\nclass ViewComponent\n{\n constructor({ name, container })\n {\n this.name = name;\n this.container = container;\n this.hidden = true;\n\n ViewComponentManager.register_component(this);\n }\n\n start()\n {\n }\n\n on_enter()\n {\n this.container.classList.remove('hidden');\n ViewComponentManager.enable_component(this);\n\n this.hidden = false;\n }\n\n update()\n {\n }\n\n on_exit()\n {\n this.container.classList.add('hidden');\n ViewComponentManager.disable_component(this);\n\n this.hidden = true;\n }\n\n set_opacity(current_state_data)\n {\n this.container.style.opacity = current_state_data[`${this.name}_opacity`];\n this.toggle_hidden();\n }\n\n toggle_hidden()\n {\n if (this.container.style.opacity > 0.001)\n {\n if (this.hidden)\n {\n this.on_enter();\n }\n }\n else\n {\n if (!this.hidden)\n {\n this.on_exit();\n }\n }\n }\n\n load_html_images()\n {\n HTMLUtilities.load_images(this.container);\n }\n\n load_html_videos()\n {\n HTMLUtilities.load_videos(this.container);\n }\n}\n\nexport { ViewComponent };\n","import { Mesh } from 'three';\nimport { MeshBasicMaterial } from 'three';\nimport { PlaneGeometry } from 'three';\n\nclass HorizontalPlane extends Mesh\n{\n constructor(width, height, color, material)\n {\n width = width || 1;\n height = height || 1;\n color = color || '#FF0000';\n material = material || new MeshBasicMaterial({ color: color });\n\n const geometry = new PlaneGeometry(width, height);\n geometry.rotateX(-3.14 / 2);\n super(geometry, material);\n }\n}\n\nexport { HorizontalPlane };\n","import { Mesh } from 'three';\nimport { PlaneGeometry } from 'three';\nimport { MeshBasicMaterial } from 'three';\n\nclass VerticalPlane extends Mesh\n{\n constructor(width, height, color, material)\n {\n width = width || 1;\n height = height || 1;\n color = color || '#FF0000';\n material = material || new MeshBasicMaterial({ color: color });\n\n const geometry = new PlaneGeometry(width, height);\n super(geometry, material);\n }\n}\n\nexport { VerticalPlane };\n","class ArrayUtilities\n{\n constructor()\n {}\n\n static merge_from_to(source, target)\n {\n target.push.apply(target, source);\n }\n\n static expand_vec3_array(array, size)\n {\n const items_left_count = size - array.length;\n\n for (let i = 0; i < items_left_count; i++)\n {\n array.push(array[i].clone());\n }\n }\n\n static remove_elem(array, elem)\n {\n const index = array.indexOf(elem);\n if (index > -1)\n {\n array.splice(index, 1);\n }\n }\n\n static get_closest_point(points, target)\n {\n let closest_point = points[0];\n let closest_distance = closest_point.distanceTo(target);\n for (let i = 1; i < points.length; i++)\n {\n if (points[i].distanceTo(target) < closest_distance)\n {\n closest_point = points[i];\n closest_distance = points[i].distanceTo(target);\n }\n }\n return closest_point;\n }\n\n static object_values_to_array(obj)\n {\n const ids = Object.keys(obj);\n const arr = [];\n for (let i = 0; i < ids.length; i++)\n {\n arr.push(obj[ids[i]]);\n }\n return arr;\n }\n}\n\nexport { ArrayUtilities };\n","import { Line3, Plane, Quaternion, Sphere, Vector3 } from 'three';\n\nclass FrustumPointFitter\n{\n constructor()\n {\n this.sphere = new Sphere();\n }\n\n fit_points(points, camera_quaternion, vertical_fov, aspect)\n {\n this.sphere.setFromPoints(points);\n\n const v_fov = Math.degToRad(vertical_fov / 2);\n const h_fov = (2 * Math.atan(Math.tan(v_fov) * aspect)) / 2;\n\n const up_plane_normal = this.get_up_plane_normal(camera_quaternion, v_fov);\n const down_plane_normal = this.get_down_plane_normal(camera_quaternion, v_fov);\n const left_plane_normal = this.get_left_plane_normal(camera_quaternion, h_fov);\n const right_plane_normal = this.get_right_plane_normal(camera_quaternion, h_fov);\n\n const camera_forward_dir = new Vector3(0, 0, -1).applyQuaternion(camera_quaternion);\n\n const sphere_center = this.sphere.center.clone();\n\n const pull_back_distance = this.get_distance_to_fit_rect(this.sphere.radius * 2, this.sphere.radius * 2, vertical_fov, aspect);\n const far_pos = sphere_center.clone().add(camera_forward_dir.clone().multiplyScalar(pull_back_distance * -1));\n\n const up_plane = new Plane().setFromNormalAndCoplanarPoint(up_plane_normal, far_pos);\n const down_plane = new Plane().setFromNormalAndCoplanarPoint(down_plane_normal, far_pos);\n\n const left_plane = new Plane().setFromNormalAndCoplanarPoint(left_plane_normal, far_pos);\n const right_plane = new Plane().setFromNormalAndCoplanarPoint(right_plane_normal, far_pos);\n\n this.apply_center_correction_to_pos(far_pos, points, camera_quaternion, up_plane, down_plane, left_plane, right_plane);\n\n up_plane.setFromNormalAndCoplanarPoint(up_plane_normal, far_pos);\n down_plane.setFromNormalAndCoplanarPoint(down_plane_normal, far_pos);\n\n left_plane.setFromNormalAndCoplanarPoint(left_plane_normal, far_pos);\n right_plane.setFromNormalAndCoplanarPoint(right_plane_normal, far_pos);\n\n let closest_distance = Infinity;\n\n const inverse_dir = camera_forward_dir.clone().multiplyScalar(pull_back_distance * -2);\n for (let i = 0; i < points.length; i++)\n {\n const line = new Line3(points[i].clone(), points[i].clone().add(inverse_dir));\n\n const up_line_intersection = new Vector3();\n const down_line_intersection = new Vector3();\n\n const left_line_intersection = new Vector3();\n const right_line_intersection = new Vector3();\n\n up_plane.intersectLine(line, up_line_intersection);\n down_plane.intersectLine(line, down_line_intersection);\n\n left_plane.intersectLine(line, left_line_intersection);\n right_plane.intersectLine(line, right_line_intersection);\n\n if (up_line_intersection.length() < 0.0001)\n {\n console.log('up intersection not found', i);\n }\n if (down_line_intersection.length() < 0.0001)\n {\n console.log('down intersection not found', i);\n }\n if (left_line_intersection.length() < 0.0001)\n {\n console.log('left intersection not found', i);\n }\n if (right_line_intersection.length() < 0.0001)\n {\n console.log('right intersection not found', i);\n }\n\n const new_up_distance = points[i].clone().sub(up_line_intersection).length();\n const new_down_distance = points[i].clone().sub(down_line_intersection).length();\n\n const new_left_distance = points[i].clone().sub(left_line_intersection).length();\n const new_right_distance = points[i].clone().sub(right_line_intersection).length();\n\n const vertical_min = Math.min(new_up_distance, new_down_distance);\n const horizontal_min = Math.min(new_left_distance, new_right_distance);\n\n const min = Math.min(vertical_min, horizontal_min);\n\n if (min < closest_distance)\n {\n closest_distance = min;\n }\n }\n\n const forward_correction = camera_forward_dir.clone().multiplyScalar(closest_distance);\n const closest_position = far_pos.clone().add(forward_correction);\n\n return closest_position;\n }\n\n apply_center_correction_to_pos(target_pos, points, camera_quaternion, up_plane, down_plane, left_plane, right_plane)\n {\n const vertical_offset = this.get_vertical_correction(points, down_plane, up_plane, camera_quaternion);\n const horizontal_offset = this.get_hozirontal_correction(points, left_plane, right_plane, camera_quaternion);\n\n target_pos.add(vertical_offset);\n target_pos.add(horizontal_offset);\n }\n\n get_vertical_correction(points, down_plane, up_plane, camera_quaternion)\n {\n let closest_distance_to_up_plane = Infinity;\n let closest_distance_to_down_plane = Infinity;\n let closest_up_point = undefined;\n let closest_down_point = undefined;\n\n const up_dir = new Vector3(0, 1, 0).applyQuaternion(camera_quaternion);\n for (let i = 0; i < points.length; i++)\n {\n const down_line = new Line3(points[i].clone(), points[i].clone().add(up_dir.clone().multiplyScalar(-5000000)));\n const up_line = new Line3(points[i].clone(), points[i].clone().add(up_dir.clone().multiplyScalar(5000000)));\n\n const down_line_intersection = new Vector3();\n const up_line_intersection = new Vector3();\n\n down_plane.intersectLine(down_line, down_line_intersection);\n up_plane.intersectLine(up_line, up_line_intersection);\n\n const down_dist = down_line_intersection.distanceTo(points[i]);\n const up_dist = up_line_intersection.distanceTo(points[i]);\n\n if (up_line_intersection.length() < 0.0001)\n {\n console.log('vertical up intersection not found', i);\n }\n if (down_line_intersection.length() < 0.0001)\n {\n console.log('vertical down intersection not found', i);\n }\n\n if (down_dist < closest_distance_to_down_plane)\n {\n closest_distance_to_down_plane = down_dist;\n closest_down_point = points[i];\n }\n if (up_dist < closest_distance_to_up_plane)\n {\n closest_distance_to_up_plane = up_dist;\n closest_up_point = points[i];\n }\n }\n\n console.log(closest_up_point, closest_down_point);\n\n const correction = (closest_distance_to_up_plane - closest_distance_to_down_plane) / 2;\n\n // console.log(\"vertical_correction\", correction)\n return up_dir.clone().multiplyScalar(-correction);\n }\n\n get_hozirontal_correction(points, left_plane, right_plane, camera_quaternion)\n {\n let closest_distance_to_right_plane = Infinity;\n let closest_distance_to_left_plane = Infinity;\n let closest_right_point = undefined;\n let closest_left_point = undefined;\n\n const right_dir = new Vector3(1, 0, 0).applyQuaternion(camera_quaternion);\n\n for (let i = 0; i < points.length; i++)\n {\n const left_line = new Line3(points[i].clone(), points[i].clone().add(right_dir.clone().multiplyScalar(-5000000)));\n const right_line = new Line3(points[i].clone(), points[i].clone().add(right_dir.clone().multiplyScalar(5000000)));\n\n const left_line_intersection = new Vector3();\n const right_line_intersection = new Vector3();\n\n left_plane.intersectLine(left_line, left_line_intersection);\n right_plane.intersectLine(right_line, right_line_intersection);\n\n const left_dist = left_line_intersection.distanceTo(points[i]);\n const right_dist = right_line_intersection.distanceTo(points[i]);\n\n if (left_line_intersection.length() < 0.0001)\n {\n console.log('left intersection not found', i);\n }\n if (right_line_intersection.length() < 0.0001)\n {\n console.log('right intersection not found', i);\n }\n\n if (left_dist < closest_distance_to_left_plane)\n {\n closest_distance_to_left_plane = left_dist;\n closest_left_point = points[i];\n }\n if (right_dist < closest_distance_to_right_plane)\n {\n closest_distance_to_right_plane = right_dist;\n closest_right_point = points[i];\n }\n }\n\n const correction = (closest_distance_to_right_plane - closest_distance_to_left_plane) / 2;\n // console.log(\"horizontal_correction\", correction)\n\n console.log(closest_right_point, closest_left_point);\n\n return right_dir.clone().multiplyScalar(-correction);\n }\n\n get_up_plane_normal(camera_quaternion, v_fov)\n {\n const up_plane_normal = new Vector3(0, -1, 0);\n up_plane_normal.applyQuaternion(new Quaternion().setFromAxisAngle(new Vector3(1, 0, 0), v_fov));\n up_plane_normal.applyQuaternion(camera_quaternion);\n return up_plane_normal;\n }\n\n get_down_plane_normal(camera_quaternion, v_fov)\n {\n const down_plane_normal = new Vector3(0, 1, 0);\n down_plane_normal.applyQuaternion(new Quaternion().setFromAxisAngle(new Vector3(1, 0, 0), -v_fov));\n down_plane_normal.applyQuaternion(camera_quaternion);\n return down_plane_normal;\n }\n\n get_left_plane_normal(camera_quaternion, h_fov)\n {\n const left_plane_normal = new Vector3(1, 0, 0);\n left_plane_normal.applyQuaternion(new Quaternion().setFromAxisAngle(new Vector3(0, 1, 0), h_fov));\n left_plane_normal.applyQuaternion(camera_quaternion);\n return left_plane_normal;\n }\n\n get_right_plane_normal(camera_quaternion, h_fov)\n {\n const right_plane_normal = new Vector3(-1, 0, 0);\n right_plane_normal.applyQuaternion(new Quaternion().setFromAxisAngle(new Vector3(0, 1, 0), -h_fov));\n right_plane_normal.applyQuaternion(camera_quaternion);\n return right_plane_normal;\n }\n\n get_distance_to_fit_rect(width, height, vertical_fov, aspect)\n {\n const v_fov = (vertical_fov / 2) * Math.PI / 180;\n const h_fov = (2 * Math.atan(Math.tan(v_fov) * aspect)) / 2;\n\n const distV = height / Math.tan(v_fov);\n const distH = width / Math.tan(h_fov);\n return Math.max(Math.abs(distH), Math.abs(distV));\n }\n}\n\nexport { FrustumPointFitter };\n","import { BufferAttribute } from 'three';\nimport { BufferGeometry } from 'three';\n\nclass GeometryUtilities\n{\n static convert_to_non_indexed_geometry(geometry_buffer)\n {\n const indices = geometry_buffer.index;\n const positions = geometry_buffer.getAttribute('position');\n\n const bar_coordinates = [];\n const vertices = [];\n\n for (let i = 0; i < indices.count; i += 3)\n {\n // VERTEX 1\n vertices.push(positions.getX(indices.array[i + 0]));\n vertices.push(positions.getY(indices.array[i + 0]));\n vertices.push(positions.getZ(indices.array[i + 0]));\n\n bar_coordinates.push(1);\n bar_coordinates.push(0);\n bar_coordinates.push(0);\n\n // VERTEX 2\n\n vertices.push(positions.getX(indices.array[i + 1]));\n vertices.push(positions.getY(indices.array[i + 1]));\n vertices.push(positions.getZ(indices.array[i + 1]));\n\n bar_coordinates.push(0);\n bar_coordinates.push(1);\n bar_coordinates.push(0);\n\n // VERTEX 3\n\n vertices.push(positions.getX(indices.array[i + 2]));\n vertices.push(positions.getY(indices.array[i + 2]));\n vertices.push(positions.getZ(indices.array[i + 2]));\n\n bar_coordinates.push(0);\n bar_coordinates.push(0);\n bar_coordinates.push(1);\n }\n\n const geometry = new BufferGeometry();\n // geometry.setAttribute('barycentric', new BufferAttribute( new Float32Array(bar_coordinates), 3 ));\n geometry.setAttribute('position', new BufferAttribute(new Float32Array(vertices), 3));\n GeometryUtilities.add_barycentric_attribute(geometry);\n return geometry;\n }\n\n static add_barycentric_attribute(non_indexed_geometry_buffer)\n {\n const bar_coordinates = [];\n const positions = non_indexed_geometry_buffer.getAttribute('position');\n\n for (let i = 0; i < positions.count; i += 3)\n {\n bar_coordinates.push(1);\n bar_coordinates.push(0);\n bar_coordinates.push(0);\n\n bar_coordinates.push(0);\n bar_coordinates.push(1);\n bar_coordinates.push(0);\n\n bar_coordinates.push(0);\n bar_coordinates.push(0);\n bar_coordinates.push(1);\n }\n non_indexed_geometry_buffer.setAttribute('barycentric', new BufferAttribute(new Float32Array(bar_coordinates), 3));\n }\n}\n\nexport { GeometryUtilities };\n","import { Vector4 } from 'three';\n\nclass ImageUtilities\n{\n constructor()\n { }\n\n static get_image_data(image)\n {\n const canvas = document.createElement('canvas');\n canvas.width = image.width;\n canvas.height = image.height;\n\n const context = canvas.getContext('2d');\n context.drawImage(image, 0, 0);\n\n return context.getImageData(0, 0, image.width, image.height);\n }\n\n static get_pixel(imagedata, x, y)\n {\n const position = (x + imagedata.width * y) * 4;\n const data = imagedata.data;\n return new Vector4(data[position + 0], data[position + 1], data[position + 2], data[position + 3]);\n }\n}\n\nexport { ImageUtilities };\n","import { Vector3 } from 'three';\nimport { Vector2 } from 'three';\nclass MeshSampler\n{\n constructor()\n {\n\n }\n\n sample(buffer_geometry, sample_count)\n {\n const face_areas = [];\n\n let min_area = 99999999;\n\n const vertices = buffer_geometry.getAttribute('position');\n const normals = buffer_geometry.getAttribute('normal');\n const tangents = buffer_geometry.getAttribute('tangent');\n const uvs = buffer_geometry.getAttribute('uv');\n const indices = buffer_geometry.index;\n\n const faces = [];\n\n for (let i = 0; i < indices.count; i += 3)\n {\n const index_0 = indices.array[i + 0];\n const index_1 = indices.array[i + 1];\n const index_2 = indices.array[i + 2];\n\n const v1 = new Vector3();\n v1.x = vertices.getX(index_0);\n v1.y = vertices.getY(index_0);\n v1.z = vertices.getZ(index_0);\n\n const v2 = new Vector3();\n v2.x = vertices.getX(index_1);\n v2.y = vertices.getY(index_1);\n v2.z = vertices.getZ(index_1);\n\n const v3 = new Vector3();\n v3.x = vertices.getX(index_2);\n v3.y = vertices.getY(index_2);\n v3.z = vertices.getZ(index_2);\n\n const face = {\n a: v1,\n b: v2,\n c: v3\n };\n\n if (normals)\n {\n const n1 = new Vector3();\n n1.x = normals.getX(index_0);\n n1.y = normals.getY(index_0);\n n1.z = normals.getZ(index_0);\n\n const n2 = new Vector3();\n n2.x = normals.getX(index_1);\n n2.y = normals.getY(index_1);\n n2.z = normals.getZ(index_1);\n\n const n3 = new Vector3();\n n3.x = normals.getX(index_2);\n n3.y = normals.getY(index_2);\n n3.z = normals.getZ(index_2);\n\n const normal = n1.clone().add(n2).add(n3).normalize();\n face.normal = normal;\n }\n\n if (tangents)\n {\n const n1 = new Vector3();\n n1.x = tangents.getX(index_0);\n n1.y = tangents.getY(index_0);\n n1.z = tangents.getZ(index_0);\n\n const n2 = new Vector3();\n n2.x = tangents.getX(index_1);\n n2.y = tangents.getY(index_1);\n n2.z = tangents.getZ(index_1);\n\n const n3 = new Vector3();\n n3.x = tangents.getX(index_2);\n n3.y = tangents.getY(index_2);\n n3.z = tangents.getZ(index_2);\n\n const tangent = n1.clone().add(n2).add(n3).normalize();\n face.tangent = tangent;\n }\n if (uvs)\n {\n const uv_a = new Vector2();\n uv_a.x = uvs.getX(index_0);\n uv_a.y = uvs.getY(index_0);\n\n const uv_b = new Vector2();\n uv_b.x = uvs.getX(index_1);\n uv_b.y = uvs.getY(index_1);\n\n const uv_c = new Vector2();\n uv_c.x = uvs.getX(index_2);\n uv_c.y = uvs.getY(index_2);\n\n face.uv_a = uv_a;\n face.uv_b = uv_b;\n face.uv_c = uv_c;\n }\n\n faces.push(face);\n\n const area = this.get_face_area(face);\n min_area = Math.min(area, min_area);\n face_areas.push(area);\n }\n\n const normalized_faces_array = this.get_uniform_face_distribution(face_areas, min_area, faces);\n const selected_faces = this.select_random_faces(normalized_faces_array, sample_count);\n const sampled_data = this.sample_data_from_faces(selected_faces);\n return sampled_data;\n }\n\n sample_data_from_faces(faces)\n {\n const sampled_points = [];\n const sampled_normals = [];\n const sampled_tangents = [];\n const sampled_uvs = [];\n\n for (let i = 0; i < faces.length; i++)\n {\n const face = faces[i];\n\n const w1 = Math.random();\n const w2 = Math.random();\n\n sampled_points.push(this.sample_point_in_face(w1, w2, face.a, face.b, face.c).clone());\n if (face.normal)\n {\n sampled_normals.push(face.normal.clone());\n }\n if (face.tangent)\n {\n sampled_tangents.push(face.tangent.clone());\n }\n if (face.uv_a)\n {\n sampled_uvs.push(this.sample_point_in_face(w1, w2, face.uv_a, face.uv_b, face.uv_c).clone());\n }\n }\n return { points: sampled_points, normals: sampled_normals, tangents: sampled_tangents, uvs: sampled_uvs };\n }\n\n select_random_faces(faces, amount)\n {\n const selected_faces = [];\n for (let i = 0; i < amount; i++)\n {\n const random = Math.floor(Math.random() * faces.length);\n const selected_face = faces[random];\n\n selected_faces.push(selected_face);\n }\n\n return selected_faces;\n }\n\n get_uniform_face_distribution(face_areas, minimum_area, faces)\n {\n const extended_triangle_indices = [];\n for (let i = 0; i < face_areas.length; i++)\n {\n face_areas[i] /= minimum_area;\n const repetitions_needed = Math.floor(Math.round(face_areas[i]));\n for (let j = 0; j < repetitions_needed; j++)\n {\n extended_triangle_indices.push(faces[i]);\n }\n }\n return extended_triangle_indices;\n }\n\n get_face_area(face)\n {\n const vec1 = face.b.clone().sub(face.a);\n const vec2 = face.c.clone().sub(face.a);\n return vec1.cross(vec2).length() / 2;\n }\n\n sample_point_in_face(w1, w2, v1, v2, v3)\n {\n if (w1 + w2 > 1)\n {\n w1 = 1.0 - w1;\n w2 = 1.0 - w2;\n }\n\n const w3 = 1.0 - (w1 + w2);\n\n return v1.clone().multiplyScalar(w1).add(v2.clone().multiplyScalar(w2)).add(v3.clone().multiplyScalar(w3));\n }\n}\n\nconst mesh_sampler = new MeshSampler();\nexport { mesh_sampler as MeshSampler };\n","import { Mesh } from 'three';\nimport { BufferGeometry } from 'three';\nimport { Skeleton } from 'three';\n\nclass ModelUtilities\n{\n get_mesh(scene, result_callback)\n {\n scene.traverse((child) =>\n {\n if (child instanceof Mesh)\n {\n if (child.geometry)\n {\n child.geometry = new BufferGeometry().fromGeometry(child.geometry);\n }\n result_callback(child);\n }\n });\n }\n\n get_geometries(scene)\n {\n const geometries = [];\n\n this.get_mesh(scene, (child) =>\n {\n geometries.push(child.geometry);\n });\n return geometries;\n }\n\n assign_material(scene, material, name)\n {\n scene.traverse((child) =>\n {\n if (child instanceof Mesh)\n {\n // assign to all if no name is given\n if (name === undefined)\n {\n child.material = material;\n }\n else\n {\n // if name is given, assign only to that\n if (child.name === name)\n {\n child.material = material;\n }\n }\n }\n });\n }\n\n clone_animated_gltf(gltf)\n {\n const clone = {\n animations: gltf.animations,\n scene: gltf.scene.clone(true)\n };\n\n const skinnedMeshes = {};\n\n gltf.scene.traverse(node =>\n {\n if (node.isSkinnedMesh)\n {\n skinnedMeshes[node.name] = node;\n }\n });\n\n const cloneBones = {};\n const cloneSkinnedMeshes = {};\n\n clone.scene.traverse(node =>\n {\n if (node.isBone)\n {\n cloneBones[node.name] = node;\n }\n\n if (node.isSkinnedMesh)\n {\n cloneSkinnedMeshes[node.name] = node;\n }\n });\n\n for (const name in skinnedMeshes)\n {\n const skinnedMesh = skinnedMeshes[name];\n const skeleton = skinnedMesh.skeleton;\n const cloneSkinnedMesh = cloneSkinnedMeshes[name];\n\n const orderedCloneBones = [];\n\n for (let i = 0; i < skeleton.bones.length; ++i)\n {\n const cloneBone = cloneBones[skeleton.bones[i].name];\n orderedCloneBones.push(cloneBone);\n }\n\n cloneSkinnedMesh.bind(\n new Skeleton(orderedCloneBones, skeleton.boneInverses),\n cloneSkinnedMesh.matrixWorld);\n }\n\n return clone;\n }\n\n set_shadow_config(scene, cast, receive)\n {\n scene.traverse((child) =>\n {\n if (child instanceof Mesh)\n {\n child.castShadow = cast;\n child.receiveShadow = receive;\n }\n });\n }\n\n __find_object(scene, object_name, result_callback)\n {\n scene.traverse((obj) =>\n {\n if (obj.name === object_name)\n {\n result_callback(obj);\n }\n });\n }\n\n get_object(scene, object_name)\n {\n let object = undefined;\n scene.traverse((obj) =>\n {\n if (obj.name === object_name)\n {\n object = obj;\n }\n });\n return object;\n }\n\n get_object_by_type(scene, object_type)\n {\n let object = undefined;\n scene.traverse((obj) =>\n {\n if (obj.constructor.name === object_type)\n {\n object = obj;\n }\n });\n return object;\n }\n}\n\nconst model_utilities = new ModelUtilities();\nexport { model_utilities as ModelUtilities };\n","class ObjectUtilities\r\n{\r\n static is_object(item)\r\n {\r\n return (item && typeof item === 'object' && !Array.isArray(item));\r\n }\r\n\r\n static merge_deep(target, ...sources)\r\n {\r\n if (!sources.length) return target;\r\n const source = sources.shift();\r\n\r\n if (ObjectUtilities.is_object(target) && ObjectUtilities.is_object(source))\r\n {\r\n for (const key in source)\r\n {\r\n if (ObjectUtilities.is_object(source[key]))\r\n {\r\n if (!target[key]) Object.assign(target, { [key]: {} });\r\n ObjectUtilities.merge_deep(target[key], source[key]);\r\n }\r\n else\r\n {\r\n Object.assign(target, { [key]: source[key] });\r\n }\r\n }\r\n }\r\n\r\n return ObjectUtilities.merge_deep(target, ...sources);\r\n }\r\n\r\n static xml_to_json(xml)\r\n {\r\n // Create the return object\r\n let obj = {};\r\n\r\n if (xml.nodeType === 1)\r\n { // element\r\n // do attributes\r\n if (xml.attributes.length > 0)\r\n {\r\n obj['@attributes'] = {};\r\n for (let j = 0; j < xml.attributes.length; j++)\r\n {\r\n const attribute = xml.attributes.item(j);\r\n obj['@attributes'][attribute.nodeName] = attribute.nodeValue;\r\n }\r\n }\r\n }\r\n else if (xml.nodeType === 3)\r\n { // text\r\n obj = xml.nodeValue;\r\n }\r\n\r\n // do children\r\n if (xml.hasChildNodes())\r\n {\r\n for (let i = 0; i < xml.childNodes.length; i++)\r\n {\r\n const item = xml.childNodes.item(i);\r\n const nodeName = item.nodeName;\r\n if (typeof (obj[nodeName]) === 'undefined')\r\n {\r\n obj[nodeName] = this.xml_to_json(item);\r\n }\r\n else\r\n {\r\n if (typeof (obj[nodeName].push) === 'undefined')\r\n {\r\n const old = obj[nodeName];\r\n obj[nodeName] = [];\r\n obj[nodeName].push(old);\r\n }\r\n obj[nodeName].push(this.xml_to_json(item));\r\n }\r\n }\r\n }\r\n return obj;\r\n }\r\n}\r\n\r\nexport { ObjectUtilities };\r\n","class StringUtilities\n{\n constructor()\n {}\n\n static get_random_color()\n {\n const hexValues = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C', 'D', 'E', 'F'];\n let hex = '#';\n\n for (let i = 0; i < 6; i++)\n {\n const index = Math.floor(Math.random() * hexValues.length);\n hex += hexValues[index];\n }\n\n return hex;\n }\n\n static capitalize(string)\n {\n const words = string.split(' ');\n\n for (let i = 0; i < words.length; i++)\n {\n words[i] = words[i][0].toUpperCase() + words[i].substr(1);\n }\n\n return words.join(' ');\n }\n\n static capitalize_first_letter(string)\n {\n return string.charAt(0).toUpperCase() + string.slice(1);\n }\n\n static snake_to_camelcase(string)\n {\n return string.toLowerCase().replace(/[-_][a-z0-9]/g, (group) => group.slice(-1).toUpperCase());\n }\n}\n\nexport { StringUtilities };\n","class TimeUtilities\n{\n constructor()\n {}\n\n // Converts a time string (00:00:00.45) into miliseconds\n time_str_to_ms(time_str)\n {\n time_str = time_str.split(':');\n\n let hours = Number(time_str[0]);\n hours = hours * 60 * 60 * 1000;\n\n let minutes = Number(time_str[1]);\n minutes = minutes * 60 * 1000;\n\n let seconds = Number(time_str[2]);\n seconds = seconds * 1000;\n\n return hours + minutes + seconds;\n }\n}\n\nexport { TimeUtilities };\n","import grid_frag from '../shaders/grid/grid.frag';\nimport grid_vert from '../shaders/grid/grid.vert';\n\nimport { GeometryUtilities } from '../utilities/GeometryUtilities';\n\nimport { Mesh } from 'three';\nimport { ShaderMaterial } from 'three';\nimport { Color } from 'three';\nimport { PlaneGeometry } from 'three';\n\nclass Grid extends Mesh\n{\n constructor()\n {\n const material = new ShaderMaterial({\n uniforms: {\n _Color: { value: new Color('#919191') }\n },\n vertexShader: grid_vert,\n fragmentShader: grid_frag,\n extensions: { derivatives: true },\n transparent: true,\n depthWrite: false\n });\n\n const plane_geometry = new PlaneGeometry(100, 100, 100, 100);\n\n const non_indexed_geometry = GeometryUtilities.convert_to_non_indexed_geometry(plane_geometry);\n\n super(non_indexed_geometry, material);\n\n this.rotation.x = -3.14 / 2;\n }\n}\n\nexport { Grid };\n","import line_vs from '../shaders/basic_line/basic_line.vert';\nimport line_fs from '../shaders/basic_line/basic_line.frag';\n\nimport { Mesh } from 'three';\nimport { BufferAttribute } from 'three';\nimport { BufferGeometry } from 'three';\nimport { ShaderMaterial } from 'three';\nimport { Color } from 'three';\n\nclass Line extends Mesh\n{\n constructor(points)\n {\n const geometry = new BufferGeometry();\n geometry.setAttribute('position', new BufferAttribute(new Float32Array([]), 3));\n geometry.setAttribute('next_position', new BufferAttribute(new Float32Array([]), 3));\n geometry.setAttribute('previous_position', new BufferAttribute(new Float32Array([]), 3));\n geometry.setAttribute('orientation', new BufferAttribute(new Float32Array([]), 1));\n geometry.setAttribute('coverage', new BufferAttribute(new Float32Array([]), 1));\n\n const material = new ShaderMaterial({\n uniforms: {\n _Thickness: { value: 0.2 },\n _Length: { value: 0 },\n _ElapsedTime: { value: 0 },\n _Color: { value: new Color('#FF0000') }\n },\n vertexShader: line_vs,\n fragmentShader: line_fs,\n transparent: true,\n depthWrite: false,\n extensions: { derivatives: true }\n\n });\n\n super(geometry, material);\n\n if (points)\n {\n this.setup(points);\n }\n }\n\n setup(points)\n {\n const vertices = [];\n const next_position = [];\n const previous_position = [];\n const orientation = [];\n const coverage = [];\n let accumulated_length = 0;\n\n for (let i = 0; i < points.length; i++)\n {\n vertices.push(points[i].x);\n vertices.push(points[i].y);\n vertices.push(points[i].z);\n orientation.push(1);\n\n vertices.push(points[i].x);\n vertices.push(points[i].y);\n vertices.push(points[i].z);\n orientation.push(-1);\n\n const next_point = this.__get_next_position(points, i);\n next_position.push(next_point.x);\n next_position.push(next_point.y);\n next_position.push(next_point.z);\n\n next_position.push(next_point.x);\n next_position.push(next_point.y);\n next_position.push(next_point.z);\n\n const previous_point = this.__get_previous_position(points, i);\n previous_position.push(previous_point.x);\n previous_position.push(previous_point.y);\n previous_position.push(previous_point.z);\n\n previous_position.push(previous_point.x);\n previous_position.push(previous_point.y);\n previous_position.push(previous_point.z);\n\n coverage.push(accumulated_length);\n coverage.push(accumulated_length);\n\n if (i < points.length - 1)\n {\n accumulated_length += points[i].distanceTo(next_point);\n }\n }\n const vertexList = new Float32Array(vertices);\n const nextPositionList = new Float32Array(next_position);\n const previousPositionList = new Float32Array(previous_position);\n const orientationList = new Float32Array(orientation);\n const coverageList = new Float32Array(coverage);\n\n const indices = [];\n for (let i = 0; i < ((vertexList.length / 3) - 2) / 2; i++)\n {\n const index = (i * 2) + 1;\n indices.push(index);\n indices.push(index + 1);\n indices.push(index - 1);\n\n indices.push(index);\n indices.push(index + 2);\n indices.push(index + 1);\n }\n\n this.geometry.setIndex(indices);\n this.geometry.getAttribute('position').copy(new BufferAttribute(vertexList, 3));\n this.geometry.getAttribute('next_position').copy(new BufferAttribute(nextPositionList, 3));\n this.geometry.getAttribute('previous_position').copy(new BufferAttribute(previousPositionList, 3));\n this.geometry.getAttribute('orientation').copy(new BufferAttribute(orientationList, 1));\n this.geometry.getAttribute('coverage').copy(new BufferAttribute(coverageList, 1));\n\n this.geometry.getAttribute('position').needsUpdate = true;\n this.geometry.getAttribute('next_position').needsUpdate = true;\n this.geometry.getAttribute('previous_position').needsUpdate = true;\n this.geometry.getAttribute('orientation').needsUpdate = true;\n this.geometry.getAttribute('coverage').needsUpdate = true;\n\n this.material.uniforms._Length.value = accumulated_length;\n this._length = accumulated_length;\n }\n\n set thickness(value)\n {\n this.material.uniforms._Thickness.value = value;\n }\n\n get thickness()\n {\n return this.material.uniforms._Thickness.value;\n }\n\n __get_previous_position(points, i)\n {\n if (i === 0)\n {\n return points[1].clone().sub(points[0]).multiplyScalar(-1).add(points[0]);\n }\n else\n {\n return points[i - 1];\n }\n }\n\n __get_next_position(points, i)\n {\n if (i === points.length - 1)\n {\n return points[points.length - 2].clone().sub(points[points.length - 1]).multiplyScalar(-1).add(points[points.length - 1]);\n }\n else\n {\n return points[i + 1];\n }\n }\n\n update()\n {\n }\n\n distance()\n {\n return this.accumulated_length;\n }\n\n total_length()\n {\n return this.accumulated_length;\n }\n\n dispose()\n {\n this.geometry.dispose();\n this.material.dispose();\n if (this.parent)\n {\n this.parent.remove(this);\n }\n }\n\n set color(col)\n {\n this.material.uniforms._Color.value.set(col);\n }\n\n get color()\n {\n return this.material.uniforms._Color.value;\n }\n\n copy_color(col)\n {\n this.material.uniforms._Color.value.copy(col);\n }\n}\n\nexport { Line };\n","import basic_texture_vert from '../shaders/basic_texture/basic_texture.vert';\nimport basic_texture_frag from '../shaders/basic_texture/basic_texture.frag';\n\nimport { Mesh } from 'three';\nimport { Vector2 } from 'three';\nimport { ShaderMaterial } from 'three';\nimport { DoubleSide } from 'three';\nimport { PlaneGeometry } from 'three';\nimport { Vector3 } from 'three';\n\nclass WorldImage extends Mesh\n{\n constructor(texture, pivot)\n {\n pivot = pivot || new Vector2(0, 0);\n const material = new ShaderMaterial({\n uniforms: {\n _MainTex: { value: texture },\n _ScreenAligned: { value: 0 },\n _Scale: { value: 1 },\n _Opacity: { value: 1 }\n },\n vertexShader: basic_texture_vert,\n fragmentShader: basic_texture_frag,\n transparent: true,\n depthWrite: false,\n side: DoubleSide\n });\n const geometry = new PlaneGeometry(1, 1, 1);\n geometry.translate(-pivot.x / 2, -pivot.y / 2, 0);\n const current_scale = texture.image.width / texture.image.height;\n geometry.scale(current_scale, 1, 1);\n super(geometry, material);\n this.current_scale = current_scale;\n this.geometry.computeBoundingBox();\n\n this.tmp_bb_size = new Vector3();\n this.geometry.boundingBox.getSize(this.tmp_bb_size);\n }\n\n update_texture()\n {\n this.material.uniforms._MainTex.value.needsUpdate = true;\n const img = this.material.uniforms._MainTex.value.image;\n\n this.geometry.scale(1 / this.current_scale, 1, 1);\n this.current_scale = img.width / img.height;\n this.geometry.scale(this.current_scale, 1, 1);\n this.geometry.computeBoundingBox();\n this.geometry.boundingBox.getSize(this.tmp_bb_size);\n }\n\n get size()\n {\n return this.tmp_bb_size.clone().multiplyScalar(this.scale.x);\n }\n\n set size(value)\n {\n this.scale.set(value, value, value);\n this.material.uniforms._Scale.value = value;\n }\n\n set screen_aligned(boolean)\n {\n this.material.uniforms._ScreenAligned.value = boolean === true ? 1 : 0;\n }\n\n get screen_aligned()\n {\n return this.material.uniforms._ScreenAligned.value === 1;\n }\n\n set opacity(opacity)\n {\n this.material.uniforms._Opacity.value = opacity;\n }\n\n get opacity()\n {\n return this.material.uniforms._Opacity.value;\n }\n\n dispose()\n {\n this.geometry.dispose();\n this.parent.remove(this);\n this.material.uniforms._MainTex.value.dispose();\n this.material.dispose();\n }\n}\n\nexport { WorldImage };\n","import { WorldImage } from './WorldImage';\nimport { SimpleTextDrawer } from '../canvas_drawer/SimpleTextDrawer';\n\nimport { LinearMipMapLinearFilter } from 'three';\nimport { LinearFilter } from 'three';\n\nclass Text2D extends WorldImage\n{\n constructor(text, font, color, pivot, is_static)\n {\n const simple_text_drawer = new SimpleTextDrawer(is_static);\n\n const draw_settings = {\n font: font,\n font_color: color || '#000000'\n };\n const canvas_texture = simple_text_drawer.draw_on_texture(text, draw_settings);\n\n canvas_texture.minFilter = LinearMipMapLinearFilter;\n canvas_texture.minFilter = LinearFilter;\n canvas_texture.needsUpdate = true;\n super(canvas_texture, pivot);\n\n this.simple_text_drawer = simple_text_drawer;\n this.canvas_texture = canvas_texture;\n this.draw_settings = draw_settings;\n }\n\n set text(value)\n {\n this.simple_text_drawer.draw_canvas(value, this.draw_settings);\n this.update_texture();\n }\n\n get text()\n {\n return 'not implemented';\n }\n}\n\nexport { Text2D };\n","import vert from '../shaders/ui_element/ui_element.vert';\nimport frag from '../shaders/ui_element/ui_element.frag';\n\nimport { BaseShaderMaterial } from '../materials/BaseShaderMaterial';\n\nimport { Vector2 } from 'three';\nimport { Vector3 } from 'three';\n\nimport { OScreen } from '../OScreen';\n\nclass UIElementMaterial extends BaseShaderMaterial\n{\n constructor(intensity = 1)\n {\n super(vert, frag, {\n _MainTex: { value: undefined },\n _ScreenSize: { value: new Vector2(OScreen.width, OScreen.height) },\n _TextureSize: { value: new Vector2() },\n _PixelOffset: { value: new Vector2(0, 0) },\n _NDC: { value: new Vector3() },\n _PivotPoint: { value: new Vector2() },\n _DepthOffset: { value: 0 }\n });\n this.transparent = true;\n this.depthWrite = false;\n this.depthTest = false;\n }\n}\n\nexport { UIElementMaterial };\n","import { Vector2 } from 'three';\n\nclass ScreenSpacePosition\n{\n constructor()\n {\n this.tmp_vec = new Vector2();\n }\n\n get_pos_NDC(position)\n {\n return this.tmp_vec.set(position.x, position.y);\n }\n}\n\nexport { ScreenSpacePosition };\n","import { CameraManager } from '../../CameraManager';\n\nimport { Vector2 } from 'three';\nimport { Vector3 } from 'three';\n\nclass WorldSpacePosition\n{\n constructor()\n {\n this.tmp_vec3 = new Vector3();\n this.tmp_vec2 = new Vector2();\n }\n\n get_pos_NDC(position)\n {\n this.tmp_vec3.copy(position);\n this.tmp_vec3.project(CameraManager.current);\n\n return this.tmp_vec2.set(this.tmp_vec3.x, this.tmp_vec3.y);\n }\n}\n\nexport { WorldSpacePosition };\n","class UIElementState\n{\n constructor()\n {\n\n }\n\n update(ui_element, normalized_mouse_position)\n {\n\n }\n\n on_enter(ui_element)\n {}\n\n on_exit(ui_element)\n {}\n}\n\nexport { UIElementState };\n","import { UIElementState } from './UIElementState';\n\nclass OnIdle extends UIElementState\n{\n constructor()\n {\n super();\n }\n\n update(ui_element, normalized_mouse_position)\n {\n if (ui_element.is_mouse_over(normalized_mouse_position))\n {\n ui_element.set_state(ui_element._on_enter_state);\n }\n }\n}\n\nexport { OnIdle };\n","import { UIElementState } from './UIElementState';\n\nclass OnMouseEnter extends UIElementState\n{\n constructor()\n {\n super();\n }\n\n on_enter(ui_element)\n {\n ui_element.on_mouse_enter();\n }\n\n update(ui_element, normalized_mouse_position)\n {\n if (ui_element.is_mouse_over(normalized_mouse_position))\n {\n ui_element.set_state(ui_element._on_hover_state);\n }\n else\n {\n ui_element.set_state(ui_element._on_exit_state);\n }\n }\n}\n\nexport { OnMouseEnter };\n","import { UIElementState } from './UIElementState';\n\nclass OnMouseExit extends UIElementState\n{\n constructor()\n {\n super();\n }\n\n on_enter(ui_element)\n {\n ui_element.on_mouse_exit();\n ui_element.set_state(ui_element._on_idle_state);\n }\n}\n\nexport { OnMouseExit };\n","import { UIElementState } from './UIElementState';\n\nclass OnMouseHover extends UIElementState\n{\n constructor()\n {\n super();\n }\n\n on_enter(ui_element)\n {\n this.__trigger_on_hover(ui_element);\n }\n\n update(ui_element, normalized_mouse_position)\n {\n if (ui_element.is_mouse_over(normalized_mouse_position))\n {\n this.__trigger_on_hover(ui_element);\n }\n else\n {\n ui_element.set_state(ui_element._on_exit_state);\n }\n }\n\n __trigger_on_hover(ui_element)\n {\n ui_element.on_mouse_hover();\n }\n}\n\nexport { OnMouseHover };\n","\nimport { OScreen } from '../OScreen';\n\nimport { UIElementMaterial } from '../materials/UIElementMaterial';\n\nimport { ScreenSpacePosition } from '../ui/ui_element_position/ScreenSpacePosition';\nimport { WorldSpacePosition } from '../ui/ui_element_position/WorldSpacePosition';\n\nimport { OnIdle } from '../ui/ui_element_state/OnIdle';\nimport { OnMouseEnter } from '../ui/ui_element_state/OnMouseEnter';\nimport { OnMouseExit } from '../ui/ui_element_state/OnMouseExit';\nimport { OnMouseHover } from '../ui/ui_element_state/OnMouseHover';\n\nimport { Mesh } from 'three';\nimport { PlaneGeometry } from 'three';\nimport { Vector2 } from 'three';\nimport { Vector3 } from 'three';\nimport { NearestFilter } from 'three';\nimport { Box2 } from 'three';\n\nclass UIElement extends Mesh\n{\n constructor(vert, frag)\n {\n super(new PlaneGeometry(1, 1), new UIElementMaterial());\n\n this.is_clickable = false;\n\n this.position_strategy = new WorldSpacePosition();\n this.current_state = new OnIdle();\n\n this._position = new Vector3();\n\n this._on_idle_state = new OnIdle();\n this._on_enter_state = new OnMouseEnter();\n this._on_exit_state = new OnMouseExit();\n this._on_hover_state = new OnMouseHover();\n\n this.on_enter = undefined;\n this.on_exit = undefined;\n this.on_hover = undefined;\n\n this.mouse_pos_tmp = new Vector2();\n this.cached_NDC_position = new Vector2();\n this.screen_pos_tmp = new Vector2();\n\n this.texture_size = new Vector2(1, 1);\n\n this.frustumCulled = false;\n this.matrixAutoUpdate = false;\n this.renderOrder = 0;\n\n this.size = 1;\n this.pixel_offset = new Vector2();\n }\n\n set_render_order(value)\n {\n this.renderOrder = value;\n }\n\n get pivot_point()\n {\n return this.material.uniforms._PivotPoint.value;\n }\n\n set_pixel_offset(offset)\n {\n this.pixel_offset.copy(offset);\n this.material.uniforms._PixelOffset.value.copy(offset);\n }\n\n set_state(new_state)\n {\n this.current_state.on_exit(this);\n this.current_state = new_state;\n this.current_state.on_enter(this);\n }\n\n get position()\n {\n return this._position;\n }\n\n set use_depth(boolean)\n {\n this.material.depthTest = boolean;\n }\n\n get use_depth()\n {\n return this.material.depthTest;\n }\n\n set depth_offset(value)\n {\n this.material.uniforms._DepthOffset.value = value;\n }\n\n get depth_offset()\n {\n return this.material.uniforms._DepthOffset.value;\n }\n\n clear_state()\n {\n this.visible = false;\n }\n\n set_world_space_coordinate_system()\n {\n this.position_strategy = new WorldSpacePosition();\n }\n\n set_screen_space_coordinate_system()\n {\n this.position_strategy = new ScreenSpacePosition();\n }\n\n set_texture(texture)\n {\n texture.minFilter = NearestFilter;\n texture.magFilter = NearestFilter;\n texture.needsUpdate = true;\n\n this.texture_size.set(texture.image.width, texture.image.height);\n\n this.material.uniforms._MainTex.value = texture;\n this.get_size(this.material.uniforms._TextureSize.value);\n this.visible = true;\n }\n\n update_state(normalized_mouse_pos)\n {\n this.material.uniforms._ScreenSize.value.set(OScreen.width, OScreen.height);\n this.get_size(this.material.uniforms._TextureSize.value);\n\n this.cached_NDC_position.copy(this.position_strategy.get_pos_NDC(this.position));\n this.material.uniforms._NDC.value.copy(this.position);\n this.current_state.update(this, normalized_mouse_pos);\n }\n\n is_mouse_over(normalized_mouse_pos)\n {\n this.screen_pos_tmp.copy(this.cached_NDC_position);\n this.to_screen_position(this.screen_pos_tmp);\n this.screen_pos_tmp.x += this.pixel_offset.x;\n this.screen_pos_tmp.y += this.pixel_offset.y;\n\n const rect = new Box2().setFromCenterAndSize(this.screen_pos_tmp, this.get_size());\n\n this.mouse_pos_tmp.copy(normalized_mouse_pos);\n this.to_screen_position(this.mouse_pos_tmp);\n\n return rect.containsPoint(this.mouse_pos_tmp);\n }\n\n to_screen_position(projected_pos)\n {\n projected_pos.x = (projected_pos.x * 0.5 + 0.5) * OScreen.width + this.pixel_offset.x;\n projected_pos.y = (projected_pos.y * 0.5 + 0.5) * OScreen.height + this.pixel_offset.y;\n }\n\n get_screen_space_position()\n {\n const pos = this.cached_NDC_position.clone();\n this.to_screen_position(pos);\n return pos;\n }\n\n set_screen_space_position(screen_pos)\n {\n this.position.x = (screen_pos.x / OScreen.width) * 2 - 1;\n this.position.y = (screen_pos.y / OScreen.height) * 2 - 1;\n }\n\n dispose()\n {\n if (this.material.uniforms._MainTex.value)\n {\n this.material.uniforms._MainTex.value.dispose();\n }\n // OScreen.remove_screen_material(this.material);\n this.geometry.dispose();\n this.material.dispose();\n }\n\n get_size(vector2)\n {\n if (vector2)\n {\n return vector2.copy(this.texture_size).multiplyScalar(this.size / OScreen.dpr);\n }\n else\n {\n return new Vector2().copy(this.texture_size).multiplyScalar(this.size / OScreen.dpr);\n }\n }\n\n on_mouse_enter()\n {}\n\n on_mouse_exit()\n {}\n\n on_mouse_hover()\n {}\n}\n\nexport { UIElement };\n","import { Mesh } from 'three';\n\nclass UpdatableMaterialMesh extends Mesh\n{\n constructor(geometry, material)\n {\n super(geometry, material);\n\n const self = this;\n\n this.onBeforeRender = () =>\n {\n self.material.update();\n };\n }\n}\n\nexport { UpdatableMaterialMesh };\n","import { Vector2, Vector4 } from 'three';\n\nclass TextGlyph\n{\n constructor(offset, plane_bounds, atlas_bounds)\n {\n const width = plane_bounds.right - plane_bounds.left;\n const height = plane_bounds.top - plane_bounds.bottom;\n\n this.scale = new Vector2(width, height);\n this.position = new Vector2(offset + plane_bounds.left, plane_bounds.bottom);\n\n this.atlas_bounds = new Vector4(atlas_bounds.left, atlas_bounds.right, atlas_bounds.top, atlas_bounds.bottom);\n }\n}\n\nexport { TextGlyph };\n","import { Vector3, Quaternion, Matrix4, Color, Box2, Vector2 } from 'three';\nimport { TextGlyph } from './TextGlyph';\n\nclass SDFText\n{\n constructor(glyph_layout, text = '')\n {\n this.glyph_layout = glyph_layout;\n\n this.glyphs = [];\n\n this.glyph_is_dirty = true;\n this.matrix_is_dirty = true;\n this.color_is_dirty = true;\n\n this.position = new Vector3();\n this.quaternion = new Quaternion();\n this.scale = new Vector3(1, 1, 1);\n this.matrix = new Matrix4();\n\n this.color = new Color('#FFFFFF');\n\n this.pivot_point = new Vector2();\n this.__opacity = 1;\n\n this.__text = text;\n\n this.__generate_glyphs(text);\n }\n\n set text(value)\n {\n this.__text = value;\n this.__generate_glyphs(value);\n this.matrix_is_dirty = true;\n }\n\n get text()\n {\n return this.__text;\n }\n\n update_matrix()\n {\n this.matrix.compose(this.position, this.quaternion, this.scale);\n this.matrix_is_dirty = false;\n this.glyph_is_dirty = true;\n }\n\n clear_glyph_dirty()\n {\n this.glyph_is_dirty = false;\n }\n\n clear_color_dirty()\n {\n this.color_is_dirty = false;\n }\n\n set_rotation(orientation = 0, tilt = 0) // 0..360, -90..0..90\n {\n const new_orientation = new Quaternion().setFromAxisAngle(new Vector3(0, 1, 0), (orientation / 360) * Math.PI * 2);\n const new_tilt = new Quaternion().setFromAxisAngle(new Vector3(1, 0, 0), (-tilt / 360) * Math.PI * 2);\n\n this.quaternion.copy(new_orientation.multiply(new_tilt));\n this.matrix_is_dirty = true;\n }\n\n set_position(pos)\n {\n this.position.copy(pos);\n this.matrix_is_dirty = true;\n }\n\n set_size(size)\n {\n this.scale.set(size, size, size);\n this.matrix_is_dirty = true;\n }\n\n set_color(col)\n {\n this.color.set(col);\n this.color_is_dirty = true;\n }\n\n set_pivot(pivot)\n {\n this.pivot_point.copy(pivot);\n this.update_glyphs();\n }\n\n set opacity(op)\n {\n this.__opacity = op;\n this.color_is_dirty = true;\n }\n\n get opacity()\n {\n return this.__opacity;\n }\n\n update_glyphs()\n {\n this.__generate_glyphs(this.text);\n }\n\n __generate_glyphs(text)\n {\n let cursor = 0;\n\n this.glyphs.length = 0;\n\n for (let i = 0; i < text.length; i++)\n {\n const unicode = text.charCodeAt(i);\n const glyph = this.glyph_layout.find(element => element.unicode === unicode);\n if (glyph)\n {\n if (glyph.planeBounds)\n {\n const text_glyph = new TextGlyph(cursor, glyph.planeBounds, glyph.atlasBounds);\n this.glyphs.push(text_glyph);\n }\n cursor += glyph.advance;\n }\n }\n\n const box2 = new Box2();\n const first_glyph = this.glyphs[0];\n box2.setFromCenterAndSize(first_glyph.position.clone().add(new Vector2(first_glyph.scale.x / 2, first_glyph.scale.y / 2)), first_glyph.scale);\n\n for (let i = 1; i < this.glyphs.length; i++)\n {\n const g = this.glyphs[i];\n const box = new Box2().setFromCenterAndSize(g.position.clone().add(new Vector2(g.scale.x / 2, g.scale.y / 2)), g.scale);\n box2.union(box);\n }\n\n const box2_size = new Vector2();\n box2.getSize(box2_size);\n for (let i = 0; i < this.glyphs.length; i++)\n {\n this.glyphs[i].position.x -= box2_size.x / 2;\n this.glyphs[i].position.y -= box2_size.y / 2;\n\n this.glyphs[i].position.x += (box2_size.x / 2) * this.pivot_point.x;\n this.glyphs[i].position.y += (box2_size.y / 2) * this.pivot_point.y;\n }\n\n this.glyph_is_dirty = true;\n }\n}\n\nexport { SDFText };\n","import { BaseShaderMaterial } from './BaseShaderMaterial';\n\nimport frag from '../shaders/sdf_text/sdf_text.frag';\nimport vert from '../shaders/sdf_text/sdf_text.vert';\n\nimport { Vector2, DoubleSide, LinearFilter } from 'three';\nimport { OMath } from '../utilities/OMath';\n\nclass SDFTextMaterial extends BaseShaderMaterial\n{\n constructor(texture)\n {\n super(vert, frag, {\n _Texture: { value: texture },\n _Boldness: { value: 0.5 },\n _AtlasSize: { value: new Vector2(1, 1) }\n });\n\n this.transparent = true;\n this.extensions = {\n derivatives: true\n };\n this.depthWrite = false;\n this.side = DoubleSide;\n texture.minFilter = LinearFilter;\n texture.magFilter = LinearFilter;\n texture.generateMipMaps = false;\n }\n\n set_atlas_size(size)\n {\n this.uniforms._AtlasSize.value.copy(size);\n }\n\n set_boldness(value)\n {\n this.uniforms._Boldness.value = OMath.lerp(0.5, 0.2, value);\n }\n}\n\nexport { SDFTextMaterial };\n","import { SDFText } from './SDFText';\nimport { SDFTextMaterial } from '../../materials/SDFTextMaterial';\nimport { ArrayUtilities } from '../../utilities/ArrayUtilities';\n\nimport {\n PlaneGeometry,\n Mesh,\n Vector2,\n InstancedBufferGeometry,\n InstancedBufferAttribute,\n Float32BufferAttribute,\n DynamicDrawUsage\n} from 'three';\n\nclass SDFTextBatch extends Mesh\n{\n constructor(font_layout, atlas_texture)\n {\n const max_allocations = 2000;\n\n const instanced_geometry = new InstancedBufferGeometry();\n instanced_geometry.instanceCount = 0;\n\n const geometry = new PlaneGeometry(1, 1);\n geometry.translate(0.5, 0.5, 0);\n instanced_geometry.setAttribute('position', new Float32BufferAttribute(geometry.getAttribute('position').array, 3));\n instanced_geometry.setAttribute('uv', new Float32BufferAttribute(geometry.getAttribute('uv').array, 2));\n instanced_geometry.index = geometry.index;\n\n const transformsCol0 = new InstancedBufferAttribute(new Float32Array(max_allocations * 4), 4, false);\n const transformsCol1 = new InstancedBufferAttribute(new Float32Array(max_allocations * 4), 4, false);\n const transformsCol2 = new InstancedBufferAttribute(new Float32Array(max_allocations * 4), 4, false);\n const transformsCol3 = new InstancedBufferAttribute(new Float32Array(max_allocations * 4), 4, false);\n\n const glyph_bounds = new InstancedBufferAttribute(new Float32Array(max_allocations * 4), 4, false);\n const plane_bounds = new InstancedBufferAttribute(new Float32Array(max_allocations * 4), 4, false);\n\n const color = new InstancedBufferAttribute(new Float32Array(max_allocations * 4), 4, false);\n\n transformsCol0.usage = DynamicDrawUsage;\n transformsCol1.usage = DynamicDrawUsage;\n transformsCol2.usage = DynamicDrawUsage;\n transformsCol3.usage = DynamicDrawUsage;\n glyph_bounds.usage = DynamicDrawUsage;\n plane_bounds.usage = DynamicDrawUsage;\n color.usage = DynamicDrawUsage;\n\n instanced_geometry.setAttribute('transformsCol0', transformsCol0);\n instanced_geometry.setAttribute('transformsCol1', transformsCol1);\n instanced_geometry.setAttribute('transformsCol2', transformsCol2);\n instanced_geometry.setAttribute('transformsCol3', transformsCol3);\n\n instanced_geometry.setAttribute('glyph_bounds', glyph_bounds);\n instanced_geometry.setAttribute('plane_bounds', plane_bounds);\n instanced_geometry.setAttribute('color', color);\n\n super(instanced_geometry, new SDFTextMaterial(atlas_texture));\n\n this.text_elements = [];\n this.font_layout = font_layout;\n\n this.material.set_atlas_size(new Vector2(font_layout.atlas.width, font_layout.atlas.height));\n\n this.frustumCulled = false;\n }\n\n set_boldness(value)\n {\n this.material.set_boldness(value);\n }\n\n add_text(text_str)\n {\n const elem = new SDFText(this.font_layout.glyphs, text_str);\n this.text_elements.push(elem);\n return elem;\n }\n\n remove_text(text_elem)\n {\n ArrayUtilities.remove_elem(this.text_elements, text_elem);\n this.update(true);\n }\n\n update(force_update)\n {\n const glyph_bounds_atr = this.geometry.getAttribute('glyph_bounds');\n const plane_bounds_atr = this.geometry.getAttribute('plane_bounds');\n\n const transformsCol0 = this.geometry.getAttribute('transformsCol0');\n const transformsCol1 = this.geometry.getAttribute('transformsCol1');\n const transformsCol2 = this.geometry.getAttribute('transformsCol2');\n const transformsCol3 = this.geometry.getAttribute('transformsCol3');\n\n const color_atr = this.geometry.getAttribute('color');\n\n let matrix_needs_update = force_update === true;\n let glyph_needs_update = force_update === true;\n let color_needs_update = force_update === true;\n\n let glyph_count = 0;\n for (let i = 0; i < this.text_elements.length; i++)\n {\n const text = this.text_elements[i];\n\n if (text.matrix_is_dirty)\n {\n matrix_needs_update = true;\n text.update_matrix();\n }\n\n if (text.glyph_is_dirty)\n {\n glyph_needs_update = true;\n text.clear_glyph_dirty();\n }\n\n if (text.color_is_dirty)\n {\n color_needs_update = true;\n text.clear_color_dirty();\n }\n\n const matrix = text.matrix;\n const color = text.color;\n const opacity = text.opacity;\n\n for (let glyph_i = 0; glyph_i < text.glyphs.length; glyph_i++)\n {\n const glyph = text.glyphs[glyph_i];\n\n const buffer_i = glyph_count;\n\n glyph_bounds_atr.setXYZW(buffer_i, glyph.atlas_bounds.x, glyph.atlas_bounds.y, glyph.atlas_bounds.z, glyph.atlas_bounds.w);\n plane_bounds_atr.setXYZW(buffer_i, glyph.position.x, glyph.position.y, glyph.scale.x, glyph.scale.y);\n\n transformsCol0.setXYZW(buffer_i, matrix.elements[0],\n matrix.elements[1],\n matrix.elements[2],\n matrix.elements[3]);\n\n transformsCol1.setXYZW(buffer_i, matrix.elements[4],\n matrix.elements[5],\n matrix.elements[6],\n matrix.elements[7]);\n\n transformsCol2.setXYZW(buffer_i, matrix.elements[8],\n matrix.elements[9],\n matrix.elements[10],\n matrix.elements[11]);\n\n transformsCol3.setXYZW(buffer_i, matrix.elements[12],\n matrix.elements[13],\n matrix.elements[14],\n matrix.elements[15]);\n\n color_atr.setXYZW(buffer_i, color.r, color.g, color.b, opacity);\n\n glyph_count++;\n }\n }\n\n this.geometry.instanceCount = glyph_count;\n\n if (glyph_count > this.max_allocations)\n {\n console.error('SDFTextBatch exceeded maximum glyph allocations(max/current): ', this.max_allocations, glyph_count, this);\n }\n\n if (matrix_needs_update)\n {\n transformsCol0.needsUpdate = true;\n transformsCol1.needsUpdate = true;\n transformsCol2.needsUpdate = true;\n transformsCol3.needsUpdate = true;\n }\n if (glyph_needs_update)\n {\n glyph_bounds_atr.needsUpdate = true;\n plane_bounds_atr.needsUpdate = true;\n }\n if (color_needs_update)\n {\n color_atr.needsUpdate = true;\n }\n }\n\n dispose()\n {\n this.geometry.dispose();\n this.material.dispose();\n }\n}\n\nexport { SDFTextBatch };\n","import { ActionInterpolator } from './ActionInterpolator';\n\nclass VectorInterpolator extends ActionInterpolator\n{\n constructor(attribute_name, from = 0, to = 1, easing_function = 'linear')\n {\n super(easing_function);\n\n this.attribute_name = attribute_name;\n this.from = from;\n this.to = to;\n }\n\n update(context, t)\n {\n const tmp = this.from.clone();\n tmp.lerp(this.to, this.easing_function(t));\n context[this.attribute_name].copy(tmp);\n }\n}\n\nexport { VectorInterpolator };\n","import { BlitMaterial } from '../materials/BlitMaterial';\n\nimport frag from '../shaders/median_filter/median_filter.frag';\n\nimport { Vector2 } from 'three';\n\nclass MedianFilterMaterial extends BlitMaterial\n{\n constructor()\n {\n super(frag, undefined, {\n kernel3x3: true\n });\n\n this.uniforms._SourceTex = { value: undefined };\n this.uniforms._SourceTexSize = { value: new Vector2(1, 1) };\n }\n\n set_texture(tex)\n {\n this.uniforms._SourceTex.value = tex;\n\n const size = this.get_size(tex);\n this.uniforms._SourceTexSize.value.copy(size);\n }\n\n get_size(tex)\n {\n if (tex.isVideoTexture)\n {\n return new Vector2(Math.max(1, tex.image.videoWidth), Math.max(1, tex.image.videoHeight));\n }\n if (tex.isWebGLRenderTarget)\n {\n return new Vector2(tex.width, tex.height);\n }\n if (tex.isTexture)\n {\n return new Vector2(tex.image.width, tex.image.height);\n }\n return new Vector2(1, 1);\n }\n}\n\nexport { MedianFilterMaterial };\n","import { MedianFilterMaterial } from '../materials/MedianFilterMaterial';\nimport { Graphics } from '../Graphics';\n\nimport { WebGLRenderTarget, Vector2, RGBAFormat, FloatType, NearestFilter } from 'three';\n\nclass MedianFilter\n{\n constructor(renderer)\n {\n this.RT = new WebGLRenderTarget(1, 1, {\n type: FloatType,\n format: RGBAFormat,\n minFilter: NearestFilter,\n magFilter: NearestFilter\n });\n this.RT1 = new WebGLRenderTarget(1, 1, {\n type: FloatType,\n format: RGBAFormat,\n minFilter: NearestFilter,\n magFilter: NearestFilter\n });\n\n this.median_filter_mat = new MedianFilterMaterial();\n }\n\n filter(texture)\n {\n const tex_size = this.get_size(texture);\n if (tex_size.x !== this.RT.width || tex_size.y !== this.RT.height)\n {\n this.RT.setSize(tex_size.x, tex_size.y);\n this.RT1.setSize(tex_size.x, tex_size.y);\n }\n\n this.median_filter_mat.set_texture(texture);\n Graphics.material_pass(this.median_filter_mat, this.RT);\n\n for (let i = 0; i < 0; i++)\n {\n this.median_filter_mat.set_texture(this.RT.texture);\n Graphics.material_pass(this.median_filter_mat, this.RT1);\n\n this.median_filter_mat.set_texture(this.RT1.texture);\n Graphics.material_pass(this.median_filter_mat, this.RT);\n }\n\n return this.RT;\n }\n\n get_size(tex)\n {\n if (tex.isVideoTexture)\n {\n return new Vector2(Math.max(1, tex.image.videoWidth), Math.max(1, tex.image.videoHeight));\n }\n if (tex.isWebGLRenderTarget)\n {\n return new Vector2(tex.width, tex.height);\n }\n if (tex.isTexture)\n {\n return new Vector2(tex.image.width, tex.image.height);\n }\n return new Vector2(1, 1);\n }\n}\n\nexport { MedianFilter };\n","import { BlitMaterial } from './BlitMaterial';\n\nimport downsample_frag from '../shaders/dual_filter_blur/downsample.frag';\nimport upsample_frag from '../shaders/dual_filter_blur/upsample.frag';\n\nclass DualFilteringBlurMaterial extends BlitMaterial\n{\n constructor(upsample)\n {\n super(upsample ? upsample_frag : downsample_frag);\n }\n}\n\nexport { DualFilteringBlurMaterial };\n","import { BlitMaterial } from './BlitMaterial';\n\nimport frag from '../shaders/dual_filter_blur/alpha_filter.frag';\n\nclass AlphaFilterMaterial extends BlitMaterial\n{\n constructor(use_alpha_mask, upsample)\n {\n super(frag);\n }\n\n set offset(value)\n {\n this.uniforms._Offset.value = value;\n }\n\n get offset()\n {\n return this.uniforms._Offset.value;\n }\n}\n\nexport { AlphaFilterMaterial };\n","import { DualFilteringBlurMaterial } from '../materials/DualFilteringBlurMaterial';\nimport { AlphaFilterMaterial } from '../materials/AlphaFilterMaterial';\nimport { Graphics } from '../Graphics';\nimport { WebGLRenderTarget } from 'three';\nclass DualFilteringBlurrer\n{\n constructor(use_alpha_mask)\n {\n this.current_width = 1;\n this.current_height = 1;\n this.RT0 = new WebGLRenderTarget(1, 1);\n this.RT1 = new WebGLRenderTarget(1, 1);\n this.RT2 = new WebGLRenderTarget(1, 1);\n this.RT3 = new WebGLRenderTarget(1, 1);\n this.RT4 = new WebGLRenderTarget(1, 1);\n\n this.upscale_blur_mat = new DualFilteringBlurMaterial(true);\n this.downscale_blur_mat = new DualFilteringBlurMaterial(false);\n\n this.alpha_filter_mat = new AlphaFilterMaterial();\n }\n\n blur(RT)\n {\n this.check_RT_resize(RT.width, RT.height);\n Graphics.blit(RT, this.RT1, this.alpha_filter_mat);\n\n // Graphics.blit(this.RT0, this.RT1, this.downscale_blur_mat);\n Graphics.blit(this.RT1, this.RT2, this.downscale_blur_mat);\n Graphics.blit(this.RT2, this.RT3, this.downscale_blur_mat);\n Graphics.blit(this.RT3, this.RT4, this.downscale_blur_mat);\n\n // Graphics.blit(this.RT4, this.RT3, this.upscale_blur_mat);\n // Graphics.blit(this.RT3, this.RT4, this.upscale_blur_mat);\n Graphics.blit(this.RT4, this.RT3, this.upscale_blur_mat);\n Graphics.blit(this.RT3, this.RT2, this.upscale_blur_mat);\n Graphics.blit(this.RT2, RT, this.upscale_blur_mat);\n // Graphics.blit(this.RT1, RT, this.upscale_blur_mat);\n\n // return this.RT2;\n }\n\n check_RT_resize(width, height)\n {\n if (this.current_width !== width || this.current_height !== height)\n {\n this.current_width = width;\n this.current_height = height;\n this.RT0.setSize(this.current_width / 2, this.current_height / 2);\n this.RT1.setSize(this.current_width / 2, this.current_height / 2);\n this.RT2.setSize(this.current_width / 4, this.current_height / 4);\n this.RT3.setSize(this.current_width / 8, this.current_height / 8);\n this.RT4.setSize(this.current_width / 16, this.current_height / 16);\n }\n }\n}\n\nexport { DualFilteringBlurrer };\n","import { Graphics } from '../Graphics';\n\nimport { NearestFilter } from 'three';\nimport { RGBAFormat } from 'three';\nimport { LinearEncoding } from 'three';\nimport { HalfFloatType } from 'three';\nimport { FloatType } from 'three';\nimport { WebGLRenderTarget } from 'three';\nimport { Capabilities } from '../Capabilities';\n\nclass ParticleAttribute\n{\n constructor(attr_name, update_material)\n {\n this.read = undefined;\n this.write = undefined;\n\n this.name = attr_name;\n\n this.update_material = update_material;\n }\n\n init_from_geometry(geometry)\n {\n // overrided by inheritance\n }\n\n init_from_attribute(particle_attribute)\n {\n\n }\n\n build_RT(particle_count)\n {\n const resolution = ParticleAttribute.calculate_resolution(particle_count);\n const options = {\n minFilter: NearestFilter,\n magFilter: NearestFilter,\n format: RGBAFormat,\n encoding: LinearEncoding,\n type: Capabilities.fp_textures_available ? FloatType : HalfFloatType,\n stencilBuffer: false,\n depthBuffer: false\n };\n\n return new WebGLRenderTarget(resolution.width, resolution.height, options);\n }\n\n static calculate_resolution(particle_count)\n {\n const width = Math.min(particle_count, 512);\n const height = Math.max(1, Math.ceil(particle_count / width));\n return { width, height };\n }\n\n swap_RT()\n {\n const tmp = this.read;\n this.read = this.write;\n this.write = tmp;\n }\n\n update(attribute_writter_scene)\n {\n if (this.update_material)\n {\n this.update_material.update();\n attribute_writter_scene.children[0].material = this.update_material;\n this.update_material.uniforms._MainTex.value = this.read.texture;\n Graphics.render(attribute_writter_scene, undefined, this.write);\n attribute_writter_scene.children[0].material = undefined;\n\n this.swap_RT();\n }\n }\n\n store_geometry_attribute_in_RT(attribute, RT, storage_material, attribute_writter_scene)\n {\n attribute_writter_scene.children[0].geometry.setAttribute('data', attribute);\n attribute_writter_scene.children[0].material = storage_material;\n\n Graphics.render(attribute_writter_scene, undefined, RT);\n\n attribute_writter_scene.children[0].geometry.deleteAttribute('data');\n attribute_writter_scene.children[0].material = undefined;\n }\n\n get_texture()\n {\n return this.read.texture;\n }\n}\n\nexport { ParticleAttribute };\n","import { Object3D } from 'three';\nimport { BufferAttribute } from 'three';\nimport { PlaneGeometry } from 'three';\nimport { Mesh } from 'three';\nimport { BufferGeometry } from 'three';\nimport { Scene } from 'three';\nimport { Points } from 'three';\nimport { InstancedBufferGeometry } from 'three';\nimport { InstancedBufferAttribute } from 'three';\nimport { ParticleAttribute } from './ParticleAttribute';\n\nclass GPUParticleSystem extends Object3D\n{\n constructor(particle_count, material)\n {\n super();\n this.attributes = [];\n\n this.mesh = this.build_point_mesh(particle_count, material);\n this.add(this.mesh);\n\n this.attribute_writter_mesh = this.build_attribute_writter_mesh(particle_count);\n this.attribute_writter_scene = new Scene();\n this.attribute_writter_scene.add(this.attribute_writter_mesh);\n }\n\n add_texture_attribute(buffer_attribute)\n {\n this.attributes.push(buffer_attribute);\n }\n\n add_update_attribute_array(name, array, item_size)\n {\n this.attribute_writter_mesh.geometry.setAttribute(name, new BufferAttribute(array, item_size, false));\n }\n\n add_attribute_array(name, array, item_size)\n {\n this.mesh.geometry.setAttribute(name, new InstancedBufferAttribute(array, item_size, false));\n }\n\n update()\n {\n this.mesh.material.update();\n for (let i = 0; i < this.attributes.length; i++)\n {\n this.attributes[i].update(this.attribute_writter_scene);\n }\n }\n\n dispose()\n {\n this.mesh.geometry.dispose();\n this.mesh.material.dispose();\n }\n\n build_point_mesh(instance_count = 1, material)\n {\n const geo = new PlaneGeometry();\n\n const instanced_geo = new InstancedBufferGeometry();\n instanced_geo.setAttribute('position', geo.getAttribute('position'));\n instanced_geo.index = geo.index;\n\n instanced_geo.setAttribute('storage_uv', this.build_uv_storage_attribute(instance_count));\n instanced_geo.instanceCount = instance_count;\n const mesh = new Mesh(instanced_geo, material);\n mesh.frustumCulled = false;\n return mesh;\n }\n\n build_attribute_writter_mesh(particle_count)\n {\n const { width, height } = ParticleAttribute.calculate_resolution(particle_count);\n\n const uvs = new Float32Array(particle_count * 3);\n\n for (let i = 0; i < particle_count; i++)\n {\n const x = i % width;\n const y = Math.floor(i / width);\n uvs[i * 3 + 0] = (x + 0.5) / width;\n uvs[i * 3 + 1] = (y + 0.5) / height;\n uvs[i * 3 + 2] = i;\n }\n const geo = new BufferGeometry();\n geo.setAttribute('position', new BufferAttribute(uvs, 3, false));\n\n const points = new Points(geo);\n points.frustumCulled = false;\n return points;\n }\n\n build_uv_storage_attribute(particle_count)\n {\n const { width, height } = ParticleAttribute.calculate_resolution(particle_count);\n\n const uvs = new Float32Array(particle_count * 2);\n\n for (let i = 0; i < particle_count; i++)\n {\n const x = i % width;\n const y = Math.floor(i / width);\n uvs[i * 2 + 0] = (x + 0.5) / width;\n uvs[i * 2 + 1] = (y + 0.5) / height;\n }\n return new InstancedBufferAttribute(uvs, 2, false);\n }\n}\n\nexport { GPUParticleSystem };\n","import frag from '../../shaders/gpu_particles/generic_storage.frag';\n\nimport { ShaderMaterial } from 'three';\nimport { NoBlending } from 'three';\nimport { AlwaysDepth } from 'three';\n\nclass ParticleStorageMaterial extends ShaderMaterial\n{\n constructor()\n {\n const vert = `\n varying vec4 value;\n attribute vec4 data;\n\n void main()\n {\n gl_Position = vec4(position.xy * 2.0 - 1.0, 1.0,1.0);\n gl_PointSize = 1.0;\n\n value = data;\n }\n `;\n super({\n uniforms: {\n\n },\n vertexShader: vert,\n fragmentShader: frag,\n depthWrite: false,\n blending: NoBlending,\n depthTest: false,\n depthFunc: AlwaysDepth\n });\n }\n}\n\nexport { ParticleStorageMaterial };\n","import { BufferAttribute } from 'three';\n\nimport { ParticleAttribute } from '../gpu_particles/ParticleAttribute';\nimport { ParticleStorageMaterial } from '../materials/gpu_particles/ParticleStorageMaterial';\n\nclass ParticlePositionAttribute extends ParticleAttribute\n{\n constructor(update_material)\n {\n super('_Position', update_material);\n }\n\n store_geometry(geometry, attribute_writter_scene)\n {\n const pos_attr = geometry.getAttribute('position');\n this.read = this.build_RT(pos_attr.count);\n this.write = this.build_RT(pos_attr.count);\n\n const mat = new ParticleStorageMaterial();\n this.store_geometry_attribute_in_RT(geometry.getAttribute('position'), this.read, mat, attribute_writter_scene);\n }\n\n store_positions(positions, attribute_writter_scene)\n {\n this.read = this.build_RT(positions.length);\n this.write = this.build_RT(positions.length);\n\n const arr = new Float32Array(positions.length * 4);\n\n for (let i = 0; i < positions.length; i++)\n {\n arr[i * 4 + 0] = positions[i].x;\n arr[i * 4 + 1] = positions[i].y;\n arr[i * 4 + 2] = positions[i].z;\n arr[i * 4 + 3] = (Math.random() * 2 - 1) * 10;\n }\n const mat = new ParticleStorageMaterial();\n this.store_geometry_attribute_in_RT(new BufferAttribute(arr, 4), this.read, mat, attribute_writter_scene);\n }\n}\n\nexport { ParticlePositionAttribute };\n","import { DataTexture } from 'three';\n\nclass CustomDataTexture extends DataTexture\n{\n constructor(data, width, height, format, type)\n {\n super(data, width, height, format, type);\n this.multiplier = 1;\n }\n\n set_rgba(index, r, g, b, a)\n {\n this.data[index * 3 + 0] = r * this.multiplier;\n this.data[index * 3 + 1] = g * this.multiplier;\n this.data[index * 3 + 2] = b * this.multiplier;\n this.data[index * 3 + 3] = a * this.multiplier;\n this.needsUpdate = true;\n }\n\n set_rgb(index, r, g, b)\n {\n this.data[index * 3 + 0] = r * this.multiplier;\n this.data[index * 3 + 1] = g * this.multiplier;\n this.data[index * 3 + 2] = b * this.multiplier;\n this.needsUpdate = true;\n }\n\n set_r(index, value)\n {\n this.data[index * 3 + 0] = value * this.multiplier;\n this.needsUpdate = true;\n }\n\n set_g(index, value)\n {\n this.data[index * 3 + 1] = value * this.multiplier;\n this.needsUpdate = true;\n }\n\n set_b(index, value)\n {\n this.data[index * 3 + 2] = value * this.multiplier;\n this.needsUpdate = true;\n }\n\n set_a(index, value)\n {\n this.data[index * 3 + 2] = value * this.multiplier;\n this.needsUpdate = true;\n }\n}\n\nexport { CustomDataTexture };\n","import { CustomDataTexture } from './CustomDataTexture';\nimport { RGBFormat } from 'three';\n\nclass RGBDataTexture extends CustomDataTexture\n{\n constructor(width, height)\n {\n const data = new Uint8Array(width * height * 3);\n super(data, width, height, RGBFormat);\n this.multiplier = 255;\n }\n}\n\nexport { RGBDataTexture };\n","import { CustomDataTexture } from './CustomDataTexture';\nimport { RGBAFormat } from 'three';\n\nclass RGBADataTexture extends CustomDataTexture\n{\n constructor(width, height)\n {\n const data = new Uint8Array(width * height * 4);\n super(data, width, height, RGBAFormat);\n this.multiplier = 255;\n }\n}\n\nexport { RGBADataTexture };\n","import { CustomDataTexture } from './CustomDataTexture';\nimport { FloatType } from 'three';\nimport { RGBFormat } from 'three';\n\nclass RGBFloatDataTexture extends CustomDataTexture\n{\n constructor(width, height)\n {\n const data = new Float32Array(width * height * 3);\n super(data, width, height, RGBFormat, FloatType);\n }\n}\n\nexport { RGBFloatDataTexture };\n","import { CustomDataTexture } from './CustomDataTexture';\nimport { FloatType } from 'three';\nimport { RGBAFormat } from 'three';\n\nclass RGBAFloatDataTexture extends CustomDataTexture\n{\n constructor(width, height)\n {\n const data = new Float32Array(width * height * 4);\n super(data, width, height, RGBAFormat, FloatType);\n }\n}\n\nexport { RGBAFloatDataTexture };\n","import { Mesh } from 'three';\nimport { RGBDataTexture } from '../data_textures/RGBDataTexture';\nimport { RGBADataTexture } from '../data_textures/RGBADataTexture';\nimport { RGBFloatDataTexture } from '../data_textures/RGBFloatDataTexture';\nimport { RGBAFloatDataTexture } from '../data_textures/RGBAFloatDataTexture';\n\nclass BatchedMesh extends Mesh\n{\n constructor(id_table, geometry, material, max_texture_width)\n {\n super(geometry, material);\n\n this.id_table = id_table;\n this.batched_count = Object.keys(id_table).length;\n this.max_texture_width = max_texture_width;\n this.batch_width = this.batched_count % max_texture_width;\n this.batch_height = Math.ceil(this.batched_count / max_texture_width);\n }\n\n attach_rgb_texture(uniform_name)\n {\n this.material.uniforms[uniform_name].value = new RGBDataTexture(this.batch_width, this.batch_height);\n }\n\n attach_rgba_texture(uniform_name)\n {\n this.material.uniforms[uniform_name].value = new RGBADataTexture(this.batch_width, this.batch_height);\n }\n\n attach_rgb_float_texture(uniform_name)\n {\n this.material.uniforms[uniform_name].value = new RGBFloatDataTexture(this.batch_width, this.batch_height);\n }\n\n attach_rgba_float_texture(uniform_name)\n {\n this.material.uniforms[uniform_name].value = new RGBAFloatDataTexture(this.batch_width, this.batch_height);\n }\n\n get_mesh_index(name)\n {\n return this.id_table[name];\n }\n\n set_rgb_value(uniform_name, mesh_name, r, g, b)\n {\n this.material.uniforms[uniform_name].set_rgb(this.get_mesh_index(mesh_name), r, g, b);\n }\n\n set_rgba_value(uniform_name, mesh_name, r, g, b, a)\n {\n this.material.uniforms[uniform_name].set_rgba(this.get_mesh_index(mesh_name), r, g, b, a);\n }\n}\n\nexport { BatchedMesh };\n","import { BatchedMesh } from './BatchedMesh';\n\nimport * as BufferGeometryUtils from 'three/examples/jsm/utils/BufferGeometryUtils.js';\n\nimport { BufferAttribute } from 'three';\n\nclass MeshBatcher\n{\n batch(meshes, material)\n {\n const max_texture_width = 2048;\n // let texture_width = meshes.length % max_texture_width;\n // let texture_height = Math.ceil(meshes.length / max_texture_width);\n\n // console.log(\"Store count: \" + buffer_geometries.length + \", Texture size: \" +texture_width);\n\n const geometries = [];\n const id_table = {};\n\n const attr_mesh_id = [];\n\n for (let i = 0; i < meshes.length; i++)\n {\n const mesh = meshes[i];\n const vertex_count = mesh.geometry.getAttribute('position').count;\n\n for (let count = 0; count < vertex_count; count++)\n {\n attr_mesh_id.push(i);\n }\n\n geometries.push(mesh.geometry);\n\n if (id_table[mesh.name] === undefined)\n {\n id_table[mesh.name] = i;\n }\n else\n {\n console.error('Mesh name is duplicated when trying to merge meshes. Non-unique id error.', mesh.name, id_table);\n }\n }\n\n const buffer_geometry = BufferGeometryUtils.mergeBufferGeometries(geometries);\n\n const buffer_attribute = new BufferAttribute(new Float32Array(attr_mesh_id), 1);\n buffer_geometry.setAttribute('mesh_id', buffer_attribute);\n\n return this.create_batched_mesh(id_table, buffer_geometry, material, max_texture_width);\n }\n\n create_batched_mesh(id_table, buffer_geometry, material, max_texture_width)\n {\n return new BatchedMesh(id_table, buffer_geometry, material, max_texture_width);\n }\n}\n\nexport { MeshBatcher };\n","import { Audio as TAudio } from 'three';\nimport { PositionalAudio as TPositionalAudio } from 'three';\n\nclass AudioClip\n{\n constructor(buffer, loop = true, volume = 1, positional = false)\n {\n this.buffer = buffer;\n this.loop = loop;\n this.volume = volume;\n this.positional = positional;\n\n this.audio = undefined;\n }\n\n init(audio_listener)\n {\n if (this.positional)\n {\n this.audio = new TPositionalAudio(audio_listener);\n }\n else\n {\n this.audio = new TAudio(audio_listener);\n }\n\n this.audio.setBuffer(this.buffer);\n this.audio.setLoop(this.loop);\n\n // This prevents undesired volume at the beginning of playing\n this.audio.gain.gain.value = 0;\n\n this.audio.setVolume(this.loop ? 0 : this.volume);\n }\n\n play()\n {\n this.audio.play();\n }\n\n pause()\n {\n this.audio.pause();\n }\n\n stop()\n {\n this.audio.stop();\n }\n\n get is_playing()\n {\n return this.audio.isPlaying;\n }\n}\n\nexport { AudioClip };\n","import { AudioContext } from 'three';\r\n\r\nimport { AudioClip } from '../components/AudioClip';\r\nimport { AbstractLoader } from './AbstractLoader';\r\n\r\nclass AudioLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, loop = true, volume = 0, size, positional = false)\r\n {\r\n super(resource_id, url, size);\r\n this.loop = loop;\r\n this.volume = volume;\r\n this.positional = positional;\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n // if (!window.user_interaction_for_audio)\r\n // {\r\n // setTimeout(this.on_preloaded_finished.bind(this, resource_container), 100);\r\n // }\r\n // else\r\n // {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n this.instantiate_audio(resource_container);\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n // }\r\n }\r\n\r\n instantiate_audio(resource_container)\r\n {\r\n const context = AudioContext.getContext();\r\n\r\n const buffer = context.createBuffer(2, 22050, 44100);\r\n\r\n fetch(this.url).then(r => r.blob()).then((response) =>\r\n {\r\n if (response.arrayBuffer)\r\n {\r\n response.arrayBuffer().then((array_buffer) =>\r\n {\r\n context.decodeAudioData(array_buffer, (audio_buffer) =>\r\n {\r\n resource_container.set_resource(\r\n this.resource_id,\r\n this.url,\r\n new AudioClip(audio_buffer, this.loop, this.volume, this.positional)\r\n );\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n });\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(\r\n this.resource_id,\r\n this.url,\r\n new AudioClip(buffer, this.loop, this.volume, this.positional)\r\n );\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n });\r\n }\r\n}\r\n\r\nexport { AudioLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\n\n// import { sRGBEncoding } from 'three';\n\nclass BasisLoader extends AbstractLoader\n{\n constructor(resource_id, url, loader, size)\n {\n super(resource_id, url, size);\n\n this.loader = loader;\n }\n\n on_preloaded_finished(resource_container)\n {\n if (resource_container.resources_by_url[this.url] === undefined)\n {\n this.loader.load(this.url, (basis) =>\n {\n // basis.encoding = sRGBEncoding;\n\n resource_container.set_resource(this.resource_id, this.url, basis);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n },\n (xhr) =>\n {\n // if (xhr)\n // {\n // let total = xhr.total || this.total_bytes;\n // this.__update_downloaded_bytes(xhr.loaded, total);\n // }\n },\n (msg) =>\n {\n this.__set_error(msg + '\\n\\n\\t If the error says something about unexpected token < in JSON then the probably the problem is related to the file not being found. Check the name and path of the resource');\n this.__loading_ended();\n });\n }\n else\n {\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n }\n }\n}\n\nexport { BasisLoader };\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { CubeTextureLoader } from 'three';\r\n\r\nclass CubemapLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, extension, size)\r\n {\r\n super(resource_id, url, size);\r\n this.loader = new CubeTextureLoader();\r\n this.loader.setPath(url + '/');\r\n this.urls = [\r\n `px.${extension}`,\r\n `nx.${extension}`,\r\n `py.${extension}`,\r\n `ny.${extension}`,\r\n `pz.${extension}`,\r\n `nz.${extension}`\r\n ];\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n this.loader.load(this.urls, (image) =>\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, image);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n },\r\n (xhr) =>\r\n {\r\n // if (xhr)\r\n // {\r\n // let total = xhr.total || this.total_bytes;\r\n // this.__update_downloaded_bytes(xhr.loaded, total);\r\n // }\r\n },\r\n (error) =>\r\n {\r\n this.__set_error('Image could not be loaded. Maybe wrong name or path, I don\\'t know' + '¯\\\\_(ツ)_/¯', error);\r\n this.__loading_ended();\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { CubemapLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { ColladaLoader } from 'three/examples/jsm/loaders/ColladaLoader.js';\r\n\r\nclass DAELoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, size)\r\n {\r\n super(resource_id, url, size);\r\n this.loader = new ColladaLoader();\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n this.loader.load(this.url, (gltf) =>\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, gltf);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n },\r\n (xhr) =>\r\n {\r\n // if (xhr)\r\n // {\r\n // let total = xhr.total || this.total_bytes;\r\n // this.__update_downloaded_bytes(xhr.loaded, total);\r\n // }\r\n },\r\n (msg) =>\r\n {\r\n this.__set_error(msg + '\\n\\n\\t If the error says something about unexpected token < in JSON then the probably the problem is related to the file not being found. Check the name and path of the resource');\r\n this.__loading_ended();\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { DAELoader };\r\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { FileLoader as TFileLoader } from 'three';\r\n\r\nclass FileLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, size)\r\n {\r\n super(resource_id, url, size);\r\n this.loader = new TFileLoader();\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n this.loader.load(this.url, (file) =>\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, file);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n },\r\n (xhr) =>\r\n {\r\n // if (xhr)\r\n // {\r\n // let total = xhr.total || this.total_bytes;\r\n // this.__update_downloaded_bytes(xhr.loaded, total);\r\n // }\r\n },\r\n (msg) =>\r\n {\r\n this.__set_error(msg);\r\n this.__loading_ended();\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { FileLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\n\nimport { FontLoader as TFontLoader } from 'three/examples/jsm/loaders/FontLoader.js';\n\nclass FontLoader extends AbstractLoader\n{\n constructor(resource_id, url, size)\n {\n super(resource_id, url, size);\n this.loader = new TFontLoader();\n }\n\n on_preloaded_finished(resource_container)\n {\n if (resource_container.resources_by_url[this.url] === undefined)\n {\n this.loader.load(this.url, (font) =>\n {\n resource_container.set_resource(this.resource_id, this.url, font);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n },\n (xhr) =>\n {\n // if (xhr)\n // {\n // let total = xhr.total || this.total_bytes;\n // this.__update_downloaded_bytes(xhr.loaded, total);\n // }\n },\n (msg) =>\n {\n this.__set_error(msg + '\\n\\n\\t If the error says something about unexpected token < in JSON then probably the problem is related to the file not being found. Check the name and path of the resource');\n this.__loading_ended();\n });\n }\n else\n {\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n }\n }\n}\n\nexport { FontLoader };\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { GLTFLoader as TGLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';\r\n\r\nclass GLTFLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, size)\r\n {\r\n super(resource_id, url, size);\r\n this.loader = new TGLTFLoader();\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n this.loader.load(this.url, (gltf) =>\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, gltf);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n },\r\n (xhr) =>\r\n {\r\n // if (xhr)\r\n // {\r\n // let total = xhr.total || this.total_bytes;\r\n\r\n // this.__update_downloaded_bytes(xhr.loaded, total);\r\n // }\r\n },\r\n (msg) =>\r\n {\r\n this.__set_error(msg + '\\n\\n\\t If the error says something about unexpected token < in JSON then the probably the problem is related to the file not being found. Check the name and path of the resource');\r\n this.__loading_ended();\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { GLTFLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';\r\n\r\nclass GLTFDRACOLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, loader, size)\r\n {\r\n super(resource_id, url, size);\r\n this.loader = new GLTFLoader();\r\n\r\n this.loader.setDRACOLoader(loader);\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n this.loader.load(this.url, (gltf) =>\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, gltf);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n },\r\n (xhr) =>\r\n {\r\n // if (xhr)\r\n // {\r\n // let total = xhr.total || this.total_bytes;\r\n // this.__update_downloaded_bytes(xhr.loaded, total);\r\n // }\r\n },\r\n (msg) =>\r\n {\r\n this.__set_error(msg + '\\n\\n\\t If the error says something about unexpected token < in JSON then the probably the problem is related to the file not being found. Check the name and path of the resource');\r\n this.__loading_ended();\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { GLTFDRACOLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { HDRCubeTextureLoader as THDRCubeTextureLoader } from 'three/examples/jsm/loaders/HDRCubeTextureLoader.js';\r\nimport { UnsignedByteType } from 'three';\r\n\r\nclass HDRCubeTextureLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, size)\r\n {\r\n super(resource_id, url, size);\r\n this.loader = new THDRCubeTextureLoader();\r\n this.url_suffix = ['/px.hdr', '/nx.hdr', '/py.hdr', '/ny.hdr', '/pz.hdr', '/nz.hdr'];\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n this.loader.setPath(this.url)\r\n .setDataType(UnsignedByteType)\r\n .load(this.url_suffix, (hdr) =>\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, hdr);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n },\r\n (xhr) =>\r\n {\r\n // if (xhr)\r\n // {\r\n // let total = xhr.total || this.total_bytes;\r\n // this.__update_downloaded_bytes(xhr.loaded, total);\r\n // }\r\n },\r\n (msg) =>\r\n {\r\n this.__set_error(msg + '\\n\\n\\t If the error says something about unexpected token < in JSON then the probably the problem is related to the file not being found. Check the name and path of the resource');\r\n this.__loading_ended();\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { HDRCubeTextureLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\n\nclass JSONLoader extends AbstractLoader\n{\n constructor(resource_id, url, size)\n {\n super(resource_id, url, size);\n }\n\n on_preloaded_finished(resource_container, response)\n {\n if (resource_container.resources_by_url[this.url] === undefined)\n {\n response.json().then((json) =>\n {\n resource_container.set_resource(this.resource_id, this.url, json);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n });\n }\n else\n {\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n }\n }\n}\n\nexport { JSONLoader };\n","import { AbstractLoader } from './AbstractLoader';\n\nimport { OBJLoader as TOBJLoader } from 'three/examples/jsm/loaders/OBJLoader.js';\n\nclass OBJLoader extends AbstractLoader\n{\n constructor(resource_id, url, size)\n {\n super(resource_id, url, size);\n this.loader = new TOBJLoader();\n }\n\n on_preloaded_finished(resource_container)\n {\n if (resource_container.resources_by_url[this.url] === undefined)\n {\n this.loader.load(this.url, (obj) =>\n {\n resource_container.set_resource(this.resource_id, this.url, obj);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n },\n (xhr) =>\n {\n // if (xhr)\n // {\n // let total = xhr.total || this.total_bytes;\n // this.__update_downloaded_bytes(xhr.loaded, total);\n // }\n },\n (msg) =>\n {\n this.__set_error(msg + '\\n\\n\\t If the error says something about unexpected token < in JSON then probably the problem is related to the file not being found. Check the name and path of the resource');\n this.__loading_ended();\n });\n }\n else\n {\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n }\n }\n}\n\nexport { OBJLoader };\n","import { AbstractLoader } from './AbstractLoader';\n\nimport { Vector3 } from 'three';\nimport { FileLoader } from 'three';\n\nclass PointArrayLoader extends AbstractLoader\n{\n constructor(resource_id, url, size)\n {\n super(resource_id, url, size);\n this.loader = new FileLoader();\n }\n\n on_preloaded_finished(resource_container)\n {\n if (resource_container.resources_by_url[this.url] === undefined)\n {\n this.loader.load(this.url, (text) =>\n {\n resource_container.set_resource(this.resource_id, this.url, this.parse_path(text));\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n },\n (xhr) =>\n {\n // if (xhr)\n // {\n // let total = xhr.total || this.total_bytes;\n // this.__update_downloaded_bytes(xhr.loaded, total);\n // }\n },\n (msg) =>\n {\n this.__set_error(msg);\n this.__loading_ended();\n });\n }\n else\n {\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n }\n }\n\n parse_path(raw_data)\n {\n const string_array = raw_data.split('\\n');\n\n if (string_array[string_array.length - 1] === '')\n {\n string_array.pop();\n }\n\n const positions = [];\n\n for (let i = 0; i < string_array.length; i += 3)\n {\n const x = parseFloat(string_array[i + 0]);\n const y = parseFloat(string_array[i + 1]);\n const z = parseFloat(string_array[i + 2]);\n positions.push(new Vector3(x, y, z));\n }\n return positions;\n // let curve = new THREE.CatmullRomCurve3(positions);\n // return curve.getPoints(100);\n }\n}\n\nexport { PointArrayLoader };\n","import { AbstractLoader } from './AbstractLoader';\n\nimport { RGBELoader } from 'three/examples/jsm/loaders/RGBELoader.js';\n\nclass RGBETextureLoader extends AbstractLoader\n{\n constructor(resource_id, url, size)\n {\n super(resource_id, url, size);\n this.loader = new RGBELoader();\n }\n\n on_preloaded_finished(resource_container)\n {\n if (resource_container.resources_by_url[this.url] === undefined)\n {\n this.loader.load(this.url, (hdr) =>\n {\n resource_container.set_resource(this.resource_id, this.url, hdr);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n },\n (xhr) =>\n {\n // if (xhr)\n // {\n // let total = xhr.total || this.total_bytes;\n // this.__update_downloaded_bytes(xhr.loaded, total);\n // }\n },\n (msg) =>\n {\n this.__set_error(msg + '\\n\\n\\t If the error says something about unexpected token < in JSON then the probably the problem is related to the file not being found. Check the name and path of the resource');\n this.__loading_ended();\n });\n }\n else\n {\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n }\n }\n}\n\nexport { RGBETextureLoader };\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { FileLoader as TFileLoader } from 'three';\r\n\r\nclass TextLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, size)\r\n {\r\n super(resource_id, url, size);\r\n this.loader = new TFileLoader();\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n this.loader.load(this.url, (gltf) =>\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, gltf);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n },\r\n (xhr) =>\r\n {\r\n // if (xhr)\r\n // {\r\n // let total = xhr.total || this.total_bytes;\r\n // this.__update_downloaded_bytes(xhr.loaded, total);\r\n // }\r\n },\r\n (msg) =>\r\n {\r\n this.__set_error(msg);\r\n this.__loading_ended();\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { TextLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { Texture } from 'three';\r\nimport { Browser } from '../Browser';\r\n\r\nclass AsyncTextureLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, size)\r\n {\r\n super(resource_id, url, size);\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n if (Browser.is_safari && Browser.version < 15)\r\n {\r\n this.load_with_old_method(resource_container);\r\n }\r\n else\r\n {\r\n this.load_with_new_method(resource_container);\r\n }\r\n }\r\n\r\n load_with_old_method(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n const texture = new Texture();\r\n const image = new Image();\r\n\r\n image.src = this.url;\r\n\r\n image.onload = () =>\r\n {\r\n texture.image = image;\r\n texture.needsUpdate = true;\r\n\r\n resource_container.set_resource(this.resource_id, this.url, texture);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n };\r\n\r\n image.onerror = () =>\r\n {\r\n console.error('Error loading texture. Maybe the resource is not an image?', this.url, this.original_url);\r\n };\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n\r\n load_with_new_method(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n const fetchOptions = {};\r\n fetchOptions.credentials = 'same-origin';\r\n // fetchOptions.headers = this.requestHeader;\r\n\r\n fetch(this.url, fetchOptions).then((res) =>\r\n {\r\n return res.blob();\r\n }).then((blob) =>\r\n {\r\n return createImageBitmap(blob, { colorSpaceConversion: 'none' });\r\n }).then((imageBitmap) =>\r\n {\r\n const texture = new Texture(imageBitmap);\r\n texture.needsUpdate = true;\r\n\r\n resource_container.set_resource(this.resource_id, this.url, texture);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }).catch(function(e)\r\n {\r\n console.error(e);\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { AsyncTextureLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { Texture } from 'three';\r\n\r\nclass TextureLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, size)\r\n {\r\n super(resource_id, url, size);\r\n }\r\n\r\n on_preloaded_finished(resource_container, response)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n response.blob().then((blob) =>\r\n {\r\n const texture = new Texture();\r\n\r\n const url = URL.createObjectURL(blob);\r\n\r\n const image = new Image();\r\n image.src = url;\r\n\r\n image.onload = () =>\r\n {\r\n texture.image = image;\r\n texture.needsUpdate = true;\r\n\r\n resource_container.set_resource(this.resource_id, this.url, texture);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n };\r\n\r\n image.onerror = () =>\r\n {\r\n console.error('Error loading texture. Maybe the resource is not an image?', this.url);\r\n };\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { TextureLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\n\nclass VideoLoader extends AbstractLoader\n{\n constructor(resource_id, url, size)\n {\n super(resource_id, url, size);\n }\n\n on_preloaded_finished(resource_container, response)\n {\n if (resource_container.resources_by_url[this.url] === undefined)\n {\n response.blob().then((blob) =>\n {\n resource_container.set_resource(this.resource_id, this.url, URL.createObjectURL(blob));\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n });\n }\n else\n {\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n }\n }\n}\n\nexport { VideoLoader };\n","import { ResourceContainer } from '../ResourceContainer';\r\n\r\nclass ResourceBatch\r\n{\r\n constructor(batch_name)\r\n {\r\n this.resource_loaders = [];\r\n this.batch_name = batch_name || 'unnamed batch';\r\n }\r\n\r\n add_loader(loader)\r\n {\r\n this.resource_loaders.push(loader);\r\n }\r\n\r\n load(resource_container)\r\n {\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n this.resource_loaders[i].load(resource_container || ResourceContainer);\r\n }\r\n }\r\n\r\n get loading_finished()\r\n {\r\n let finished = true;\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n finished = finished && this.resource_loaders[i].has_finished;\r\n }\r\n return finished;\r\n }\r\n\r\n get has_errors()\r\n {\r\n let has_error = false;\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n has_error = has_error || this.resource_loaders[i].has_error;\r\n }\r\n return has_error;\r\n }\r\n\r\n print_errors()\r\n {\r\n console.error('Batch <' + this.batch_name + '> could not load successfully');\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n if (this.resource_loaders[i].has_error)\r\n {\r\n this.resource_loaders[i].print_error();\r\n }\r\n }\r\n }\r\n\r\n get_progress()\r\n {\r\n return this.get_loaded_bytes() / this.get_total_bytes();\r\n }\r\n\r\n get_loaded_bytes()\r\n {\r\n let loaded_bytes = 1;\r\n\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n loaded_bytes += this.resource_loaders[i].loaded_bytes;\r\n }\r\n\r\n return loaded_bytes;\r\n }\r\n\r\n get_total_bytes()\r\n {\r\n let total_bytes = 1;\r\n\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n total_bytes += this.resource_loaders[i].total_bytes;\r\n }\r\n\r\n return total_bytes;\r\n }\r\n}\r\n\r\nexport { ResourceBatch };\r\n"],"names":["browser","init","this","browser_name","agent","window","navigator","userAgent","toLowerCase","indexOf","opr","chrome","version","get_version","name","is_safari","is_chrome","is_edge","is_edge_chromium","has_webm","is_firefox","has_hvec","preferred_video_extension","ua","tem","M","match","test","exec","slice","join","replace","appName","appVersion","splice","Number","split","Validation","constructor","static","n","is_int","is_float","str","JSON","parse","e","AbstractLoader","resource_id","url","size","loaded_bytes","total_bytes","has_finished","has_error","error_message","__update_downloaded_bytes","loaded","total","is_number","console","warn","__loading_ended","__set_error","message","print_error","error","load","resource_container","undefined","resources_by_url","cache","Browser","fetch","method","mode","credentials","redirect","then","on_progress","bind","catch","__on_error","set_resource","async","response","response_clone","clone","reader","body","getReader","contentLength","headers","get","receivedLength","done","value","read","length","on_preloaded_finished","data","OMath","from_range_start_value","from_range_end_value","to_range_start_value","to_range_end_value","min","max","number","divisor","rgb","r","Math","round","toString","g","b","points","plane","projected_point","Vector3","points_on_plane","i","projectPoint","push","from","to","target","t","elements","lerp","x1","x2","abs","x","y","m","euclideanModulo","degrees","PI","radians","v","w","z","center","add","multiplyScalar","arr","col","floor","random","clamp","ActionSequencer","context","elapsed_time","playback_speed","__get_playback_speed","playing","action_events","initial_context","stringify","tmp_t","channels","channel_names","Object","keys","duration","play","stop","reset","skip","get_duration","__play_clips","update","delta_time","set_progress","time","set_normalized_progress","get_progress","is_finished","add_action_event","trigger_time","action","add_action_interpolator","interpolator","use_dynamic_from_value","keyframes","attribute_name","keyframe","get_current_target_value","__get_current_keyframe","evaluate","get_current_starting_value","get_current_progress","__linear_map_01","easing_function","EPSILON","trigger","evaluate_keyframe","get_keyframes","channel_name","is_channel_redefined","initial","saturate","current","Infinity","distance","transitions_velocity","URLSearchParams","location","search","EasingFunctions","cos","sin","pow","sqrt","c4","ease_out_bounce","n1","d1","sign","ActionInterpolator","NumberInterpolator","super","view_context","app","set_app","ActionEvent","args","ViewContext","DrawIOAnimationSheet","xml_document","animation_nodes","DOMParser","parseFromString","querySelectorAll","animation_tracks","triggers","node","parent_node","parentElement","getAttribute","get_node_x_position","parseFloat","includes","split_data","trigger_name","trigger_method","at_time","value_data","to_value","from_time","to_time","sort","a","x_pos","ActionSequencerBuilder","default_state_data","from_animation_sheet","animation_data","current_context","tracks","initial_tracks","state_to_tracks","get_longest_time","find","element","sequencer","action_event","state","longest_time","from_draw_io","xml","transition_data","track_time","event_manager","queue","zoom_changed_evt","store_clickd_evt","point_selected_evt","config_changed","path_substep_completed","path_completed","go_to_store_requested_evt","resource_loaded_evt","service_clicked_evt","unit_pos_updated_evt","floor_changed_evt","on_enter_floor_navigation","on_exit_floor_navigation","on_enter_floor_selection","on_exit_floor_selection","on_enter_outside_navigation","on_exit_outside_navigation","step_selected_evt","fire","event","payload","on","callback","fire_zoom_changed","zoom","fire_store_selected","store_id","fire_point_selected","hit_data","fire_config_changed","fire_path_substep_completed","step_number","fire_path_completed","fire_step_selected","step_index","fire_go_to_store_requested","fire_resource_loaded","resource","fire_service_clicked","service","fire_unit_position_updated","unit_data","fire_floor_switched","floor_id","fire_on_enter_floor_navigation","fire_on_exit_floor_navigation","fire_on_enter_floor_selection","fire_on_exit_floor_selection","fire_on_enter_outside_navigation","fire_on_exit_outside_navigation","resources","EventManager","get_resource","HTMLUtilities","container","images","image","dataset","src","image_objects","image_object","videos","video","TransitionTable","transitions","from_state_name","to_state_name","add_transitions","set_transitions","set_default_state_data","delta_buffer","___time","Clock","__raw_delta_time","__elapsed_time","__allocated_time","Vector2","shader_time","__update","getDelta","getElapsedTime","shift","__calculate_delta_time","ViewState","start","show","hide","before_enter","on_enter","update_enter_transition","global_view_data","transition_progress","action_sequencer","update_transition","update_exit_transition","before_exit","on_exit","ViewStateTransitionHandler","transition_table","last_state","current_state","current_state_data","transitioning","go_to_state","__exit_last_state","__update_transitions","set_state","assign","Time","view_manager","views","transition_handler","view_change_subscribers","browser_title_suffix","__set_views_opacities","go_to_view","view_name","change_url","__change_browser_url","__change_browser_title","notify_view_change","go_to_scene","scene_name","next_view","transition_view","set_next_view","subscribe_to_view_change","subscriber","on_view_change","register_view","view","has_view","set_view","set_browser_title_suffix","title_suffix","get_current_view","get_view_by_name","get_view_by_url","get_by_url","history","pushState","title","__capitalize","document","set_opacity","string","aux_string","toUpperCase","__snake_to_whitespace","group","ApplicationView","ResourceContainer","ViewManager","classList","remove","load_html_images","load_images","load_html_videos","load_videos","style","opacity","BaseApplication","on_post_start","on_post_render","on_pre_render","on_frame_end","BaseRender","render","renderer","resize","dispose","BaseShaderMaterial","ShaderMaterial","vert","frag","uniforms","vertexShader","basic_vert","fragmentShader","basic_frag","_Color","Color","BlitMaterial","frag_shader","vert_shader","defines","_MainTex","_Resolution","_TargetResolution","depthWrite","blending","NoBlending","depthTest","depthFunc","AlwaysDepth","AddMaterial","nMips","_SecondTex","set_add_texture","tex","UnrealBloomComposeMaterial","NUM_MIPS","_BlurredTex","_BloomStrength","blurTexture1","blurTexture2","blurTexture3","blurTexture4","blurTexture5","bloomStrength","bloomFactors","bloomRadius","bloomTintColors","set_RT_0","rt","set_RT_1","set_RT_2","set_RT_3","set_RT_4","set_bloom_strength","set_bloom_radius","set_tint_color_0","col_string","set","set_tint_color_1","set_tint_color_2","set_tint_color_3","set_tint_color_4","camera_manager","_current","_spectator","camera","spectator","capabilities","max_anisotropy","vertex_texture_sampler_available","fp_textures_available","CanvasDrawer","uses_dynamic_font","__textHeight","canvas","createElement","ctx","getContext","getFontHeight","fontStyle","getElementsByTagName","dummy","dummyText","createTextNode","appendChild","setAttribute","offsetHeight","removeChild","get_text_size","text","font","ceil","measureText","width","draw_canvas","ctxOptions","font_color","__draw","draw_on_texture","canvas_texture","CanvasTexture","UVMapping","ClampToEdgeWrapping","NearestFilter","generateMipMaps","needsUpdate","roundRect","height","radius","fill","stroke","tl","tr","br","bl","defaultRadius","side","beginPath","moveTo","lineTo","quadraticCurveTo","closePath","configuration","parameters","dpr","from_json","json","Idle","is_animating","Animating","easing_function_t","animator","set_property_value","set_current_state","finished_callback","CSSAnimator","css_property","value_prefix","value_suffix","ease_in_out_cubic","animate","AxisHelper","Object3D","scale","blue_points","blue_axis_mat","LineBasicMaterial","color","blue_axis_geo","BufferGeometry","setFromPoints","blue_axis_line","Line","renderOrder","green_points","green_axis_mat","green_axis_geo","green_axis_line","red_points","red_axis_mat","red_axis_geo","red_axis_line","scene_manager","Scene","add_scene","scene","traverse","child","geometry","material","children","Cube","Mesh","segments","BoxGeometry","MeshBasicMaterial","Sphere","SphereBufferGeometry","Arrow","dir","cylinder_height","cylinder_geo","CylinderBufferGeometry","translate","cone_geometry","ConeBufferGeometry","cone_height","buffer_geometry","BufferGeometryUtils","mergeBufferGeometries","rotateX","quaternion","setFromUnitVectors","_dir","oscreen","position","render_width","render_height","width_height","pixel_size","update_position","size_changed","update_size","apply_pixel_density_v2","vector2","apply_pixel_density","get_pixel_size","aspect_ratio","portrait","ScreenSpaceTextureMaterial","h","_ScreenSpacePosition","_ScreenSize","_TextureSize","set_position","set_texture","set_screen_size","PerspectiveCamera","TPerspectiveCamera","fov","aspect","near","far","clear_color","clear_alpha","copy","debug","Vector3_one","Vector3_zero","canvas_renderer","display_texture_meshes","draw_arrow","origin","arrow","normalize","SceneManager","draw_axis","axis","set_debug_RT","RT","rt_debug","draw_rectangle","position_2d","fillStyle","fillRect","clear","clearRect","draw_line_2D","strokeStyle","draw_line","line","frustumCulled","draw_cube","pos","cube","draw_oriented_cube","depth","distanceTo","sub","forward_dir","draw_plane","PlaneGeometry","Vector4","basic_color_vert","basic_color_frag","transparent","draw_empty_cube","box","Box3","setFromCenterAndSize","helper","Box3Helper","draw_sphere","sphere","draw_point_array","input_points","open","catmull","CatmullRomCurve3","updateArcLengths","getSpacedPoints","draw_sphere_helper","SphereGeometry","sphere_mesh","draw_math_sphere","sphere1","draw_bounding_box","bb","draw_curve","curve","options","offset","draw_texture","mesh","graphics","OScreen","ClearDepthNormalMaterial","clear_depth","clear_normal","_DepthNormal","DepthNormalMaterial","_FarPlane","far_plane","DepthAndNormalsRenderer","WebGLRenderTarget","clear_depth_normal_mat","depth_normal_material","__resize_RT_if_necessary","blit_clear_with_material","CameraManager","setSize","render_target","Blitter","_blit_scene","_blit_material","_blit_quad","_blit_camera","OrthographicCamera","blit","dst","src_texture","isWebGLRenderTarget","texture","src_width","src_height","getSize","__render","material_pass","mat","blit_with_material","dst_RT","current_rt","getRenderTarget","setRenderTarget","core_attributes","context_attributes","threejs_attributes","_renderer","blitter","no_render","current_render_mode","generateDepthNormalTexture","depth_and_normals_renderer","is_webgl2","canvas_context","force_webgl2","xr_enabled","alpha","antialias","desynchronized","failIfMajorPerformanceCaveat","powerPreference","premultipliedAlpha","preserveDrawingBuffer","stencil","logarithmicDepthBuffer","WebGLRenderer","xr","enabled","autoClear","setPixelRatio","Configuration","extensions","domElement","Capabilities","getMaxAnisotropy","maxVertexTextures","is_floating_point_texture_available","resize_observer","ResizeObserver","on_resize","observe","dom_element","depth_normals_RT","new_state","__update_current_camera","updateProjectionMatrix","updateMatrix","updateMatrixWorld","override_mat","__apply_override_material","render_scene","overrideMaterial","readback_RT","buffer","readRenderTargetPixels","clear_stencil","setClearColor","entries","entry","contentRect","setViewport","src_RT","take_screenshot","blob_callback","old_width","old_height","new_width","new_height","tile_width","tile_height","divisions_x","parseInt","divisions_y","old_dpr","getPixelRatio","ctx_2D","setViewOffset","drawImage","toBlob","clearViewOffset","download_screenshot","blob","link","download","href","URL","createObjectURL","click","onclick","requestAnimationFrame","revokeObjectURL","removeAttribute","minFilter","magFilter","format","RGBAFormat","encoding","LinearEncoding","type","FloatType","stencilBuffer","depthBuffer","output","Float32Array","NormalMaterial","DebugNormalsRender","Graphics","KeyboardInput","ctrlz_pressed","ctrlz_fired","keys_keys","addEventListener","on_key_down","on_key_up","keyCode","ctrlKey","code","press_key","release_key","pressed","released","key_name","key","fired","down","release_keys","is_key_pressed","is_key_down","is_key_released","register_key","unregister_key","removeEventListener","os","operating_systems","ANDROID","IOS","LINUX","MAC","WINDOWS","is_mobile","is_ipad","maxTouchPoints","is_ios","is_android","get_os","is_linux","is_mac","is_windows","platform","reflection_plane_context","target_geometry","target_position","set_target_geometry","GeometryBatch","batch_width","data_textures","object_names","zero_offset","write_offset","uniform_dirty_count","tmp_uploaded_data_count","add_global_uniform","set_global_uniform","add_object_uniform_v3","uniform_name","default_value_v3","src_tex","__create_rgb_texture","dst_tex","one_pixel_tex","new_data_tex","__add_data_texture","__flood_data_texture_rgb","add_object_uniform_v4","default_value_v4","__create_rgba_texture","__flood_data_texture_rgba","add_object_uniform_v4_float","__create_rgba_float_texture","set_object_uniform_v3","object_name","vector3","use_r","use_g","use_b","obj_index","__get_object_index","data_texture","__get_data_texture","__set_pixel_rgb","one_pixel","last_accessed_index","dirty_count","set_object_uniform_v4","vector4","use_a","__set_pixel_rgba","upload_texture_data","upload_budget","__partial_texture_data_upload","__full_texture_data_upload","get_uniform_dirty_count","texture_data","copyTextureToTexture","index","get_mesh","v3","v4","Uint8Array","DataTexture","RGBFormat","dst_texture","one_pixel_text","geometry_batcher","batches","batch","buffer_geometries","attr_accessor_uvs","texture_width","ceilPowerOfTwo","__init_uv_array","uv_index","vertex_count","count","buffer_attribute","BufferAttribute","uvs","ui","input","ui_elements","_tmp_normalized_pos","ss_scene","matrixWorldAutoUpdate","ws_scene","ss_camera","delete_element","elem","add_screen_space_element","set_screen_space_coordinate_system","add_world_space_element","set_world_space_coordinate_system","NDC","update_state","current_clicked_element","PerspectiveFrustumPointFitter","fit_points","camera_quaternion","vertical_fov","v_fov","degToRad","h_fov","atan","tan","up_plane_normal","get_up_plane_normal","down_plane_normal","get_down_plane_normal","left_plane_normal","get_left_plane_normal","right_plane_normal","get_right_plane_normal","camera_forward_dir","applyQuaternion","sphere_center","pull_back_distance","get_distance_to_fit_rect","far_pos","up_plane","Plane","setFromNormalAndCoplanarPoint","down_plane","left_plane","right_plane","apply_center_correction_to_pos","closest_distance","inverse_dir","Line3","up_line_intersection","down_line_intersection","left_line_intersection","right_line_intersection","intersectLine","log","new_up_distance","new_down_distance","new_left_distance","new_right_distance","vertical_min","horizontal_min","forward_correction","target_pos","vertical_offset","get_vertical_correction","horizontal_offset","get_horizontal_correction","closest_distance_to_up_plane","closest_distance_to_down_plane","up_dir","down_line","up_line","down_dist","up_dist","correction","closest_distance_to_right_plane","closest_distance_to_left_plane","right_dir","left_line","right_line","left_dist","right_dist","Quaternion","setFromAxisAngle","distV","distH","OrthographicFrustumPointFitter","inverse_camera_quat","inverse","inverted_points","getCenter","distance_to_center","camera_utilities","tmp_mat","Matrix4","ray","Ray","tmp_size","tmp_unproj","get_up_dir","tmp_vec","get_forward_dir","get_right_dir","unproject_mouse_position","get_plane_intersection","plane_position","plane_normal","isPerspectiveCamera","unproject","intersectPlane","fit_points_on_camera","zoom_scale","world_space_center","camera_forward","project_points_on_plane","projected_points_center","up","right","cross","inverse_mat","getInverse","applyMatrix4","projected_center","get_zoom_to_fit_rect","get_zoom_to_fit_box","isOrthographicCamera","obj_x","obj_y","object_aspect","get_html_screen_pos","object","getWorldPosition","project","world_pos_to_screen","update_projection","left","top","bottom","fit_bounding_box_points","p1","p2","p3","p4","p5","p6","p7","p8","camera_backward_dir","fitter","camera_pos","reference_position_plane","camera_ray","reference_position","camera_position","result","reference_rotation","reference_zoom","forward","initializer","CameraUtilities","GeometryBatcher","OS","ReflectionPlaneContext","UI","Debug","render_loop","SSAOMaterial","_InverseProjMatrix","_ProjectionMatrix","_Bias","_Radius","_SampleKernel","__get_sample_kernel","_RandomRotation","__get_rotation_kernel","sample_kernel","rotation_kernel","rotation_texture","wrapS","RepeatWrapping","wrapT","SSAOComposeMaterial","_AO","DisplayNormalTextureMaterial","depth_normals_vert","BoxBlurMaterial","_SampleDir","Blurrer","RT1","RT2","box_blur_mat","blur","NormalAORender","ssao_mat","ssao_compose_mat","debug_normals","ssaa","use_ssaa","main_RT","SSAO_RT","blurrer","__check_RT_size","__update_uniforms","projectionMatrix","NormalRender","VRRender","render_spectator_camera","spectator_camera","isPresenting","xrCam","getCamera","currentRenderTarget","GaussianBlurMaterial","kernel_radius","KERNEL_RADIUS","SIGMA","texSize","direction","set_size","set_direction","LuminosityHighPassMaterial","luminosityThreshold","smoothWidth","defaultColor","defaultOpacity","GaussianBlurrer","current_width","current_height","separableBlurMaterials","renderTargetsHorizontal","renderTargetsVertical","kernelSizeArray","rt_pars","LinearFilter","renderTargetBright","generateMipmaps","init_materials","init_RT","luminosity_high_pass_mat","use_luminosity_high_pass","resize_RT","inputRenderTarget","get_blurred_texture","get_blurred_RT","dispose_RT","hor","ver","texture_height","dispose_materials","UnrealBloomRender","bloom_compose_mat","blur_RT","add_mat","val","TOrthographicCamera","view_component_manager","components","enabled_components","Set","__set_components_opacities","component","register_component","enable_component","disable_component","delete","get_component_by_name","component_name","RenderLoop","target_application","is_running","frames_passed","ViewComponentManager","setAnimationLoop","screen","SimpleTextDrawer","text_margin","text_size","globalAlpha","textBaseline","textAlign","fillText","ViewComponent","hidden","toggle_hidden","HorizontalPlane","VerticalPlane","ArrayUtilities","source","apply","array","items_left_count","closest_point","obj","ids","FrustumPointFitter","get_hozirontal_correction","closest_up_point","closest_down_point","closest_right_point","closest_left_point","GeometryUtilities","geometry_buffer","indices","positions","vertices","getX","getY","getZ","add_barycentric_attribute","non_indexed_geometry_buffer","bar_coordinates","ImageUtilities","getImageData","imagedata","mesh_sampler","sample","sample_count","face_areas","min_area","normals","tangents","faces","index_0","index_1","index_2","v1","v2","face","c","n2","n3","normal","tangent","uv_a","uv_b","uv_c","area","get_face_area","normalized_faces_array","get_uniform_face_distribution","selected_faces","select_random_faces","sample_data_from_faces","sampled_points","sampled_normals","sampled_tangents","sampled_uvs","w1","w2","sample_point_in_face","amount","selected_face","minimum_area","extended_triangle_indices","repetitions_needed","j","vec1","vec2","w3","model_utilities","result_callback","fromGeometry","get_geometries","geometries","assign_material","clone_animated_gltf","gltf","animations","skinnedMeshes","isSkinnedMesh","cloneBones","cloneSkinnedMeshes","isBone","skeleton","cloneSkinnedMesh","orderedCloneBones","bones","cloneBone","Skeleton","boneInverses","matrixWorld","set_shadow_config","cast","receive","castShadow","receiveShadow","__find_object","get_object","get_object_by_type","object_type","ObjectUtilities","item","Array","isArray","sources","is_object","merge_deep","nodeType","attributes","attribute","nodeName","nodeValue","hasChildNodes","childNodes","xml_to_json","old","StringUtilities","hexValues","hex","words","substr","charAt","TimeUtilities","time_str_to_ms","time_str","hours","minutes","seconds","Grid","derivatives","plane_geometry","convert_to_non_indexed_geometry","rotation","_Thickness","_Length","_ElapsedTime","setup","next_position","previous_position","orientation","coverage","accumulated_length","next_point","__get_next_position","previous_point","__get_previous_position","vertexList","nextPositionList","previousPositionList","orientationList","coverageList","setIndex","_length","thickness","total_length","parent","copy_color","WorldImage","pivot","_ScreenAligned","_Scale","_Opacity","DoubleSide","current_scale","computeBoundingBox","tmp_bb_size","boundingBox","update_texture","img","screen_aligned","boolean","Text2D","is_static","simple_text_drawer","draw_settings","LinearMipMapLinearFilter","UIElementMaterial","intensity","_PixelOffset","_NDC","_PivotPoint","_DepthOffset","ScreenSpacePosition","get_pos_NDC","WorldSpacePosition","tmp_vec3","tmp_vec2","UIElementState","ui_element","normalized_mouse_position","OnIdle","is_mouse_over","_on_enter_state","OnMouseEnter","on_mouse_enter","_on_hover_state","_on_exit_state","OnMouseExit","on_mouse_exit","_on_idle_state","OnMouseHover","__trigger_on_hover","on_mouse_hover","UIElement","is_clickable","position_strategy","_position","on_hover","mouse_pos_tmp","cached_NDC_position","screen_pos_tmp","texture_size","matrixAutoUpdate","pixel_offset","set_render_order","pivot_point","set_pixel_offset","use_depth","depth_offset","clear_state","visible","get_size","normalized_mouse_pos","to_screen_position","rect","Box2","containsPoint","projected_pos","get_screen_space_position","set_screen_space_position","screen_pos","UpdatableMaterialMesh","self","onBeforeRender","TextGlyph","plane_bounds","atlas_bounds","SDFText","glyph_layout","glyphs","glyph_is_dirty","matrix_is_dirty","color_is_dirty","matrix","__opacity","__text","__generate_glyphs","update_matrix","compose","clear_glyph_dirty","clear_color_dirty","set_rotation","tilt","new_orientation","new_tilt","multiply","set_color","set_pivot","update_glyphs","op","cursor","unicode","charCodeAt","glyph","planeBounds","text_glyph","atlasBounds","advance","box2","first_glyph","union","box2_size","SDFTextMaterial","_Texture","_Boldness","_AtlasSize","set_atlas_size","set_boldness","SDFTextBatch","font_layout","atlas_texture","instanced_geometry","InstancedBufferGeometry","instanceCount","Float32BufferAttribute","transformsCol0","InstancedBufferAttribute","max_allocations","transformsCol1","transformsCol2","transformsCol3","glyph_bounds","usage","DynamicDrawUsage","text_elements","atlas","add_text","text_str","remove_text","text_elem","remove_elem","force_update","glyph_bounds_atr","plane_bounds_atr","color_atr","matrix_needs_update","glyph_needs_update","color_needs_update","glyph_count","glyph_i","buffer_i","setXYZW","VectorInterpolator","tmp","MedianFilterMaterial","kernel3x3","_SourceTex","_SourceTexSize","isVideoTexture","videoWidth","videoHeight","isTexture","MedianFilter","median_filter_mat","filter","tex_size","DualFilteringBlurMaterial","upsample","AlphaFilterMaterial","use_alpha_mask","_Offset","DualFilteringBlurrer","RT0","RT3","RT4","upscale_blur_mat","downscale_blur_mat","alpha_filter_mat","check_RT_resize","ParticleAttribute","attr_name","update_material","write","init_from_geometry","init_from_attribute","particle_attribute","build_RT","particle_count","resolution","calculate_resolution","HalfFloatType","swap_RT","attribute_writter_scene","store_geometry_attribute_in_RT","storage_material","deleteAttribute","get_texture","GPUParticleSystem","build_point_mesh","attribute_writter_mesh","build_attribute_writter_mesh","add_texture_attribute","add_update_attribute_array","item_size","add_attribute_array","instance_count","geo","instanced_geo","build_uv_storage_attribute","Points","ParticleStorageMaterial","ParticlePositionAttribute","store_geometry","pos_attr","store_positions","CustomDataTexture","multiplier","set_rgba","set_rgb","set_r","set_g","set_b","set_a","RGBDataTexture","RGBADataTexture","RGBFloatDataTexture","RGBAFloatDataTexture","BatchedMesh","id_table","max_texture_width","batched_count","batch_height","attach_rgb_texture","attach_rgba_texture","attach_rgb_float_texture","attach_rgba_float_texture","get_mesh_index","set_rgb_value","mesh_name","set_rgba_value","MeshBatcher","meshes","attr_mesh_id","create_batched_mesh","AudioClip","loop","volume","positional","audio","audio_listener","TPositionalAudio","TAudio","setBuffer","setLoop","gain","setVolume","pause","is_playing","isPlaying","AudioLoader","instantiate_audio","AudioContext","createBuffer","arrayBuffer","array_buffer","decodeAudioData","audio_buffer","BasisLoader","loader","basis","xhr","msg","CubemapLoader","extension","CubeTextureLoader","setPath","urls","DAELoader","ColladaLoader","FileLoader","TFileLoader","file","FontLoader","TFontLoader","GLTFLoader","TGLTFLoader","GLTFDRACOLoader","setDRACOLoader","HDRCubeTextureLoader","THDRCubeTextureLoader","url_suffix","setDataType","UnsignedByteType","hdr","JSONLoader","OBJLoader","TOBJLoader","PointArrayLoader","parse_path","raw_data","string_array","pop","RGBETextureLoader","RGBELoader","TextLoader","AsyncTextureLoader","load_with_old_method","load_with_new_method","Texture","Image","onload","onerror","original_url","fetchOptions","res","createImageBitmap","colorSpaceConversion","imageBitmap","TextureLoader","VideoLoader","ResourceBatch","batch_name","resource_loaders","add_loader","loading_finished","finished","has_errors","print_errors","get_loaded_bytes","get_total_bytes"],"mappings":"qqDA2GK,MAACA,GAAU,IA1GhB,MAEEC,OAKE,OAHAC,KAAKC,aAAe,GACpBD,KAAKE,MAAQC,OAAOC,UAAUC,UAAUC,eAEhC,GAER,KAAKN,KAAKE,MAAMK,QAAQ,SAAW,EACjCP,KAAKC,aAAe,UACpB,MACF,KAAKD,KAAKE,MAAMK,QAAQ,QAAU,EAChCP,KAAKC,aAAe,gBACpB,MACF,KAAKD,KAAKE,MAAMK,QAAQ,QAAU,KAAOJ,OAAOK,IAC9CR,KAAKC,aAAe,QACpB,MACF,KAAKD,KAAKE,MAAMK,QAAQ,WAAa,KAAOJ,OAAOM,OACjDT,KAAKC,aAAe,SACpB,MACF,KAAKD,KAAKE,MAAMK,QAAQ,YAAc,EACpCP,KAAKC,aAAe,YACpB,MACF,KAAKD,KAAKE,MAAMK,QAAQ,YAAc,EACpCP,KAAKC,aAAe,UACpB,MACF,KAAKD,KAAKE,M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