ohzi-core 9.5.2 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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/Input.js","../src/OS.js","../src/ReflectionPlaneContext.js","../src/static_batcher/GeometryBatch.js","../src/static_batcher/GeometryBatcher.js","../src/UI.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/utilities/PerspectiveFrustumPointFitter.js","../src/utilities/OrthographicFrustumPointFitter.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 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 M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, '-?'];\n if ((tem = ua.match(/version\\/(\\d+)/i)) != null) M.splice(1, 1, tem[1]);\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)\n {\n this.name = name;\n this.method = method;\n }\n\n trigger()\n {\n ViewContext.app[this.name][this.method]();\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);\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, context_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.context_attributes = {\n alpha: true,\n depth: true,\n desynchronized: false,\n stencil: false,\n antialias: false,\n premultipliedAlpha: true,\n preserveDrawingBuffer: true,\n powerPreference: 'high-performance',\n logarithmicDepthBuffer: false,\n force_webgl2: true,\n xr_enabled: false\n };\n\n Object.assign(this.context_attributes, context_attributes);\n\n if (this.context_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._renderer = new WebGLRenderer({\n canvas: canvas,\n context: this.canvas_context\n });\n\n if (this.context_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 if (e.key)\n {\n this.press_key(e.key);\n }\n }\n\n on_key_up(e)\n {\n this.release_key(e.key);\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","import { InputController } from 'pit-js';\nimport { KeyboardInput } from './KeyboardInput';\n\nclass Input extends InputController\n{\n constructor()\n {\n super();\n\n this.clicked = false;\n this.captured_NDC = { x: 0, y: 0 };\n this.current_NDC_delta = { x: 0, y: 0 };\n\n this.keyboard = new KeyboardInput();\n }\n\n init(container, keyboard_input_container)\n {\n super.init(container);\n\n this.keyboard.init(keyboard_input_container);\n }\n\n dispose()\n {\n super.dispose();\n\n this.keyboard.dispose();\n }\n\n update()\n {\n if (this.left_mouse_button_pressed)\n {\n this.captured_NDC.x = this.NDC.x;\n this.captured_NDC.y = this.NDC.y;\n }\n\n if (this.left_mouse_button_down)\n {\n this.current_NDC_delta.x += Math.abs(this.NDC_delta.x);\n this.current_NDC_delta.y += Math.abs(this.NDC_delta.y);\n }\n\n if (this.left_mouse_button_released)\n {\n if (this.current_NDC_delta.x < 0.001 || this.current_NDC_delta.y < 0.001)\n {\n this.clicked = true;\n }\n\n this.current_NDC_delta = { x: 0, y: 0 };\n }\n }\n\n clear()\n {\n super.clear();\n\n this.clicked = false;\n\n this.keyboard.clear();\n }\n}\n\nconst input = new Input();\nexport { input as Input };\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 { Input } from './Input';\nimport { 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()\n {\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(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 { CameraManager } from '../CameraManager';\nimport { Input } from '../Input';\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';\n\nclass CameraUtilities\n{\n init()\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\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 || 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\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 { Input } from './Input';\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(canvas, app_container, context_attributes, keyboard_input_container = document)\n {\n CameraManager.init();\n CameraUtilities.init();\n Capabilities.init();\n Configuration.init();\n EventManager.init();\n GeometryBatcher.init();\n Input.init(app_container, keyboard_input_container);\n OS.init();\n Browser.init();\n ReflectionPlaneContext.init();\n ResourceContainer.init();\n SceneManager.init();\n OScreen.init();\n Time.init();\n UI.init();\n\n Graphics.init(canvas, context_attributes);\n Debug.init();\n }\n\n dispose(render_loop)\n {\n Graphics.dispose();\n Input.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.render_width, OScreen.render_height);\n this.blur_RT = new WebGLRenderTarget(OScreen.render_width, OScreen.render_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.render_width || this.main_RT.height !== OScreen.render_height)\n {\n this.main_RT.setSize(OScreen.render_width, OScreen.render_height);\n this.blur_RT.setSize(OScreen.render_width, OScreen.render_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 { Input } from './Input';\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)\n {\n target_application = target_application || new BaseApplication();\n\n this.target_application = target_application;\n this.graphics = graphics;\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 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 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.replace(\n /([-_][a-z])/g,\n (group) => group.toUpperCase()\n .replace('-', '')\n .replace('_', '')\n );\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 { 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 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","[object Object]","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","n","is_int","is_float","str","JSON","parse","e","AbstractLoader","resource_id","url","size","loaded_bytes","total_bytes","has_finished","has_error","error_message","loaded","total","is_number","console","warn","message","error","resource_container","undefined","resources_by_url","cache","Browser","fetch","method","mode","credentials","redirect","then","on_progress","bind","catch","__on_error","set_resource","__update_downloaded_bytes","__loading_ended","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","get_duration","__play_clips","delta_time","time","trigger_time","action","interpolator","use_dynamic_from_value","keyframes","attribute_name","keyframe","__get_current_keyframe","evaluate","__linear_map_01","easing_function","EPSILON","trigger","evaluate_keyframe","channel_name","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","ActionEvent","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","animation_data","current_context","tracks","initial_tracks","state_to_tracks","get_longest_time","find","element","sequencer","add_action_interpolator","action_event","add_action_event","state","longest_time","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","event","payload","callback","zoom","fire","store_id","hit_data","step_number","step_index","resource","service","unit_data","floor_id","resources","EventManager","fire_resource_loaded","HTMLUtilities","container","images","image","dataset","src","image_objects","image_object","videos","video","TransitionTable","transitions","from_state_name","to_state_name","from_animation_sheet","delta_buffer","___time","Clock","__raw_delta_time","__elapsed_time","__allocated_time","Vector2","shader_time","getDelta","getElapsedTime","shift","__calculate_delta_time","ViewState","global_view_data","transition_progress","action_sequencer","update_transition","ViewStateTransitionHandler","transition_table","last_state","current_state","current_state_data","transitioning","skip","__exit_last_state","before_exit","show","before_enter","play","update","__update_transitions","is_finished","on_enter","assign","Time","update_exit_transition","get_progress","update_enter_transition","hide","on_exit","view_manager","views","transition_handler","view_change_subscribers","browser_title_suffix","__set_views_opacities","view_name","change_url","go_to_state","__change_browser_url","__change_browser_title","notify_view_change","scene_name","next_view","transition_view","set_next_view","go_to_view","subscriber","on_view_change","view","add_transitions","set_transitions","set_state","title_suffix","get_by_url","set_default_state_data","history","pushState","title","__capitalize","document","set_opacity","string","aux_string","toUpperCase","__snake_to_whitespace","group","ApplicationView","ResourceContainer","ViewManager","register_view","classList","remove","load_images","load_videos","style","opacity","BaseApplication","BaseRender","renderer","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","tex","UnrealBloomComposeMaterial","NUM_MIPS","_BlurredTex","_BloomStrength","blurTexture1","blurTexture2","blurTexture3","blurTexture4","blurTexture5","bloomStrength","bloomFactors","bloomRadius","bloomTintColors","rt","col_string","set","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","fontStyle","getElementsByTagName","dummy","dummyText","createTextNode","appendChild","setAttribute","offsetHeight","removeChild","text","font","ceil","measureText","width","getFontHeight","ctxOptions","font_color","__draw","draw_canvas","canvas_texture","CanvasTexture","UVMapping","ClampToEdgeWrapping","NearestFilter","generateMipMaps","needsUpdate","height","radius","fill","stroke","tl","tr","br","bl","defaultRadius","side","beginPath","moveTo","lineTo","quadraticCurveTo","closePath","configuration","parameters","dpr","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","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","scene","traverse","child","geometry","dispose","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","size_changed","vector2","aspect_ratio","portrait","ScreenSpaceTextureMaterial","h","_ScreenSpacePosition","_ScreenSize","_TextureSize","PerspectiveCamera","TPerspectiveCamera","fov","aspect","near","far","clear_color","clear_alpha","copy","debug","Vector3_one","Vector3_zero","canvas_renderer","display_texture_meshes","origin","arrow","normalize","SceneManager","axis","RT","rt_debug","position_2d","fillStyle","fillRect","clearRect","strokeStyle","line","frustumCulled","pos","cube","depth","distanceTo","sub","forward_dir","PlaneGeometry","Vector4","basic_color_vert","basic_color_frag","transparent","box","Box3","setFromCenterAndSize","helper","Box3Helper","sphere","input_points","open","catmull","CatmullRomCurve3","updateArcLengths","getSpacedPoints","draw_line","SphereGeometry","sphere_mesh","sphere1","bb","curve","options","offset","mesh","set_texture","graphics","set_screen_size","OScreen","render","ClearDepthNormalMaterial","clear_depth","clear_normal","_DepthNormal","DepthNormalMaterial","_FarPlane","far_plane","DepthAndNormalsRenderer","WebGLRenderTarget","clear_depth_normal_mat","depth_normal_material","__resize_RT_if_necessary","clear","blit_clear_with_material","CameraManager","setSize","render_target","Blitter","_blit_scene","_blit_material","_blit_quad","_blit_camera","OrthographicCamera","dst","src_texture","isWebGLRenderTarget","texture","src_width","src_height","getSize","__render","mat","dst_RT","current_rt","getRenderTarget","setRenderTarget","context_attributes","_renderer","blitter","no_render","current_render_mode","generateDepthNormalTexture","depth_and_normals_renderer","is_webgl2","canvas_context","alpha","desynchronized","stencil","antialias","premultipliedAlpha","preserveDrawingBuffer","powerPreference","logarithmicDepthBuffer","force_webgl2","xr_enabled","constructor","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","on_pre_render","on_post_render","overrideMaterial","buffer","readRenderTargetPixels","clear_stencil","setClearColor","entries","entry","update_position","contentRect","update_size","setViewport","material_pass","src_RT","blit_with_material","blit","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","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","key","press_key","release_key","pressed","released","key_name","fired","down","removeEventListener","input","InputController","clicked","captured_NDC","current_NDC_delta","keyboard","keyboard_input_container","init","left_mouse_button_pressed","NDC","left_mouse_button_down","NDC_delta","left_mouse_button_released","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","GeometryBatch","batch_width","data_textures","object_names","zero_offset","write_offset","uniform_dirty_count","tmp_uploaded_data_count","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","default_value_v4","__create_rgba_texture","__flood_data_texture_rgba","__create_rgba_float_texture","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","vector4","use_a","__set_pixel_rgba","upload_budget","__partial_texture_data_upload","__full_texture_data_upload","texture_data","copyTextureToTexture","index","v3","v4","Uint8Array","DataTexture","RGBFormat","dst_texture","one_pixel_text","geometry_batcher","batches","buffer_geometries","attr_accessor_uvs","texture_width","ceilPowerOfTwo","__init_uv_array","uv_index","vertex_count","count","buffer_attribute","BufferAttribute","upload_texture_data","uvs","ui","ui_elements","_tmp_normalized_pos","ss_scene","matrixWorldAutoUpdate","ws_scene","ss_camera","elem","set_screen_space_coordinate_system","set_world_space_coordinate_system","Input","update_state","current_clicked_element","camera_utilities","tmp_mat","Matrix4","Plane","ray","Ray","tmp_size","tmp_unproj","tmp_vec","applyQuaternion","v_fov","h_fov","atan","tan","distV","distH","plane_position","plane_normal","setFromNormalAndCoplanarPoint","get_forward_dir","isPerspectiveCamera","unproject_mouse_position","unproject","intersectPlane","zoom_scale","world_space_center","camera_forward","project_points_on_plane","projected_points_center","getCenter","up","right","cross","inverse_mat","getInverse","applyMatrix4","projected_center","get_zoom_to_fit_rect","isOrthographicCamera","obj_x","obj_y","object_aspect","object","getWorldPosition","project","left","top","bottom","initializer","app_container","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","NormalAORender","ssao_mat","ssao_compose_mat","debug_normals","ssaa","use_ssaa","main_RT","SSAO_RT","blurrer","__check_RT_size","__update_uniforms","blur","projectionMatrix","NormalRender","VRRender","render_spectator_camera","spectator_camera","isPresenting","xrCam","getCamera","currentRenderTarget","GaussianBlurMaterial","kernel_radius","KERNEL_RADIUS","SIGMA","texSize","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","set_direction","dispose_RT","hor","ver","texture_height","set_size","dispose_materials","UnrealBloomRender","bloom_compose_mat","blur_RT","add_mat","set_RT_0","set_RT_1","set_RT_2","set_RT_3","set_RT_4","set_bloom_strength","set_bloom_radius","set_add_texture","val","set_tint_color_0","set_tint_color_1","set_tint_color_2","set_tint_color_3","set_tint_color_4","TOrthographicCamera","view_component_manager","components","enabled_components","Set","__set_components_opacities","component","delete","component_name","RenderLoop","target_application","is_running","frames_passed","__update","on_post_start","ViewComponentManager","on_frame_end","setAnimationLoop","stop","screen","apply_pixel_density_v2","apply_pixel_density","get_pixel_size","SimpleTextDrawer","text_margin","text_size","get_text_size","globalAlpha","textBaseline","textAlign","fillText","ViewComponent","hidden","register_component","enable_component","disable_component","toggle_hidden","HorizontalPlane","VerticalPlane","ArrayUtilities","source","apply","array","items_left_count","closest_point","closest_distance","obj","ids","FrustumPointFitter","camera_quaternion","vertical_fov","degToRad","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","sphere_center","pull_back_distance","get_distance_to_fit_rect","far_pos","up_plane","down_plane","left_plane","right_plane","apply_center_correction_to_pos","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_hozirontal_correction","closest_up_point","closest_down_point","closest_distance_to_up_plane","closest_distance_to_down_plane","up_dir","down_line","up_line","down_dist","up_dist","correction","closest_right_point","closest_left_point","closest_distance_to_right_plane","closest_distance_to_left_plane","right_dir","left_line","right_line","left_dist","right_dist","Quaternion","setFromAxisAngle","GeometryUtilities","geometry_buffer","indices","positions","vertices","getX","getY","getZ","add_barycentric_attribute","non_indexed_geometry_buffer","bar_coordinates","ImageUtilities","getImageData","imagedata","mesh_sampler","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","geometries","get_mesh","gltf","animations","skinnedMeshes","isSkinnedMesh","cloneBones","cloneSkinnedMeshes","isBone","skeleton","cloneSkinnedMesh","orderedCloneBones","bones","cloneBone","Skeleton","boneInverses","matrixWorld","cast","receive","castShadow","receiveShadow","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","hours","minutes","seconds","PerspectiveFrustumPointFitter","get_horizontal_correction","OrthographicFrustumPointFitter","inverse_camera_quat","inverse","inverted_points","distance_to_center","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","parent","WorldImage","pivot","_ScreenAligned","_Scale","_Opacity","DoubleSide","current_scale","computeBoundingBox","tmp_bb_size","boundingBox","img","screen_aligned","boolean","Text2D","is_static","simple_text_drawer","draw_settings","draw_on_texture","LinearMipMapLinearFilter","update_texture","UIElementMaterial","intensity","_PixelOffset","_NDC","_PivotPoint","_DepthOffset","ScreenSpacePosition","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","pivot_point","use_depth","depth_offset","visible","get_size","normalized_mouse_pos","get_pos_NDC","to_screen_position","rect","Box2","containsPoint","projected_pos","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","compose","tilt","new_orientation","new_tilt","multiply","update_glyphs","op","cursor","unicode","charCodeAt","glyph","planeBounds","text_glyph","atlasBounds","advance","box2","first_glyph","union","box2_size","SDFTextMaterial","_Texture","_Boldness","_AtlasSize","SDFTextBatch","font_layout","atlas_texture","instanced_geometry","InstancedBufferGeometry","instanceCount","Float32BufferAttribute","transformsCol0","InstancedBufferAttribute","max_allocations","transformsCol1","transformsCol2","transformsCol3","glyph_bounds","usage","DynamicDrawUsage","text_elements","set_atlas_size","atlas","set_boldness","text_str","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","update_matrix","clear_glyph_dirty","clear_color_dirty","glyph_i","buffer_i","setXYZW","VectorInterpolator","tmp","MedianFilterMaterial","kernel3x3","_SourceTex","_SourceTexSize","isVideoTexture","videoWidth","videoHeight","isTexture","MedianFilter","median_filter_mat","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","particle_attribute","particle_count","resolution","calculate_resolution","HalfFloatType","attribute_writter_scene","swap_RT","storage_material","deleteAttribute","GPUParticleSystem","build_point_mesh","attribute_writter_mesh","build_attribute_writter_mesh","item_size","instance_count","geo","instanced_geo","build_uv_storage_attribute","Points","ParticleStorageMaterial","ParticlePositionAttribute","pos_attr","build_RT","store_geometry_attribute_in_RT","CustomDataTexture","multiplier","RGBDataTexture","RGBADataTexture","RGBFloatDataTexture","RGBAFloatDataTexture","BatchedMesh","id_table","max_texture_width","batched_count","batch_height","mesh_name","set_rgb","get_mesh_index","set_rgba","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","load","basis","xhr","msg","__set_error","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","loading_finished","finished","has_errors","print_error","get_loaded_bytes","get_total_bytes"],"mappings":"+sDAwGK,MAACA,GAAU,IAvGhB,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,MAAMK,QAAQ,WAAa,EACnCP,KAAKC,aAAe,SACpB,MACF,QACED,KAAKC,aAAe,QAItBD,KAAKU,QAAUV,KAAKW,cAGtBC,WAEE,OAAOZ,KAAKC,aAGdY,gBAEE,MAA6B,WAAtBb,KAAKC,aAGda,gBAEE,MAA6B,WAAtBd,KAAKC,aAGdc,cAEE,MAA6B,YAAtBf,KAAKC,aAGde,uBAEE,MAA6B,kBAAtBhB,KAAKC,aAGdgB,eAEE,SAAUjB,KAAKc,WAAad,KAAKkB,YAAclB,KAAKgB,kBAGtDG,eAEE,OAAOnB,KAAKa,UAGdO,gCA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E3BlD,KAAKolD,iBAAiBl+C,GAAGs+C,cAK/BzlD,eAEE,OAAOC,KAAKylD,mBAAqBzlD,KAAK0lD,kBAGxC3lD,mBAEE,IAAIgD,EAAe,EAEnB,IAAK,IAAImE,EAAI,EAAGA,EAAIlH,KAAKolD,iBAAiB1/C,OAAQwB,IAEhDnE,GAAgB/C,KAAKolD,iBAAiBl+C,GAAGnE,aAG3C,OAAOA,EAGThD,kBAEE,IAAIiD,EAAc,EAElB,IAAK,IAAIkE,EAAI,EAAGA,EAAIlH,KAAKolD,iBAAiB1/C,OAAQwB,IAEhDlE,GAAehD,KAAKolD,iBAAiBl+C,GAAGlE,YAG1C,OAAOA"}
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/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/utilities/PerspectiveFrustumPointFitter.js","../src/utilities/OrthographicFrustumPointFitter.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 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 M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, '-?'];\n if ((tem = ua.match(/version\\/(\\d+)/i)) != null) M.splice(1, 1, tem[1]);\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)\n {\n this.name = name;\n this.method = method;\n }\n\n trigger()\n {\n ViewContext.app[this.name][this.method]();\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);\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, context_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.context_attributes = {\n alpha: true,\n depth: true,\n desynchronized: false,\n stencil: false,\n antialias: false,\n premultipliedAlpha: true,\n preserveDrawingBuffer: true,\n powerPreference: 'high-performance',\n logarithmicDepthBuffer: false,\n force_webgl2: true,\n xr_enabled: false\n };\n\n Object.assign(this.context_attributes, context_attributes);\n\n if (this.context_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._renderer = new WebGLRenderer({\n canvas: canvas,\n context: this.canvas_context\n });\n\n if (this.context_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 if (e.key)\n {\n this.press_key(e.key);\n }\n }\n\n on_key_up(e)\n {\n this.release_key(e.key);\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 { 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';\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\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(canvas, context_attributes, 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 Graphics.init(canvas, context_attributes);\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.render_width, OScreen.render_height);\n this.blur_RT = new WebGLRenderTarget(OScreen.render_width, OScreen.render_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.render_width || this.main_RT.height !== OScreen.render_height)\n {\n this.main_RT.setSize(OScreen.render_width, OScreen.render_height);\n this.blur_RT.setSize(OScreen.render_width, OScreen.render_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.replace(\n /([-_][a-z])/g,\n (group) => group.toUpperCase()\n .replace('-', '')\n .replace('_', '')\n );\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 { 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 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","[object Object]","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","n","is_int","is_float","str","JSON","parse","e","AbstractLoader","resource_id","url","size","loaded_bytes","total_bytes","has_finished","has_error","error_message","loaded","total","is_number","console","warn","message","error","resource_container","undefined","resources_by_url","cache","Browser","fetch","method","mode","credentials","redirect","then","on_progress","bind","catch","__on_error","set_resource","__update_downloaded_bytes","__loading_ended","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","get_duration","__play_clips","delta_time","time","trigger_time","action","interpolator","use_dynamic_from_value","keyframes","attribute_name","keyframe","__get_current_keyframe","evaluate","__linear_map_01","easing_function","EPSILON","trigger","evaluate_keyframe","channel_name","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","ActionEvent","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","animation_data","current_context","tracks","initial_tracks","state_to_tracks","get_longest_time","find","element","sequencer","add_action_interpolator","action_event","add_action_event","state","longest_time","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","event","payload","callback","zoom","fire","store_id","hit_data","step_number","step_index","resource","service","unit_data","floor_id","resources","EventManager","fire_resource_loaded","HTMLUtilities","container","images","image","dataset","src","image_objects","image_object","videos","video","TransitionTable","transitions","from_state_name","to_state_name","from_animation_sheet","delta_buffer","___time","Clock","__raw_delta_time","__elapsed_time","__allocated_time","Vector2","shader_time","getDelta","getElapsedTime","shift","__calculate_delta_time","ViewState","global_view_data","transition_progress","action_sequencer","update_transition","ViewStateTransitionHandler","transition_table","last_state","current_state","current_state_data","transitioning","skip","__exit_last_state","before_exit","show","before_enter","play","update","__update_transitions","is_finished","on_enter","assign","Time","update_exit_transition","get_progress","update_enter_transition","hide","on_exit","view_manager","views","transition_handler","view_change_subscribers","browser_title_suffix","__set_views_opacities","view_name","change_url","go_to_state","__change_browser_url","__change_browser_title","notify_view_change","scene_name","next_view","transition_view","set_next_view","go_to_view","subscriber","on_view_change","view","add_transitions","set_transitions","set_state","title_suffix","get_by_url","set_default_state_data","history","pushState","title","__capitalize","document","set_opacity","string","aux_string","toUpperCase","__snake_to_whitespace","group","ApplicationView","ResourceContainer","ViewManager","register_view","classList","remove","load_images","load_videos","style","opacity","BaseApplication","BaseRender","renderer","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","tex","UnrealBloomComposeMaterial","NUM_MIPS","_BlurredTex","_BloomStrength","blurTexture1","blurTexture2","blurTexture3","blurTexture4","blurTexture5","bloomStrength","bloomFactors","bloomRadius","bloomTintColors","rt","col_string","set","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","fontStyle","getElementsByTagName","dummy","dummyText","createTextNode","appendChild","setAttribute","offsetHeight","removeChild","text","font","ceil","measureText","width","getFontHeight","ctxOptions","font_color","__draw","draw_canvas","canvas_texture","CanvasTexture","UVMapping","ClampToEdgeWrapping","NearestFilter","generateMipMaps","needsUpdate","height","radius","fill","stroke","tl","tr","br","bl","defaultRadius","side","beginPath","moveTo","lineTo","quadraticCurveTo","closePath","configuration","parameters","dpr","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","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","scene","traverse","child","geometry","dispose","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","size_changed","vector2","aspect_ratio","portrait","ScreenSpaceTextureMaterial","h","_ScreenSpacePosition","_ScreenSize","_TextureSize","PerspectiveCamera","TPerspectiveCamera","fov","aspect","near","far","clear_color","clear_alpha","copy","debug","Vector3_one","Vector3_zero","canvas_renderer","display_texture_meshes","origin","arrow","normalize","SceneManager","axis","RT","rt_debug","position_2d","fillStyle","fillRect","clearRect","strokeStyle","line","frustumCulled","pos","cube","depth","distanceTo","sub","forward_dir","PlaneGeometry","Vector4","basic_color_vert","basic_color_frag","transparent","box","Box3","setFromCenterAndSize","helper","Box3Helper","sphere","input_points","open","catmull","CatmullRomCurve3","updateArcLengths","getSpacedPoints","draw_line","SphereGeometry","sphere_mesh","sphere1","bb","curve","options","offset","mesh","set_texture","graphics","set_screen_size","OScreen","render","ClearDepthNormalMaterial","clear_depth","clear_normal","_DepthNormal","DepthNormalMaterial","_FarPlane","far_plane","DepthAndNormalsRenderer","WebGLRenderTarget","clear_depth_normal_mat","depth_normal_material","__resize_RT_if_necessary","clear","blit_clear_with_material","CameraManager","setSize","render_target","Blitter","_blit_scene","_blit_material","_blit_quad","_blit_camera","OrthographicCamera","dst","src_texture","isWebGLRenderTarget","texture","src_width","src_height","getSize","__render","mat","dst_RT","current_rt","getRenderTarget","setRenderTarget","context_attributes","_renderer","blitter","no_render","current_render_mode","generateDepthNormalTexture","depth_and_normals_renderer","is_webgl2","canvas_context","alpha","desynchronized","stencil","antialias","premultipliedAlpha","preserveDrawingBuffer","powerPreference","logarithmicDepthBuffer","force_webgl2","xr_enabled","constructor","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","on_pre_render","on_post_render","overrideMaterial","buffer","readRenderTargetPixels","clear_stencil","setClearColor","entries","entry","update_position","contentRect","update_size","setViewport","material_pass","src_RT","blit_with_material","blit","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","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","key","press_key","release_key","pressed","released","key_name","fired","down","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","GeometryBatch","batch_width","data_textures","object_names","zero_offset","write_offset","uniform_dirty_count","tmp_uploaded_data_count","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","default_value_v4","__create_rgba_texture","__flood_data_texture_rgba","__create_rgba_float_texture","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","vector4","use_a","__set_pixel_rgba","upload_budget","__partial_texture_data_upload","__full_texture_data_upload","texture_data","copyTextureToTexture","index","v3","v4","Uint8Array","DataTexture","RGBFormat","dst_texture","one_pixel_text","geometry_batcher","batches","buffer_geometries","attr_accessor_uvs","texture_width","ceilPowerOfTwo","__init_uv_array","uv_index","vertex_count","count","buffer_attribute","BufferAttribute","upload_texture_data","uvs","ui","input","ui_elements","_tmp_normalized_pos","ss_scene","matrixWorldAutoUpdate","ws_scene","ss_camera","elem","set_screen_space_coordinate_system","set_world_space_coordinate_system","NDC","update_state","current_clicked_element","camera_utilities","tmp_mat","Matrix4","Plane","ray","Ray","tmp_size","tmp_unproj","tmp_vec","applyQuaternion","v_fov","h_fov","atan","tan","distV","distH","plane_position","plane_normal","setFromNormalAndCoplanarPoint","get_forward_dir","isPerspectiveCamera","unproject_mouse_position","unproject","intersectPlane","zoom_scale","world_space_center","camera_forward","project_points_on_plane","projected_points_center","getCenter","up","right","cross","inverse_mat","getInverse","applyMatrix4","projected_center","get_zoom_to_fit_rect","isOrthographicCamera","obj_x","obj_y","object_aspect","object","getWorldPosition","project","left","top","bottom","initializer","init","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","NormalAORender","ssao_mat","ssao_compose_mat","debug_normals","ssaa","use_ssaa","main_RT","SSAO_RT","blurrer","__check_RT_size","__update_uniforms","blur","projectionMatrix","NormalRender","VRRender","render_spectator_camera","spectator_camera","isPresenting","xrCam","getCamera","currentRenderTarget","GaussianBlurMaterial","kernel_radius","KERNEL_RADIUS","SIGMA","texSize","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","set_direction","dispose_RT","hor","ver","texture_height","set_size","dispose_materials","UnrealBloomRender","bloom_compose_mat","blur_RT","add_mat","set_RT_0","set_RT_1","set_RT_2","set_RT_3","set_RT_4","set_bloom_strength","set_bloom_radius","set_add_texture","val","set_tint_color_0","set_tint_color_1","set_tint_color_2","set_tint_color_3","set_tint_color_4","TOrthographicCamera","view_component_manager","components","enabled_components","Set","__set_components_opacities","component","delete","component_name","RenderLoop","target_application","is_running","frames_passed","__update","on_post_start","ViewComponentManager","on_frame_end","setAnimationLoop","stop","screen","apply_pixel_density_v2","apply_pixel_density","get_pixel_size","SimpleTextDrawer","text_margin","text_size","get_text_size","globalAlpha","textBaseline","textAlign","fillText","ViewComponent","hidden","register_component","enable_component","disable_component","toggle_hidden","HorizontalPlane","VerticalPlane","ArrayUtilities","source","apply","array","items_left_count","closest_point","closest_distance","obj","ids","FrustumPointFitter","camera_quaternion","vertical_fov","degToRad","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","sphere_center","pull_back_distance","get_distance_to_fit_rect","far_pos","up_plane","down_plane","left_plane","right_plane","apply_center_correction_to_pos","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_hozirontal_correction","closest_up_point","closest_down_point","closest_distance_to_up_plane","closest_distance_to_down_plane","up_dir","down_line","up_line","down_dist","up_dist","correction","closest_right_point","closest_left_point","closest_distance_to_right_plane","closest_distance_to_left_plane","right_dir","left_line","right_line","left_dist","right_dist","Quaternion","setFromAxisAngle","GeometryUtilities","geometry_buffer","indices","positions","vertices","getX","getY","getZ","add_barycentric_attribute","non_indexed_geometry_buffer","bar_coordinates","ImageUtilities","getImageData","imagedata","mesh_sampler","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","geometries","get_mesh","gltf","animations","skinnedMeshes","isSkinnedMesh","cloneBones","cloneSkinnedMeshes","isBone","skeleton","cloneSkinnedMesh","orderedCloneBones","bones","cloneBone","Skeleton","boneInverses","matrixWorld","cast","receive","castShadow","receiveShadow","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","hours","minutes","seconds","PerspectiveFrustumPointFitter","get_horizontal_correction","OrthographicFrustumPointFitter","inverse_camera_quat","inverse","inverted_points","distance_to_center","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","parent","WorldImage","pivot","_ScreenAligned","_Scale","_Opacity","DoubleSide","current_scale","computeBoundingBox","tmp_bb_size","boundingBox","img","screen_aligned","boolean","Text2D","is_static","simple_text_drawer","draw_settings","draw_on_texture","LinearMipMapLinearFilter","update_texture","UIElementMaterial","intensity","_PixelOffset","_NDC","_PivotPoint","_DepthOffset","ScreenSpacePosition","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","pivot_point","use_depth","depth_offset","visible","get_size","normalized_mouse_pos","get_pos_NDC","to_screen_position","rect","Box2","containsPoint","projected_pos","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","compose","tilt","new_orientation","new_tilt","multiply","update_glyphs","op","cursor","unicode","charCodeAt","glyph","planeBounds","text_glyph","atlasBounds","advance","box2","first_glyph","union","box2_size","SDFTextMaterial","_Texture","_Boldness","_AtlasSize","SDFTextBatch","font_layout","atlas_texture","instanced_geometry","InstancedBufferGeometry","instanceCount","Float32BufferAttribute","transformsCol0","InstancedBufferAttribute","max_allocations","transformsCol1","transformsCol2","transformsCol3","glyph_bounds","usage","DynamicDrawUsage","text_elements","set_atlas_size","atlas","set_boldness","text_str","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","update_matrix","clear_glyph_dirty","clear_color_dirty","glyph_i","buffer_i","setXYZW","VectorInterpolator","tmp","MedianFilterMaterial","kernel3x3","_SourceTex","_SourceTexSize","isVideoTexture","videoWidth","videoHeight","isTexture","MedianFilter","median_filter_mat","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","particle_attribute","particle_count","resolution","calculate_resolution","HalfFloatType","attribute_writter_scene","swap_RT","storage_material","deleteAttribute","GPUParticleSystem","build_point_mesh","attribute_writter_mesh","build_attribute_writter_mesh","item_size","instance_count","geo","instanced_geo","build_uv_storage_attribute","Points","ParticleStorageMaterial","ParticlePositionAttribute","pos_attr","build_RT","store_geometry_attribute_in_RT","CustomDataTexture","multiplier","RGBDataTexture","RGBADataTexture","RGBFloatDataTexture","RGBAFloatDataTexture","BatchedMesh","id_table","max_texture_width","batched_count","batch_height","mesh_name","set_rgb","get_mesh_index","set_rgba","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","load","basis","xhr","msg","__set_error","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","loading_finished","finished","has_errors","print_error","get_loaded_bytes","get_total_bytes"],"mappings":"qqDAwGK,MAACA,GAAU,IAvGhB,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,KAAO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