ohzi-core 9.2.0 → 9.3.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/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/UnrealBloomComposeMaterial.js","../src/materials/AddMaterial.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\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\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 = 1;\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\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","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/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","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/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, 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.png',\r\n 'nx.png',\r\n 'py.png',\r\n 'ny.png',\r\n 'pz.png',\r\n 'nz.png'\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\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 (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\r\nexport { AsyncTextureLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { Texture } from 'three';\r\n\r\nclass TextureLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, size)\r\n {\r\n super(resource_id, url, size);\r\n }\r\n\r\n on_preloaded_finished(resource_container, response)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n response.blob().then((blob) =>\r\n {\r\n const texture = new Texture();\r\n\r\n const url = URL.createObjectURL(blob);\r\n\r\n const image = new Image();\r\n image.src = url;\r\n\r\n image.onload = () =>\r\n {\r\n texture.image = image;\r\n texture.needsUpdate = true;\r\n\r\n resource_container.set_resource(this.resource_id, this.url, texture);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n };\r\n\r\n image.onerror = () =>\r\n {\r\n console.error('Error loading texture. Maybe the resource is not an image?', this.url);\r\n };\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { TextureLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\n\nclass VideoLoader extends AbstractLoader\n{\n constructor(resource_id, url, size)\n {\n super(resource_id, url, size);\n }\n\n on_preloaded_finished(resource_container, response)\n {\n if (resource_container.resources_by_url[this.url] === undefined)\n {\n response.blob().then((blob) =>\n {\n resource_container.set_resource(this.resource_id, this.url, URL.createObjectURL(blob));\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n });\n }\n else\n {\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n }\n }\n}\n\nexport { VideoLoader };\n","import { ResourceContainer } from '../ResourceContainer';\r\n\r\nclass ResourceBatch\r\n{\r\n constructor(batch_name)\r\n {\r\n this.resource_loaders = [];\r\n this.batch_name = batch_name || 'unnamed batch';\r\n }\r\n\r\n add_loader(loader)\r\n {\r\n this.resource_loaders.push(loader);\r\n }\r\n\r\n load(resource_container)\r\n {\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n this.resource_loaders[i].load(resource_container || ResourceContainer);\r\n }\r\n }\r\n\r\n get loading_finished()\r\n {\r\n let finished = true;\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n finished = finished && this.resource_loaders[i].has_finished;\r\n }\r\n return finished;\r\n }\r\n\r\n get has_errors()\r\n {\r\n let has_error = false;\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n has_error = has_error || this.resource_loaders[i].has_error;\r\n }\r\n return has_error;\r\n }\r\n\r\n print_errors()\r\n {\r\n console.error('Batch <' + this.batch_name + '> could not load successfully');\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n if (this.resource_loaders[i].has_error)\r\n {\r\n this.resource_loaders[i].print_error();\r\n }\r\n }\r\n }\r\n\r\n get_progress()\r\n {\r\n return this.get_loaded_bytes() / this.get_total_bytes();\r\n }\r\n\r\n get_loaded_bytes()\r\n {\r\n let loaded_bytes = 1;\r\n\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n loaded_bytes += this.resource_loaders[i].loaded_bytes;\r\n }\r\n\r\n return loaded_bytes;\r\n }\r\n\r\n get_total_bytes()\r\n {\r\n let total_bytes = 1;\r\n\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n total_bytes += this.resource_loaders[i].total_bytes;\r\n }\r\n\r\n return total_bytes;\r\n }\r\n}\r\n\r\nexport { ResourceBatch };\r\n"],"names":["browser","init","this","browser_name","agent","window","navigator","userAgent","toLowerCase","indexOf","opr","chrome","name","is_safari","is_chrome","is_edge","is_edge_chromium","has_webm","is_firefox","has_hvec","preferred_video_extension","Validation","constructor","static","n","Number","is_int","is_float","str","JSON","parse","e","AbstractLoader","resource_id","url","size","loaded_bytes","total_bytes","has_finished","has_error","error_message","__update_downloaded_bytes","loaded","total","is_number","console","warn","__loading_ended","__set_error","message","print_error","error","load","resource_container","undefined","resources_by_url","cache","Browser","fetch","method","mode","credentials","redirect","then","on_progress","bind","catch","__on_error","set_resource","async","response","response_clone","clone","reader","body","getReader","contentLength","headers","get","receivedLength","done","value","read","length","on_preloaded_finished","data","OMath","from_range_start_value","from_range_end_value","to_range_start_value","to_range_end_value","min","max","number","divisor","rgb","r","Math","round","toString","g","b","points","plane","projected_point","Vector3","points_on_plane","i","projectPoint","push","from","to","target","t","elements","lerp","x1","x2","abs","x","y","m","euclideanModulo","degrees","PI","radians","v","w","z","center","add","multiplyScalar","arr","col","floor","random","clamp","ActionSequencer","context","elapsed_time","playback_speed","playing","action_events","initial_context","stringify","tmp_t","channels","channel_names","Object","keys","duration","play","stop","reset","skip","get_duration","__play_clips","update","delta_time","set_progress","time","set_normalized_progress","get_progress","is_finished","add_action_event","trigger_time","action","add_action_interpolator","interpolator","use_dynamic_from_value","keyframes","attribute_name","keyframe","get_current_target_value","__get_current_keyframe","evaluate","get_current_starting_value","get_current_progress","__linear_map_01","easing_function","EPSILON","trigger","evaluate_keyframe","get_keyframes","channel_name","is_channel_redefined","initial","saturate","current","Infinity","distance","EasingFunctions","cos","sin","pow","sqrt","c4","ease_out_bounce","n1","d1","sign","ActionInterpolator","NumberInterpolator","super","view_context","app","set_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","split","trigger_name","trigger_method","at_time","value_data","to_value","from_time","to_time","sort","a","x_pos","ActionSequencerBuilder","default_state_data","from_animation_sheet","animation_data","current_context","tracks","initial_tracks","state_to_tracks","get_longest_time","find","element","sequencer","action_event","state","longest_time","from_draw_io","xml","transition_data","track_time","event_manager","queue","zoom_changed_evt","store_clickd_evt","point_selected_evt","config_changed","path_substep_completed","path_completed","go_to_store_requested_evt","resource_loaded_evt","service_clicked_evt","unit_pos_updated_evt","floor_changed_evt","on_enter_floor_navigation","on_exit_floor_navigation","on_enter_floor_selection","on_exit_floor_selection","on_enter_outside_navigation","on_exit_outside_navigation","step_selected_evt","fire","event","payload","on","callback","fire_zoom_changed","zoom","fire_store_selected","store_id","fire_point_selected","hit_data","fire_config_changed","fire_path_substep_completed","step_number","fire_path_completed","fire_step_selected","step_index","fire_go_to_store_requested","fire_resource_loaded","resource","fire_service_clicked","service","fire_unit_position_updated","unit_data","fire_floor_switched","floor_id","fire_on_enter_floor_navigation","fire_on_exit_floor_navigation","fire_on_enter_floor_selection","fire_on_exit_floor_selection","fire_on_enter_outside_navigation","fire_on_exit_outside_navigation","resources","EventManager","get_resource","HTMLUtilities","container","images","image","dataset","src","image_objects","image_object","videos","video","TransitionTable","transitions","from_state_name","to_state_name","add_transitions","set_transitions","set_default_state_data","delta_buffer","___time","Clock","__raw_delta_time","__elapsed_time","__allocated_time","Vector2","shader_time","__update","getDelta","getElapsedTime","shift","__calculate_delta_time","ViewState","start","show","hide","before_enter","on_enter","update_enter_transition","global_view_data","transition_progress","action_sequencer","update_transition","update_exit_transition","before_exit","on_exit","ViewStateTransitionHandler","transition_table","last_state","current_state","current_state_data","transitioning","go_to_state","__exit_last_state","__update_transitions","set_state","assign","Time","view_manager","views","transition_handler","view_change_subscribers","browser_title_suffix","__set_views_opacities","go_to_view","view_name","change_url","__change_browser_url","__change_browser_title","notify_view_change","go_to_scene","scene_name","next_view","transition_view","set_next_view","subscribe_to_view_change","subscriber","on_view_change","register_view","view","has_view","set_view","set_browser_title_suffix","title_suffix","get_current_view","get_view_by_name","get_view_by_url","get_by_url","history","pushState","title","__capitalize","document","set_opacity","string","aux_string","toUpperCase","replace","__snake_to_whitespace","group","ApplicationView","ResourceContainer","ViewManager","classList","remove","load_html_images","load_images","load_html_videos","load_videos","style","opacity","BaseApplication","on_post_start","on_post_render","on_pre_render","on_frame_end","BaseRender","render","renderer","resize","dispose","BaseShaderMaterial","ShaderMaterial","vert","frag","uniforms","vertexShader","basic_vert","fragmentShader","basic_frag","_Color","Color","BlitMaterial","frag_shader","vert_shader","defines","_MainTex","_Resolution","_TargetResolution","depthWrite","blending","NoBlending","depthTest","depthFunc","AlwaysDepth","camera_manager","_current","_spectator","camera","spectator","capabilities","max_anisotropy","vertex_texture_sampler_available","fp_textures_available","CanvasDrawer","uses_dynamic_font","__textHeight","canvas","createElement","ctx","getContext","getFontHeight","fontStyle","getElementsByTagName","dummy","dummyText","createTextNode","appendChild","setAttribute","offsetHeight","removeChild","get_text_size","text","font","ceil","measureText","width","draw_canvas","ctxOptions","font_color","__draw","draw_on_texture","canvas_texture","CanvasTexture","UVMapping","ClampToEdgeWrapping","NearestFilter","generateMipMaps","needsUpdate","roundRect","height","radius","fill","stroke","tl","tr","br","bl","defaultRadius","side","beginPath","moveTo","lineTo","quadraticCurveTo","closePath","configuration","parameters","dpr","from_json","json","Idle","is_animating","Animating","easing_function_t","animator","set_property_value","set_current_state","finished_callback","CSSAnimator","css_property","value_prefix","value_suffix","ease_in_out_cubic","animate","AxisHelper","Object3D","scale","blue_points","blue_axis_mat","LineBasicMaterial","color","blue_axis_geo","BufferGeometry","setFromPoints","blue_axis_line","Line","renderOrder","green_points","green_axis_mat","green_axis_geo","green_axis_line","red_points","red_axis_mat","red_axis_geo","red_axis_line","set","scene_manager","Scene","add_scene","scene","traverse","child","geometry","material","children","Cube","Mesh","segments","BoxGeometry","MeshBasicMaterial","Sphere","SphereBufferGeometry","Arrow","dir","cylinder_height","cylinder_geo","CylinderBufferGeometry","translate","cone_geometry","ConeBufferGeometry","cone_height","buffer_geometry","BufferGeometryUtils","mergeBufferGeometries","rotateX","quaternion","setFromUnitVectors","_dir","oscreen","position","render_width","render_height","width_height","pixel_size","update_position","size_changed","update_size","apply_pixel_density_v2","vector2","apply_pixel_density","get_pixel_size","aspect_ratio","portrait","ScreenSpaceTextureMaterial","h","_ScreenSpacePosition","_ScreenSize","_TextureSize","set_position","set_texture","tex","set_screen_size","PerspectiveCamera","TPerspectiveCamera","fov","aspect","near","far","clear_color","clear_alpha","copy","debug","Vector3_one","Vector3_zero","canvas_renderer","display_texture_meshes","draw_arrow","origin","arrow","normalize","SceneManager","draw_axis","axis","set_debug_RT","RT","rt_debug","draw_rectangle","position_2d","fillStyle","fillRect","clear","clearRect","draw_line_2D","strokeStyle","draw_line","line","frustumCulled","draw_cube","pos","cube","draw_oriented_cube","depth","distanceTo","sub","forward_dir","draw_plane","PlaneGeometry","Vector4","basic_color_vert","basic_color_frag","transparent","draw_empty_cube","box","Box3","setFromCenterAndSize","helper","Box3Helper","draw_sphere","sphere","draw_point_array","input_points","open","catmull","CatmullRomCurve3","updateArcLengths","getSpacedPoints","draw_sphere_helper","SphereGeometry","sphere_mesh","draw_math_sphere","sphere1","draw_bounding_box","bb","draw_curve","curve","options","offset","draw_texture","mesh","graphics","OScreen","ClearDepthNormalMaterial","clear_depth","clear_normal","_DepthNormal","DepthNormalMaterial","_FarPlane","far_plane","DepthAndNormalsRenderer","WebGLRenderTarget","clear_depth_normal_mat","depth_normal_material","__resize_RT_if_necessary","blit_clear_with_material","CameraManager","setSize","render_target","Blitter","_blit_scene","_blit_material","_blit_quad","_blit_camera","OrthographicCamera","blit","dst","src_texture","isWebGLRenderTarget","texture","src_width","src_height","getSize","__render","material_pass","mat","blit_with_material","dst_RT","current_rt","getRenderTarget","setRenderTarget","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","WebGLRenderer","xr","enabled","autoClear","setPixelRatio","Configuration","extensions","domElement","Capabilities","getMaxAnisotropy","maxVertexTextures","is_floating_point_texture_available","resize_observer","ResizeObserver","on_resize","observe","dom_element","depth_normals_RT","new_state","__update_current_camera","updateProjectionMatrix","updateMatrix","updateMatrixWorld","override_mat","__apply_override_material","render_scene","overrideMaterial","readback_RT","buffer","readRenderTargetPixels","clear_stencil","setClearColor","entries","entry","contentRect","setViewport","src_RT","take_screenshot","blob_callback","old_width","old_height","new_width","new_height","tile_width","tile_height","divisions_x","parseInt","divisions_y","old_dpr","getPixelRatio","ctx_2D","setViewOffset","drawImage","toBlob","clearViewOffset","download_screenshot","blob","link","download","href","URL","createObjectURL","click","onclick","requestAnimationFrame","revokeObjectURL","removeAttribute","minFilter","magFilter","format","RGBAFormat","encoding","LinearEncoding","type","FloatType","stencilBuffer","depthBuffer","output","Float32Array","NormalMaterial","DebugNormalsRender","Graphics","KeyboardInput","ctrlz_pressed","ctrlz_fired","keys_keys","addEventListener","on_key_down","on_key_up","keyCode","ctrlKey","key","press_key","release_key","pressed","released","key_name","fired","down","release_keys","is_key_pressed","is_key_down","is_key_released","register_key","unregister_key","removeEventListener","input","InputController","clicked","captured_NDC","current_NDC_delta","keyboard","keyboard_input_container","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","match","is_ipad","maxTouchPoints","is_ios","is_android","get_os","is_linux","is_mac","is_windows","platform","test","reflection_plane_context","target_geometry","target_position","set_target_geometry","GeometryBatch","batch_width","data_textures","object_names","zero_offset","write_offset","uniform_dirty_count","tmp_uploaded_data_count","add_global_uniform","set_global_uniform","add_object_uniform_v3","uniform_name","default_value_v3","src_tex","__create_rgb_texture","dst_tex","one_pixel_tex","new_data_tex","__add_data_texture","__flood_data_texture_rgb","add_object_uniform_v4","default_value_v4","__create_rgba_texture","__flood_data_texture_rgba","add_object_uniform_v4_float","__create_rgba_float_texture","set_object_uniform_v3","object_name","vector3","use_r","use_g","use_b","obj_index","__get_object_index","data_texture","__get_data_texture","__set_pixel_rgb","one_pixel","last_accessed_index","dirty_count","set_object_uniform_v4","vector4","use_a","__set_pixel_rgba","upload_texture_data","upload_budget","__partial_texture_data_upload","__full_texture_data_upload","get_uniform_dirty_count","texture_data","copyTextureToTexture","index","get_mesh","v3","v4","Uint8Array","DataTexture","RGBFormat","dst_texture","one_pixel_text","geometry_batcher","batches","batch","buffer_geometries","attr_accessor_uvs","texture_width","ceilPowerOfTwo","__init_uv_array","uv_index","vertex_count","count","buffer_attribute","BufferAttribute","uvs","ui","ui_elements","_tmp_normalized_pos","ss_scene","matrixWorldAutoUpdate","ws_scene","ss_camera","delete_element","elem","splice","add_screen_space_element","set_screen_space_coordinate_system","add_world_space_element","set_world_space_coordinate_system","Input","update_state","current_clicked_element","camera_utilities","tmp_mat","Matrix4","Plane","ray","Ray","tmp_size","tmp_unproj","get_up_dir","tmp_vec","applyQuaternion","get_forward_dir","get_right_dir","unproject_mouse_position","v_fov","h_fov","atan","tan","distV","distH","get_plane_intersection","plane_position","plane_normal","setFromNormalAndCoplanarPoint","isPerspectiveCamera","unproject","intersectPlane","fit_points_on_camera","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","get_zoom_to_fit_box","isOrthographicCamera","obj_x","obj_y","object_aspect","get_html_screen_pos","object","getWorldPosition","project","world_pos_to_screen","update_projection","left","top","bottom","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","blur","NormalAORender","ssao_mat","ssao_compose_mat","debug_normals","ssaa","use_ssaa","main_RT","SSAO_RT","blurrer","__check_RT_size","__update_uniforms","projectionMatrix","NormalRender","VRRender","render_spectator_camera","spectator_camera","isPresenting","xrCam","getCamera","currentRenderTarget","UnrealBloomComposeMaterial","nMips","NUM_MIPS","_BlurredTex","_BloomStrength","blurTexture1","blurTexture2","blurTexture3","blurTexture4","blurTexture5","bloomStrength","bloomFactors","bloomRadius","bloomTintColors","set_RT_0","rt","set_RT_1","set_RT_2","set_RT_3","set_RT_4","set_bloom_strength","set_bloom_radius","set_tint_color_0","col_string","set_tint_color_1","set_tint_color_2","set_tint_color_3","set_tint_color_4","AddMaterial","_SecondTex","set_add_texture","GaussianBlurMaterial","kernel_radius","KERNEL_RADIUS","SIGMA","texSize","direction","set_size","set_direction","LuminosityHighPassMaterial","luminosityThreshold","smoothWidth","defaultColor","defaultOpacity","GaussianBlurrer","current_width","current_height","separableBlurMaterials","renderTargetsHorizontal","renderTargetsVertical","kernelSizeArray","rt_pars","LinearFilter","renderTargetBright","generateMipmaps","init_materials","init_RT","luminosity_high_pass_mat","use_luminosity_high_pass","resize_RT","inputRenderTarget","get_blurred_texture","get_blurred_RT","dispose_RT","hor","ver","texture_height","dispose_materials","UnrealBloomRender","bloom_compose_mat","blur_RT","add_mat","val","TOrthographicCamera","view_component_manager","components","enabled_components","Set","__set_components_opacities","component","register_component","enable_component","disable_component","delete","get_component_by_name","component_name","RenderLoop","target_application","is_running","frames_passed","ViewComponentManager","setAnimationLoop","screen","SimpleTextDrawer","text_margin","text_size","globalAlpha","textBaseline","textAlign","fillText","ViewComponent","hidden","toggle_hidden","HorizontalPlane","VerticalPlane","ArrayUtilities","source","apply","array","items_left_count","closest_point","closest_distance","obj","ids","FrustumPointFitter","fit_points","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","sample_count","face_areas","min_area","normals","tangents","faces","index_0","index_1","index_2","v1","v2","face","c","n2","n3","normal","tangent","uv_a","uv_b","uv_c","area","get_face_area","normalized_faces_array","get_uniform_face_distribution","selected_faces","select_random_faces","sample_data_from_faces","sampled_points","sampled_normals","sampled_tangents","sampled_uvs","w1","w2","sample_point_in_face","amount","selected_face","minimum_area","extended_triangle_indices","repetitions_needed","j","vec1","vec2","w3","model_utilities","result_callback","fromGeometry","get_geometries","geometries","assign_material","clone_animated_gltf","gltf","animations","skinnedMeshes","isSkinnedMesh","cloneBones","cloneSkinnedMeshes","isBone","skeleton","cloneSkinnedMesh","orderedCloneBones","bones","cloneBone","Skeleton","boneInverses","matrixWorld","set_shadow_config","cast","receive","castShadow","receiveShadow","__find_object","get_object","get_object_by_type","object_type","ObjectUtilities","item","Array","isArray","sources","is_object","merge_deep","nodeType","attributes","attribute","nodeName","nodeValue","hasChildNodes","childNodes","xml_to_json","old","StringUtilities","hexValues","hex","words","substr","join","charAt","slice","TimeUtilities","time_str_to_ms","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","total_length","parent","copy_color","WorldImage","pivot","_ScreenAligned","_Scale","_Opacity","DoubleSide","current_scale","computeBoundingBox","tmp_bb_size","boundingBox","update_texture","img","screen_aligned","boolean","Text2D","is_static","simple_text_drawer","draw_settings","LinearMipMapLinearFilter","UIElementMaterial","intensity","_PixelOffset","_NDC","_PivotPoint","_DepthOffset","ScreenSpacePosition","get_pos_NDC","WorldSpacePosition","tmp_vec3","tmp_vec2","UIElementState","ui_element","normalized_mouse_position","OnIdle","is_mouse_over","_on_enter_state","OnMouseEnter","on_mouse_enter","_on_hover_state","_on_exit_state","OnMouseExit","on_mouse_exit","_on_idle_state","OnMouseHover","__trigger_on_hover","on_mouse_hover","UIElement","is_clickable","position_strategy","_position","on_hover","mouse_pos_tmp","cached_NDC_position","screen_pos_tmp","texture_size","matrixAutoUpdate","pixel_offset","set_render_order","pivot_point","set_pixel_offset","use_depth","depth_offset","clear_state","visible","get_size","normalized_mouse_pos","to_screen_position","rect","Box2","containsPoint","projected_pos","get_screen_space_position","set_screen_space_position","screen_pos","UpdatableMaterialMesh","self","onBeforeRender","TextGlyph","plane_bounds","atlas_bounds","SDFText","glyph_layout","glyphs","glyph_is_dirty","matrix_is_dirty","color_is_dirty","matrix","__opacity","__text","__generate_glyphs","update_matrix","compose","clear_glyph_dirty","clear_color_dirty","set_rotation","tilt","new_orientation","new_tilt","multiply","set_color","set_pivot","update_glyphs","op","cursor","unicode","charCodeAt","glyph","planeBounds","text_glyph","atlasBounds","advance","box2","first_glyph","union","box2_size","SDFTextMaterial","_Texture","_Boldness","_AtlasSize","set_atlas_size","set_boldness","SDFTextBatch","font_layout","atlas_texture","instanced_geometry","InstancedBufferGeometry","instanceCount","Float32BufferAttribute","transformsCol0","InstancedBufferAttribute","max_allocations","transformsCol1","transformsCol2","transformsCol3","glyph_bounds","usage","DynamicDrawUsage","text_elements","atlas","add_text","text_str","remove_text","text_elem","remove_elem","force_update","glyph_bounds_atr","plane_bounds_atr","color_atr","matrix_needs_update","glyph_needs_update","color_needs_update","glyph_count","glyph_i","buffer_i","setXYZW","VectorInterpolator","tmp","MedianFilterMaterial","kernel3x3","_SourceTex","_SourceTexSize","isVideoTexture","videoWidth","videoHeight","isTexture","MedianFilter","median_filter_mat","filter","tex_size","DualFilteringBlurMaterial","upsample","AlphaFilterMaterial","use_alpha_mask","_Offset","DualFilteringBlurrer","RT0","RT3","RT4","upscale_blur_mat","downscale_blur_mat","alpha_filter_mat","check_RT_resize","ParticleAttribute","attr_name","update_material","write","init_from_geometry","init_from_attribute","particle_attribute","build_RT","particle_count","resolution","calculate_resolution","HalfFloatType","swap_RT","attribute_writter_scene","store_geometry_attribute_in_RT","storage_material","deleteAttribute","get_texture","GPUParticleSystem","build_point_mesh","attribute_writter_mesh","build_attribute_writter_mesh","add_texture_attribute","add_update_attribute_array","item_size","add_attribute_array","instance_count","geo","instanced_geo","build_uv_storage_attribute","Points","ParticleStorageMaterial","ParticlePositionAttribute","store_geometry","pos_attr","store_positions","CustomDataTexture","multiplier","set_rgba","set_rgb","set_r","set_g","set_b","set_a","RGBDataTexture","RGBADataTexture","RGBFloatDataTexture","RGBAFloatDataTexture","BatchedMesh","id_table","max_texture_width","batched_count","batch_height","attach_rgb_texture","attach_rgba_texture","attach_rgb_float_texture","attach_rgba_float_texture","get_mesh_index","set_rgb_value","mesh_name","set_rgba_value","MeshBatcher","meshes","attr_mesh_id","create_batched_mesh","AudioClip","loop","volume","positional","audio","audio_listener","TPositionalAudio","TAudio","setBuffer","setLoop","gain","setVolume","pause","is_playing","isPlaying","AudioLoader","instantiate_audio","AudioContext","createBuffer","arrayBuffer","array_buffer","decodeAudioData","audio_buffer","BasisLoader","loader","basis","xhr","msg","CubemapLoader","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","Texture","Image","onload","onerror","original_url","TextureLoader","VideoLoader","ResourceBatch","batch_name","resource_loaders","add_loader","loading_finished","finished","has_errors","print_errors","get_loaded_bytes","get_total_bytes"],"mappings":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E,WAE3BrC,KAAK0sD,iBAAiBjmD,GAAGzD,aAG9B,CAEDgH,eAEE,OAAOhK,KAAKgtD,mBAAqBhtD,KAAKitD,iBACvC,CAEDD,mBAEE,IAAI9qD,EAAe,EAEnB,IAAK,IAAIuE,EAAI,EAAGA,EAAIzG,KAAK0sD,iBAAiBznD,OAAQwB,IAEhDvE,GAAgBlC,KAAK0sD,iBAAiBjmD,GAAGvE,aAG3C,OAAOA,CACR,CAED+qD,kBAEE,IAAI9qD,EAAc,EAElB,IAAK,IAAIsE,EAAI,EAAGA,EAAIzG,KAAK0sD,iBAAiBznD,OAAQwB,IAEhDtE,GAAenC,KAAK0sD,iBAAiBjmD,GAAGtE,YAG1C,OAAOA,CACR"}
1
+ {"version":3,"file":"index.module.js","sources":["../src/Browser.js","../src/utilities/Validation.js","../src/resource_loader/AbstractLoader.js","../src/utilities/OMath.js","../src/action_sequencer/ActionSequencer.js","../src/utilities/EasingFunctions.js","../src/action_sequencer/ActionInterpolator.js","../src/action_sequencer/NumberInterpolator.js","../src/view_components/ViewContext.js","../src/action_sequencer/ActionEvent.js","../src/view_components/transition/DrawIOAnimationSheet.js","../src/view_components/transition/ActionSequencerBuilder.js","../src/EventManager.js","../src/ResourceContainer.js","../src/utilities/HTMLUtilities.js","../src/view_components/transition/TransitionTable.js","../src/Time.js","../src/view_components/ViewState.js","../src/view_components/transition/ViewStateTransitionHandler.js","../src/view_components/ViewManager.js","../src/view_components/ApplicationView.js","../src/BaseApplication.js","../src/render_mode/BaseRender.js","../src/materials/BaseShaderMaterial.js","../src/materials/BlitMaterial.js","../src/materials/AddMaterial.js","../src/materials/UnrealBloomComposeMaterial.js","../src/CameraManager.js","../src/Capabilities.js","../src/canvas_drawer/CanvasDrawer.js","../src/Configuration.js","../src/html_utilities/css_animator_states/Idle.js","../src/html_utilities/css_animator_states/Animating.js","../src/html_utilities/CSSAnimator.js","../src/components/AxisHelper.js","../src/SceneManager.js","../src/primitives/Cube.js","../src/primitives/Sphere.js","../src/primitives/Arrow.js","../src/OScreen.js","../src/materials/ScreenSpaceTextureMaterial.js","../src/PerspectiveCamera.js","../src/Debug.js","../src/materials/ClearDepthNormalMaterial.js","../src/materials/DepthNormalMaterial.js","../src/render_utilities/DepthAndNormalsRenderer.js","../src/render_utilities/Blitter.js","../src/Graphics.js","../src/materials/NormalMaterial.js","../src/render_mode/DebugNormalsRender.js","../src/KeyboardInput.js","../src/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\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\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 = 1;\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\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, 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.png',\r\n 'nx.png',\r\n 'py.png',\r\n 'ny.png',\r\n 'pz.png',\r\n 'nz.png'\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\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 (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\r\nexport { AsyncTextureLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { Texture } from 'three';\r\n\r\nclass TextureLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, size)\r\n {\r\n super(resource_id, url, size);\r\n }\r\n\r\n on_preloaded_finished(resource_container, response)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n response.blob().then((blob) =>\r\n {\r\n const texture = new Texture();\r\n\r\n const url = URL.createObjectURL(blob);\r\n\r\n const image = new Image();\r\n image.src = url;\r\n\r\n image.onload = () =>\r\n {\r\n texture.image = image;\r\n texture.needsUpdate = true;\r\n\r\n resource_container.set_resource(this.resource_id, this.url, texture);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n };\r\n\r\n image.onerror = () =>\r\n {\r\n console.error('Error loading texture. Maybe the resource is not an image?', this.url);\r\n };\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { TextureLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\n\nclass VideoLoader extends AbstractLoader\n{\n constructor(resource_id, url, size)\n {\n super(resource_id, url, size);\n }\n\n on_preloaded_finished(resource_container, response)\n {\n if (resource_container.resources_by_url[this.url] === undefined)\n {\n response.blob().then((blob) =>\n {\n resource_container.set_resource(this.resource_id, this.url, URL.createObjectURL(blob));\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n });\n }\n else\n {\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n }\n }\n}\n\nexport { VideoLoader };\n","import { ResourceContainer } from '../ResourceContainer';\r\n\r\nclass ResourceBatch\r\n{\r\n constructor(batch_name)\r\n {\r\n this.resource_loaders = [];\r\n this.batch_name = batch_name || 'unnamed batch';\r\n }\r\n\r\n add_loader(loader)\r\n {\r\n this.resource_loaders.push(loader);\r\n }\r\n\r\n load(resource_container)\r\n {\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n this.resource_loaders[i].load(resource_container || ResourceContainer);\r\n }\r\n }\r\n\r\n get loading_finished()\r\n {\r\n let finished = true;\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n finished = finished && this.resource_loaders[i].has_finished;\r\n }\r\n return finished;\r\n }\r\n\r\n get has_errors()\r\n {\r\n let has_error = false;\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n has_error = has_error || this.resource_loaders[i].has_error;\r\n }\r\n return has_error;\r\n }\r\n\r\n print_errors()\r\n {\r\n console.error('Batch <' + this.batch_name + '> could not load successfully');\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n if (this.resource_loaders[i].has_error)\r\n {\r\n this.resource_loaders[i].print_error();\r\n }\r\n }\r\n }\r\n\r\n get_progress()\r\n {\r\n return this.get_loaded_bytes() / this.get_total_bytes();\r\n }\r\n\r\n get_loaded_bytes()\r\n {\r\n let loaded_bytes = 1;\r\n\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n loaded_bytes += this.resource_loaders[i].loaded_bytes;\r\n }\r\n\r\n return loaded_bytes;\r\n }\r\n\r\n get_total_bytes()\r\n {\r\n let total_bytes = 1;\r\n\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n total_bytes += this.resource_loaders[i].total_bytes;\r\n }\r\n\r\n return total_bytes;\r\n }\r\n}\r\n\r\nexport { ResourceBatch };\r\n"],"names":["browser","init","this","browser_name","agent","window","navigator","userAgent","toLowerCase","indexOf","opr","chrome","name","is_safari","is_chrome","is_edge","is_edge_chromium","has_webm","is_firefox","has_hvec","preferred_video_extension","Validation","constructor","static","n","Number","is_int","is_float","str","JSON","parse","e","AbstractLoader","resource_id","url","size","loaded_bytes","total_bytes","has_finished","has_error","error_message","__update_downloaded_bytes","loaded","total","is_number","console","warn","__loading_ended","__set_error","message","print_error","error","load","resource_container","undefined","resources_by_url","cache","Browser","fetch","method","mode","credentials","redirect","then","on_progress","bind","catch","__on_error","set_resource","async","response","response_clone","clone","reader","body","getReader","contentLength","headers","get","receivedLength","done","value","read","length","on_preloaded_finished","data","OMath","from_range_start_value","from_range_end_value","to_range_start_value","to_range_end_value","min","max","number","divisor","rgb","r","Math","round","toString","g","b","points","plane","projected_point","Vector3","points_on_plane","i","projectPoint","push","from","to","target","t","elements","lerp","x1","x2","abs","x","y","m","euclideanModulo","degrees","PI","radians","v","w","z","center","add","multiplyScalar","arr","col","floor","random","clamp","ActionSequencer","context","elapsed_time","playback_speed","playing","action_events","initial_context","stringify","tmp_t","channels","channel_names","Object","keys","duration","play","stop","reset","skip","get_duration","__play_clips","update","delta_time","set_progress","time","set_normalized_progress","get_progress","is_finished","add_action_event","trigger_time","action","add_action_interpolator","interpolator","use_dynamic_from_value","keyframes","attribute_name","keyframe","get_current_target_value","__get_current_keyframe","evaluate","get_current_starting_value","get_current_progress","__linear_map_01","easing_function","EPSILON","trigger","evaluate_keyframe","get_keyframes","channel_name","is_channel_redefined","initial","saturate","current","Infinity","distance","EasingFunctions","cos","sin","pow","sqrt","c4","ease_out_bounce","n1","d1","sign","ActionInterpolator","NumberInterpolator","super","view_context","app","set_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","split","trigger_name","trigger_method","at_time","value_data","to_value","from_time","to_time","sort","a","x_pos","ActionSequencerBuilder","default_state_data","from_animation_sheet","animation_data","current_context","tracks","initial_tracks","state_to_tracks","get_longest_time","find","element","sequencer","action_event","state","longest_time","from_draw_io","xml","transition_data","track_time","event_manager","queue","zoom_changed_evt","store_clickd_evt","point_selected_evt","config_changed","path_substep_completed","path_completed","go_to_store_requested_evt","resource_loaded_evt","service_clicked_evt","unit_pos_updated_evt","floor_changed_evt","on_enter_floor_navigation","on_exit_floor_navigation","on_enter_floor_selection","on_exit_floor_selection","on_enter_outside_navigation","on_exit_outside_navigation","step_selected_evt","fire","event","payload","on","callback","fire_zoom_changed","zoom","fire_store_selected","store_id","fire_point_selected","hit_data","fire_config_changed","fire_path_substep_completed","step_number","fire_path_completed","fire_step_selected","step_index","fire_go_to_store_requested","fire_resource_loaded","resource","fire_service_clicked","service","fire_unit_position_updated","unit_data","fire_floor_switched","floor_id","fire_on_enter_floor_navigation","fire_on_exit_floor_navigation","fire_on_enter_floor_selection","fire_on_exit_floor_selection","fire_on_enter_outside_navigation","fire_on_exit_outside_navigation","resources","EventManager","get_resource","HTMLUtilities","container","images","image","dataset","src","image_objects","image_object","videos","video","TransitionTable","transitions","from_state_name","to_state_name","add_transitions","set_transitions","set_default_state_data","delta_buffer","___time","Clock","__raw_delta_time","__elapsed_time","__allocated_time","Vector2","shader_time","__update","getDelta","getElapsedTime","shift","__calculate_delta_time","ViewState","start","show","hide","before_enter","on_enter","update_enter_transition","global_view_data","transition_progress","action_sequencer","update_transition","update_exit_transition","before_exit","on_exit","ViewStateTransitionHandler","transition_table","last_state","current_state","current_state_data","transitioning","go_to_state","__exit_last_state","__update_transitions","set_state","assign","Time","view_manager","views","transition_handler","view_change_subscribers","browser_title_suffix","__set_views_opacities","go_to_view","view_name","change_url","__change_browser_url","__change_browser_title","notify_view_change","go_to_scene","scene_name","next_view","transition_view","set_next_view","subscribe_to_view_change","subscriber","on_view_change","register_view","view","has_view","set_view","set_browser_title_suffix","title_suffix","get_current_view","get_view_by_name","get_view_by_url","get_by_url","history","pushState","title","__capitalize","document","set_opacity","string","aux_string","toUpperCase","replace","__snake_to_whitespace","group","ApplicationView","ResourceContainer","ViewManager","classList","remove","load_html_images","load_images","load_html_videos","load_videos","style","opacity","BaseApplication","on_post_start","on_post_render","on_pre_render","on_frame_end","BaseRender","render","renderer","resize","dispose","BaseShaderMaterial","ShaderMaterial","vert","frag","uniforms","vertexShader","basic_vert","fragmentShader","basic_frag","_Color","Color","BlitMaterial","frag_shader","vert_shader","defines","_MainTex","_Resolution","_TargetResolution","depthWrite","blending","NoBlending","depthTest","depthFunc","AlwaysDepth","AddMaterial","nMips","_SecondTex","set_add_texture","tex","UnrealBloomComposeMaterial","NUM_MIPS","_BlurredTex","_BloomStrength","blurTexture1","blurTexture2","blurTexture3","blurTexture4","blurTexture5","bloomStrength","bloomFactors","bloomRadius","bloomTintColors","set_RT_0","rt","set_RT_1","set_RT_2","set_RT_3","set_RT_4","set_bloom_strength","set_bloom_radius","set_tint_color_0","col_string","set","set_tint_color_1","set_tint_color_2","set_tint_color_3","set_tint_color_4","camera_manager","_current","_spectator","camera","spectator","capabilities","max_anisotropy","vertex_texture_sampler_available","fp_textures_available","CanvasDrawer","uses_dynamic_font","__textHeight","canvas","createElement","ctx","getContext","getFontHeight","fontStyle","getElementsByTagName","dummy","dummyText","createTextNode","appendChild","setAttribute","offsetHeight","removeChild","get_text_size","text","font","ceil","measureText","width","draw_canvas","ctxOptions","font_color","__draw","draw_on_texture","canvas_texture","CanvasTexture","UVMapping","ClampToEdgeWrapping","NearestFilter","generateMipMaps","needsUpdate","roundRect","height","radius","fill","stroke","tl","tr","br","bl","defaultRadius","side","beginPath","moveTo","lineTo","quadraticCurveTo","closePath","configuration","parameters","dpr","from_json","json","Idle","is_animating","Animating","easing_function_t","animator","set_property_value","set_current_state","finished_callback","CSSAnimator","css_property","value_prefix","value_suffix","ease_in_out_cubic","animate","AxisHelper","Object3D","scale","blue_points","blue_axis_mat","LineBasicMaterial","color","blue_axis_geo","BufferGeometry","setFromPoints","blue_axis_line","Line","renderOrder","green_points","green_axis_mat","green_axis_geo","green_axis_line","red_points","red_axis_mat","red_axis_geo","red_axis_line","scene_manager","Scene","add_scene","scene","traverse","child","geometry","material","children","Cube","Mesh","segments","BoxGeometry","MeshBasicMaterial","Sphere","SphereBufferGeometry","Arrow","dir","cylinder_height","cylinder_geo","CylinderBufferGeometry","translate","cone_geometry","ConeBufferGeometry","cone_height","buffer_geometry","BufferGeometryUtils","mergeBufferGeometries","rotateX","quaternion","setFromUnitVectors","_dir","oscreen","position","render_width","render_height","width_height","pixel_size","update_position","size_changed","update_size","apply_pixel_density_v2","vector2","apply_pixel_density","get_pixel_size","aspect_ratio","portrait","ScreenSpaceTextureMaterial","h","_ScreenSpacePosition","_ScreenSize","_TextureSize","set_position","set_texture","set_screen_size","PerspectiveCamera","TPerspectiveCamera","fov","aspect","near","far","clear_color","clear_alpha","copy","debug","Vector3_one","Vector3_zero","canvas_renderer","display_texture_meshes","draw_arrow","origin","arrow","normalize","SceneManager","draw_axis","axis","set_debug_RT","RT","rt_debug","draw_rectangle","position_2d","fillStyle","fillRect","clear","clearRect","draw_line_2D","strokeStyle","draw_line","line","frustumCulled","draw_cube","pos","cube","draw_oriented_cube","depth","distanceTo","sub","forward_dir","draw_plane","PlaneGeometry","Vector4","basic_color_vert","basic_color_frag","transparent","draw_empty_cube","box","Box3","setFromCenterAndSize","helper","Box3Helper","draw_sphere","sphere","draw_point_array","input_points","open","catmull","CatmullRomCurve3","updateArcLengths","getSpacedPoints","draw_sphere_helper","SphereGeometry","sphere_mesh","draw_math_sphere","sphere1","draw_bounding_box","bb","draw_curve","curve","options","offset","draw_texture","mesh","graphics","OScreen","ClearDepthNormalMaterial","clear_depth","clear_normal","_DepthNormal","DepthNormalMaterial","_FarPlane","far_plane","DepthAndNormalsRenderer","WebGLRenderTarget","clear_depth_normal_mat","depth_normal_material","__resize_RT_if_necessary","blit_clear_with_material","CameraManager","setSize","render_target","Blitter","_blit_scene","_blit_material","_blit_quad","_blit_camera","OrthographicCamera","blit","dst","src_texture","isWebGLRenderTarget","texture","src_width","src_height","getSize","__render","material_pass","mat","blit_with_material","dst_RT","current_rt","getRenderTarget","setRenderTarget","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","WebGLRenderer","xr","enabled","autoClear","setPixelRatio","Configuration","extensions","domElement","Capabilities","getMaxAnisotropy","maxVertexTextures","is_floating_point_texture_available","resize_observer","ResizeObserver","on_resize","observe","dom_element","depth_normals_RT","new_state","__update_current_camera","updateProjectionMatrix","updateMatrix","updateMatrixWorld","override_mat","__apply_override_material","render_scene","overrideMaterial","readback_RT","buffer","readRenderTargetPixels","clear_stencil","setClearColor","entries","entry","contentRect","setViewport","src_RT","take_screenshot","blob_callback","old_width","old_height","new_width","new_height","tile_width","tile_height","divisions_x","parseInt","divisions_y","old_dpr","getPixelRatio","ctx_2D","setViewOffset","drawImage","toBlob","clearViewOffset","download_screenshot","blob","link","download","href","URL","createObjectURL","click","onclick","requestAnimationFrame","revokeObjectURL","removeAttribute","minFilter","magFilter","format","RGBAFormat","encoding","LinearEncoding","type","FloatType","stencilBuffer","depthBuffer","output","Float32Array","NormalMaterial","DebugNormalsRender","Graphics","KeyboardInput","ctrlz_pressed","ctrlz_fired","keys_keys","addEventListener","on_key_down","on_key_up","keyCode","ctrlKey","key","press_key","release_key","pressed","released","key_name","fired","down","release_keys","is_key_pressed","is_key_down","is_key_released","register_key","unregister_key","removeEventListener","input","InputController","clicked","captured_NDC","current_NDC_delta","keyboard","keyboard_input_container","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","match","is_ipad","maxTouchPoints","is_ios","is_android","get_os","is_linux","is_mac","is_windows","platform","test","reflection_plane_context","target_geometry","target_position","set_target_geometry","GeometryBatch","batch_width","data_textures","object_names","zero_offset","write_offset","uniform_dirty_count","tmp_uploaded_data_count","add_global_uniform","set_global_uniform","add_object_uniform_v3","uniform_name","default_value_v3","src_tex","__create_rgb_texture","dst_tex","one_pixel_tex","new_data_tex","__add_data_texture","__flood_data_texture_rgb","add_object_uniform_v4","default_value_v4","__create_rgba_texture","__flood_data_texture_rgba","add_object_uniform_v4_float","__create_rgba_float_texture","set_object_uniform_v3","object_name","vector3","use_r","use_g","use_b","obj_index","__get_object_index","data_texture","__get_data_texture","__set_pixel_rgb","one_pixel","last_accessed_index","dirty_count","set_object_uniform_v4","vector4","use_a","__set_pixel_rgba","upload_texture_data","upload_budget","__partial_texture_data_upload","__full_texture_data_upload","get_uniform_dirty_count","texture_data","copyTextureToTexture","index","get_mesh","v3","v4","Uint8Array","DataTexture","RGBFormat","dst_texture","one_pixel_text","geometry_batcher","batches","batch","buffer_geometries","attr_accessor_uvs","texture_width","ceilPowerOfTwo","__init_uv_array","uv_index","vertex_count","count","buffer_attribute","BufferAttribute","uvs","ui","ui_elements","_tmp_normalized_pos","ss_scene","matrixWorldAutoUpdate","ws_scene","ss_camera","delete_element","elem","splice","add_screen_space_element","set_screen_space_coordinate_system","add_world_space_element","set_world_space_coordinate_system","Input","update_state","current_clicked_element","camera_utilities","tmp_mat","Matrix4","Plane","ray","Ray","tmp_size","tmp_unproj","get_up_dir","tmp_vec","applyQuaternion","get_forward_dir","get_right_dir","unproject_mouse_position","v_fov","h_fov","atan","tan","distV","distH","get_plane_intersection","plane_position","plane_normal","setFromNormalAndCoplanarPoint","isPerspectiveCamera","unproject","intersectPlane","fit_points_on_camera","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","get_zoom_to_fit_box","isOrthographicCamera","obj_x","obj_y","object_aspect","get_html_screen_pos","object","getWorldPosition","project","world_pos_to_screen","update_projection","left","top","bottom","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","blur","NormalAORender","ssao_mat","ssao_compose_mat","debug_normals","ssaa","use_ssaa","main_RT","SSAO_RT","blurrer","__check_RT_size","__update_uniforms","projectionMatrix","NormalRender","VRRender","render_spectator_camera","spectator_camera","isPresenting","xrCam","getCamera","currentRenderTarget","GaussianBlurMaterial","kernel_radius","KERNEL_RADIUS","SIGMA","texSize","direction","set_size","set_direction","LuminosityHighPassMaterial","luminosityThreshold","smoothWidth","defaultColor","defaultOpacity","GaussianBlurrer","current_width","current_height","separableBlurMaterials","renderTargetsHorizontal","renderTargetsVertical","kernelSizeArray","rt_pars","LinearFilter","renderTargetBright","generateMipmaps","init_materials","init_RT","luminosity_high_pass_mat","use_luminosity_high_pass","resize_RT","inputRenderTarget","get_blurred_texture","get_blurred_RT","dispose_RT","hor","ver","texture_height","dispose_materials","UnrealBloomRender","bloom_compose_mat","blur_RT","add_mat","val","TOrthographicCamera","view_component_manager","components","enabled_components","Set","__set_components_opacities","component","register_component","enable_component","disable_component","delete","get_component_by_name","component_name","RenderLoop","target_application","is_running","frames_passed","ViewComponentManager","setAnimationLoop","screen","SimpleTextDrawer","text_margin","text_size","globalAlpha","textBaseline","textAlign","fillText","ViewComponent","hidden","toggle_hidden","HorizontalPlane","VerticalPlane","ArrayUtilities","source","apply","array","items_left_count","closest_point","closest_distance","obj","ids","FrustumPointFitter","fit_points","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","sample_count","face_areas","min_area","normals","tangents","faces","index_0","index_1","index_2","v1","v2","face","c","n2","n3","normal","tangent","uv_a","uv_b","uv_c","area","get_face_area","normalized_faces_array","get_uniform_face_distribution","selected_faces","select_random_faces","sample_data_from_faces","sampled_points","sampled_normals","sampled_tangents","sampled_uvs","w1","w2","sample_point_in_face","amount","selected_face","minimum_area","extended_triangle_indices","repetitions_needed","j","vec1","vec2","w3","model_utilities","result_callback","fromGeometry","get_geometries","geometries","assign_material","clone_animated_gltf","gltf","animations","skinnedMeshes","isSkinnedMesh","cloneBones","cloneSkinnedMeshes","isBone","skeleton","cloneSkinnedMesh","orderedCloneBones","bones","cloneBone","Skeleton","boneInverses","matrixWorld","set_shadow_config","cast","receive","castShadow","receiveShadow","__find_object","get_object","get_object_by_type","object_type","ObjectUtilities","item","Array","isArray","sources","is_object","merge_deep","nodeType","attributes","attribute","nodeName","nodeValue","hasChildNodes","childNodes","xml_to_json","old","StringUtilities","hexValues","hex","words","substr","join","charAt","slice","TimeUtilities","time_str_to_ms","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","total_length","parent","copy_color","WorldImage","pivot","_ScreenAligned","_Scale","_Opacity","DoubleSide","current_scale","computeBoundingBox","tmp_bb_size","boundingBox","update_texture","img","screen_aligned","boolean","Text2D","is_static","simple_text_drawer","draw_settings","LinearMipMapLinearFilter","UIElementMaterial","intensity","_PixelOffset","_NDC","_PivotPoint","_DepthOffset","ScreenSpacePosition","get_pos_NDC","WorldSpacePosition","tmp_vec3","tmp_vec2","UIElementState","ui_element","normalized_mouse_position","OnIdle","is_mouse_over","_on_enter_state","OnMouseEnter","on_mouse_enter","_on_hover_state","_on_exit_state","OnMouseExit","on_mouse_exit","_on_idle_state","OnMouseHover","__trigger_on_hover","on_mouse_hover","UIElement","is_clickable","position_strategy","_position","on_hover","mouse_pos_tmp","cached_NDC_position","screen_pos_tmp","texture_size","matrixAutoUpdate","pixel_offset","set_render_order","pivot_point","set_pixel_offset","use_depth","depth_offset","clear_state","visible","get_size","normalized_mouse_pos","to_screen_position","rect","Box2","containsPoint","projected_pos","get_screen_space_position","set_screen_space_position","screen_pos","UpdatableMaterialMesh","self","onBeforeRender","TextGlyph","plane_bounds","atlas_bounds","SDFText","glyph_layout","glyphs","glyph_is_dirty","matrix_is_dirty","color_is_dirty","matrix","__opacity","__text","__generate_glyphs","update_matrix","compose","clear_glyph_dirty","clear_color_dirty","set_rotation","tilt","new_orientation","new_tilt","multiply","set_color","set_pivot","update_glyphs","op","cursor","unicode","charCodeAt","glyph","planeBounds","text_glyph","atlasBounds","advance","box2","first_glyph","union","box2_size","SDFTextMaterial","_Texture","_Boldness","_AtlasSize","set_atlas_size","set_boldness","SDFTextBatch","font_layout","atlas_texture","instanced_geometry","InstancedBufferGeometry","instanceCount","Float32BufferAttribute","transformsCol0","InstancedBufferAttribute","max_allocations","transformsCol1","transformsCol2","transformsCol3","glyph_bounds","usage","DynamicDrawUsage","text_elements","atlas","add_text","text_str","remove_text","text_elem","remove_elem","force_update","glyph_bounds_atr","plane_bounds_atr","color_atr","matrix_needs_update","glyph_needs_update","color_needs_update","glyph_count","glyph_i","buffer_i","setXYZW","VectorInterpolator","tmp","MedianFilterMaterial","kernel3x3","_SourceTex","_SourceTexSize","isVideoTexture","videoWidth","videoHeight","isTexture","MedianFilter","median_filter_mat","filter","tex_size","DualFilteringBlurMaterial","upsample","AlphaFilterMaterial","use_alpha_mask","_Offset","DualFilteringBlurrer","RT0","RT3","RT4","upscale_blur_mat","downscale_blur_mat","alpha_filter_mat","check_RT_resize","ParticleAttribute","attr_name","update_material","write","init_from_geometry","init_from_attribute","particle_attribute","build_RT","particle_count","resolution","calculate_resolution","HalfFloatType","swap_RT","attribute_writter_scene","store_geometry_attribute_in_RT","storage_material","deleteAttribute","get_texture","GPUParticleSystem","build_point_mesh","attribute_writter_mesh","build_attribute_writter_mesh","add_texture_attribute","add_update_attribute_array","item_size","add_attribute_array","instance_count","geo","instanced_geo","build_uv_storage_attribute","Points","ParticleStorageMaterial","ParticlePositionAttribute","store_geometry","pos_attr","store_positions","CustomDataTexture","multiplier","set_rgba","set_rgb","set_r","set_g","set_b","set_a","RGBDataTexture","RGBADataTexture","RGBFloatDataTexture","RGBAFloatDataTexture","BatchedMesh","id_table","max_texture_width","batched_count","batch_height","attach_rgb_texture","attach_rgba_texture","attach_rgb_float_texture","attach_rgba_float_texture","get_mesh_index","set_rgb_value","mesh_name","set_rgba_value","MeshBatcher","meshes","attr_mesh_id","create_batched_mesh","AudioClip","loop","volume","positional","audio","audio_listener","TPositionalAudio","TAudio","setBuffer","setLoop","gain","setVolume","pause","is_playing","isPlaying","AudioLoader","instantiate_audio","AudioContext","createBuffer","arrayBuffer","array_buffer","decodeAudioData","audio_buffer","BasisLoader","loader","basis","xhr","msg","CubemapLoader","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","Texture","Image","onload","onerror","original_url","TextureLoader","VideoLoader","ResourceBatch","batch_name","resource_loaders","add_loader","loading_finished","finished","has_errors","print_errors","get_loaded_bytes","get_total_bytes"],"mappings":"+sDA8EK,MAACA,GAAU,IA7EhB,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,QAGvB,CAEGS,WAEF,OAAOV,KAAKC,YACb,CAEGU,gBAEF,MAA6B,WAAtBX,KAAKC,YACb,CAEGW,gBAEF,MAA6B,WAAtBZ,KAAKC,YACb,CAEGY,cAEF,MAA6B,YAAtBb,KAAKC,YACb,CAEGa,uBAEF,MAA6B,kBAAtBd,KAAKC,YACb,CAEGc,eAEF,OAAOf,KAAKY,WAAaZ,KAAKgB,YAAchB,KAAKc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