ohzi-core 10.5.0 → 10.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.module.js +1 -1
- package/build/index.module.js.map +1 -1
- package/package.json +1 -1
- package/src/BaseApplication.js +6 -0
- package/src/Browser.js +1 -1
- package/src/Debug.js +11 -10
- package/src/RenderLoop.js +16 -0
- package/src/Time.js +49 -13
- package/src/action_sequencer/ActionSequencer.js +23 -11
- package/src/view_components/ViewManager.js +10 -0
- package/src/view_components/ViewState.js +8 -0
- package/src/view_components/transition/ViewStateTransitionHandler.js +10 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.js","sources":["../src/Browser.js","../src/utilities/Validation.js","../src/resource_loader/AbstractLoader.js","../src/utilities/OMath.js","../src/action_sequencer/ActionSequencer.js","../src/utilities/EasingFunctions.js","../src/action_sequencer/ActionInterpolator.js","../src/action_sequencer/NumberInterpolator.js","../src/view_components/ViewContext.js","../src/action_sequencer/ActionEvent.js","../src/view_components/transition/DrawIOAnimationSheet.js","../src/view_components/transition/ActionSequencerBuilder.js","../src/EventManager.js","../src/ResourceContainer.js","../src/utilities/HTMLUtilities.js","../src/view_components/transition/TransitionTable.js","../src/Time.js","../src/view_components/ViewState.js","../src/view_components/transition/ViewStateTransitionHandler.js","../src/view_components/ViewManager.js","../src/view_components/ApplicationView.js","../src/BaseApplication.js","../src/render_mode/BaseRender.js","../src/materials/BaseShaderMaterial.js","../src/materials/BlitMaterial.js","../src/materials/AddMaterial.js","../src/materials/UnrealBloomComposeMaterial.js","../src/CameraManager.js","../src/Capabilities.js","../src/canvas_drawer/CanvasDrawer.js","../src/Configuration.js","../src/html_utilities/css_animator_states/Idle.js","../src/html_utilities/css_animator_states/Animating.js","../src/html_utilities/CSSAnimator.js","../src/components/AxisHelper.js","../src/SceneManager.js","../src/primitives/Cube.js","../src/primitives/Sphere.js","../src/primitives/Arrow.js","../src/OScreen.js","../src/materials/ScreenSpaceTextureMaterial.js","../src/PerspectiveCamera.js","../src/Debug.js","../src/materials/ClearDepthNormalMaterial.js","../src/materials/DepthNormalMaterial.js","../src/render_utilities/DepthAndNormalsRenderer.js","../src/render_utilities/Blitter.js","../src/Graphics.js","../src/materials/NormalMaterial.js","../src/render_mode/DebugNormalsRender.js","../src/KeyboardInput.js","../src/OS.js","../src/ReflectionPlaneContext.js","../src/static_batcher/GeometryBatch.js","../src/static_batcher/GeometryBatcher.js","../src/UI.js","../src/utilities/PerspectiveFrustumPointFitter.js","../src/utilities/OrthographicFrustumPointFitter.js","../src/utilities/CameraUtilities.js","../src/Initializer.js","../src/materials/SSAOMaterial.js","../src/materials/SSAOComposeMaterial.js","../src/materials/DisplayNormalTextureMaterial.js","../src/materials/BoxBlurMaterial.js","../src/render_utilities/Blurrer.js","../src/render_mode/NormalAORender.js","../src/render_mode/NormalRender.js","../src/render_mode/VRRender.js","../src/materials/GaussianBlurMaterial.js","../src/materials/LuminosityHighPassMaterial.js","../src/render_utilities/GaussianBlurrer.js","../src/render_mode/UnrealBloomRender.js","../src/OrthographicCamera.js","../src/view_components/ViewComponentManager.js","../src/RenderLoop.js","../src/Screen.js","../src/canvas_drawer/SimpleTextDrawer.js","../src/view_components/ViewComponent.js","../src/primitives/HorizontalPlane.js","../src/primitives/VerticalPlane.js","../src/utilities/ArrayUtilities.js","../src/utilities/FrustumPointFitter.js","../src/utilities/GeometryUtilities.js","../src/utilities/ImageUtilities.js","../src/utilities/MeshSampler.js","../src/utilities/ModelUtilities.js","../src/utilities/ObjectUtilities.js","../src/utilities/StringUtilities.js","../src/utilities/TimeUtilities.js","../src/components/Grid.js","../src/components/Line.js","../src/components/WorldImage.js","../src/components/Text2D.js","../src/materials/UIElementMaterial.js","../src/ui/ui_element_position/ScreenSpacePosition.js","../src/ui/ui_element_position/WorldSpacePosition.js","../src/ui/ui_element_state/UIElementState.js","../src/ui/ui_element_state/OnIdle.js","../src/ui/ui_element_state/OnMouseEnter.js","../src/ui/ui_element_state/OnMouseExit.js","../src/ui/ui_element_state/OnMouseHover.js","../src/components/UIElement.js","../src/components/UpdatableMaterialMesh.js","../src/components/sdf_text/TextGlyph.js","../src/components/sdf_text/SDFText.js","../src/materials/SDFTextMaterial.js","../src/components/sdf_text/SDFTextBatch.js","../src/action_sequencer/VectorInterpolator.js","../src/materials/MedianFilterMaterial.js","../src/render_utilities/MedianFilter.js","../src/materials/DualFilteringBlurMaterial.js","../src/materials/AlphaFilterMaterial.js","../src/render_utilities/DualFilteringBlurrer.js","../src/gpu_particles/ParticleAttribute.js","../src/gpu_particles/GPUParticleSystem.js","../src/materials/gpu_particles/ParticleStorageMaterial.js","../src/gpu_particles/ParticlePositionAttribute.js","../src/data_textures/CustomDataTexture.js","../src/data_textures/RGBDataTexture.js","../src/data_textures/RGBADataTexture.js","../src/data_textures/RGBFloatDataTexture.js","../src/data_textures/RGBAFloatDataTexture.js","../src/static_batcher/BatchedMesh.js","../src/static_batcher/MeshBatcher.js","../src/components/AudioClip.js","../src/resource_loader/AudioLoader.js","../src/resource_loader/BasisLoader.js","../src/resource_loader/CubemapLoader.js","../src/resource_loader/DAELoader.js","../src/resource_loader/FileLoader.js","../src/resource_loader/FontLoader.js","../src/resource_loader/GLTFLoader.js","../src/resource_loader/GLTFDRACOLoader.js","../src/resource_loader/HDRCubeTextureLoader.js","../src/resource_loader/JSONLoader.js","../src/resource_loader/OBJLoader.js","../src/resource_loader/PointArrayLoader.js","../src/resource_loader/RGBETextureLoader.js","../src/resource_loader/TextLoader.js","../src/resource_loader/AsyncTextureLoader.js","../src/resource_loader/TextureLoader.js","../src/resource_loader/VideoLoader.js","../src/resource_loader/ResourceBatch.js"],"sourcesContent":["\nclass Browser\n{\n init()\n {\n this.browser_name = '';\n this.agent = window.navigator.userAgent.toLowerCase();\n\n // vr specific\n this.vrBrowserKeywords = ['oculus', 'vive', 'rift', 'windowsmr', 'cardboard', 'daydream'];\n this.vrBrowser = this.vrBrowserKeywords.find(keyword => this.agent.includes(keyword));\n // Check for WebXR support (indicating VR capabilities)\n this.hasWebXRSupport = 'xr' in navigator;\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 case this.vrBrowser && this.hasWebXRSupport:\n this.browser_name = this.vrBrowser;\n break;\n default:\n this.browser_name = 'other';\n break;\n }\n\n this.version = this.get_version();\n }\n\n get name()\n {\n return this.browser_name;\n }\n\n get is_safari()\n {\n return this.browser_name === 'safari';\n }\n\n get is_chrome()\n {\n return this.browser_name === 'chrome';\n }\n\n get is_edge()\n {\n return this.browser_name === 'edge_ie';\n }\n\n get is_edge_chromium()\n {\n return this.browser_name === 'edge_chromium';\n }\n\n get is_vr()\n {\n return this.vrBrowserKeywords.includes(this.browser_name);\n }\n\n get has_webm()\n {\n return !!(this.is_chrome || this.is_firefox || this.is_edge_chromium);\n }\n\n get has_hvec()\n {\n return this.is_safari;\n }\n\n get preferred_video_extension()\n {\n return this.has_webm ? 'webm' : this.has_hvec ? 'hvec.mp4' : 'mp4';\n }\n\n get_version()\n {\n const ua = navigator.userAgent;\n let tem = '';\n let version = 0;\n\n let M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\\/))\\/?\\s*(\\d+)/i) || [];\n\n if (/trident/i.test(M[1]))\n {\n tem = /\\brv[ :]+(\\d+)/g.exec(ua) || [];\n version = 'IE ' + (tem[1] || '');\n }\n if (M[1] === 'Chrome')\n {\n tem = ua.match(/\\b(OPR|Edge)\\/(\\d+)/);\n if (tem != null) version = tem.slice(1).join(' ').replace('OPR', 'Opera');\n }\n\n M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, '-?'];\n if ((tem = ua.match(/version\\/(\\d+(\\.\\d+)?)/i)) != null) M.splice(1, 1, tem[1]);\n\n version = M.join(' ');\n\n return Number(version.split(' ')[1]);\n }\n}\n\nconst browser = new Browser();\nexport { browser as Browser };\n","class Validation\n{\n constructor()\n {}\n\n static is_int(n)\n {\n return Number(n) === n && n % 1 === 0;\n }\n\n static is_float(n)\n {\n return Number(n) === n && n % 1 !== 0;\n }\n\n static is_number(n)\n {\n return this.is_int(n) || this.is_float(n);\n }\n\n static is_json(str)\n {\n try\n {\n JSON.parse(str);\n }\n catch (e)\n {\n return false;\n }\n\n return true;\n }\n}\n\nexport { Validation };\n","import { Browser } from '../Browser';\r\nimport { Validation } from '../utilities/Validation';\r\n\r\nclass AbstractLoader\r\n{\r\n constructor(resource_id, url, size = 1)\r\n {\r\n this.resource_id = resource_id;\r\n this.url = url;\r\n this.loaded_bytes = 0;\r\n this.total_bytes = size;\r\n\r\n this.has_finished = false;\r\n this.has_error = false;\r\n this.error_message = 'none';\r\n }\r\n\r\n __update_downloaded_bytes(loaded, total)\r\n {\r\n loaded = Validation.is_number(loaded) ? loaded : 1;\r\n total = Validation.is_number(total) ? total : 1;\r\n\r\n this.loaded_bytes = loaded;\r\n\r\n if (total > 0)\r\n {\r\n this.total_bytes = total;\r\n }\r\n\r\n if (this.loaded_bytes > this.total_bytes)\r\n {\r\n console.warn('Total bytes is smaller than loaded ones. Please set total bytes by hand to:', this.url);\r\n }\r\n }\r\n\r\n __loading_ended()\r\n {\r\n this.has_finished = true;\r\n }\r\n\r\n __set_error(message)\r\n {\r\n this.has_error = true;\r\n this.error_message = message;\r\n }\r\n\r\n print_error()\r\n {\r\n console.error('Error while loading ' + this.resource_id + '\\n\\t path: ' + this.url + '\\n\\t\\t' + this.error_message);\r\n }\r\n\r\n load(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n const cache = Browser.is_safari ? 'no-cache' : 'default';\r\n\r\n fetch(this.url, {\r\n method: 'GET', // *GET, POST, PUT, DELETE, etc.\r\n mode: 'cors', // no-cors, *cors, same-origin\r\n cache: cache, // *default, no-cache, reload, force-cache, only-if-cached\r\n credentials: 'same-origin', // include, *same-origin, omit\r\n redirect: 'follow' // manual, *follow, error\r\n })\r\n .then(this.on_progress.bind(this, resource_container))\r\n .catch(this.__on_error.bind(this));\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n\r\n async on_progress(resource_container, response)\r\n {\r\n const response_clone = response.clone();\r\n const reader = response.body.getReader();\r\n\r\n // Step 2: get total length\r\n const contentLength = +response.headers.get('Content-Length');\r\n\r\n // Step 3: read the data\r\n let receivedLength = 0; // received that many bytes at the moment\r\n\r\n while (true)\r\n {\r\n const { done, value } = await reader.read();\r\n\r\n if (done)\r\n {\r\n break;\r\n }\r\n\r\n receivedLength += value.length;\r\n\r\n this.__update_downloaded_bytes(receivedLength, contentLength);\r\n // console.log(`Received ${receivedLength} of ${contentLength}`);\r\n }\r\n\r\n this.on_preloaded_finished(resource_container, response_clone);\r\n }\r\n\r\n on_preloaded_finished(resource_container, response)\r\n {\r\n }\r\n\r\n __on_error(data)\r\n {\r\n console.error(data);\r\n }\r\n}\r\n\r\nexport { AbstractLoader };\r\n","import { Vector3 } from 'three';\n\nclass OMath\n{\n constructor()\n {}\n\n static linear_map(value,\n from_range_start_value,\n from_range_end_value,\n to_range_start_value,\n to_range_end_value)\n {\n return ((value - from_range_start_value) / (from_range_end_value - from_range_start_value)) * (to_range_end_value - to_range_start_value) + to_range_start_value;\n }\n\n static between(value, min, max)\n {\n return (value >= min && value <= max);\n }\n\n static mod(number, divisor)\n {\n return ((number % divisor) + divisor) % divisor;\n }\n\n static rgb_to_hex(rgb)\n {\n rgb.r = Math.round(rgb.r * 255).toString(16);\n rgb.g = Math.round(rgb.g * 255).toString(16);\n rgb.b = Math.round(rgb.b * 255).toString(16);\n\n if (rgb.r.length === 1)\n {\n rgb.r = '0' + rgb.r;\n }\n if (rgb.g.length === 1)\n {\n rgb.g = '0' + rgb.g;\n }\n if (rgb.b.length === 1)\n {\n rgb.b = '0' + rgb.b;\n }\n\n return '#' + rgb.r + rgb.g + rgb.b;\n }\n\n static project_points_on_plane(points, plane)\n {\n const projected_point = new Vector3();\n const points_on_plane = [];\n for (let i = 0; i < points.length; i++)\n {\n plane.projectPoint(points[i], projected_point);\n points_on_plane.push(projected_point.clone());\n }\n\n return points_on_plane;\n }\n\n static matrix4_lerp(from, to, target, t)\n {\n for (let i = 0; i < 16; i++)\n {\n target.elements[i] = this.lerp(from.elements[i], to.elements[i], t);\n }\n }\n\n static equals(x1, x2)\n {\n return Math.abs(x1 - x2) < 0.000001;\n }\n\n static lerp(x, y, t)\n {\n return (1 - t) * x + t * y;\n }\n\n static clamp(value, min, max)\n {\n return Math.max(min, Math.min(max, value));\n }\n\n static euclideanModulo(n, m)\n {\n return ((n % m) + m) % m;\n }\n\n static pingpong(x, length = 1)\n {\n return length - Math.abs(OMath.euclideanModulo(x, length * 2) - length);\n }\n\n static degToRad(degrees)\n {\n return degrees * (Math.PI / 180);\n }\n\n static radToDeg(radians)\n {\n return radians * (180 / Math.PI);\n }\n\n static deg_to_rad(degrees)\n {\n return degrees * (Math.PI / 180);\n }\n\n static rad_to_deg(radians)\n {\n return radians * (180 / Math.PI);\n }\n\n static perspective_divide(v)\n {\n v.x /= v.w;\n v.y /= v.w;\n v.z /= v.w;\n return v;\n }\n\n static points_average(points)\n {\n const center = points[0].clone();\n for (let i = 1; i < points.length; i++)\n {\n center.add(points[i]);\n }\n center.multiplyScalar(1 / points.length);\n return center;\n }\n\n static get_random_color()\n {\n const arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'a', 'b', 'c', 'd', 'e', 'f'];\n\n let col = '#';\n col += arr[Math.floor(Math.random() * 16)];\n col += arr[Math.floor(Math.random() * 16)];\n\n col += arr[Math.floor(Math.random() * 16)];\n col += arr[Math.floor(Math.random() * 16)];\n\n col += arr[Math.floor(Math.random() * 16)];\n col += arr[Math.floor(Math.random() * 16)];\n return col;\n }\n\n static saturate(x)\n {\n return OMath.clamp(x, 0, 1);\n }\n}\n\nexport { OMath };\n","\nimport { OMath } from '../utilities/OMath';\n\nclass ActionSequencer\n{\n constructor(context)\n {\n this.elapsed_time = -0.00001;\n this.playback_speed = this.__get_playback_speed();\n this.playing = false;\n\n this.action_events = [];\n this.context = context;\n\n this.initial_context = JSON.parse(JSON.stringify(context));\n\n this.tmp_t = 0;\n\n this.channels = {};\n\n const channel_names = Object.keys(context);\n for (let i = 0; i < channel_names.length; i++)\n {\n this.channels[channel_names[i]] = [];\n }\n\n this.duration = 0;\n }\n\n play()\n {\n this.playing = true;\n }\n\n stop()\n {\n this.playing = false;\n }\n\n reset()\n {\n this.elapsed_time = -0.00001;\n }\n\n skip()\n {\n const duration = this.get_duration();\n this.__play_clips(this.elapsed_time, duration + 0.0001);\n this.elapsed_time = duration;\n }\n\n update(delta_time)\n {\n if (this.playing)\n {\n this.__play_clips(this.elapsed_time, this.elapsed_time + delta_time * this.playback_speed);\n this.elapsed_time = this.elapsed_time + delta_time * this.playback_speed;\n }\n }\n\n set_progress(time)\n {\n this.elapsed_time = OMath.clamp(time, 0, this.duration);\n this.__play_clips(this.elapsed_time, this.elapsed_time);\n }\n\n set_normalized_progress(t)\n {\n this.elapsed_time = OMath.clamp(t, 0, 1) * this.duration;\n this.__play_clips(this.elapsed_time, this.elapsed_time);\n }\n\n get_progress()\n {\n return OMath.clamp(this.elapsed_time / this.get_duration(), 0, 1);\n }\n\n is_finished()\n {\n return this.elapsed_time > this.get_duration();\n }\n\n add_action_event(trigger_time, action)\n {\n this.action_events.push({\n trigger_time: trigger_time,\n action: action\n });\n\n this.duration = Math.max(this.duration, trigger_time);\n }\n\n add_action_interpolator(from, to, interpolator, use_dynamic_from_value = false)\n {\n if (use_dynamic_from_value)\n {\n const keyframes = this.channels[interpolator.attribute_name];\n\n if (keyframes === undefined)\n {\n console.error(`${interpolator.attribute_name} missing in initial state data.`);\n }\n\n if (keyframes.length === 0)\n {\n interpolator.from = this.initial_context[interpolator.attribute_name];\n }\n else\n {\n interpolator.from = keyframes[keyframes.length - 1].interpolator.to;\n }\n }\n\n const keyframe = {\n from: from,\n to: to,\n interpolator: interpolator\n };\n\n this.duration = Math.max(this.duration, to);\n this.channels[interpolator.attribute_name].push(keyframe);\n }\n\n get_current_target_value(name)\n {\n const keyframe = this.__get_current_keyframe(name, this.elapsed_time);\n\n if (this.elapsed_time < keyframe.from)\n {\n return keyframe.interpolator.evaluate(0);\n }\n\n return keyframe.interpolator.evaluate(1);\n }\n\n get_current_starting_value(name)\n {\n const keyframe = this.__get_current_keyframe(name, this.elapsed_time);\n\n return keyframe.interpolator.evaluate(0);\n }\n\n get_current_progress(name)\n {\n const keyframe = this.__get_current_keyframe(name, this.elapsed_time);\n const t = this.__linear_map_01(this.elapsed_time, keyframe.from, keyframe.to);\n\n return keyframe.interpolator.easing_function(t);\n }\n\n get_duration()\n {\n return this.duration;\n }\n\n __play_clips(from, to)\n {\n for (let i = 0; i < this.action_events.length; i++)\n {\n if (this.action_events[i].trigger_time > from - Number.EPSILON &&\n this.action_events[i].trigger_time < to + Number.EPSILON)\n {\n // console.log(\"Play event: \" + this.action_events[i].action.constructor.name + \" at \"+ this.action_events[i].trigger_time);\n this.action_events[i].action.trigger();\n }\n }\n const channel_names = Object.keys(this.initial_context);\n\n for (let i = 0; i < channel_names.length; i++)\n {\n const name = channel_names[i];\n const keyframe = this.__get_current_keyframe(name, from);\n\n this.context[name] = this.evaluate_keyframe(keyframe, from);\n }\n }\n\n evaluate_keyframe(keyframe, time)\n {\n this.tmp_t = this.__linear_map_01(time, keyframe.from, keyframe.to);\n\n return keyframe.interpolator.evaluate(OMath.clamp(this.tmp_t, 0, 1));\n }\n\n get_keyframes(channel_name)\n {\n return this.channels[channel_name];\n }\n\n is_channel_redefined(channel_name)\n {\n for (let i = 0; i < this.channels[channel_name].length; i++)\n {\n const keyframe = this.channels[channel_name][i];\n\n if (keyframe.interpolator.initial)\n {\n return false;\n }\n }\n\n return true;\n }\n\n __linear_map_01(value,\n from_range_start_value,\n from_range_end_value)\n {\n return OMath.saturate(((value - from_range_start_value) / (from_range_end_value - from_range_start_value)) * (1 - 0) + 0);\n }\n\n __get_current_keyframe(channel_name, time)\n {\n let current = undefined;\n\n const keyframes = this.channels[channel_name];\n\n for (let i = 0; i < keyframes.length; i++)\n {\n const keyframe = keyframes[i];\n\n if (time >= keyframe.from && time <= keyframe.to)\n {\n current = keyframe;\n return current;\n }\n }\n\n let min = Infinity;\n\n for (let i = 0; i < keyframes.length; i++)\n {\n const keyframe = keyframes[i];\n const distance = Math.abs(keyframe.to - time);\n\n if (distance < min)\n {\n current = keyframe;\n min = distance;\n }\n }\n\n return current;\n }\n\n __get_playback_speed()\n {\n const url_params = new URLSearchParams(window.location.search);\n\n const transitions_velocity = url_params.get('transitions_velocity');\n\n if (transitions_velocity)\n {\n return Number(transitions_velocity);\n }\n else\n {\n return 1;\n }\n }\n}\n\nexport { ActionSequencer };\n","class EasingFunctions\n{\n constructor()\n {}\n\n static linear(x)\n {\n return x;\n }\n\n static triangular(x)\n {\n return 1 - Math.abs((x * 2) % (1 * 2) - 1);\n }\n\n static ease_in_sine(x)\n {\n return 1 - Math.cos(x * 3.1415926 / 2);\n }\n\n static ease_out_sine(x)\n {\n return Math.sin(x * 3.1415926 / 2);\n }\n\n static ease_in_out_sine(x)\n {\n return -(Math.cos(3.1415926 * x) - 1) / 2;\n }\n\n static ease_in_cubic(x)\n {\n return x * x * x;\n }\n\n static ease_out_cubic(x)\n {\n return 1 - Math.pow(1 - x, 3);\n }\n\n static ease_in_out_cubic(x)\n {\n return x < 0.5\n ? 4 * x * x * x\n : 1 - Math.pow(-2 * x + 2, 3) / 2;\n }\n\n static ease_in_quad(x)\n {\n return x * x;\n }\n\n static ease_out_quad(x)\n {\n return 1 - (1 - x) * (1 - x);\n }\n\n static ease_in_out_quad(x)\n {\n return x < 0.5\n ? 2 * x * x\n : 1 - Math.pow(-2 * x + 2, 2) / 2;\n }\n\n static ease_in_quart(x)\n {\n return x * x * x * x;\n }\n\n static ease_out_quart(x)\n {\n return 1 - Math.pow(1 - x, 4);\n }\n\n static ease_in_out_quart(x)\n {\n return x < 0.5\n ? 8 * x * x * x * x\n : 1 - Math.pow(-2 * x + 2, 4) / 2;\n }\n\n static ease_in_quint(x)\n {\n return x * x * x * x * x;\n }\n\n static ease_out_quint(x)\n {\n return 1 - Math.pow(1 - x, 5);\n }\n\n static ease_in_out_quint(x)\n {\n return x < 0.5\n ? 16 * x * x * x * x * x\n : 1 - Math.pow(-2 * x + 2, 5) / 2;\n }\n\n static ease_in_expo(x)\n {\n return x === 0 ? 0 : Math.pow(2, 10 * x - 10);\n }\n\n static ease_out_expo(x)\n {\n return x === 1 ? 1 : 1 - Math.pow(2, -10 * x);\n }\n\n static ease_in_out_expo(x)\n {\n return x === 0\n ? 0\n : x === 1\n ? 1\n : x < 0.5\n ? Math.pow(2, 20 * x - 10) / 2\n : (2 - Math.pow(2, -20 * x + 10)) / 2;\n }\n\n static ease_in_circ(x)\n {\n return 1 - Math.sqrt(1 - Math.pow(x, 2));\n }\n\n static ease_out_circ(x)\n {\n return Math.sqrt(1 - Math.pow(x - 1, 2));\n }\n\n static ease_in_out_circ(x)\n {\n return x < 0.5\n ? (1 - Math.sqrt(1 - Math.pow(2 * x, 2))) / 2\n : (Math.sqrt(1 - Math.pow(-2 * x + 2, 2)) + 1) / 2;\n }\n\n static ease_in_back(x)\n {\n return 2.7015 * x * x * x - 1.7015 * x * x;\n }\n\n static ease_out_back(x)\n {\n return 1 + 2.7015 * Math.pow(x - 1, 3) + 1.7015 * Math.pow(x - 1, 2);\n }\n\n static ease_in_out_back(x)\n {\n return x < 0.5\n ? (Math.pow(2 * x, 2) * ((2.5949095 + 1) * 2 * x - 2.5949095)) / 2\n : (Math.pow(2 * x - 2, 2) * ((2.5949095 + 1) * (x * 2 - 2) + 2.5949095) + 2) / 2;\n }\n\n static ease_in_elastic(x)\n {\n const c4 = (2 * Math.PI) / 3;\n\n return x === 0\n ? 0\n : x === 1\n ? 1\n : -Math.pow(2, 10 * x - 10) * Math.sin((x * 10 - 10.75) * c4);\n }\n\n static ease_out_elastic(x)\n {\n return x === 0\n ? 0\n : x === 1\n ? 1\n : Math.pow(2, -10 * x) * Math.sin((x * 10 - 0.75) * 2.0943950) + 1;\n }\n\n static ease_in_out_elastic(x)\n {\n return x === 0\n ? 0\n : x === 1\n ? 1\n : x < 0.5\n ? -(Math.pow(2, 20 * x - 10) * Math.sin((20 * x - 11.125) * 1.3962633)) / 2\n : Math.pow(2, -20 * x + 10) * Math.sin((20 * x - 11.125) * 1.3962633) / 2 + 1;\n }\n\n static ease_in_bounce(x)\n {\n return 1 - this.ease_out_bounce(1 - x);\n }\n\n static ease_out_bounce(x)\n {\n const n1 = 7.5625;\n const d1 = 2.75;\n\n if (x < 1 / d1)\n {\n return n1 * x * x;\n }\n else if (x < 2 / d1)\n {\n return n1 * (x -= 1.5 / d1) * x + 0.75;\n }\n else if (x < 2.5 / d1)\n {\n return n1 * (x -= 2.25 / d1) * x + 0.9375;\n }\n else\n {\n return n1 * (x -= 2.625 / d1) * x + 0.984375;\n }\n }\n\n static ease_in_out_bounce(x)\n {\n return x < 0.5\n ? (1 - this.ease_out_bounce(1 - 2 * x)) / 2\n : (1 + this.ease_out_bounce(2 * x - 1)) / 2;\n }\n\n static heartbeat(t)\n {\n return 1.0 - Math.pow(Math.abs(Math.sin(t + 1.0)), 63.0) * Math.sign(Math.sin(t)) * Math.sin(t + 1.5 + 1.0) * 0.8;\n }\n}\n\nexport { EasingFunctions };\n","import { EasingFunctions } from '../utilities/EasingFunctions';\n\nclass ActionInterpolator\n{\n constructor(easing_function = 'linear')\n {\n this.easing_function = undefined;\n\n if (typeof easing_function === 'string')\n {\n this.easing_function = EasingFunctions[easing_function];\n }\n else\n {\n this.easing_function = easing_function;\n }\n }\n\n update(context, t)\n {\n\n }\n}\n\nexport { ActionInterpolator };\n","import { ActionInterpolator } from './ActionInterpolator';\nimport { OMath } from '../utilities/OMath';\n\nclass NumberInterpolator extends ActionInterpolator\n{\n constructor(attribute_name, from = 0, to = 1, initial = false, easing_function = 'linear')\n {\n super(easing_function);\n\n this.attribute_name = attribute_name;\n this.from = from;\n this.to = to;\n this.initial = initial;\n }\n\n update(context, t)\n {\n context[this.attribute_name] = OMath.lerp(this.from, this.to, this.easing_function(t));\n }\n\n evaluate(t)\n {\n return OMath.lerp(this.from, this.to, this.easing_function(t));\n }\n}\n\nexport { NumberInterpolator };\n","class ViewContext\n{\n constructor()\n {\n this.app = undefined;\n }\n\n set_app(app)\n {\n this.app = app;\n }\n}\n\nconst view_context = new ViewContext();\nexport { view_context as ViewContext };\n","import { ViewContext } from '../view_components/ViewContext';\n\nclass ActionEvent\n{\n constructor(name, method, args)\n {\n this.name = name;\n this.method = method;\n this.args = args;\n }\n\n trigger()\n {\n ViewContext.app[this.name][this.method](...this.args.split(','));\n }\n}\n\nexport { ActionEvent };\n","class DrawIOAnimationSheet\n{\n constructor()\n {\n\n }\n\n parse(xml_document)\n {\n const doc = new DOMParser().parseFromString(xml_document, 'text/xml');\n\n const animation_nodes = doc.querySelectorAll('mxGeometry');\n\n const animation_tracks = [];\n const triggers = [];\n\n for (let i = 0; i < animation_nodes.length; i++)\n {\n const node = animation_nodes[i];\n const parent_node = node.parentElement;\n const data = parent_node.getAttribute('value');\n\n const x_pos = this.get_node_x_position(node);\n\n const from = x_pos / 100;\n const duration = parseFloat(node.getAttribute('width')) / 100;\n\n // is trigger\n if (parent_node.getAttribute('style').includes('rhombus;'))\n {\n const split_data = data.split('.');\n const trigger_name = split_data[0];\n const trigger_method = split_data[1];\n\n triggers.push({\n name: trigger_name,\n method: trigger_method,\n at_time: from + duration * 0.5\n });\n }\n\n const valid_element = parent_node.getAttribute('style').includes('rounded=0;') &&\n !parent_node.getAttribute('style').includes('text;');\n\n if (valid_element && data !== '' && !data.includes(' '))\n {\n const split_data = data.split('=');\n\n const attribute_name = split_data[0];\n\n const value_data = split_data[1].split('--');\n const to_value = parseFloat(value_data[0]);\n const easing_function = value_data[1];\n\n if (split_data.length !== 2)\n {\n console.error('DrawIO data is malformed:', data);\n }\n\n if (value_data.length !== 2)\n {\n console.error('DrawIO data is malformed:', data);\n }\n\n animation_tracks.push({\n attribute_name: attribute_name,\n from_time: from,\n to_time: from + duration,\n to_value: to_value,\n easing_function: easing_function\n });\n }\n }\n\n animation_tracks.sort((a, b) =>\n {\n return a.from_time - b.from_time;\n });\n return {\n animation_tracks: animation_tracks,\n triggers: triggers\n };\n }\n\n get_node_x_position(node)\n {\n const x_pos = node.getAttribute('x');\n return x_pos === null ? 0 : parseFloat(x_pos);\n }\n}\n\nexport { DrawIOAnimationSheet };\n","import { ActionSequencer } from '../../action_sequencer/ActionSequencer';\nimport { NumberInterpolator } from '../../action_sequencer/NumberInterpolator';\nimport { ActionEvent } from '../../action_sequencer/ActionEvent';\nimport { DrawIOAnimationSheet } from './DrawIOAnimationSheet';\n\nclass ActionSequencerBuilder\n{\n constructor(default_state_data)\n {\n this.default_state_data = default_state_data;\n }\n\n from_animation_sheet(animation_data, current_context, initial_context)\n {\n initial_context = initial_context || this.default_state_data;\n const tracks = animation_data.animation_tracks;\n const triggers = animation_data.triggers;\n\n const initial_tracks = this.state_to_tracks(this.default_state_data, this.get_longest_time(animation_data.animation_tracks));\n\n for (let i = 0; i < initial_tracks.length; i++)\n {\n if (tracks.find(element => element.attribute_name === initial_tracks[i].attribute_name) === undefined)\n {\n tracks.push(initial_tracks[i]);\n }\n }\n\n const sequencer = new ActionSequencer(current_context);\n\n for (let i = 0; i < tracks.length; i++)\n {\n const t = tracks[i];\n const interpolator = new NumberInterpolator(\n t.attribute_name,\n current_context[t.attribute_name],\n t.to_value,\n t.initial,\n t.easing_function\n );\n\n sequencer.add_action_interpolator(t.from_time, t.to_time, interpolator, true);\n }\n\n for (let i = 0; i < triggers.length; i++)\n {\n const t = triggers[i];\n const action_event = new ActionEvent(t.name, t.method, t.args);\n sequencer.add_action_event(t.at_time, action_event);\n }\n\n return sequencer;\n }\n\n state_to_tracks(state, longest_time)\n {\n const tracks = [];\n\n const keys = Object.keys(state);\n\n for (let i = 0; i < keys.length; i++)\n {\n tracks.push({\n attribute_name: keys[i],\n from_time: 0,\n to_time: longest_time < 1 ? longest_time : 1,\n to_value: state[keys[i]],\n initial: true,\n easing_function: 'ease_in_out_cubic'\n });\n }\n\n return tracks;\n }\n\n from_draw_io(xml, context)\n {\n const transition_data = (new DrawIOAnimationSheet()).parse(xml);\n const tracks = transition_data.animation_tracks;\n const triggers = transition_data.triggers;\n const sequencer = new ActionSequencer(context);\n\n for (let i = 0; i < tracks.length; i++)\n {\n const t = tracks[i];\n const interpolator = new NumberInterpolator(\n t.attribute_name,\n context[t.attribute_name],\n t.to_value,\n t.initial,\n t.easing_function\n );\n\n sequencer.add_action_interpolator(t.from_time, t.to_time, interpolator, true);\n }\n\n for (let i = 0; i < triggers.length; i++)\n {\n const t = triggers[i];\n const action_event = new ActionEvent(t.name, t.method);\n sequencer.add_action_event(t.at_time, action_event);\n }\n\n return sequencer;\n }\n\n get_longest_time(tracks)\n {\n let longest_time = -1;\n\n for (let i = 0; i < tracks.length; i++)\n {\n const track = tracks[i];\n\n const track_time = track.to_time;\n\n longest_time = track_time > longest_time ? track_time : longest_time;\n }\n\n return longest_time;\n }\n}\n\nexport { ActionSequencerBuilder };\n","class EventManager\n{\n init()\n {\n this.queue = {};\n\n this.zoom_changed_evt = 'zoom_changed';\n this.store_clickd_evt = 'store_clicked';\n this.point_selected_evt = 'point_selected';\n this.config_changed = 'config_changed';\n\n this.path_substep_completed = 'path_substep_completed';\n this.path_completed = 'path_completed';\n this.go_to_store_requested_evt = 'go_to_store_requested';\n\n this.resource_loaded_evt = 'resource_loaded';\n this.service_clicked_evt = 'service_clicked';\n this.unit_pos_updated_evt = 'unit_position_updated';\n\n this.floor_changed_evt = 'floor_changed';\n\n this.on_enter_floor_navigation = 'on_enter_floor_navigation';\n this.on_exit_floor_navigation = 'on_exit_floor_navigation';\n\n this.on_enter_floor_selection = 'on_enter_floor_selection';\n this.on_exit_floor_selection = 'on_exit_floor_selection';\n\n this.on_enter_outside_navigation = 'on_enter_outside_navigation';\n this.on_exit_outside_navigation = 'on_exit_outside_navigation';\n\n this.step_selected_evt = 'step_selected';\n }\n\n fire(event, payload)\n {\n const queue = this.queue[event];\n\n if (queue === undefined)\n {\n return;\n }\n let i = queue.length;\n while (i--)\n {\n queue[i](payload);\n }\n }\n\n on(event, callback)\n {\n if (typeof this.queue[event] === 'undefined')\n {\n this.queue[event] = [];\n }\n\n this.queue[event].push(callback);\n }\n\n fire_zoom_changed(zoom)\n {\n this.fire(this.zoom_changed_evt, zoom);\n }\n\n fire_store_selected(store_id)\n {\n this.fire(this.store_clickd_evt, store_id);\n }\n\n fire_point_selected(hit_data)\n {\n this.fire(this.point_selected_evt, hit_data);\n }\n\n fire_config_changed()\n {\n this.fire(this.config_changed);\n }\n\n fire_path_substep_completed(step_number)\n {\n this.fire(this.path_substep_completed, step_number);\n }\n\n fire_path_completed()\n {\n this.fire(this.path_completed);\n }\n\n fire_step_selected(step_index)\n {\n this.fire(this.step_selected_evt, step_index);\n }\n\n fire_go_to_store_requested(store_id)\n {\n this.fire(this.go_to_store_requested_evt, store_id);\n }\n\n fire_resource_loaded(resource)\n {\n this.fire(this.resource_loaded_evt, resource);\n }\n\n fire_service_clicked(service)\n {\n this.fire(this.service_clicked_evt, service);\n }\n\n fire_unit_position_updated(unit_data)\n {\n this.fire(this.unit_pos_updated_evt, unit_data);\n }\n\n fire_floor_switched(floor_id)\n {\n this.fire(this.floor_changed_evt, floor_id);\n }\n\n fire_on_enter_floor_navigation(state)\n {\n this.fire(this.on_enter_floor_navigation, state);\n }\n\n fire_on_exit_floor_navigation(state)\n {\n this.fire(this.on_exit_floor_navigation, state);\n }\n\n fire_on_enter_floor_selection(state)\n {\n this.fire(this.on_enter_floor_selection, state);\n }\n\n fire_on_exit_floor_selection(state)\n {\n this.fire(this.on_exit_floor_selection, state);\n }\n\n fire_on_enter_outside_navigation(state)\n {\n this.fire(this.on_enter_outside_navigation, state);\n }\n\n fire_on_exit_outside_navigation(state)\n {\n this.fire(this.on_exit_outside_navigation, state);\n }\n}\n\nconst event_manager = new EventManager();\nexport { event_manager as EventManager };\n","import { EventManager } from './EventManager';\n\nclass ResourceContainer\n{\n init()\n {\n this.resources = {};\n this.resources_by_url = {};\n }\n\n set_resource(name, url, resource)\n {\n const urls = Object.keys(this.resources_by_url);\n\n if (urls.includes(url))\n {\n this.resources[name] = this.resources_by_url[url];\n }\n else\n {\n this.resources[name] = resource;\n this.resources_by_url[url] = resource;\n }\n\n EventManager.fire_resource_loaded({ name: name, value: resource });\n }\n\n get_resource(name)\n {\n return this.resources[name];\n }\n\n get(name)\n {\n return this.resources[name];\n }\n}\n\nconst resource_container = new ResourceContainer();\nexport { resource_container as ResourceContainer };\n","class HTMLUtilities\n{\n static load_images(container)\n {\n const images = container.querySelectorAll('img');\n\n for (let i = 0; i < images.length; i++)\n {\n const image = images[i];\n\n if (image.dataset.src)\n {\n image.src = image.dataset.src;\n }\n }\n\n const image_objects = container.querySelectorAll('object');\n\n for (let i = 0; i < image_objects.length; i++)\n {\n const image_object = image_objects[i];\n\n if (image_object.dataset.src)\n {\n image_object.data = image_object.dataset.src;\n }\n }\n }\n\n static load_videos(container)\n {\n const videos = container.querySelectorAll('video');\n\n for (let i = 0; i < videos.length; i++)\n {\n const video = videos[i];\n\n if (video.dataset.src)\n {\n video.src = video.dataset.src;\n }\n }\n }\n\n static load_iframes(container)\n {\n const iframes = container.querySelectorAll('iframe');\n\n for (let i = 0; i < iframes.length; i++)\n {\n const iframe = iframes[i];\n\n if (iframe.dataset.src)\n {\n iframe.src = iframe.dataset.src;\n }\n }\n }\n\n static load_elements(container, selector)\n {\n const elements = container.querySelectorAll(selector);\n\n for (let i = 0; i < elements.length; i++)\n {\n const element = elements[i];\n\n if (element.dataset.src)\n {\n element.src = element.dataset.src;\n }\n }\n }\n}\n\nexport { HTMLUtilities };\n","import { ActionSequencerBuilder } from './ActionSequencerBuilder';\n\nclass TransitionTable\n{\n constructor()\n {\n this.transitions = [];\n this.default_state_data = {};\n }\n\n get(from_state_name, to_state_name, current_context)\n {\n for (let i = 0; i < this.transitions.length; i++)\n {\n if (this.transitions[i].from === from_state_name && this.transitions[i].to === to_state_name)\n {\n const action_sequencer = new ActionSequencerBuilder(this.default_state_data).from_animation_sheet(this.transitions[i].data, current_context);\n return action_sequencer;\n }\n }\n\n for (let i = 0; i < this.transitions.length; i++)\n {\n if (this.transitions[i].to === to_state_name && this.transitions[i].from === undefined)\n {\n const action_sequencer = new ActionSequencerBuilder(this.default_state_data).from_animation_sheet(this.transitions[i].data, current_context);\n return action_sequencer;\n }\n }\n\n console.error('TransitionTable.get no data found for: ', from_state_name, to_state_name);\n return undefined;\n }\n\n add_transitions(transitions)\n {\n for (let i = 0; i < transitions.length; i++)\n {\n this.transitions.push(transitions[i]);\n }\n }\n\n set_transitions(transitions)\n {\n this.transitions = transitions;\n }\n\n set_default_state_data(default_state_data)\n {\n this.default_state_data = default_state_data;\n }\n}\n\nexport { TransitionTable };\n","import { Vector2 } from 'three';\nimport { Clock } from 'three';\n\nclass Time\n{\n constructor()\n {\n this.delta_buffer = [0.016, 0.016, 0.016, 0.016, 0.016, 0.016, 0.016, 0.016, 0.016, 0.016];\n }\n\n init()\n {\n this.___time = new Clock();\n this.__raw_delta_time = 0;\n this.__elapsed_time = 0;\n this.__allocated_time = new Vector2(0, 0);\n\n this.delta_time = 0.016;\n }\n\n get elapsed_time()\n {\n return this.__elapsed_time;\n }\n\n get shader_time()\n {\n this.__allocated_time.x = this.delta_time;\n this.__allocated_time.y = this.elapsed_time;\n return this.__allocated_time;\n }\n\n __update()\n {\n this.__raw_delta_time = this.___time.getDelta();\n this.__elapsed_time = this.___time.getElapsedTime();\n\n this.delta_buffer.shift();\n this.delta_buffer.push(this.__raw_delta_time < 0.32 ? this.__raw_delta_time : 0.032);\n\n this.__calculate_delta_time();\n }\n\n __calculate_delta_time()\n {\n this.delta_time = 0;\n\n for (let i = 0; i < this.delta_buffer.length; i++)\n {\n this.delta_time += this.delta_buffer[i];\n }\n\n this.delta_time = this.delta_time / this.delta_buffer.length;\n }\n}\n\nconst time = new Time();\nexport { time as Time };\n","class ViewState\n{\n constructor(name)\n {\n this.name = name;\n }\n\n start()\n {\n }\n\n show()\n {\n }\n\n hide()\n {\n }\n\n before_enter()\n {\n }\n\n on_enter()\n {\n }\n\n update()\n {\n }\n\n update_enter_transition(global_view_data, transition_progress, action_sequencer)\n {\n // Backward compatibility. It will be removed in future releases.\n this.update_transition(global_view_data, transition_progress, action_sequencer);\n }\n\n update_exit_transition(global_view_data, transition_progress, action_sequencer)\n {\n }\n\n // Deprecated\n update_transition(global_view_data, transition_progress, action_sequencer)\n {\n }\n\n before_exit()\n {\n }\n\n on_exit()\n {\n }\n}\n\nexport { ViewState };\n","import { Time } from '../../Time';\nimport { ViewState } from '../ViewState';\n\nclass ViewStateTransitionHandler\n{\n constructor(transition_table)\n {\n this.last_state = new ViewState();\n this.current_state = new ViewState();\n\n this.default_state_data = {};\n this.current_state_data = {};\n\n this.transition_table = transition_table;\n\n this.transitioning = false;\n }\n\n go_to_state(state, skip = false)\n {\n if (this.transitioning)\n {\n this.__exit_last_state();\n }\n\n this.last_state = this.current_state;\n this.current_state = state;\n\n this.last_state.before_exit();\n this.current_state.show();\n\n this.action_sequencer = this.transition_table.get(this.last_state.name, this.current_state.name, this.current_state_data);\n this.current_state.before_enter();\n\n this.action_sequencer.play();\n\n this.transitioning = true;\n\n if (skip)\n {\n this.action_sequencer.skip();\n this.update();\n }\n }\n\n update()\n {\n if (this.transitioning)\n {\n this.__update_transitions();\n\n if (this.action_sequencer.is_finished())\n {\n this.transitioning = false;\n\n this.__update_transitions();\n\n this.__exit_last_state();\n\n this.current_state.on_enter();\n }\n }\n else\n {\n this.current_state.update();\n }\n }\n\n set_state(state)\n {\n this.current_state = state;\n }\n\n set_default_state_data(default_state_data)\n {\n Object.assign(this.default_state_data, default_state_data);\n Object.assign(this.current_state_data, default_state_data);\n }\n\n __update_transitions()\n {\n this.action_sequencer.update(Time.delta_time);\n this.last_state.update_exit_transition(this.current_state_data, this.action_sequencer.get_progress(), this.action_sequencer);\n this.current_state.update_enter_transition(this.current_state_data, this.action_sequencer.get_progress(), this.action_sequencer);\n }\n\n __exit_last_state()\n {\n if (this.last_state.name !== this.current_state.name)\n {\n this.last_state.hide();\n }\n\n this.last_state.on_exit();\n }\n}\n\nexport { ViewStateTransitionHandler };\n","import { TransitionTable } from './transition/TransitionTable';\nimport { ViewStateTransitionHandler } from './transition/ViewStateTransitionHandler';\n\nclass ViewManager\n{\n constructor()\n {\n this.views = [];\n\n this.transition_table = new TransitionTable();\n this.transition_handler = new ViewStateTransitionHandler(this.transition_table);\n\n this.view_change_subscribers = [];\n\n this.browser_title_suffix = '';\n }\n\n update()\n {\n this.transition_handler.update();\n\n this.__set_views_opacities();\n }\n\n go_to_view(view_name, change_url = true, skip = false)\n {\n const v = this.get(view_name);\n this.transition_handler.go_to_state(v, skip);\n\n if (change_url)\n {\n this.__change_browser_url(v.url);\n this.__change_browser_title(v.url);\n }\n\n this.notify_view_change(view_name);\n }\n\n go_to_scene(scene_name, change_url = false, skip = false)\n {\n const next_view = this.get(scene_name);\n const transition_view = this.get('transition');\n\n transition_view.set_next_view(next_view);\n this.go_to_view(transition_view.name, change_url, skip);\n }\n\n subscribe_to_view_change(subscriber)\n {\n this.view_change_subscribers.push(subscriber);\n }\n\n notify_view_change(view_name)\n {\n for (let i = 0; i < this.view_change_subscribers.length; i++)\n {\n const subscriber = this.view_change_subscribers[i];\n subscriber.on_view_change(view_name);\n }\n }\n\n register_view(view)\n {\n this.views.push(view);\n }\n\n has_view(view_name)\n {\n for (let i = 0; i < this.views.length; i++)\n {\n if (this.views[i].name === view_name)\n {\n return true;\n }\n }\n return false;\n }\n\n add_transitions(transitions)\n {\n this.transition_table.add_transitions(transitions);\n }\n\n set_transitions(transitions)\n {\n this.transition_table.set_transitions(transitions);\n }\n\n set_view(view_name)\n {\n const view = this.get(view_name);\n\n this.transition_handler.set_state(view);\n }\n\n set_browser_title_suffix(title_suffix)\n {\n this.browser_title_suffix = title_suffix;\n }\n\n get_current_view()\n {\n return this.transition_handler.current_state;\n }\n\n get_view_by_name(view_name)\n {\n console.warn('DEPRECATED. Use ViewManager.get instead');\n this.get(view_name);\n }\n\n get(view_name)\n {\n for (let i = 0; i < this.views.length; i++)\n {\n if (this.views[i].name === view_name)\n {\n return this.views[i];\n }\n }\n console.error('[ViewManager.get] no view found for: ', view_name);\n return undefined;\n }\n\n get_view_by_url(url)\n {\n console.warn('DEPRECATED. Use ViewManager.get_by_url instead');\n this.get_by_url(url);\n }\n\n get_by_url(url)\n {\n for (let i = 0; i < this.views.length; i++)\n {\n if (this.views[i].url === url)\n {\n return this.views[i];\n }\n }\n console.error('[ViewManager.get_by_url] no view found for: ', url);\n return undefined;\n }\n\n set_default_state_data(default_state_data)\n {\n this.transition_table.set_default_state_data(default_state_data);\n this.transition_handler.set_default_state_data(default_state_data);\n }\n\n __change_browser_url(url)\n {\n window.history.pushState('', '', url);\n }\n\n __change_browser_title(name)\n {\n const title = this.__capitalize(name);\n\n document.title = title ? `${title} | ${this.browser_title_suffix}` : this.browser_title_suffix;\n }\n\n __set_views_opacities()\n {\n for (let i = 0; i < this.views.length; i++)\n {\n this.views[i].set_opacity(this.transition_handler.current_state_data);\n }\n }\n\n __capitalize(string)\n {\n let aux_string = string.toUpperCase().replace('/', '');\n aux_string = this.__snake_to_whitespace(aux_string);\n\n return aux_string;\n }\n\n __snake_to_whitespace(string)\n {\n return string.replace(\n /([-_][A-Z])/g,\n (group) => group\n .replace('-', ' ')\n .replace('_', ' ')\n );\n }\n}\n\nconst view_manager = new ViewManager();\nexport { view_manager as ViewManager };\n","import { ResourceContainer } from '../ResourceContainer';\nimport { HTMLUtilities } from '../utilities/HTMLUtilities';\nimport { ViewManager } from './ViewManager';\nimport { ViewState } from './ViewState';\n\nclass ApplicationView extends ViewState\n{\n constructor({ name, url, container })\n {\n super(name);\n\n this.container = container;\n this.url = url;\n\n let transition_data = ResourceContainer.get(`${name}_data`);\n\n transition_data = transition_data || {\n animation_tracks: [],\n triggers: []\n };\n\n const transitions = [\n {\n to: name,\n data: transition_data\n }\n ];\n\n ViewManager.register_view(this);\n ViewManager.add_transitions(transitions);\n }\n\n show()\n {\n this.container.classList.add('before_enter');\n this.container.classList.remove('before_exit');\n this.container.classList.remove('hidden');\n }\n\n on_enter()\n {\n this.container.classList.remove('before_enter');\n this.container.classList.remove('before_exit');\n this.container.classList.remove('hidden');\n }\n\n before_exit()\n {\n this.container.classList.add('before_exit');\n this.container.classList.remove('before_enter');\n this.container.classList.remove('hidden');\n }\n\n hide()\n {\n this.container.classList.add('hidden');\n this.container.classList.remove('before_enter');\n this.container.classList.remove('before_exit');\n }\n\n load_html_images()\n {\n HTMLUtilities.load_images(this.container);\n }\n\n load_html_videos()\n {\n HTMLUtilities.load_videos(this.container);\n }\n\n set_opacity(current_state_data)\n {\n this.container.style.opacity = current_state_data[`${this.name}_opacity`];\n }\n}\n\nexport { ApplicationView };\n","class BaseApplication\n{\n on_post_start()\n {}\n\n on_enter()\n {}\n\n on_exit()\n {}\n\n update()\n {}\n\n on_post_render()\n {}\n\n on_pre_render()\n {}\n\n on_frame_end()\n {}\n}\n\nexport { BaseApplication };\n","class BaseRender\n{\n constructor()\n {\n\n }\n\n render()\n {\n\n }\n\n on_enter(context, renderer)\n {\n\n }\n\n on_exit(context, renderer)\n {\n\n }\n\n resize()\n {\n\n }\n\n dispose()\n {\n\n }\n}\n\nexport { BaseRender };\n","import basic_vert from '../shaders/basic_color/basic_color.vert';\nimport basic_frag from '../shaders/basic_color/basic_color.frag';\n\nimport { ShaderMaterial } from 'three';\nimport { Color } from 'three';\n\nclass BaseShaderMaterial extends ShaderMaterial\n{\n constructor(vert, frag, uniforms)\n {\n super({\n vertexShader: vert || basic_vert,\n fragmentShader: frag || basic_frag,\n uniforms: uniforms || {\n _Color: { value: new Color('#FF0000') }\n }\n });\n }\n}\n\nexport { BaseShaderMaterial };\n","import vert from '../shaders/copy/copy.vert';\nimport frag from '../shaders/copy/copy.frag';\n\nimport { ShaderMaterial } from 'three';\nimport { Vector2 } from 'three';\nimport { NoBlending } from 'three';\nimport { AlwaysDepth } from 'three';\n\nclass BlitMaterial extends ShaderMaterial\n{\n constructor(frag_shader, vert_shader, defines)\n {\n super({\n uniforms: {\n _MainTex: { value: null },\n _Resolution: { value: new Vector2(0, 0) },\n _TargetResolution: { value: new Vector2(0, 0) }\n },\n defines: defines || {},\n vertexShader: vert_shader || vert,\n fragmentShader: frag_shader || frag,\n depthWrite: false,\n blending: NoBlending,\n depthTest: false,\n depthFunc: AlwaysDepth\n });\n }\n}\n\nexport { BlitMaterial };\n","import { BlitMaterial } from './BlitMaterial';\n\nimport frag from '../shaders/add/add.frag';\n\nclass AddMaterial extends BlitMaterial\n{\n constructor(nMips)\n {\n super(frag);\n\n this.uniforms._SecondTex = { value: undefined };\n }\n\n set_add_texture(tex)\n {\n this.uniforms._SecondTex.value = tex;\n }\n}\n\nexport { AddMaterial };\n","import { BlitMaterial } from './BlitMaterial';\n\nimport frag from '../shaders/gaussian_blur/unreal_bloom_compose.frag';\n\nimport { Color } from 'three';\nclass UnrealBloomComposeMaterial extends BlitMaterial\n{\n constructor(nMips)\n {\n super(frag, undefined, {\n NUM_MIPS: nMips\n });\n this.uniforms._MainTex = { value: undefined };\n this.uniforms._BlurredTex = { value: undefined };\n this.uniforms._BloomStrength = { value: 1 };\n\n this.uniforms.blurTexture1 = { value: null };\n this.uniforms.blurTexture2 = { value: null };\n this.uniforms.blurTexture3 = { value: null };\n this.uniforms.blurTexture4 = { value: null };\n this.uniforms.blurTexture5 = { value: null };\n\n this.uniforms.bloomStrength = { value: 1.0 };\n this.uniforms.bloomFactors = { value: [1.0, 0.8, 0.6, 0.4, 0.2] };\n this.uniforms.bloomRadius = { value: 0.0 };\n\n const bloomTintColors = [\n new Color('#FFFFFF'),\n new Color('#FFFFFF'),\n new Color('#FFFFFF'),\n new Color('#FFFFFF'),\n new Color('#FFFFFF')\n ];\n\n this.uniforms.bloomTintColors = { value: bloomTintColors };\n }\n\n set_RT_0(rt)\n {\n this.uniforms.blurTexture1.value = rt;\n }\n\n set_RT_1(rt)\n {\n this.uniforms.blurTexture2.value = rt;\n }\n\n set_RT_2(rt)\n {\n this.uniforms.blurTexture3.value = rt;\n }\n\n set_RT_3(rt)\n {\n this.uniforms.blurTexture4.value = rt;\n }\n\n set_RT_4(rt)\n {\n this.uniforms.blurTexture5.value = rt;\n }\n\n set_bloom_strength(value)\n {\n this.uniforms.bloomStrength.value = value;\n }\n\n set_bloom_radius(value)\n {\n this.uniforms.bloomRadius.value = value;\n }\n\n set_tint_color_0(col_string)\n {\n this.uniforms.bloomTintColors.value[0].set(col_string);\n }\n\n set_tint_color_1(col_string)\n {\n this.uniforms.bloomTintColors.value[1].set(col_string);\n }\n\n set_tint_color_2(col_string)\n {\n this.uniforms.bloomTintColors.value[2].set(col_string);\n }\n\n set_tint_color_3(col_string)\n {\n this.uniforms.bloomTintColors.value[3].set(col_string);\n }\n\n set_tint_color_4(col_string)\n {\n this.uniforms.bloomTintColors.value[4].set(col_string);\n }\n}\n\nexport { UnrealBloomComposeMaterial };\n","class CameraManager\n{\n init()\n {\n this._current = undefined;\n // VR Spectator\n this._spectator = undefined;\n }\n\n set current(camera)\n {\n this._current = camera;\n }\n\n get current()\n {\n return this._current;\n }\n\n set spectator(camera)\n {\n this._spectator = camera;\n }\n\n get spectator()\n {\n return this._spectator;\n }\n}\n\nconst camera_manager = new CameraManager();\nexport { camera_manager as CameraManager };\n","class Capabilities\n{\n init()\n {\n this.max_anisotropy = 0;\n this.vertex_texture_sampler_available = false;\n this.fp_textures_available = false;\n }\n}\n\nconst capabilities = new Capabilities();\nexport { capabilities as Capabilities };\n","import { CanvasTexture } from 'three';\nimport { Vector2 } from 'three';\nimport { UVMapping } from 'three';\nimport { ClampToEdgeWrapping } from 'three';\nimport { NearestFilter } from 'three';\n\nclass CanvasDrawer\n{\n constructor(uses_dynamic_font)\n {\n this.uses_dynamic_font = uses_dynamic_font;\n this.__textHeight = null;\n\n this.canvas = document.createElement('canvas');\n this.ctx = this.canvas.getContext('2d');\n }\n\n getFontHeight(fontStyle = 'Arial')\n {\n if (this.__textHeight == null || this.uses_dynamic_font)\n {\n const body = document.getElementsByTagName('body')[0];\n const dummy = document.createElement('div');\n const dummyText = document.createTextNode('MÉqgOLAKTAL');\n dummy.appendChild(dummyText);\n dummy.setAttribute('style', `font:${fontStyle};position:absolute;top:0;left:0`);\n body.appendChild(dummy);\n this.__textHeight = dummy.offsetHeight;\n body.removeChild(dummy);\n }\n return this.__textHeight;\n }\n\n get_text_size(text, font = '24px Arial')\n {\n const size = new Vector2();\n this.ctx.font = font;\n size.x = Math.ceil(this.ctx.measureText(text).width);\n size.y = Math.ceil(this.getFontHeight(font));\n return size;\n }\n\n draw_canvas(text, ctxOptions = {})\n {\n ctxOptions.font = ctxOptions.font || '24px Arial';\n ctxOptions.font_color = ctxOptions.font_color || '#000000';\n\n this.__draw(text, ctxOptions, this.canvas, this.ctx);\n return this.canvas;\n }\n\n draw_on_texture(text, ctxOptions)\n {\n const canvas = this.draw_canvas(text, ctxOptions);\n const canvas_texture = new CanvasTexture(canvas, UVMapping,\n ClampToEdgeWrapping,\n ClampToEdgeWrapping,\n NearestFilter,\n NearestFilter);\n canvas_texture.generateMipMaps = false;\n canvas_texture.needsUpdate = true;\n\n return canvas_texture;\n }\n\n __draw(text, ctxOptions)\n {}\n\n roundRect(ctx, x, y, width, height, radius, fill, stroke)\n {\n if (typeof stroke === 'undefined')\n {\n stroke = true;\n }\n if (typeof radius === 'undefined')\n {\n radius = 5;\n }\n if (typeof radius === 'number')\n {\n radius = { tl: radius, tr: radius, br: radius, bl: radius };\n }\n else\n {\n const defaultRadius = { tl: 0, tr: 0, br: 0, bl: 0 };\n for (const side in defaultRadius)\n {\n radius[side] = radius[side] || defaultRadius[side];\n }\n }\n ctx.beginPath();\n ctx.moveTo(x + radius.tl, y);\n ctx.lineTo(x + width - radius.tr, y);\n ctx.quadraticCurveTo(x + width, y, x + width, y + radius.tr);\n ctx.lineTo(x + width, y + height - radius.br);\n ctx.quadraticCurveTo(x + width, y + height, x + width - radius.br, y + height);\n ctx.lineTo(x + radius.bl, y + height);\n ctx.quadraticCurveTo(x, y + height, x, y + height - radius.bl);\n ctx.lineTo(x, y + radius.tl);\n ctx.quadraticCurveTo(x, y, x + radius.tl, y);\n ctx.closePath();\n if (fill)\n {\n ctx.fill();\n }\n if (stroke)\n {\n ctx.stroke();\n }\n }\n}\n\nexport { CanvasDrawer };\n","/*\n\n A configuration class used as a singleton\n\n*/\n\nclass Configuration\n{\n init(parameters = {})\n {\n this.dpr = 1;\n\n this.app = {}; // for arbitrary use in end application\n }\n\n from_json(json)\n {\n\n }\n}\n\nconst configuration = new Configuration();\nexport { configuration as Configuration };\n","class Idle\n{\n constructor()\n {\n }\n\n get is_animating()\n {\n return false;\n }\n\n on_enter(view)\n {\n\n }\n\n update(view)\n {\n }\n\n on_exit(view)\n {\n\n }\n}\n\nexport { Idle };\n","import { Time } from '../../Time';\nimport { Idle } from './Idle';\n\nimport { OMath } from '../../utilities/OMath';\nclass Animating\n{\n constructor()\n {\n this.t = 0;\n this.easing_function_t = 0;\n }\n\n get is_animating()\n {\n return true;\n }\n\n on_enter(animator)\n {\n }\n\n update(animator)\n {\n this.t += Time.delta_time / animator.duration;\n\n this.easing_function_t = animator.easing_function(this.t);\n this.easing_function_t = OMath.clamp(this.easing_function_t, 0, 1);\n\n animator.set_property_value(OMath.lerp(animator.from, animator.to, this.easing_function_t));\n\n if (this.easing_function_t >= 0.9999)\n {\n animator.set_property_value(animator.to);\n\n animator.set_current_state(new Idle());\n animator.finished_callback(animator);\n }\n }\n\n on_exit(view)\n {\n\n }\n}\n\nexport { Animating };\n","import { Animating } from './css_animator_states/Animating';\nimport { Idle } from './css_animator_states/Idle';\nimport { EasingFunctions } from '../utilities/EasingFunctions';\n\nclass CSSAnimator\n{\n constructor({\n element,\n css_property,\n from = 0,\n to = 1,\n duration = 1,\n value_prefix = '',\n value_suffix = '',\n easing_function = EasingFunctions.ease_in_out_cubic,\n finished_callback = () =>\n {}\n })\n {\n this.element = element;\n this.css_property = css_property;\n this.from = from;\n this.to = to;\n this.value_prefix = value_prefix;\n this.value_suffix = value_suffix;\n this.duration = duration;\n this.easing_function = easing_function;\n this.finished_callback = finished_callback;\n\n this.current_state = new Idle();\n }\n\n animate()\n {\n this.set_current_state(new Animating());\n }\n\n stop()\n {\n this.set_current_state(new Idle());\n }\n\n set_property_value(value)\n {\n this.element.style[this.css_property] = `${this.value_prefix}${value}${this.value_suffix}`;\n }\n\n update()\n {\n this.current_state.update(this);\n }\n\n get is_animating()\n {\n return this.current_state.is_animating;\n }\n\n set_current_state(state)\n {\n this.current_state.on_exit(this);\n this.current_state = state;\n this.current_state.on_enter(this);\n }\n}\n\nexport { CSSAnimator };\n","\nimport { Object3D } from 'three';\nimport { LineBasicMaterial } from 'three';\nimport { AlwaysDepth } from 'three';\nimport { BufferGeometry } from 'three';\nimport { Vector3 } from 'three';\nimport { Line } from 'three';\n\nclass AxisHelper extends Object3D\n{\n constructor(scale = 1.0)\n {\n super();\n\n const blue_points = [];\n blue_points.push(new Vector3(0, 0, 0));\n blue_points.push(new Vector3(0, 0, 1000));\n\n const blue_axis_mat = new LineBasicMaterial({ color: 0x4444ff, depthFunc: AlwaysDepth });\n const blue_axis_geo = new BufferGeometry().setFromPoints(blue_points);\n const blue_axis_line = new Line(blue_axis_geo, blue_axis_mat);\n blue_axis_line.renderOrder = 50000;\n\n const green_points = [];\n green_points.push(new Vector3(0, 0, 0));\n green_points.push(new Vector3(0, 1000, 0));\n\n const green_axis_mat = new LineBasicMaterial({ color: 0x44ff44, depthFunc: AlwaysDepth });\n const green_axis_geo = new BufferGeometry().setFromPoints(green_points);\n const green_axis_line = new Line(green_axis_geo, green_axis_mat);\n green_axis_line.renderOrder = 50000;\n\n const red_points = [];\n red_points.push(new Vector3(0, 0, 0));\n red_points.push(new Vector3(1000, 0, 0));\n\n const red_axis_mat = new LineBasicMaterial({ color: 0xff4444, depthFunc: AlwaysDepth });\n const red_axis_geo = new BufferGeometry().setFromPoints(red_points);\n const red_axis_line = new Line(red_axis_geo, red_axis_mat);\n red_axis_line.renderOrder = 50000;\n\n this.renderOrder = 100000;\n\n this.add(blue_axis_line);\n this.add(green_axis_line);\n this.add(red_axis_line);\n\n this.scale.set(scale, scale, scale);\n }\n\n update()\n {\n }\n\n dispose()\n {\n }\n}\n\nexport { AxisHelper };\n","import { Scene } from 'three';\n\nclass SceneManager\n{\n init()\n {\n this._current = new Scene();\n this._current.name = 'default_scene';\n }\n\n add_scene(name)\n {\n\n }\n\n get current()\n {\n return this._current;\n }\n\n set current(scene)\n {\n this._current = scene;\n }\n\n dispose()\n {\n this.current.traverse(child =>\n {\n if (child.geometry)\n {\n child.geometry.dispose();\n child.material.dispose();\n }\n });\n\n while (this.current.children.length > 0)\n {\n this.current.remove(this.current.children[0]);\n }\n }\n}\n\nconst scene_manager = new SceneManager();\nexport { scene_manager as SceneManager };\n","\nimport { Vector3, Mesh } from 'three';\nimport { BoxGeometry } from 'three';\nimport { MeshBasicMaterial } from 'three';\n\nclass Cube extends Mesh\n{\n constructor(size, segments, color)\n {\n size = size || new Vector3(1, 1, 1);\n segments = segments || new Vector3(1, 1, 1);\n color = color || 0xff0000;\n const geometry = new BoxGeometry(size.x, size.y, size.z, segments.x, segments.y, segments.z);\n const material = new MeshBasicMaterial({ color: color });\n super(geometry, material);\n }\n}\n\nexport { Cube };\n","import { Mesh } from 'three';\nimport { SphereBufferGeometry } from 'three';\nimport { MeshBasicMaterial } from 'three';\n\nclass Sphere extends Mesh\n{\n constructor(radius, color)\n {\n color = color || '#FF0000';\n radius = radius || 1;\n const geometry = new SphereBufferGeometry(radius, 64, 64);\n const material = new MeshBasicMaterial({ color: color });\n super(geometry, material);\n }\n}\n\nexport { Sphere };\n","import { CylinderBufferGeometry } from 'three';\nimport { ConeBufferGeometry } from 'three';\nimport { MeshBasicMaterial } from 'three';\nimport { Vector3, Mesh } from 'three';\n\nimport * as BufferGeometryUtils from 'three/examples/jsm/utils/BufferGeometryUtils.js';\n\nclass Arrow extends Mesh\n{\n constructor(color, length, dir)\n {\n color = color || '#FF0000';\n length = length || 1;\n\n const cone_height = 0.4;\n const cylinder_height = length - cone_height;\n const cylinder_geo = new CylinderBufferGeometry(0.01, 0.01, cylinder_height, 32);\n cylinder_geo.translate(0, cylinder_height / 2, 0);\n\n const cone_geometry = new ConeBufferGeometry(0.1, cone_height, 32);\n cone_geometry.translate(0, cylinder_height + cone_height / 2, 0);\n\n const buffer_geometry = BufferGeometryUtils.mergeBufferGeometries([cylinder_geo, cone_geometry]);\n buffer_geometry.rotateX(3.14 / 2);\n\n const material = new MeshBasicMaterial({ color: color });\n super(buffer_geometry, material);\n\n if (dir)\n {\n this.quaternion.setFromUnitVectors(new Vector3(0, 0, 1), dir);\n }\n\n this._dir = dir;\n }\n\n set dir(dir)\n {\n this.quaternion.setFromUnitVectors(new Vector3(0, 0, 1), dir);\n this._dir = dir;\n }\n\n get dir()\n {\n return this._dir;\n }\n\n set length(value)\n {\n this.scale.z = value;\n }\n\n get length()\n {\n return this.scale.z;\n }\n}\n\nexport { Arrow };\n","import { Vector2 } from 'three';\n\nclass OScreen\n{\n init()\n {\n this.width = 1;\n this.height = 1;\n\n this.position = new Vector2();\n\n this.render_width = 1;\n this.render_height = 1;\n this.width_height = new Vector2(this.width, this.height);\n\n this.dpr = 1;\n this.pixel_size = new Vector2(1 / this.width, 1 / this.height);\n }\n\n update_position(x, y)\n {\n this.position.set(x, y);\n }\n\n update()\n {\n this.size_changed = false;\n }\n\n update_size(width, height)\n {\n this.width = width;\n this.height = height;\n\n this.pixel_size = new Vector2(1 / this.width, 1 / this.height);\n\n this.width_height.x = width;\n this.width_height.y = height;\n\n this.render_width = width * this.dpr;\n this.render_height = height * this.dpr;\n\n this.size_changed = true;\n }\n\n apply_pixel_density_v2(vector2)\n {\n vector2.multiplyScalar(1 / this.dpr);\n\n return vector2;\n }\n\n apply_pixel_density(value)\n {\n return value * (1 / this.dpr);\n }\n\n get_pixel_size()\n {\n return this.pixel_size;\n }\n\n get aspect_ratio()\n {\n return this.width / this.height;\n }\n\n get portrait()\n {\n return this.width < this.height;\n }\n}\n\nconst oscreen = new OScreen();\nexport { oscreen as OScreen };\n","import { BaseShaderMaterial } from './BaseShaderMaterial';\nimport { Vector2 } from 'three';\nclass ScreenSpaceTextureMaterial extends BaseShaderMaterial\n{\n constructor(x, y, w, h)\n {\n const vert = `\n uniform vec2 _ScreenSpacePosition;\n uniform vec2 _ScreenSize;\n uniform vec2 _TextureSize;\n varying vec2 vUv;\n void main()\n {\n vec2 pos = uv * vec2(_TextureSize.x / _ScreenSize.x, _TextureSize.y / _ScreenSize.y);\n pos += vec2(_ScreenSpacePosition.x / _ScreenSize.x, _ScreenSpacePosition.y / _ScreenSize.y);\n\n pos.x = pos.x * 2.0 - 1.0;\n pos.y = pos.y * 2.0 - 1.0;\n\n gl_Position = vec4(pos, 0.0, 1.0);\n vUv = uv;\n }\n `;\n const frag = `\n uniform sampler2D _MainTex;\n varying vec2 vUv;\n\n void main()\n {\n gl_FragColor = texture2D(_MainTex, vUv);\n }\n `;\n super(vert, frag, {\n _MainTex: { value: undefined },\n _ScreenSpacePosition: { value: new Vector2() },\n _ScreenSize: { value: new Vector2() },\n _TextureSize: { value: new Vector2() }\n });\n }\n\n set_position(x, y)\n {\n this.uniforms._ScreenSpacePosition.value.set(x, y);\n }\n\n set_texture(tex, w, h)\n {\n this.uniforms._MainTex.value = tex;\n this.uniforms._TextureSize.value.set(tex.image.width, tex.image.height);\n\n if (w !== undefined)\n {\n this.uniforms._TextureSize.value.x = w;\n }\n if (h !== undefined)\n {\n this.uniforms._TextureSize.value.y = h;\n }\n }\n\n set_screen_size(w, h)\n {\n this.uniforms._ScreenSize.value.set(w, h);\n }\n}\n\nexport { ScreenSpaceTextureMaterial };\n","import { Color } from 'three';\nimport { PerspectiveCamera as TPerspectiveCamera } from 'three';\n\nclass PerspectiveCamera extends TPerspectiveCamera\n{\n constructor(fov, aspect, near, far)\n {\n super(fov, aspect, near, far);\n\n this.clear_color = new Color('#000000');\n this.clear_alpha = 1;\n }\n\n copy(camera)\n {\n super.copy(camera);\n this.clear_color.copy(camera.clear_color);\n this.clear_alpha = camera.clear_alpha;\n return this;\n }\n}\n\nexport { PerspectiveCamera };\n","import { AxisHelper } from './components/AxisHelper';\n\nimport { SceneManager } from './SceneManager';\nimport { Cube } from './primitives/Cube';\nimport { Sphere } from './primitives/Sphere';\nimport { Arrow } from './primitives/Arrow';\nimport { OScreen } from './OScreen';\nimport { ScreenSpaceTextureMaterial } from './materials/ScreenSpaceTextureMaterial';\nimport { PerspectiveCamera } from './PerspectiveCamera';\n\nimport { Vector3 } from 'three';\nimport { LineBasicMaterial } from 'three';\nimport { BufferGeometry } from 'three';\nimport { Line } from 'three';\nimport { PlaneGeometry } from 'three';\nimport { ShaderMaterial } from 'three';\nimport { Vector4 } from 'three';\nimport { Mesh } from 'three';\nimport { Box3 } from 'three';\nimport { Box3Helper } from 'three';\nimport { Scene } from 'three';\nimport { CatmullRomCurve3 } from 'three';\nimport { SphereGeometry } from 'three';\nimport { MeshBasicMaterial } from 'three';\n\nimport basic_color_vert from './shaders/basic_color/basic_color.vert';\nimport basic_color_frag from './shaders/basic_color/basic_color.frag';\n\nclass Debug\n{\n init()\n {\n this.Vector3_one = new Vector3(1, 1, 1);\n this.Vector3_zero = new Vector3(0, 0, 0);\n this.canvas_renderer = undefined;\n\n this.display_texture_meshes = [];\n\n this.ctx = undefined;\n this.scene = new Scene();\n this.camera = new PerspectiveCamera();\n // this.camera.clear_alpha = 0;\n }\n\n draw_arrow(origin, dir, color = 0xff0000)\n {\n const arrow = new Arrow(color, dir.length(), dir.clone().normalize());\n arrow.position.copy(origin);\n SceneManager.current.add(arrow);\n return arrow;\n }\n\n draw_axis()\n {\n const axis = new AxisHelper();\n SceneManager.current.add(axis);\n return axis;\n }\n\n set_debug_RT(RT)\n {\n this.rt_debug = RT;\n }\n\n draw_rectangle(position_2d, width, height, color)\n {\n width = width || 100;\n height = height || 100;\n this.ctx.fillStyle = color || 'rgba(255, 0, 0, 1)';\n this.ctx.fillRect(position_2d.x - width / 2,\n (this.ctx.canvas.height - position_2d.y) - height / 2, width, height);\n }\n\n clear()\n {\n if (this.ctx)\n {\n this.ctx.clearRect(0, 0, this.ctx.canvas.width, this.ctx.canvas.height);\n }\n }\n\n draw_line_2D(from, to, color)\n {\n this.ctx.strokeStyle = color || 'rgba(255, 0, 0, 1)';\n this.ctx.beginPath();\n this.ctx.moveTo(from.x, from.y);\n this.ctx.lineTo(to.x, to.y);\n this.ctx.closePath();\n this.ctx.stroke();\n }\n\n draw_line(points, color = 0xff0000)\n {\n const material = new LineBasicMaterial({\n color: color\n });\n\n const geometry = new BufferGeometry().setFromPoints(points);\n\n const line = new Line(geometry, material);\n line.frustumCulled = false;\n SceneManager.current.add(line);\n return line;\n }\n\n draw_cube(pos, size, color)\n {\n size = size || 1;\n color = color || 0xff0000;\n pos = pos || new Vector3();\n\n const cube = new Cube(new Vector3(size, size, size), undefined, color);\n cube.position.copy(pos);\n SceneManager.current.add(cube);\n return cube;\n }\n\n draw_oriented_cube(from, to, height = 1, color = '#FF0000', depth = 0.1)\n {\n const size = from.distanceTo(to);\n const cube = new Cube(new Vector3(depth, height, size), undefined, color);\n\n const center = to.clone().sub(from).multiplyScalar(0.5);\n const forward_dir = center.clone().normalize();\n center.add(from);\n\n cube.position.copy(center);\n\n // let up = new Vector3(0, 1, 0);\n // let forward = forward_dir.clone();\n // let right = forward.clone().cross(up);\n\n // cube.quaternion.setFromRotationMatrix(new Matrix4().makeBasis(right,up,forward));\n cube.quaternion.setFromUnitVectors(new Vector3(0, 0, -1), forward_dir);\n\n SceneManager.current.add(cube);\n return cube;\n }\n\n draw_plane(width, height, color)\n {\n const geometry = new PlaneGeometry(width, height);\n const material = new ShaderMaterial({\n uniforms: {\n _Color: { value: new Vector4(0, 1, 0, 0.2) }\n },\n vertexShader: basic_color_vert,\n fragmentShader: basic_color_frag,\n transparent: true,\n depthWrite: false\n });\n\n const plane = new Mesh(geometry, material);\n plane.renderOrder = -10000;\n SceneManager.current.add(plane);\n return plane;\n }\n\n draw_empty_cube(pos, size, color)\n {\n size = size || 1;\n color = color || 0xff0000;\n\n const box = new Box3().setFromCenterAndSize(new Vector3(), new Vector3(size, size, size));\n const helper = new Box3Helper(box, color);\n helper.position.copy(pos || new Vector3());\n return helper;\n }\n\n draw_sphere(pos, size, color)\n {\n size = size || 1;\n color = color || 0xff0000;\n pos = pos || new Vector3();\n\n const sphere = new Sphere(size, color);\n sphere.position.copy(pos);\n SceneManager.current.add(sphere);\n return sphere;\n }\n\n draw_point_array(input_points, open = false, color = 0xff0000)\n {\n const catmull = new CatmullRomCurve3(input_points, open);\n catmull.updateArcLengths();\n const points = catmull.getSpacedPoints(200);\n const line_helper = this.draw_line(points, 0x00ff00);\n // line_helper.position.y = 1.5;\n return line_helper;\n }\n\n draw_sphere_helper(sphere, color)\n {\n color = color || 0xff0000;\n const geometry = new SphereGeometry(sphere.radius, 32, 32);\n const material = new MeshBasicMaterial({ color: color });\n const sphere_mesh = new Mesh(geometry, material);\n sphere_mesh.position.copy(sphere.center);\n SceneManager.current.add(sphere_mesh);\n return sphere_mesh;\n }\n\n draw_math_sphere(sphere)\n {\n const geometry = new SphereGeometry(sphere.radius, 32, 32);\n const material = new ShaderMaterial({\n uniforms: {\n _Color: { value: new Vector4(1, 0, 0, 0.2) }\n },\n vertexShader: basic_color_vert,\n fragmentShader: basic_color_frag,\n transparent: true\n });\n // var material = new MeshBasicMaterial( {color: 0xff0000, transparent = true} );\n const sphere1 = new Mesh(geometry, material);\n sphere1.position.copy(sphere.center);\n SceneManager.current.add(sphere1);\n }\n\n draw_bounding_box(bb)\n {\n const helper = new Box3Helper(bb, 0xffff00);\n SceneManager.current.add(helper);\n }\n\n draw_curve(curve, options)\n {\n const offset = new Vector3(0, 0, 0);\n if (options)\n {\n offset.y = options.offset || 0;\n }\n\n for (let i = 0; i < curve.length - 1; i++)\n {\n this.draw_line(curve[i].clone().add(offset), curve[i + 1].clone().add(offset));\n }\n }\n\n draw_texture(tex, w, h)\n {\n const mesh = new Mesh(new PlaneGeometry(1, 1), new ScreenSpaceTextureMaterial());\n this.display_texture_meshes.push(mesh);\n this.scene.add(mesh);\n\n mesh.material.set_texture(tex, w, h);\n return mesh;\n }\n\n render(graphics)\n {\n for (let i = 0; i < this.display_texture_meshes.length; i++)\n {\n this.display_texture_meshes[i].material.set_screen_size(OScreen.width, OScreen.height);\n }\n if (this.scene.children.length > 0)\n {\n graphics.render(this.scene, this.camera);\n }\n }\n}\n\nconst debug = new Debug();\nexport { debug as Debug };\n","import { BlitMaterial } from '../materials/BlitMaterial';\n\nimport frag from '../shaders/clear/clear_depth_normal.frag';\n\nimport { Vector4 } from 'three';\n\nclass ClearDepthNormalMaterial extends BlitMaterial\n{\n constructor(clear_depth, clear_normal)\n {\n super(frag);\n this.uniforms._DepthNormal = { value: new Vector4(clear_depth, clear_normal.x, clear_normal.y, clear_normal.z) };\n }\n}\n\nexport { ClearDepthNormalMaterial };\n","import vert from '../shaders/depth_normals/depth_normals.vert';\nimport frag from '../shaders/depth_normals/depth_normals.frag';\n\nimport { ShaderMaterial } from 'three';\n\nclass DepthNormalMaterial extends ShaderMaterial\n{\n constructor()\n {\n super({\n uniforms: {\n _FarPlane: { value: 1 }\n },\n vertexShader: vert,\n fragmentShader: frag\n });\n }\n\n set far_plane(value)\n {\n this.uniforms._FarPlane.value = value;\n }\n\n get far_plane()\n {\n return this.uniforms._FarPlane.value;\n }\n}\n\nexport { DepthNormalMaterial };\n","import { CameraManager } from '../CameraManager';\nimport { OScreen } from '../OScreen';\n\nimport { ClearDepthNormalMaterial } from '../materials/ClearDepthNormalMaterial';\nimport { DepthNormalMaterial } from '../materials/DepthNormalMaterial';\n\nimport { WebGLRenderTarget } from 'three';\nimport { Vector3 } from 'three';\n\nclass DepthAndNormalsRenderer\n{\n constructor()\n {\n this.RT = new WebGLRenderTarget(OScreen.width, OScreen.height);\n\n this.clear_depth_normal_mat = new ClearDepthNormalMaterial(1, new Vector3(0, 0, 1));\n this.depth_normal_material = new DepthNormalMaterial();\n }\n\n render(graphics)\n {\n this.__resize_RT_if_necessary();\n\n graphics.clear(this.RT, undefined, true, true);\n\n graphics.blit_clear_with_material(this.RT, this.clear_depth_normal_mat);\n\n this.depth_normal_material.far_plane = CameraManager.current.far;\n\n graphics.render(undefined, undefined, this.RT, this.depth_normal_material);\n }\n\n __resize_RT_if_necessary()\n {\n if (this.RT.width !== OScreen.width || this.RT.height !== OScreen.height)\n {\n this.RT.setSize(OScreen.width, OScreen.height);\n }\n }\n\n get render_target()\n {\n return this.RT;\n }\n}\n\nexport { DepthAndNormalsRenderer };\n","import { BlitMaterial } from '../materials/BlitMaterial';\n\nimport { Scene } from 'three';\nimport { Mesh } from 'three';\nimport { PlaneGeometry } from 'three';\nimport { OrthographicCamera } from 'three';\n\nclass Blitter\n{\n constructor(renderer)\n {\n this.renderer = renderer;\n this._blit_scene = new Scene();\n this._blit_material = new BlitMaterial();\n this._blit_quad = new Mesh(\n new PlaneGeometry(1, 1), this._blit_material);\n this._blit_scene.add(this._blit_quad);\n this._blit_camera = new OrthographicCamera(-1, 1, 1, -1, -10000, 10000);\n }\n\n blit(src, dst)\n {\n this._blit_quad.material = this._blit_material;\n\n const src_texture = src.isWebGLRenderTarget === true ? src.texture : src;\n const src_width = src.isWebGLRenderTarget === true ? src.width : src.image.width;\n const src_height = src.isWebGLRenderTarget === true ? src.height : src.image.height;\n\n this._blit_quad.material.uniforms._MainTex.value = src_texture;\n this._blit_quad.material.uniforms._Resolution.value.set(src_width, src_height);\n\n if (dst)\n {\n this._blit_quad.material.uniforms._TargetResolution.value.set(dst.width, dst.height);\n }\n else\n {\n this.renderer.getSize(this._blit_quad.material.uniforms._TargetResolution.value);\n }\n\n this.__render(dst);\n }\n\n material_pass(mat, dst)\n {\n this._blit_quad.material = mat;\n // this._blit_quad.material.uniforms._MainTex.value = undefined;\n // this._blit_quad.material.uniforms._Resolution.value.set(1, 1);\n\n this.__render(dst);\n }\n\n blit_with_material(src, dst, mat)\n {\n const src_texture = src.isWebGLRenderTarget === true ? src.texture : src;\n const src_width = src.isWebGLRenderTarget === true ? src.width : src.image.width;\n const src_height = src.isWebGLRenderTarget === true ? src.height : src.image.height;\n\n this._blit_quad.material = mat;\n this._blit_quad.material.uniforms._MainTex.value = src_texture;\n this._blit_quad.material.uniforms._Resolution.value.set(src_width, src_height);\n\n if (dst)\n {\n this._blit_quad.material.uniforms._TargetResolution.value.set(dst.width, dst.height);\n }\n else\n {\n this.renderer.getSize(this._blit_quad.material.uniforms._TargetResolution.value);\n }\n\n this.__render(dst);\n }\n\n blit_clear_with_material(dst_RT, mat)\n {\n this._blit_quad.material = mat;\n\n this.__render(dst_RT);\n }\n\n dispose()\n {\n this._blit_quad.geometry.dispose();\n this._blit_quad.material.dispose();\n }\n\n __render(RT)\n {\n RT = RT === undefined ? null : RT;\n\n const current_rt = this.renderer.getRenderTarget();\n\n this.renderer.setRenderTarget(RT === undefined ? null : RT);\n this.renderer.render(this._blit_scene, this._blit_camera);\n\n this.renderer.setRenderTarget(current_rt);\n }\n}\n\nexport { Blitter };\n","import { Configuration } from './Configuration';\nimport { BaseRender } from './render_mode/BaseRender';\nimport { OScreen } from './OScreen';\nimport { CameraManager } from './CameraManager';\nimport { SceneManager } from './SceneManager';\nimport { Capabilities } from './Capabilities';\nimport { DepthAndNormalsRenderer } from './render_utilities/DepthAndNormalsRenderer';\nimport { Blitter } from './render_utilities/Blitter';\n\nimport {\n NearestFilter,\n RGBAFormat,\n LinearEncoding,\n FloatType,\n WebGLRenderTarget,\n ShaderMaterial,\n NoBlending,\n AlwaysDepth\n} from 'three';\n\nimport { WebGLRenderer } from 'three';\n\nclass Graphics\n{\n init(canvas, core_attributes, context_attributes, threejs_attributes)\n {\n this._renderer = undefined;\n this.blitter = undefined;\n this.canvas = undefined;\n this.no_render = undefined;\n this.current_render_mode = undefined;\n this.generateDepthNormalTexture = false;\n this.depth_and_normals_renderer = undefined;\n\n this.is_webgl2 = false;\n this.canvas_context = undefined;\n this.context_attributes = undefined;\n\n this.core_attributes = {\n force_webgl2: true,\n xr_enabled: false\n };\n\n this.context_attributes = {\n alpha: true,\n antialias: false,\n depth: true,\n desynchronized: false,\n failIfMajorPerformanceCaveat: false,\n powerPreference: 'high-performance',\n premultipliedAlpha: true,\n preserveDrawingBuffer: true,\n stencil: false\n };\n\n this.threejs_attributes = {\n logarithmicDepthBuffer: false\n };\n\n Object.assign(this.core_attributes, core_attributes);\n Object.assign(this.context_attributes, context_attributes);\n\n Object.assign(this.threejs_attributes, this.context_attributes);\n Object.assign(this.threejs_attributes, threejs_attributes);\n\n if (this.core_attributes.force_webgl2)\n {\n this.canvas_context = canvas.getContext('webgl2', this.context_attributes) ||\n canvas.getContext('webgl', this.context_attributes) ||\n canvas.getContext('experimental-webgl', this.context_attributes);\n }\n else\n {\n this.canvas_context = canvas.getContext('webgl', this.context_attributes) ||\n canvas.getContext('experimental-webgl', this.context_attributes);\n }\n\n this.is_webgl2 = this.canvas_context.constructor.name === 'WebGL2RenderingContext';\n\n // console.log(`Using WebGL ${this.is_webgl2 ? 2 : 1}`);\n\n this.threejs_attributes.canvas = canvas;\n this.threejs_attributes.context = this.canvas_context;\n\n this._renderer = new WebGLRenderer(this.threejs_attributes);\n\n if (this.core_attributes.xr_enabled)\n {\n this._renderer.xr.enabled = true;\n }\n else\n {\n this._renderer.autoClear = false;\n }\n\n this._renderer.setPixelRatio(1);\n\n OScreen.dpr = Configuration.dpr;\n\n if (!this.is_webgl2)\n {\n this._renderer.extensions.get('ANGLE_instanced_arrays');\n }\n\n this.blitter = new Blitter(this._renderer);\n\n this.canvas = this._renderer.domElement;\n\n this.no_render = new BaseRender();\n\n this.current_render_mode = this.no_render;\n Capabilities.max_anisotropy = this._renderer.capabilities.getMaxAnisotropy();\n Capabilities.vertex_texture_sampler_available = this._renderer.capabilities.maxVertexTextures > 0;\n Capabilities.fp_textures_available = this.is_floating_point_texture_available();\n\n this.generateDepthNormalTexture = false;\n\n this.depth_and_normals_renderer = new DepthAndNormalsRenderer();\n\n this.resize_observer = new ResizeObserver(this.on_resize.bind(this));\n this.resize_observer.observe(this.canvas);\n }\n\n get dom_element()\n {\n return this._renderer.domElement;\n }\n\n get depth_normals_RT()\n {\n return this.depth_and_normals_renderer.render_target;\n }\n\n set_state(new_state)\n {\n // console.log('VIEWAPI - map render mode switch to: ' + new_state.constructor.name);\n\n this.current_render_mode.on_exit(this, this._renderer);\n this.current_render_mode = new_state;\n this.current_render_mode.on_enter(this, this._renderer);\n }\n\n update()\n {\n if (this.generateDepthNormalTexture)\n {\n this.depth_and_normals_renderer.render(this);\n }\n\n this.__update_current_camera();\n\n if (CameraManager.current)\n {\n this.current_render_mode.render();\n }\n\n OScreen.update();\n }\n\n __update_current_camera()\n {\n if (CameraManager.current)\n {\n CameraManager.current.aspect = OScreen.aspect_ratio;\n CameraManager.current.updateProjectionMatrix();\n CameraManager.current.updateMatrix();\n CameraManager.current.updateMatrixWorld(true);\n }\n }\n\n render(scene, camera, RT, override_mat)\n {\n this.__apply_override_material(scene, override_mat);\n\n this._renderer.setRenderTarget(RT === undefined ? null : RT);\n this._renderer.render(scene || SceneManager.current,\n camera || CameraManager.current);\n\n this.__apply_override_material(scene, undefined);\n }\n\n render_scene(scene)\n {\n if (scene.on_pre_render)\n {\n scene.on_pre_render();\n }\n\n if (scene.render)\n {\n scene.render();\n }\n else\n {\n this.render(scene, undefined);\n }\n\n if (scene.on_post_render)\n {\n scene.on_post_render();\n }\n }\n\n __apply_override_material(scene, mat)\n {\n mat = mat === undefined ? null : mat;\n if (scene)\n {\n scene.overrideMaterial = mat;\n }\n else\n {\n SceneManager.current.overrideMaterial = mat;\n }\n }\n\n readback_RT(RT, buffer)\n {\n this._renderer.readRenderTargetPixels(RT, 0, 0, RT.width, RT.height, buffer);\n }\n\n clear(RT, camera, clear_depth, clear_stencil)\n {\n this._renderer.setRenderTarget(RT === undefined ? null : RT);\n\n if (camera)\n {\n this._renderer.setClearColor(camera.clear_color, camera.clear_alpha);\n }\n\n this._renderer.clear(!!camera, // clear color\n !!clear_depth,\n !!clear_stencil);\n }\n\n on_resize(entries)\n {\n for (const entry of entries)\n {\n OScreen.dpr = Configuration.dpr;\n OScreen.update_position(entry.contentRect.x, entry.contentRect.y);\n OScreen.update_size(entry.contentRect.width, entry.contentRect.height);\n\n this.canvas.width = OScreen.render_width;\n this.canvas.height = OScreen.render_height;\n\n this._renderer.setViewport(0, 0, OScreen.render_width, OScreen.render_height);\n\n this.__update_current_camera();\n }\n }\n\n material_pass(mat, dst)\n {\n this.blitter.material_pass(mat, dst);\n }\n\n blit(src_RT, dst_RT, mat)\n {\n if (mat)\n {\n this.blitter.blit_with_material(src_RT, dst_RT, mat);\n }\n else\n {\n this.blitter.blit(src_RT, dst_RT);\n }\n }\n\n blit_clear_with_material(dst_RT, mat)\n {\n this.blitter.blit_clear_with_material(dst_RT, mat);\n }\n\n take_screenshot(blob_callback, width = OScreen.width, height = OScreen.height)\n {\n // const ctx = this;\n\n const old_width = OScreen.width;\n const old_height = OScreen.height;\n\n const new_width = width;\n const new_height = height;\n\n const tile_width = 1024;\n const tile_height = 1024;\n\n const divisions_x = parseInt(Math.ceil(new_width / tile_width));\n const divisions_y = parseInt(Math.ceil(new_height / tile_height));\n\n OScreen.update_size(tile_width, tile_height);\n const old_dpr = this._renderer.getPixelRatio();\n this._renderer.setPixelRatio(1);\n\n this._renderer.setSize(tile_width, tile_height, false);\n\n const canvas_2d = document.createElement('canvas');\n const ctx_2D = canvas_2d.getContext('2d');\n\n ctx_2D.canvas.width = new_width;\n ctx_2D.canvas.height = new_height;\n\n CameraManager.current.aspect = OScreen.aspect_ratio;\n CameraManager.current.updateMatrix();\n CameraManager.current.updateMatrixWorld(true);\n\n for (let x = 0; x < divisions_x; x++)\n {\n for (let y = 0; y < divisions_y; y++)\n {\n CameraManager.current.setViewOffset(new_width, new_height,\n OScreen.width * x, OScreen.height * y,\n OScreen.width, OScreen.height);\n this.current_render_mode.render();\n\n ctx_2D.drawImage(this._renderer.domElement, OScreen.width * x, OScreen.height * y);\n }\n }\n\n // transform the result canvas into a blob\n // } from them the callback turns into a ULR and download it\n ctx_2D.canvas.toBlob(blob_callback, 'image/png;base64;');\n\n CameraManager.current.clearViewOffset();\n\n OScreen.update_size(old_width, old_height);\n this._renderer.setPixelRatio(old_dpr);\n this._renderer.setSize(old_width, old_height, false);\n\n CameraManager.current.aspect = OScreen.aspect_ratio;\n CameraManager.current.updateMatrix();\n CameraManager.current.updateMatrixWorld(true);\n }\n\n download_screenshot(blob)\n {\n const link = document.createElement('a');\n link.download = 'Snapshot.png';\n\n link.href = URL.createObjectURL(blob);\n link.click();\n\n link.onclick = function()\n {\n requestAnimationFrame(function()\n {\n URL.revokeObjectURL(link.href);\n });\n link.removeAttribute('href');\n };\n }\n\n dispose()\n {\n this._renderer.dispose();\n this.current_render_mode.dispose();\n this.blitter.dispose();\n }\n\n is_floating_point_texture_available()\n {\n const RT = new WebGLRenderTarget(1, 1, {\n minFilter: NearestFilter,\n magFilter: NearestFilter,\n format: RGBAFormat,\n encoding: LinearEncoding,\n type: FloatType,\n stencilBuffer: false,\n depthBuffer: false\n });\n\n const vert = `\n void main()\n {\n gl_Position = vec4(uv * 2.0 - 1.0, 1.0, 1.0);\n }\n `;\n const frag = `\n void main()\n {\n gl_FragColor = vec4(0.0, 4865.35, 0.0, 1.0);\n }\n `;\n\n const mat = new ShaderMaterial({\n vertexShader: vert,\n fragmentShader: frag,\n depthWrite: false,\n blending: NoBlending,\n depthTest: false,\n depthFunc: AlwaysDepth\n });\n\n this.material_pass(mat, RT);\n\n const output = new Float32Array(4);\n this._renderer.readRenderTargetPixels(RT, 0, 0, 1, 1, output);\n\n return Math.abs(output[1] - 4865.35) < 0.001;\n }\n}\n\nconst graphics = new Graphics();\nexport { graphics as Graphics };\n","import frag from '../shaders/normal/normal.frag';\nimport vert from '../shaders/normal/normal.vert';\n\nimport { ShaderMaterial } from 'three';\n\nclass NormalMaterial extends ShaderMaterial\n{\n constructor()\n {\n super({\n uniforms: {\n },\n vertexShader: vert,\n fragmentShader: frag\n });\n }\n}\n\nexport { NormalMaterial };\n","import { CameraManager } from '../CameraManager';\nimport { SceneManager } from '../SceneManager';\nimport { BaseRender } from '../render_mode/BaseRender';\nimport { Graphics } from '../Graphics';\nimport { NormalMaterial } from '../materials/NormalMaterial';\n\nclass DebugNormalsRender extends BaseRender\n{\n constructor()\n {\n super();\n }\n\n render()\n {\n Graphics.clear(undefined, CameraManager.current, true, true);\n\n Graphics.render(SceneManager.current, CameraManager.current, undefined, new NormalMaterial());\n }\n}\n\nexport { DebugNormalsRender };\n","class KeyboardInput\n{\n init(container)\n {\n this.ctrlz_pressed = false;\n this.ctrlz_fired = false;\n\n this.keys = {};\n this.keys_keys = [];\n this.container = container;\n\n this.container.addEventListener('keydown', this.on_key_down.bind(this), false);\n this.container.addEventListener('keyup', this.on_key_up.bind(this), false);\n }\n\n on_key_down(e)\n {\n if (e.keyCode === 90 && e.ctrlKey && !this.ctrlz_fired)\n {\n this.ctrlz_pressed = true;\n this.ctrlz_fired = true;\n }\n\n if (e.code)\n {\n this.press_key(e.code);\n }\n }\n\n on_key_up(e)\n {\n this.release_key(e.code);\n }\n\n clear()\n {\n this.ctrlz_pressed = false;\n\n for (let i = 0; i < this.keys_keys.length; i++)\n {\n this.keys[this.keys_keys[i]].pressed = false;\n this.keys[this.keys_keys[i]].released = false;\n }\n }\n\n release_key(key_name)\n {\n const key = this.keys[key_name];\n if (key)\n {\n key.fired = false;\n key.down = false;\n key.released = true;\n }\n }\n\n release_keys()\n {\n this.ctrlz_fired = false;\n\n for (let i = 0; i < this.keys_keys.length; i++)\n {\n this.keys[this.keys_keys[i]].fired = false;\n this.keys[this.keys_keys[i]].down = false;\n }\n }\n\n press_key(key_name)\n {\n const key = this.keys[key_name];\n if (key)\n {\n if (key.down === false)\n {\n key.pressed = true;\n }\n key.down = true;\n key.fired = true;\n }\n }\n\n is_key_pressed(key_name)\n {\n const key = this.keys[key_name];\n if (key)\n {\n return key.pressed;\n }\n return false;\n }\n\n is_key_down(key_name)\n {\n const key = this.keys[key_name];\n if (key)\n {\n return key.down;\n }\n return false;\n }\n\n is_key_released(key_name)\n {\n const key = this.keys[key_name];\n if (key)\n {\n return key.released;\n }\n\n return false;\n }\n\n register_key(key)\n {\n this.keys[key] =\n {\n key_name: key,\n pressed: false,\n down: false,\n fired: false\n };\n\n this.keys_keys = Object.keys(this.keys);\n }\n\n unregister_key(key_name)\n {\n delete this.keys[key_name];\n }\n\n dispose()\n {\n this.container.removeEventListener('keydown', this.on_key_down.bind(this), false);\n this.container.removeEventListener('keyup', this.on_key_up.bind(this), false);\n }\n}\n\nexport { KeyboardInput };\n","\nclass OS\n{\n init()\n {\n this.operating_systems = {\n ANDROID: 'android',\n IOS: 'ios',\n LINUX: 'linux',\n MAC: 'mac',\n WINDOWS: 'windows'\n };\n\n this.is_mobile = !!(navigator.userAgent.match(/(iPhone|iPod|iPad|Android|playbook|silk|BlackBerry|BB10|Windows Phone|Tizen|Bada|webOS|IEMobile|Opera Mini)/));\n this.is_ipad = !!(navigator.userAgent.match(/Mac/) && navigator.maxTouchPoints && navigator.maxTouchPoints > 2);\n this.is_ios = !!navigator.userAgent.match(/(iPhone|iPod|iPad)/) || this.is_ipad;\n\n this.is_android = this.get_os() === this.operating_systems.ANDROID;\n this.is_linux = this.get_os() === this.operating_systems.LINUX;\n this.is_mac = this.get_os() === this.operating_systems.MAC;\n this.is_windows = this.get_os() === this.operating_systems.WINDOWS;\n }\n\n get_os()\n {\n const userAgent = window.navigator.userAgent;\n const platform = window.navigator.platform;\n const macosPlatforms = ['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K'];\n const windowsPlatforms = ['Win32', 'Win64', 'Windows', 'WinCE'];\n const iosPlatforms = ['iPhone', 'iPad', 'iPod'];\n let os = null;\n\n if (macosPlatforms.indexOf(platform) !== -1)\n {\n os = this.operating_systems.MAC;\n }\n else if (iosPlatforms.indexOf(platform) !== -1)\n {\n os = this.operating_systems.IOS;\n }\n else if (windowsPlatforms.indexOf(platform) !== -1)\n {\n os = this.operating_systems.WINDOWS;\n }\n else if (/Android/.test(userAgent))\n {\n os = this.operating_systems.ANDROID;\n }\n else if (!os && /Linux/.test(platform))\n {\n os = this.operating_systems.LINUX;\n }\n\n return os;\n }\n}\n\nconst os = new OS();\nexport { os as OS };\n","import { Vector3 } from 'three';\n\nclass ReflectionPlaneContext\n{\n init()\n {\n this.target_geometry = undefined;\n this.target_position = new Vector3();\n }\n\n set_target_geometry(geometry)\n {\n this.target_geometry = geometry;\n }\n}\n\nconst reflection_plane_context = new ReflectionPlaneContext();\nexport { reflection_plane_context as ReflectionPlaneContext };\n","import { Vector2 } from 'three';\nimport { ShaderMaterial } from 'three';\nimport { Mesh } from 'three';\nimport { DataTexture } from 'three';\nimport { RGBAFormat } from 'three';\nimport { RGBFormat } from 'three';\nimport { FloatType } from 'three';\n\nclass GeometryBatch\n{\n constructor(geometry, batch_width)\n {\n this.geometry = geometry;\n\n this.material = undefined;\n this.uniforms = {};\n this.batch_width = batch_width;\n\n this.data_textures = [];\n\n this.object_names = undefined;\n\n this.zero_offset = new Vector2();\n this.write_offset = new Vector2();\n\n this.uniform_dirty_count = 0;\n\n this.tmp_uploaded_data_count = 0;\n }\n\n init(object_names, vert_shader, frag_shader)\n {\n this.material = new ShaderMaterial({\n uniforms: this.uniforms,\n vertexShader: vert_shader,\n fragmentShader: frag_shader\n });\n this.object_names = object_names;\n }\n\n add_global_uniform(name, data)\n {\n this.uniforms[name] = { value: data };\n this.material.needsUpdate = true;\n }\n\n set_global_uniform(name, data)\n {\n this.uniforms[name].value = data;\n }\n\n add_object_uniform_v3(uniform_name, default_value_v3)\n {\n const src_tex = this.__create_rgb_texture(this.batch_width);\n const dst_tex = this.__create_rgb_texture(this.batch_width);\n const one_pixel_tex = this.__create_rgb_texture(1);\n\n const new_data_tex = this.__add_data_texture(uniform_name, src_tex, dst_tex, one_pixel_tex);\n\n if (default_value_v3)\n {\n this.__flood_data_texture_rgb(new_data_tex, default_value_v3);\n }\n }\n\n add_object_uniform_v4(uniform_name, default_value_v4)\n {\n const src_tex = this.__create_rgba_texture(this.batch_width);\n const dst_tex = this.__create_rgba_texture(this.batch_width);\n const one_pixel_tex = this.__create_rgba_texture(1);\n\n const new_data_tex = this.__add_data_texture(uniform_name, src_tex, dst_tex, one_pixel_tex);\n\n if (default_value_v4)\n {\n this.__flood_data_texture_rgba(new_data_tex, default_value_v4);\n }\n }\n\n add_object_uniform_v4_float(uniform_name, default_value_v4)\n {\n const src_tex = this.__create_rgba_float_texture(this.batch_width);\n const dst_tex = this.__create_rgba_float_texture(this.batch_width);\n const one_pixel_tex = this.__create_rgba_float_texture(1);\n\n const new_data_tex = this.__add_data_texture(uniform_name, src_tex, dst_tex, one_pixel_tex);\n\n if (default_value_v4)\n {\n this.__flood_data_texture_rgba(new_data_tex, default_value_v4);\n }\n }\n\n set_object_uniform_v3(object_name, uniform_name, vector3, use_r, use_g, use_b)\n {\n const obj_index = this.__get_object_index(object_name);\n const data_texture = this.__get_data_texture(uniform_name);\n\n this.__set_pixel_rgb(data_texture.src, obj_index, vector3, use_r, use_g, use_b);\n this.__set_pixel_rgb(data_texture.one_pixel, 0, vector3, use_r, use_g, use_b);\n\n data_texture.last_accessed_index = obj_index;\n\n data_texture.dirty_count++;\n }\n\n set_object_uniform_v4(object_name, uniform_name, vector4, use_r, use_g, use_b, use_a)\n {\n const obj_index = this.__get_object_index(object_name);\n const data_texture = this.__get_data_texture(uniform_name);\n\n this.__set_pixel_rgba(data_texture.src, obj_index, vector4, use_r, use_g, use_b, use_a);\n this.__set_pixel_rgba(data_texture.one_pixel, 0, vector4, use_r, use_g, use_b, use_a);\n data_texture.last_accessed_index = obj_index;\n\n data_texture.dirty_count++;\n }\n\n upload_texture_data(renderer, upload_budget)\n {\n for (let i = 0; i < this.data_textures.length; i++)\n {\n if (upload_budget > 0 && this.data_textures[i].dirty_count > 0)\n {\n if (this.data_textures[i].dirty_count === 1)\n {\n this.__partial_texture_data_upload(renderer, this.data_textures[i]);\n }\n if (this.data_textures[i].dirty_count > 1)\n {\n this.__full_texture_data_upload(renderer, this.data_textures[i]);\n }\n\n this.data_textures[i].dirty_count = 0;\n\n upload_budget--;\n }\n }\n }\n\n get_uniform_dirty_count()\n {\n this.uniform_dirty_count = 0;\n for (let i = 0; i < this.data_textures.length; i++)\n {\n if (this.data_textures[i].dirty_count > 0)\n {\n this.uniform_dirty_count++;\n }\n }\n return this.uniform_dirty_count;\n }\n\n __full_texture_data_upload(renderer, texture_data)\n {\n // console.log(\"full texture update of\"+ texture_data.name);\n texture_data.dst.needsUpdate = true;\n renderer.copyTextureToTexture(\n this.zero_offset,\n texture_data.src,\n texture_data.dst\n );\n }\n\n __partial_texture_data_upload(renderer, texture_data)\n {\n // console.log(\"partial texture update\"+ texture_data.name);\n const index = texture_data.last_accessed_index;\n if (index === -1)\n {\n return;\n }\n\n this.write_offset.y = Math.floor(index / this.batch_width);\n this.write_offset.x = index - this.batch_width * this.write_offset.y;\n renderer.copyTextureToTexture(\n this.write_offset,\n texture_data.one_pixel,\n texture_data.dst\n );\n }\n\n get_mesh()\n {\n return new Mesh(this.geometry, this.material);\n }\n\n __set_pixel_rgb(data_texture, index, vector3, use_r, use_g, use_b)\n {\n if (use_r)\n {\n data_texture.image.data[index * 3 + 0] = vector3.x;\n }\n if (use_g)\n {\n data_texture.image.data[index * 3 + 1] = vector3.y;\n }\n if (use_b)\n {\n data_texture.image.data[index * 3 + 2] = vector3.z;\n }\n }\n\n __set_pixel_rgba(data_texture, index, vector4, use_r, use_g, use_b, use_a)\n {\n if (use_r)\n {\n data_texture.image.data[index * 4 + 0] = vector4.x;\n }\n if (use_g)\n {\n data_texture.image.data[index * 4 + 1] = vector4.y;\n }\n if (use_b)\n {\n data_texture.image.data[index * 4 + 2] = vector4.z;\n }\n if (use_a)\n {\n data_texture.image.data[index * 4 + 3] = vector4.w;\n }\n }\n\n __flood_data_texture_rgb(data_texture, v3)\n {\n for (let i = 0; i < this.batch_width * this.batch_width; i++)\n {\n this.__set_pixel_rgb(data_texture.src, i, v3, true, true, true);\n data_texture.dirty_count++;\n }\n }\n\n __flood_data_texture_rgba(data_texture, v4)\n {\n for (let i = 0; i < this.batch_width * this.batch_width; i++)\n {\n this.__set_pixel_rgba(data_texture.src, i, v4, true, true, true, true);\n data_texture.dirty_count++;\n }\n }\n\n __create_rgb_texture(width)\n {\n const data = new Uint8Array(3 * width * width);\n return new DataTexture(data, width, width, RGBFormat);\n }\n\n __create_rgba_texture(width)\n {\n const data = new Uint8Array(4 * width * width);\n return new DataTexture(data, width, width, RGBAFormat);\n }\n\n __create_rgba_float_texture(width)\n {\n const data = new Float32Array(4 * width * width);\n return new DataTexture(data, width, width, RGBAFormat, FloatType);\n }\n\n __get_data_texture(uniform_name)\n {\n for (let i = 0; i < this.data_textures.length; i++)\n {\n if (this.data_textures[i].name === uniform_name)\n {\n return this.data_textures[i];\n }\n }\n console.error('Data texture ' + uniform_name + ' does not exist');\n return undefined;\n }\n\n __get_object_index(name)\n {\n for (let i = 0; i < this.object_names.length; i++)\n {\n if (this.object_names[i] === name)\n {\n return i;\n }\n }\n console.error('the name ' + name + ' is not contained in this batch');\n return undefined;\n }\n\n __add_data_texture(uniform_name, src_texture, dst_texture, one_pixel_text)\n {\n dst_texture.needsUpdate = true;\n\n this.data_textures.push({\n name: uniform_name,\n src: src_texture,\n dst: dst_texture,\n one_pixel: one_pixel_text,\n last_accessed_index: -1,\n dirty_count: 0\n });\n\n this.uniforms[uniform_name] = { value: dst_texture };\n return this.data_textures[this.data_textures.length - 1];\n }\n\n dispose()\n {\n for (let i = 0; i < this.data_textures.length; i++)\n {\n this.data_textures[i].src.dispose();\n this.data_textures[i].dst.dispose();\n this.data_textures[i].one_pixel.dispose();\n }\n }\n}\n\nexport { GeometryBatch };\n","import { GeometryBatch } from './GeometryBatch';\n\nimport * as BufferGeometryUtils from 'three/examples/jsm/utils/BufferGeometryUtils.js';\n\nimport { BufferAttribute } from 'three';\nimport { OMath } from '../utilities/OMath';\n\nclass GeometryBatcher\n{\n init()\n {\n this.batches = [];\n }\n\n batch(buffer_geometries)\n {\n const attr_accessor_uvs = [];\n const texture_width = OMath.ceilPowerOfTwo(Math.sqrt(buffer_geometries.length));\n // console.log(\"Store count: \" + buffer_geometries.length + \", Texture size: \" +texture_width);\n\n this.__init_uv_array(attr_accessor_uvs, texture_width);\n\n let uv_index = 0;\n\n for (let i = 0; i < buffer_geometries.length; i++)\n {\n const vertex_count = buffer_geometries[i].getAttribute('position').count;\n const y = Math.floor(i / texture_width);\n const x = i - texture_width * y;\n for (let count = 0; count < vertex_count; count++)\n {\n attr_accessor_uvs[uv_index] = (x / texture_width) + 0.5 / texture_width;\n attr_accessor_uvs[uv_index + 1] = (y / texture_width) + 0.5 / texture_width;\n uv_index += 2;\n }\n }\n\n const buffer_attribute = new BufferAttribute(new Float32Array(attr_accessor_uvs), 2);\n const buffer_geometry = BufferGeometryUtils.mergeBufferGeometries(buffer_geometries);\n buffer_geometry.setAttribute('attr_accessor_uv', buffer_attribute);\n\n this.batches.push(new GeometryBatch(buffer_geometry, texture_width));\n return this.batches[this.batches.length - 1];\n }\n\n upload_texture_data(renderer)\n {\n for (let i = 0; i < this.batches.length; i++)\n {\n this.batches[i].upload_texture_data(renderer, 1);\n }\n }\n\n __init_uv_array(uvs, texture_width)\n {\n for (let i = 0; i < texture_width * texture_width * 2; i++)\n {\n uvs.push(0);\n }\n }\n}\n\nconst geometry_batcher = new GeometryBatcher();\nexport { geometry_batcher as GeometryBatcher };\n","import { CameraManager } from './CameraManager';\nimport { Graphics } from './Graphics';\n\nimport { Vector2 } from 'three';\nimport { Scene } from 'three';\nimport { OrthographicCamera } from 'three';\n\nclass UI\n{\n init(input)\n {\n this.input = input;\n this.ui_elements = [];\n this._tmp_normalized_pos = new Vector2();\n this.ss_scene = new Scene();\n this.ss_scene.matrixWorldAutoUpdate = false;\n this.ss_scene.frustumCulled = false;\n\n this.ws_scene = new Scene();\n this.ws_scene.matrixWorldAutoUpdate = false;\n this.ws_scene.frustumCulled = false;\n\n this.ss_camera = new OrthographicCamera(-1, 1, 1, -1, -100, 100);\n }\n\n delete_element(elem)\n {\n const index = this.ui_elements.indexOf(elem);\n if (index > -1)\n {\n this.ui_elements.splice(index, 1);\n }\n\n this.ss_scene.remove(elem);\n this.ws_scene.remove(elem);\n\n elem.dispose();\n }\n\n add_screen_space_element(elem)\n {\n this.ui_elements.push(elem);\n this.ss_scene.add(elem);\n\n elem.set_screen_space_coordinate_system();\n }\n\n add_world_space_element(elem)\n {\n this.ui_elements.push(elem);\n this.ws_scene.add(elem);\n\n elem.set_world_space_coordinate_system();\n }\n\n update()\n {\n // this.ss_camera.left = -OScreen.width / 2;\n // this.ss_camera.right = OScreen.width / 2;\n // this.ss_camera.top = OScreen.top / 2;\n // this.ss_camera.right = -OScreen.bottom / 2;\n this.ss_camera.updateProjectionMatrix();\n\n this._tmp_normalized_pos.copy(this.input.NDC);\n for (let i = 0; i < this.ui_elements.length; i++)\n {\n this.ui_elements[i].update_state(this._tmp_normalized_pos);\n }\n }\n\n render(renderer)\n {\n // renderer.render_ui(this.scene);\n if (this.ss_scene.children.length > 0)\n {\n Graphics.render(this.ss_scene, this.ss_camera);\n }\n if (this.ws_scene.children.length > 0)\n {\n Graphics.render(this.ws_scene, CameraManager.current);\n }\n }\n\n clear()\n {\n this.current_clicked_element = undefined;\n }\n}\n\nconst ui = new UI();\nexport { ui as UI };\n","import { Vector3, Plane, Quaternion, Sphere, Line3 } from 'three';\nimport { OMath } from './OMath';\n\nclass PerspectiveFrustumPointFitter\n{\n constructor()\n {\n this.sphere = new Sphere();\n }\n\n fit_points(points, camera_quaternion, vertical_fov, aspect)\n {\n this.sphere.setFromPoints(points);\n\n const v_fov = OMath.degToRad(vertical_fov / 2);\n const h_fov = (2 * Math.atan(Math.tan(v_fov) * aspect)) / 2;\n\n const up_plane_normal = this.get_up_plane_normal(camera_quaternion, v_fov);\n const down_plane_normal = this.get_down_plane_normal(camera_quaternion, v_fov);\n const left_plane_normal = this.get_left_plane_normal(camera_quaternion, h_fov);\n const right_plane_normal = this.get_right_plane_normal(camera_quaternion, h_fov);\n\n const camera_forward_dir = new Vector3(0, 0, -1).applyQuaternion(camera_quaternion);\n\n const sphere_center = this.sphere.center.clone();\n\n const pull_back_distance = this.get_distance_to_fit_rect(this.sphere.radius * 2, this.sphere.radius * 2, vertical_fov, aspect);\n const far_pos = sphere_center.clone().add(camera_forward_dir.clone().multiplyScalar(pull_back_distance * -1));\n\n const up_plane = new Plane().setFromNormalAndCoplanarPoint(up_plane_normal, far_pos);\n const down_plane = new Plane().setFromNormalAndCoplanarPoint(down_plane_normal, far_pos);\n\n const left_plane = new Plane().setFromNormalAndCoplanarPoint(left_plane_normal, far_pos);\n const right_plane = new Plane().setFromNormalAndCoplanarPoint(right_plane_normal, far_pos);\n\n this.apply_center_correction_to_pos(far_pos, points, camera_quaternion, up_plane, down_plane, left_plane, right_plane);\n\n up_plane.setFromNormalAndCoplanarPoint(up_plane_normal, far_pos);\n down_plane.setFromNormalAndCoplanarPoint(down_plane_normal, far_pos);\n\n left_plane.setFromNormalAndCoplanarPoint(left_plane_normal, far_pos);\n right_plane.setFromNormalAndCoplanarPoint(right_plane_normal, far_pos);\n\n let closest_distance = Infinity;\n\n const inverse_dir = camera_forward_dir.clone().multiplyScalar(pull_back_distance * -2);\n for (let i = 0; i < points.length; i++)\n {\n const line = new Line3(points[i].clone(), points[i].clone().add(inverse_dir));\n\n const up_line_intersection = new Vector3();\n const down_line_intersection = new Vector3();\n\n const left_line_intersection = new Vector3();\n const right_line_intersection = new Vector3();\n\n up_plane.intersectLine(line, up_line_intersection);\n down_plane.intersectLine(line, down_line_intersection);\n\n left_plane.intersectLine(line, left_line_intersection);\n right_plane.intersectLine(line, right_line_intersection);\n\n if (up_line_intersection.length() < 0.0001)\n {\n console.log('up intersection not found', i);\n }\n if (down_line_intersection.length() < 0.0001)\n {\n console.log('down intersection not found', i);\n }\n if (left_line_intersection.length() < 0.0001)\n {\n console.log('left intersection not found', i);\n }\n if (right_line_intersection.length() < 0.0001)\n {\n console.log('right intersection not found', i);\n }\n\n const new_up_distance = points[i].clone().sub(up_line_intersection).length();\n const new_down_distance = points[i].clone().sub(down_line_intersection).length();\n\n const new_left_distance = points[i].clone().sub(left_line_intersection).length();\n const new_right_distance = points[i].clone().sub(right_line_intersection).length();\n\n const vertical_min = Math.min(new_up_distance, new_down_distance);\n const horizontal_min = Math.min(new_left_distance, new_right_distance);\n\n const min = Math.min(vertical_min, horizontal_min);\n\n if (min < closest_distance)\n {\n closest_distance = min;\n }\n }\n\n const forward_correction = camera_forward_dir.clone().multiplyScalar(closest_distance);\n const closest_position = far_pos.clone().add(forward_correction);\n\n return closest_position;\n }\n\n apply_center_correction_to_pos(target_pos, points, camera_quaternion, up_plane, down_plane, left_plane, right_plane)\n {\n const vertical_offset = this.get_vertical_correction(points, down_plane, up_plane, camera_quaternion);\n const horizontal_offset = this.get_horizontal_correction(points, left_plane, right_plane, camera_quaternion);\n\n target_pos.add(vertical_offset);\n target_pos.add(horizontal_offset);\n }\n\n get_vertical_correction(points, down_plane, up_plane, camera_quaternion)\n {\n let closest_distance_to_up_plane = Infinity;\n let closest_distance_to_down_plane = Infinity;\n // let closest_up_point = undefined;\n // let closest_down_point = undefined;\n\n const up_dir = new Vector3(0, 1, 0).applyQuaternion(camera_quaternion);\n for (let i = 0; i < points.length; i++)\n {\n const down_line = new Line3(points[i].clone(), points[i].clone().add(up_dir.clone().multiplyScalar(-5000000)));\n const up_line = new Line3(points[i].clone(), points[i].clone().add(up_dir.clone().multiplyScalar(5000000)));\n\n const down_line_intersection = new Vector3();\n const up_line_intersection = new Vector3();\n\n down_plane.intersectLine(down_line, down_line_intersection);\n up_plane.intersectLine(up_line, up_line_intersection);\n\n const down_dist = down_line_intersection.distanceTo(points[i]);\n const up_dist = up_line_intersection.distanceTo(points[i]);\n\n if (up_line_intersection.length() < 0.0001)\n {\n console.log('vertical up intersection not found', i);\n }\n if (down_line_intersection.length() < 0.0001)\n {\n console.log('vertical down intersection not found', i);\n }\n\n if (down_dist < closest_distance_to_down_plane)\n {\n closest_distance_to_down_plane = down_dist;\n // closest_down_point = points[i];\n }\n if (up_dist < closest_distance_to_up_plane)\n {\n closest_distance_to_up_plane = up_dist;\n // closest_up_point = points[i];\n }\n }\n\n const correction = (closest_distance_to_up_plane - closest_distance_to_down_plane) / 2;\n\n // console.log(\"vertical_correction\", correction)\n return up_dir.clone().multiplyScalar(-correction);\n }\n\n get_horizontal_correction(points, left_plane, right_plane, camera_quaternion)\n {\n let closest_distance_to_right_plane = Infinity;\n let closest_distance_to_left_plane = Infinity;\n // let closest_right_point = undefined;\n // let closest_left_point = undefined;\n\n const right_dir = new Vector3(1, 0, 0).applyQuaternion(camera_quaternion);\n\n for (let i = 0; i < points.length; i++)\n {\n const left_line = new Line3(points[i].clone(), points[i].clone().add(right_dir.clone().multiplyScalar(-5000000)));\n const right_line = new Line3(points[i].clone(), points[i].clone().add(right_dir.clone().multiplyScalar(5000000)));\n\n const left_line_intersection = new Vector3();\n const right_line_intersection = new Vector3();\n\n left_plane.intersectLine(left_line, left_line_intersection);\n right_plane.intersectLine(right_line, right_line_intersection);\n\n const left_dist = left_line_intersection.distanceTo(points[i]);\n const right_dist = right_line_intersection.distanceTo(points[i]);\n\n if (left_line_intersection.length() < 0.0001)\n {\n console.log('left intersection not found', i);\n }\n if (right_line_intersection.length() < 0.0001)\n {\n console.log('right intersection not found', i);\n }\n\n if (left_dist < closest_distance_to_left_plane)\n {\n closest_distance_to_left_plane = left_dist;\n // closest_left_point = points[i];\n }\n if (right_dist < closest_distance_to_right_plane)\n {\n closest_distance_to_right_plane = right_dist;\n // closest_right_point = points[i];\n }\n }\n\n const correction = (closest_distance_to_right_plane - closest_distance_to_left_plane) / 2;\n // console.log(\"horizontal_correction\", correction)\n\n return right_dir.clone().multiplyScalar(-correction);\n }\n\n get_up_plane_normal(camera_quaternion, v_fov)\n {\n const up_plane_normal = new Vector3(0, -1, 0);\n up_plane_normal.applyQuaternion(new Quaternion().setFromAxisAngle(new Vector3(1, 0, 0), v_fov));\n up_plane_normal.applyQuaternion(camera_quaternion);\n return up_plane_normal;\n }\n\n get_down_plane_normal(camera_quaternion, v_fov)\n {\n const down_plane_normal = new Vector3(0, 1, 0);\n down_plane_normal.applyQuaternion(new Quaternion().setFromAxisAngle(new Vector3(1, 0, 0), -v_fov));\n down_plane_normal.applyQuaternion(camera_quaternion);\n return down_plane_normal;\n }\n\n get_left_plane_normal(camera_quaternion, h_fov)\n {\n const left_plane_normal = new Vector3(1, 0, 0);\n left_plane_normal.applyQuaternion(new Quaternion().setFromAxisAngle(new Vector3(0, 1, 0), h_fov));\n left_plane_normal.applyQuaternion(camera_quaternion);\n return left_plane_normal;\n }\n\n get_right_plane_normal(camera_quaternion, h_fov)\n {\n const right_plane_normal = new Vector3(-1, 0, 0);\n right_plane_normal.applyQuaternion(new Quaternion().setFromAxisAngle(new Vector3(0, 1, 0), -h_fov));\n right_plane_normal.applyQuaternion(camera_quaternion);\n return right_plane_normal;\n }\n\n get_distance_to_fit_rect(width, height, vertical_fov, aspect)\n {\n const v_fov = (vertical_fov / 2) * Math.PI / 180;\n const h_fov = (2 * Math.atan(Math.tan(v_fov) * aspect)) / 2;\n\n const distV = height / Math.tan(v_fov);\n const distH = width / Math.tan(h_fov);\n return Math.max(Math.abs(distH), Math.abs(distV));\n }\n}\n\nexport { PerspectiveFrustumPointFitter };\n","import { Vector3, Box3 } from 'three';\n\nclass OrthographicFrustumPointFitter\n{\n constructor()\n {\n\n }\n\n fit_points(points, camera_quaternion, vertical_fov, aspect)\n {\n const inverse_camera_quat = camera_quaternion.clone().inverse();\n\n const inverted_points = [];\n\n for (let i = 0; i < points.length; i++)\n {\n inverted_points.push(points[i].clone().applyQuaternion(inverse_camera_quat));\n }\n\n const box = new Box3().setFromPoints(inverted_points);\n const size = new Vector3();\n box.getSize(size);\n\n const distance = this.get_distance_to_fit_rect(size.x / 2, size.y / 2, vertical_fov, aspect);\n\n const center = new Vector3();\n box.getCenter(center);\n\n center.applyQuaternion(camera_quaternion);\n\n return {\n center: center,\n distance_to_center: distance\n };\n }\n\n get_distance_to_fit_rect(width, height, vertical_fov, aspect)\n {\n const v_fov = (vertical_fov / 2) * Math.PI / 180;\n const h_fov = (2 * Math.atan(Math.tan(v_fov) * aspect)) / 2;\n\n const distV = height / Math.tan(v_fov);\n const distH = width / Math.tan(h_fov);\n return Math.max(Math.abs(distH), Math.abs(distV));\n }\n}\n\nexport { OrthographicFrustumPointFitter };\n","import { CameraManager } from '../CameraManager';\nimport { OMath } from '../utilities/OMath';\nimport { OScreen } from '../OScreen';\n\nimport { Vector3 } from 'three';\nimport { Matrix4 } from 'three';\nimport { Plane } from 'three';\nimport { Ray } from 'three';\nimport { Sphere } from 'three';\nimport { Box3 } from 'three';\nimport { PerspectiveFrustumPointFitter } from './PerspectiveFrustumPointFitter';\nimport { OrthographicFrustumPointFitter } from './OrthographicFrustumPointFitter';\n\nclass CameraUtilities\n{\n init(input)\n {\n this.tmp_mat = new Matrix4();\n this.plane = new Plane();\n this.ray = new Ray();\n\n this.tmp_size = new Vector3();\n this.tmp_unproj = new Vector3();\n\n this.input = input;\n }\n\n get_up_dir(camera)\n {\n camera = camera || CameraManager.current;\n const tmp_vec = new Vector3();\n\n tmp_vec.set(0, 1, 0);\n tmp_vec.applyQuaternion(camera.quaternion);\n\n return tmp_vec;\n }\n\n get_forward_dir(camera)\n {\n camera = camera || CameraManager.current;\n const tmp_vec = new Vector3();\n\n tmp_vec.set(0, 0, -1);\n tmp_vec.applyQuaternion(camera.quaternion);\n\n return tmp_vec;\n }\n\n get_right_dir(camera)\n {\n camera = camera || CameraManager.current;\n const tmp_vec = new Vector3();\n\n tmp_vec.set(1, 0, 0);\n tmp_vec.applyQuaternion(camera.quaternion);\n return tmp_vec;\n }\n\n unproject_mouse_position(NDC, camera)\n {\n camera = camera || CameraManager.current;\n const tmp_vec = new Vector3();\n\n const v_fov = (camera.fov / 2) * Math.PI / 180;\n const h_fov = (2 * Math.atan(Math.tan(v_fov) * camera.aspect)) / 2;\n\n const distV = Math.tan(v_fov) * camera.far;\n const distH = Math.tan(h_fov) * camera.far;\n\n tmp_vec.set(distH * NDC.x, distV * NDC.y, -camera.far).normalize();\n\n return tmp_vec.applyQuaternion(camera.quaternion);\n }\n\n get_plane_intersection(plane_position, plane_normal, NDC, camera)\n {\n camera = camera || CameraManager.current;\n NDC = NDC || this.input.NDC;\n\n const tmp_vec = new Vector3();\n\n this.plane.setFromNormalAndCoplanarPoint(plane_normal || this.get_forward_dir(camera), plane_position);\n if (camera.isPerspectiveCamera)\n {\n this.ray.set(camera.position, this.unproject_mouse_position(NDC, camera));\n }\n else\n {\n this.tmp_unproj.set(NDC.x, NDC.y, 1).unproject(camera);\n this.ray.set(camera.position, this.tmp_unproj);\n }\n\n this.ray.intersectPlane(this.plane, tmp_vec);\n return tmp_vec;\n }\n\n fit_points_on_camera(points, zoom_scale = 1)\n {\n const points_sphere = new Sphere().setFromPoints(points);\n const world_space_center = points_sphere.center;\n const camera_forward = this.get_forward_dir(CameraManager.current).clone();\n\n const plane = new Plane().setFromNormalAndCoplanarPoint(camera_forward, world_space_center);\n\n const points_on_plane = OMath.project_points_on_plane(points, plane);\n\n const projected_points_center = new Vector3();\n let box = new Box3().setFromPoints(points_on_plane);\n box.getCenter(projected_points_center);\n\n const up = new Vector3(0, 1, 0).applyQuaternion(CameraManager.current.quaternion);\n const right = up.clone().cross(camera_forward).normalize();\n const mat = new Matrix4().set(right.x, up.x, camera_forward.x, world_space_center.x,\n right.y, up.y, camera_forward.y, world_space_center.y,\n right.z, up.z, camera_forward.z, world_space_center.z,\n 0, 0, 0, 1);\n\n const inverse_mat = new Matrix4().getInverse(mat);\n for (let i = 0; i < points_on_plane.length; i++)\n {\n points_on_plane[i].applyMatrix4(inverse_mat);\n }\n\n const size = new Vector3();\n box = new Box3().setFromPoints(points_on_plane);\n box.getSize(size);\n size.multiplyScalar(zoom_scale);\n const projected_center = new Vector3();\n box.getCenter(projected_center);\n\n return {\n position: projected_points_center,\n zoom: this.get_zoom_to_fit_rect(size.x / 2, size.y / 2)\n };\n }\n\n get_zoom_to_fit_rect(width, height)\n {\n const v_fov = (CameraManager.current.fov / 2) * Math.PI / 180;\n const h_fov = (2 * Math.atan(Math.tan(v_fov) * CameraManager.current.aspect)) / 2;\n\n const distV = height / Math.tan(v_fov);\n const distH = width / Math.tan(h_fov);\n\n return Math.max(Math.abs(distH), Math.abs(distV));\n }\n\n get_zoom_to_fit_box(bb, camera)\n {\n if (camera.isOrthographicCamera)\n {\n bb.getSize(this.tmp_size);\n\n const obj_x = this.tmp_size.x;\n const obj_y = this.tmp_size.y;\n const object_aspect = obj_x / obj_y;\n if (OScreen.aspect_ratio / object_aspect > 1)\n {\n return OScreen.height / obj_y;\n }\n else\n {\n return OScreen.width / obj_x;\n }\n }\n else\n {\n // return this.fit_points_on_camera([bb.min, bb.max], 1).zoom;\n const size = new Vector3();\n bb.getSize(size);\n return this.get_zoom_to_fit_rect(size.x, size.y);\n }\n }\n\n get_html_screen_pos(object, camera)\n {\n camera = camera || CameraManager.current;\n const tmp_vec = new Vector3();\n\n object.getWorldPosition(tmp_vec);\n tmp_vec.project(camera);\n\n tmp_vec.x = (tmp_vec.x * 0.5 + 0.5) * (OScreen.width);\n tmp_vec.y = (1 - (tmp_vec.y * 0.5 + 0.5)) * OScreen.height;\n return tmp_vec;\n }\n\n world_pos_to_screen(pos, camera)\n {\n camera = camera || CameraManager.current;\n const tmp_vec = new Vector3();\n\n tmp_vec.copy(pos);\n tmp_vec.project(camera);\n\n tmp_vec.x = (tmp_vec.x * 0.5 + 0.5) * (OScreen.width);\n tmp_vec.y = (1 - (tmp_vec.y * 0.5 + 0.5)) * OScreen.height;\n return tmp_vec;\n }\n\n update_projection(camera)\n {\n camera.left = -OScreen.width / 2;\n camera.right = OScreen.width / 2;\n camera.top = OScreen.height / 2;\n camera.bottom = -OScreen.height / 2;\n camera.aspect = OScreen.aspect_ratio;\n camera.updateProjectionMatrix(true);\n }\n\n fit_bounding_box_points(camera, bb, scale = 1)\n {\n const dir = new Vector3();\n dir.copy(bb.max).sub(bb.min);\n\n const p1 = bb.min.clone();\n\n const p2 = p1.clone().add(new Vector3(dir.x, 0, 0));\n const p3 = p1.clone().add(new Vector3(0, dir.y, 0));\n const p4 = p1.clone().add(new Vector3(0, 0, dir.z));\n\n const p5 = p1.clone().add(new Vector3(dir.x, 0, dir.z));\n const p6 = p1.clone().add(new Vector3(0, dir.y, dir.z));\n const p7 = bb.max.clone();\n const p8 = p1.clone().add(new Vector3(dir.x, dir.y, 0));\n return this.fit_points(camera, [p1, p2, p3, p4, p5, p6, p7, p8], scale);\n }\n\n fit_points(camera, points, zoom_scale = 1)\n {\n if (camera.isPerspectiveCamera)\n {\n const camera_forward_dir = new Vector3(0, 0, -1).applyQuaternion(camera.quaternion);\n const camera_backward_dir = camera_forward_dir.clone().multiplyScalar(-1);\n\n const fitter = new PerspectiveFrustumPointFitter();\n\n const aspect_ratio = OScreen.aspect_ratio;\n\n const camera_pos = fitter.fit_points(points, camera.quaternion, camera.fov * zoom_scale, aspect_ratio);\n const box = new Box3().setFromPoints(points);\n const center = new Vector3();\n box.getCenter(center);\n\n const reference_position_plane = new Plane().setFromNormalAndCoplanarPoint(camera_backward_dir, center);\n\n const camera_ray = new Ray(camera_pos, camera_forward_dir);\n\n const reference_position = new Vector3();\n camera_ray.intersectPlane(reference_position_plane, reference_position);\n\n const zoom = camera_pos.distanceTo(reference_position);\n\n return {\n zoom: zoom,\n reference_position: reference_position,\n camera_position: camera_pos\n };\n }\n else\n {\n const fitter = new OrthographicFrustumPointFitter();\n const result = fitter.fit_points(points, this.reference_rotation, camera.fov * zoom_scale, OScreen.aspect_ratio);\n\n this.reference_position.copy(result.center);\n this.reference_zoom = result.distance_to_center;\n\n const forward = new Vector3(0, 0, 1).applyQuaternion(camera.quaternion);\n return {\n zoom: result.distance_to_center,\n reference_position: result.center,\n camera_position: forward.multiplyScalar(result.distance_to_center)\n };\n }\n }\n}\n\nconst camera_utilities = new CameraUtilities();\nexport { camera_utilities as CameraUtilities };\n","import { Browser } from './Browser';\nimport { CameraManager } from './CameraManager';\nimport { Capabilities } from './Capabilities';\nimport { Configuration } from './Configuration';\nimport { Debug } from './Debug';\nimport { EventManager } from './EventManager';\nimport { Graphics } from './Graphics';\nimport { OS } from './OS';\nimport { OScreen } from './OScreen';\nimport { ReflectionPlaneContext } from './ReflectionPlaneContext';\nimport { ResourceContainer } from './ResourceContainer';\nimport { SceneManager } from './SceneManager';\nimport { GeometryBatcher } from './static_batcher/GeometryBatcher';\nimport { Time } from './Time';\nimport { UI } from './UI';\nimport { CameraUtilities } from './utilities/CameraUtilities';\n\nclass Initializer\n{\n constructor()\n {\n }\n\n init(input)\n {\n CameraManager.init();\n CameraUtilities.init(input);\n Capabilities.init();\n Configuration.init();\n EventManager.init();\n GeometryBatcher.init();\n\n OS.init();\n Browser.init();\n ReflectionPlaneContext.init();\n ResourceContainer.init();\n SceneManager.init();\n OScreen.init();\n Time.init();\n UI.init(input);\n\n Debug.init();\n }\n\n dispose(render_loop)\n {\n Graphics.dispose();\n SceneManager.dispose();\n\n render_loop.dispose();\n }\n}\n\nconst initializer = new Initializer();\nexport { initializer as Initializer };\n","import { BlitMaterial } from '../materials/BlitMaterial';\n\nimport frag from '../shaders/ssao/ssao.frag';\nimport vert from '../shaders/ssao/ssao.vert';\n\nimport { Matrix4 } from 'three';\nimport { Vector3 } from 'three';\nimport { DataTexture } from 'three';\nimport { RGBFormat } from 'three';\nimport { RepeatWrapping } from 'three';\n\nimport { OMath } from '../utilities/OMath';\nclass SSAOMaterial extends BlitMaterial\n{\n constructor()\n {\n super(frag, vert);\n\n this.uniforms._InverseProjMatrix = { value: new Matrix4() };\n this.uniforms._ProjectionMatrix = { value: new Matrix4() };\n\n this.uniforms._Bias = { value: 0.0125 };\n this.uniforms._Radius = { value: 0.3 };\n this.uniforms._FarPlane = { value: 100 };\n\n this.uniforms._SampleKernel = { value: this.__get_sample_kernel() };\n this.uniforms._RandomRotation = { value: this.__get_rotation_kernel() };\n }\n\n __get_sample_kernel()\n {\n const sample_kernel = [];\n const kernel_size = 64;\n\n for (let i = 0; i < kernel_size; i++)\n {\n const dir = new Vector3(Math.random() * 2 - 1,\n Math.random() * 2 - 1,\n Math.random());\n dir.normalize();\n let scale = i / kernel_size;\n scale = OMath.lerp(0.1, 1.0, scale * scale);\n dir.multiplyScalar(scale);\n\n sample_kernel.push(dir);\n }\n return sample_kernel;\n }\n\n __get_rotation_kernel()\n {\n const rotation_kernel = new Uint8Array(3 * 16);\n for (let i = 0; i < 16; i++)\n {\n rotation_kernel[i * 3 + 1] = Math.floor(Math.random() * 255);\n rotation_kernel[i * 3 + 2] = Math.floor(Math.random() * 255);\n rotation_kernel[i * 3 + 3] = 0;\n }\n\n const rotation_texture = new DataTexture(rotation_kernel, 4, 4, RGBFormat);\n rotation_texture.wrapS = RepeatWrapping;\n rotation_texture.wrapT = RepeatWrapping;\n\n rotation_texture.needsUpdate = true;\n return rotation_texture;\n }\n}\n\nexport { SSAOMaterial };\n","import { BlitMaterial } from '../materials/BlitMaterial';\n\nimport frag from '../shaders/ssao/ssao_compose.frag';\n\nclass SSAOComposeMaterial extends BlitMaterial\n{\n constructor()\n {\n super(frag);\n this.uniforms._AO = { value: undefined };\n }\n}\n\nexport { SSAOComposeMaterial };\n","import { BlitMaterial } from '../materials/BlitMaterial';\n\nimport frag from '../shaders/depth_normals/debug_normals.frag';\nimport depth_normals_vert from '../shaders/ssao/ssao.vert';\n\nimport { Matrix4 } from 'three';\n\nclass DisplayNormalTextureMaterial extends BlitMaterial\n{\n constructor()\n {\n super(frag, depth_normals_vert);\n this.uniforms._FarPlane = { value: 1 };\n this.uniforms._InverseProjMatrix = { value: new Matrix4() };\n }\n}\n\nexport { DisplayNormalTextureMaterial };\n","import { BlitMaterial } from '../materials/BlitMaterial';\n\nimport frag from '../shaders/box_blur/box_blur.frag';\n\nimport { Vector2 } from 'three';\n\nclass BoxBlurMaterial extends BlitMaterial\n{\n constructor()\n {\n super(frag);\n this.uniforms._SampleDir = { value: new Vector2() };\n }\n}\n\nexport { BoxBlurMaterial };\n","import { BoxBlurMaterial } from '../materials/BoxBlurMaterial';\nimport { Graphics } from '../Graphics';\n\nimport { WebGLRenderTarget } from 'three';\n\nclass Blurrer\n{\n constructor(renderer)\n {\n this.RT1 = new WebGLRenderTarget(1, 1);\n this.RT2 = new WebGLRenderTarget(1, 1);\n this.box_blur_mat = new BoxBlurMaterial();\n }\n\n blur(RT)\n {\n if (RT.width !== this.RT1.width || RT.height !== this.RT1.height)\n {\n this.RT1.setSize(RT.width, RT.height);\n this.RT2.setSize(RT.width, RT.height);\n }\n\n this.box_blur_mat.uniforms._SampleDir.value.set(1, 0);\n Graphics.blit(RT, this.RT1, this.box_blur_mat);\n this.box_blur_mat.uniforms._SampleDir.value.set(0, 1);\n Graphics.blit(this.RT1, RT, this.box_blur_mat);\n // return this.RT2;\n }\n}\n\nexport { Blurrer };\n","import { CameraManager } from '../CameraManager';\nimport { SceneManager } from '../SceneManager';\nimport { OScreen } from '../OScreen';\nimport { BaseRender } from '../render_mode/BaseRender';\nimport { Configuration } from '../Configuration';\nimport { SSAOMaterial } from '../materials/SSAOMaterial';\nimport { SSAOComposeMaterial } from '../materials/SSAOComposeMaterial';\nimport { DisplayNormalTextureMaterial } from '../materials/DisplayNormalTextureMaterial';\nimport { Blurrer } from '../render_utilities/Blurrer';\nimport { Graphics } from '../Graphics';\n\nimport { WebGLRenderTarget } from 'three';\n\nclass NormalAORender extends BaseRender\n{\n constructor()\n {\n super();\n\n this.ssao_mat = new SSAOMaterial();\n this.ssao_compose_mat = new SSAOComposeMaterial();\n this.debug_normals = new DisplayNormalTextureMaterial();\n\n this.ssaa = Configuration.use_ssaa ? 2 : 1;\n\n this.main_RT = new WebGLRenderTarget(OScreen.width * this.ssaa, OScreen.height * this.ssaa);\n\n this.SSAO_RT = new WebGLRenderTarget(OScreen.width, OScreen.height);\n\n this.blurrer = new Blurrer();\n Graphics.generateDepthNormalTexture = true;\n }\n\n render()\n {\n this.__check_RT_size();\n\n Graphics.clear(this.main_RT, CameraManager.current, true, false);\n Graphics.render(SceneManager.current, CameraManager.current, this.main_RT);\n\n this.__update_uniforms();\n\n Graphics.blit(Graphics.depth_normals_RT, this.SSAO_RT, this.ssao_mat);\n\n // // BLUR\n this.blurrer.blur(this.SSAO_RT);\n Graphics.blit(this.SSAO_RT, undefined);\n\n // // COMPOSE\n this.ssao_compose_mat.uniforms._AO.value = this.SSAO_RT.texture;\n Graphics.blit(this.main_RT, undefined, this.ssao_compose_mat);\n\n // Graphics.blit(this.SSAO_RT, undefined);\n }\n\n __update_uniforms()\n {\n this.ssao_mat.uniforms._InverseProjMatrix.value.getInverse(CameraManager.current.projectionMatrix);\n this.ssao_mat.uniforms._ProjectionMatrix.value.copy(CameraManager.current.projectionMatrix);\n this.ssao_mat.uniforms._FarPlane.value = CameraManager.current.far;\n }\n\n __check_RT_size()\n {\n if (this.main_RT.width !== OScreen.width * this.ssaa || this.main_RT.height !== OScreen.height * this.ssaa)\n {\n this.main_RT.setSize(OScreen.width * this.ssaa, OScreen.height * this.ssaa);\n this.SSAO_RT.setSize(OScreen.width, OScreen.height);\n }\n }\n}\n\nexport { NormalAORender };\n","import { CameraManager } from '../CameraManager';\nimport { SceneManager } from '../SceneManager';\nimport { BaseRender } from '../render_mode/BaseRender';\nimport { Graphics } from '../Graphics';\n\nclass NormalRender extends BaseRender\n{\n constructor()\n {\n super();\n }\n\n render()\n {\n Graphics.clear(undefined, CameraManager.current, true, true);\n\n if (SceneManager.current.on_pre_render)\n {\n SceneManager.current.on_pre_render();\n }\n\n if (SceneManager.current.render)\n {\n SceneManager.current.render();\n }\n else\n {\n Graphics.render(SceneManager.current, CameraManager.current);\n }\n\n if (SceneManager.current.on_post_render)\n {\n SceneManager.current.on_post_render();\n }\n }\n}\n\nexport { NormalRender };\n","import { CameraManager } from '../CameraManager';\nimport { SceneManager } from '../SceneManager';\nimport { BaseRender } from '../render_mode/BaseRender';\nimport { Graphics } from '../Graphics';\n\nclass VRRender extends BaseRender\n{\n constructor()\n {\n super();\n }\n\n render()\n {\n // Graphics.clear(undefined, CameraManager.current, true, true);\n\n if (SceneManager.current.on_pre_render)\n {\n SceneManager.current.on_pre_render();\n }\n\n if (SceneManager.current.render)\n {\n SceneManager.current.render();\n }\n else\n {\n Graphics.render(SceneManager.current, CameraManager.current, Graphics._renderer.getRenderTarget());\n }\n\n this.render_spectator_camera();\n\n if (SceneManager.current.on_post_render)\n {\n SceneManager.current.on_post_render();\n }\n }\n\n render_spectator_camera()\n {\n const spectator_camera = CameraManager.spectator;\n\n if (spectator_camera && Graphics._renderer.xr.isPresenting)\n {\n // Copy the XR Camera's position and rotation, but use your\n // main camera's projection matrix\n const xrCam = Graphics._renderer.xr.getCamera(CameraManager.current);\n\n spectator_camera.projectionMatrix.copy(CameraManager.current.projectionMatrix);\n\n spectator_camera.position.copy(xrCam.position);\n spectator_camera.quaternion.copy(xrCam.quaternion);\n\n // we'll restore this later\n const currentRenderTarget = Graphics._renderer.getRenderTarget();\n\n // turn off the WebXR rendering\n Graphics._renderer.xr.isPresenting = false;\n\n // render to the canvas on our main display\n Graphics._renderer.setRenderTarget(null);\n Graphics._renderer.render(SceneManager.current, spectator_camera);\n\n // reset back to enable WebXR\n Graphics._renderer.setRenderTarget(currentRenderTarget);\n Graphics._renderer.xr.isPresenting = true;\n }\n }\n}\n\nexport { VRRender };\n","import { BlitMaterial } from './BlitMaterial';\n\nimport frag from '../shaders/gaussian_blur/gaussian_blur.frag';\n\nimport { Vector2 } from 'three';\n\nclass GaussianBlurMaterial extends BlitMaterial\n{\n constructor(kernel_radius)\n {\n super(frag, undefined, {\n KERNEL_RADIUS: kernel_radius,\n SIGMA: kernel_radius\n });\n\n this.uniforms.texSize = { value: new Vector2(0.5, 0.5) };\n this.uniforms.direction = { value: new Vector2(0.5, 0.5) };\n }\n\n set_size(w, h)\n {\n this.uniforms.texSize.value.x = w;\n this.uniforms.texSize.value.y = h;\n }\n\n set_direction(x, y)\n {\n this.uniforms.direction.value.set(x, y);\n }\n}\n\nexport { GaussianBlurMaterial };\n","import { BlitMaterial } from './BlitMaterial';\n\nimport frag from '../shaders/luminosity_high_pass/luminosity_high_pass.frag';\n\nimport { Color } from 'three';\nclass LuminosityHighPassMaterial extends BlitMaterial\n{\n constructor(kernel_radius)\n {\n super(frag);\n\n this.uniforms.luminosityThreshold = { value: 0.23 };\n this.uniforms.smoothWidth = { value: 0.01 };\n this.uniforms.defaultColor = { value: new Color('#000000') };\n this.uniforms.defaultOpacity = { value: 0.0 };\n }\n}\n\nexport { LuminosityHighPassMaterial };\n","import { GaussianBlurMaterial } from '../materials/GaussianBlurMaterial';\nimport { LuminosityHighPassMaterial } from '../materials/LuminosityHighPassMaterial';\nimport { Graphics } from '../Graphics';\n\nimport { WebGLRenderTarget, LinearFilter, RGBAFormat } from 'three';\n\nclass GaussianBlurrer\n{\n constructor(nMips = 5)\n {\n this.current_width = 1;\n this.current_height = 1;\n\n this.separableBlurMaterials = [];\n this.renderTargetsHorizontal = [];\n this.renderTargetsVertical = [];\n\n this.nMips = nMips;\n this.kernelSizeArray = [3, 5, 7, 9, 11];\n this.rt_pars = { minFilter: LinearFilter, magFilter: LinearFilter, format: RGBAFormat };\n\n this.renderTargetBright = new WebGLRenderTarget(1, 1, this.rt_pars);\n this.renderTargetBright.texture.generateMipmaps = false;\n\n this.init_materials();\n this.init_RT();\n\n this.luminosity_high_pass_mat = new LuminosityHighPassMaterial();\n }\n\n blur(RT, use_luminosity_high_pass)\n {\n this.resize_RT(RT.width, RT.height);\n\n if (use_luminosity_high_pass)\n {\n Graphics.blit(RT, this.renderTargetBright, this.luminosity_high_pass_mat);\n }\n else\n {\n Graphics.blit(RT, this.renderTargetBright);\n }\n\n let inputRenderTarget = this.renderTargetBright;\n\n for (let i = 0; i < this.nMips; i++)\n {\n const mat = this.separableBlurMaterials[i];\n\n mat.set_direction(1, 0);\n Graphics.blit(inputRenderTarget, this.renderTargetsHorizontal[i], mat);\n\n mat.set_direction(0, 1);\n Graphics.blit(this.renderTargetsHorizontal[i], this.renderTargetsVertical[i], mat);\n\n inputRenderTarget = this.renderTargetsVertical[i];\n }\n }\n\n get_blurred_texture()\n {\n return this.renderTargetsHorizontal[0].texture;\n }\n\n get_blurred_RT()\n {\n return this.renderTargetsHorizontal[0];\n }\n\n init_RT()\n {\n this.dispose_RT();\n\n this.renderTargetBright.setSize(1, 1);\n\n for (let i = 0; i < this.nMips; i++)\n {\n const hor = new WebGLRenderTarget(1, 1, this.rt_pars);\n const ver = new WebGLRenderTarget(1, 1, this.rt_pars);\n\n hor.texture.generateMipmaps = false;\n ver.texture.generateMipmaps = false;\n\n this.renderTargetsHorizontal.push(hor);\n this.renderTargetsVertical.push(ver);\n }\n }\n\n resize_RT(texture_width, texture_height)\n {\n if (this.current_width === texture_width && this.current_height === texture_height)\n {\n return;\n }\n\n this.current_width = texture_width;\n this.current_height = texture_height;\n\n let width = Math.round(texture_width / 2);\n let height = Math.round(texture_height / 2);\n\n this.renderTargetBright.setSize(width, height);\n\n for (let i = 0; i < this.nMips; i++)\n {\n this.renderTargetsVertical[i].setSize(width, height);\n this.renderTargetsHorizontal[i].setSize(width, height);\n this.separableBlurMaterials[i].set_size(width, height);\n\n width = Math.round(width / 2);\n height = Math.round(height / 2);\n }\n }\n\n init_materials(texture_width, texture_height)\n {\n this.dispose_materials();\n\n for (let i = 0; i < this.nMips; i++)\n {\n this.separableBlurMaterials.push(new GaussianBlurMaterial(this.kernelSizeArray[i]));\n }\n }\n\n dispose_materials()\n {\n for (let i = 0; i < this.separableBlurMaterials.length; i++)\n {\n this.separableBlurMaterials[i].dispose();\n }\n this.separableBlurMaterials.length = 0;\n }\n\n dispose_RT()\n {\n for (let i = 0; i < this.renderTargetsVertical.length; i++)\n {\n this.renderTargetsHorizontal[i].dispose();\n this.renderTargetsVertical[i].dispose();\n }\n this.renderTargetBright.dispose();\n\n this.renderTargetsHorizontal.length = 0;\n this.renderTargetsVertical.length = 0;\n }\n}\n\nexport { GaussianBlurrer };\n","import { OScreen } from '../OScreen';\nimport { BaseRender } from '../render_mode/BaseRender';\nimport { UnrealBloomComposeMaterial } from '../materials/UnrealBloomComposeMaterial';\nimport { AddMaterial } from '../materials/AddMaterial';\n\nimport { WebGLRenderTarget } from 'three';\n\nimport { GaussianBlurrer } from '../render_utilities/GaussianBlurrer';\nimport { Graphics } from '../Graphics';\nimport { CameraManager } from '../CameraManager';\nimport { SceneManager } from '../SceneManager';\n\nclass UnrealBloomRender extends BaseRender\n{\n constructor()\n {\n super();\n\n this.bloom_compose_mat = undefined;\n\n this.main_RT = undefined;\n this.blur_RT = undefined;\n this.blurrer = undefined;\n\n this.add_mat = new AddMaterial();\n }\n\n on_enter()\n {\n this.blurrer = new GaussianBlurrer();\n this.main_RT = new WebGLRenderTarget(OScreen.width, OScreen.height);\n this.blur_RT = new WebGLRenderTarget(OScreen.width, OScreen.height);\n\n this.bloom_compose_mat = new UnrealBloomComposeMaterial(5);\n this.blurrer = new GaussianBlurrer(5);\n\n this.bloom_compose_mat.set_RT_0(this.blurrer.renderTargetsVertical[0].texture);\n this.bloom_compose_mat.set_RT_1(this.blurrer.renderTargetsVertical[1].texture);\n this.bloom_compose_mat.set_RT_2(this.blurrer.renderTargetsVertical[2].texture);\n this.bloom_compose_mat.set_RT_3(this.blurrer.renderTargetsVertical[3].texture);\n this.bloom_compose_mat.set_RT_4(this.blurrer.renderTargetsVertical[4].texture);\n\n this.bloom_compose_mat.set_bloom_strength(1);\n this.bloom_compose_mat.set_bloom_radius(1);\n\n this.add_mat.set_add_texture(this.blurrer.renderTargetsHorizontal[0].texture);\n }\n\n set_bloom_strength(val)\n {\n this.bloom_compose_mat.set_bloom_strength(val);\n }\n\n set_bloom_radius(val)\n {\n this.bloom_compose_mat.set_bloom_radius(val);\n }\n\n set_tint_color_0(col_string)\n {\n this.bloom_compose_mat.set_tint_color_0(col_string);\n }\n\n set_tint_color_1(col_string)\n {\n this.bloom_compose_mat.set_tint_color_1(col_string);\n }\n\n set_tint_color_2(col_string)\n {\n this.bloom_compose_mat.set_tint_color_2(col_string);\n }\n\n set_tint_color_3(col_string)\n {\n this.bloom_compose_mat.set_tint_color_3(col_string);\n }\n\n set_tint_color_4(col_string)\n {\n this.bloom_compose_mat.set_tint_color_4(col_string);\n }\n\n render()\n {\n this.__check_RT_size();\n\n Graphics.clear(this.main_RT, CameraManager.current, true, false);\n Graphics.render(SceneManager.current, CameraManager.current, this.main_RT);\n\n // // BLUR\n this.blurrer.blur(this.main_RT, true);\n\n // Blur compose\n Graphics.material_pass(this.bloom_compose_mat, this.blurrer.renderTargetsHorizontal[0]);\n\n // Additive blend\n Graphics.blit(this.main_RT, undefined, this.add_mat);\n }\n\n __check_RT_size()\n {\n if (this.main_RT.width !== OScreen.width || this.main_RT.height !== OScreen.height)\n {\n this.main_RT.setSize(OScreen.width, OScreen.height);\n this.blur_RT.setSize(OScreen.width, OScreen.height);\n }\n }\n}\n\nexport { UnrealBloomRender };\n","import { Color } from 'three';\nimport { OrthographicCamera as TOrthographicCamera } from 'three';\n\nclass OrthographicCamera extends TOrthographicCamera\n{\n constructor(left, right, top, bottom, near, far)\n {\n super(left, right, top, bottom, near, far);\n\n this.clear_color = new Color('#000000');\n this.clear_alpha = 1;\n }\n\n copy(camera)\n {\n super.copy(camera);\n this.clear_color.copy(camera.clear_color);\n this.clear_alpha = camera.clear_alpha;\n return this;\n }\n}\n\nexport { OrthographicCamera };\n","import { ViewManager } from './ViewManager';\n\nclass ViewComponentManager\n{\n constructor()\n {\n this.components = [];\n this.enabled_components = new Set();\n }\n\n update()\n {\n this.__set_components_opacities();\n\n for (const component of this.enabled_components)\n {\n component.update(ViewManager.transition_handler.current_state_data);\n }\n }\n\n register_component(component)\n {\n this.components.push(component);\n }\n\n enable_component(component)\n {\n // const component_to_enable = this.get_component_by_name(component_name);\n\n this.enabled_components.add(component);\n }\n\n disable_component(component)\n {\n // const component_to_disable = this.get_component_by_name(component_name);\n\n this.enabled_components.delete(component);\n }\n\n get_component_by_name(component_name)\n {\n console.warn('DEPRECATED. Use ViewComponentManager.get instead');\n this.get(component_name);\n }\n\n get(component_name)\n {\n for (let i = 0; i < this.components.length; i++)\n {\n if (this.components[i].name === component_name)\n {\n return this.components[i];\n }\n }\n console.error('[ViewComponentManager.get] no component found for: ', component_name);\n return undefined;\n }\n\n __set_components_opacities()\n {\n for (let i = 0; i < this.components.length; i++)\n {\n this.components[i].set_opacity(ViewManager.transition_handler.current_state_data);\n }\n }\n}\n\nconst view_component_manager = new ViewComponentManager();\nexport { view_component_manager as ViewComponentManager };\n","import { Time } from './Time';\nimport { UI } from './UI';\nimport { Debug } from './Debug';\nimport { BaseApplication } from './BaseApplication';\nimport { ViewManager } from './view_components/ViewManager';\nimport { ViewComponentManager } from './view_components/ViewComponentManager';\n\nclass RenderLoop\n{\n constructor(target_application, graphics, input)\n {\n target_application = target_application || new BaseApplication();\n\n this.target_application = target_application;\n this.graphics = graphics;\n this.input = input;\n\n this.is_running = false;\n this.frames_passed = 0;\n }\n\n update()\n {\n if (!this.is_running)\n {\n return;\n }\n Time.__update();\n\n // ###### START CYCLE ######\n if (this.frames_passed === 1)\n {\n this.target_application.on_post_start();\n }\n\n this.input.update();\n\n this.target_application.update();\n ViewManager.update();\n ViewComponentManager.update();\n\n this.target_application.on_pre_render();\n\n this.graphics.update(); // render scene\n UI.update(); // update after new camera matrix has been calculated\n UI.render(this.graphics); // render ui layer on top\n this.target_application.on_post_render();\n\n Debug.render(this.graphics); // render debug layer\n\n // ###### END CYCLE #######\n\n this.target_application.on_frame_end();\n this.frames_passed++;\n\n this.input.clear();\n UI.clear();\n Debug.clear();\n }\n\n start()\n {\n if (this.is_running) return; // sanity check\n\n if (this.frames_passed === 0)\n {\n this.target_application.on_enter();\n }\n\n this.is_running = true;\n\n this.graphics._renderer.setAnimationLoop(this.update.bind(this));\n }\n\n stop()\n {\n if (this.is_running === false) return; // sanity check\n\n this.is_running = false;\n this.target_application.on_exit();\n\n this.graphics._renderer.setAnimationLoop(null);\n }\n\n set_state(new_state)\n {\n this.target_application.on_exit(this);\n this.target_application = new_state;\n this.target_application.on_enter(this);\n }\n\n dispose()\n {\n this.stop();\n this.frames_passed = 0;\n }\n}\n\nexport { RenderLoop };\n","import { OScreen } from './OScreen';\n\nclass Screen\n{\n init()\n {\n console.warn('Screen Singleton is deprecated. Please use OScreen.');\n OScreen.init();\n }\n\n update_position(x, y)\n {\n console.warn('Screen Singleton is deprecated. Please use OScreen.');\n OScreen.update_position(x, y);\n }\n\n update()\n {\n console.warn('Screen Singleton is deprecated. Please use OScreen.');\n OScreen.update();\n }\n\n update_size(width, height)\n {\n console.warn('Screen Singleton is deprecated. Please use OScreen.');\n OScreen.update_size(width, height);\n }\n\n apply_pixel_density_v2(vector2)\n {\n console.warn('Screen Singleton is deprecated. Please use OScreen.');\n return OScreen.apply_pixel_density_v2(vector2);\n }\n\n apply_pixel_density(value)\n {\n console.warn('Screen Singleton is deprecated. Please use OScreen.');\n return OScreen.apply_pixel_density(value);\n }\n\n get_pixel_size()\n {\n console.warn('Screen Singleton is deprecated. Please use OScreen.');\n return OScreen.get_pixel_size();\n }\n\n get aspect_ratio()\n {\n console.warn('Screen Singleton is deprecated. Please use OScreen.');\n return OScreen.aspect_ratio;\n }\n}\n\nconst screen = new Screen();\nexport { screen as Screen };\n","\nimport { CanvasDrawer } from './CanvasDrawer';\n\nimport { Vector2 } from 'three';\n\nclass SimpleTextDrawer extends CanvasDrawer\n{\n constructor()\n {\n super();\n this.text_margin = new Vector2(2, 0);\n }\n\n __draw(text, ctxOptions, canvas, ctx)\n {\n ctx.font = ctxOptions.font;\n\n const text_size = this.get_text_size(text, ctxOptions.font);\n // canvas.width = Math.ceilPowerOfTwo(text_size.x+this.text_margin.x*2);\n // canvas.height = Math.ceilPowerOfTwo(text_size.y+ this.text_margin.y*2);\n canvas.width = Math.ceil(text_size.x + this.text_margin.x * 2);\n canvas.height = Math.ceil(text_size.y + this.text_margin.y * 2);\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n\n // turn this on for debugging\n ctx.globalAlpha = 0.0;\n ctx.fillStyle = ctxOptions.font_color || '#000000';\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n ctx.globalAlpha = 1;\n\n ctx.globalAlpha = 1;\n\n ctx.font = ctxOptions.font;\n ctx.fillStyle = ctxOptions.font_color || '#000000';\n ctx.textBaseline = 'middle';\n\n ctx.textAlign = ctxOptions.textAlign || 'center';\n if (ctx.textAlign === 'center')\n {\n ctx.fillText(text, canvas.width / 2, canvas.height / 2);\n }\n else\n {\n ctx.fillText(text, 0, canvas.height / 2);\n }\n }\n}\n\nexport { SimpleTextDrawer };\n","import { HTMLUtilities } from '../utilities/HTMLUtilities';\nimport { ViewComponentManager } from './ViewComponentManager';\n\nclass ViewComponent\n{\n constructor({ name, container })\n {\n this.name = name;\n this.container = container;\n this.hidden = true;\n\n ViewComponentManager.register_component(this);\n }\n\n start()\n {\n }\n\n on_enter()\n {\n this.container.classList.remove('hidden');\n ViewComponentManager.enable_component(this);\n\n this.hidden = false;\n }\n\n update()\n {\n }\n\n on_exit()\n {\n this.container.classList.add('hidden');\n ViewComponentManager.disable_component(this);\n\n this.hidden = true;\n }\n\n set_opacity(current_state_data)\n {\n this.container.style.opacity = current_state_data[`${this.name}_opacity`];\n this.toggle_hidden();\n }\n\n toggle_hidden()\n {\n if (this.container.style.opacity > 0.001)\n {\n if (this.hidden)\n {\n this.on_enter();\n }\n }\n else\n {\n if (!this.hidden)\n {\n this.on_exit();\n }\n }\n }\n\n load_html_images()\n {\n HTMLUtilities.load_images(this.container);\n }\n\n load_html_videos()\n {\n HTMLUtilities.load_videos(this.container);\n }\n}\n\nexport { ViewComponent };\n","import { Mesh } from 'three';\nimport { MeshBasicMaterial } from 'three';\nimport { PlaneGeometry } from 'three';\n\nclass HorizontalPlane extends Mesh\n{\n constructor(width, height, color, material)\n {\n width = width || 1;\n height = height || 1;\n color = color || '#FF0000';\n material = material || new MeshBasicMaterial({ color: color });\n\n const geometry = new PlaneGeometry(width, height);\n geometry.rotateX(-3.14 / 2);\n super(geometry, material);\n }\n}\n\nexport { HorizontalPlane };\n","import { Mesh } from 'three';\nimport { PlaneGeometry } from 'three';\nimport { MeshBasicMaterial } from 'three';\n\nclass VerticalPlane extends Mesh\n{\n constructor(width, height, color, material)\n {\n width = width || 1;\n height = height || 1;\n color = color || '#FF0000';\n material = material || new MeshBasicMaterial({ color: color });\n\n const geometry = new PlaneGeometry(width, height);\n super(geometry, material);\n }\n}\n\nexport { VerticalPlane };\n","class ArrayUtilities\n{\n constructor()\n {}\n\n static merge_from_to(source, target)\n {\n target.push.apply(target, source);\n }\n\n static expand_vec3_array(array, size)\n {\n const items_left_count = size - array.length;\n\n for (let i = 0; i < items_left_count; i++)\n {\n array.push(array[i].clone());\n }\n }\n\n static remove_elem(array, elem)\n {\n const index = array.indexOf(elem);\n if (index > -1)\n {\n array.splice(index, 1);\n }\n }\n\n static get_closest_point(points, target)\n {\n let closest_point = points[0];\n let closest_distance = closest_point.distanceTo(target);\n for (let i = 1; i < points.length; i++)\n {\n if (points[i].distanceTo(target) < closest_distance)\n {\n closest_point = points[i];\n closest_distance = points[i].distanceTo(target);\n }\n }\n return closest_point;\n }\n\n static object_values_to_array(obj)\n {\n const ids = Object.keys(obj);\n const arr = [];\n for (let i = 0; i < ids.length; i++)\n {\n arr.push(obj[ids[i]]);\n }\n return arr;\n }\n}\n\nexport { ArrayUtilities };\n","import { Line3, Plane, Quaternion, Sphere, Vector3 } from 'three';\n\nclass FrustumPointFitter\n{\n constructor()\n {\n this.sphere = new Sphere();\n }\n\n fit_points(points, camera_quaternion, vertical_fov, aspect)\n {\n this.sphere.setFromPoints(points);\n\n const v_fov = Math.degToRad(vertical_fov / 2);\n const h_fov = (2 * Math.atan(Math.tan(v_fov) * aspect)) / 2;\n\n const up_plane_normal = this.get_up_plane_normal(camera_quaternion, v_fov);\n const down_plane_normal = this.get_down_plane_normal(camera_quaternion, v_fov);\n const left_plane_normal = this.get_left_plane_normal(camera_quaternion, h_fov);\n const right_plane_normal = this.get_right_plane_normal(camera_quaternion, h_fov);\n\n const camera_forward_dir = new Vector3(0, 0, -1).applyQuaternion(camera_quaternion);\n\n const sphere_center = this.sphere.center.clone();\n\n const pull_back_distance = this.get_distance_to_fit_rect(this.sphere.radius * 2, this.sphere.radius * 2, vertical_fov, aspect);\n const far_pos = sphere_center.clone().add(camera_forward_dir.clone().multiplyScalar(pull_back_distance * -1));\n\n const up_plane = new Plane().setFromNormalAndCoplanarPoint(up_plane_normal, far_pos);\n const down_plane = new Plane().setFromNormalAndCoplanarPoint(down_plane_normal, far_pos);\n\n const left_plane = new Plane().setFromNormalAndCoplanarPoint(left_plane_normal, far_pos);\n const right_plane = new Plane().setFromNormalAndCoplanarPoint(right_plane_normal, far_pos);\n\n this.apply_center_correction_to_pos(far_pos, points, camera_quaternion, up_plane, down_plane, left_plane, right_plane);\n\n up_plane.setFromNormalAndCoplanarPoint(up_plane_normal, far_pos);\n down_plane.setFromNormalAndCoplanarPoint(down_plane_normal, far_pos);\n\n left_plane.setFromNormalAndCoplanarPoint(left_plane_normal, far_pos);\n right_plane.setFromNormalAndCoplanarPoint(right_plane_normal, far_pos);\n\n let closest_distance = Infinity;\n\n const inverse_dir = camera_forward_dir.clone().multiplyScalar(pull_back_distance * -2);\n for (let i = 0; i < points.length; i++)\n {\n const line = new Line3(points[i].clone(), points[i].clone().add(inverse_dir));\n\n const up_line_intersection = new Vector3();\n const down_line_intersection = new Vector3();\n\n const left_line_intersection = new Vector3();\n const right_line_intersection = new Vector3();\n\n up_plane.intersectLine(line, up_line_intersection);\n down_plane.intersectLine(line, down_line_intersection);\n\n left_plane.intersectLine(line, left_line_intersection);\n right_plane.intersectLine(line, right_line_intersection);\n\n if (up_line_intersection.length() < 0.0001)\n {\n console.log('up intersection not found', i);\n }\n if (down_line_intersection.length() < 0.0001)\n {\n console.log('down intersection not found', i);\n }\n if (left_line_intersection.length() < 0.0001)\n {\n console.log('left intersection not found', i);\n }\n if (right_line_intersection.length() < 0.0001)\n {\n console.log('right intersection not found', i);\n }\n\n const new_up_distance = points[i].clone().sub(up_line_intersection).length();\n const new_down_distance = points[i].clone().sub(down_line_intersection).length();\n\n const new_left_distance = points[i].clone().sub(left_line_intersection).length();\n const new_right_distance = points[i].clone().sub(right_line_intersection).length();\n\n const vertical_min = Math.min(new_up_distance, new_down_distance);\n const horizontal_min = Math.min(new_left_distance, new_right_distance);\n\n const min = Math.min(vertical_min, horizontal_min);\n\n if (min < closest_distance)\n {\n closest_distance = min;\n }\n }\n\n const forward_correction = camera_forward_dir.clone().multiplyScalar(closest_distance);\n const closest_position = far_pos.clone().add(forward_correction);\n\n return closest_position;\n }\n\n apply_center_correction_to_pos(target_pos, points, camera_quaternion, up_plane, down_plane, left_plane, right_plane)\n {\n const vertical_offset = this.get_vertical_correction(points, down_plane, up_plane, camera_quaternion);\n const horizontal_offset = this.get_hozirontal_correction(points, left_plane, right_plane, camera_quaternion);\n\n target_pos.add(vertical_offset);\n target_pos.add(horizontal_offset);\n }\n\n get_vertical_correction(points, down_plane, up_plane, camera_quaternion)\n {\n let closest_distance_to_up_plane = Infinity;\n let closest_distance_to_down_plane = Infinity;\n let closest_up_point = undefined;\n let closest_down_point = undefined;\n\n const up_dir = new Vector3(0, 1, 0).applyQuaternion(camera_quaternion);\n for (let i = 0; i < points.length; i++)\n {\n const down_line = new Line3(points[i].clone(), points[i].clone().add(up_dir.clone().multiplyScalar(-5000000)));\n const up_line = new Line3(points[i].clone(), points[i].clone().add(up_dir.clone().multiplyScalar(5000000)));\n\n const down_line_intersection = new Vector3();\n const up_line_intersection = new Vector3();\n\n down_plane.intersectLine(down_line, down_line_intersection);\n up_plane.intersectLine(up_line, up_line_intersection);\n\n const down_dist = down_line_intersection.distanceTo(points[i]);\n const up_dist = up_line_intersection.distanceTo(points[i]);\n\n if (up_line_intersection.length() < 0.0001)\n {\n console.log('vertical up intersection not found', i);\n }\n if (down_line_intersection.length() < 0.0001)\n {\n console.log('vertical down intersection not found', i);\n }\n\n if (down_dist < closest_distance_to_down_plane)\n {\n closest_distance_to_down_plane = down_dist;\n closest_down_point = points[i];\n }\n if (up_dist < closest_distance_to_up_plane)\n {\n closest_distance_to_up_plane = up_dist;\n closest_up_point = points[i];\n }\n }\n\n console.log(closest_up_point, closest_down_point);\n\n const correction = (closest_distance_to_up_plane - closest_distance_to_down_plane) / 2;\n\n // console.log(\"vertical_correction\", correction)\n return up_dir.clone().multiplyScalar(-correction);\n }\n\n get_hozirontal_correction(points, left_plane, right_plane, camera_quaternion)\n {\n let closest_distance_to_right_plane = Infinity;\n let closest_distance_to_left_plane = Infinity;\n let closest_right_point = undefined;\n let closest_left_point = undefined;\n\n const right_dir = new Vector3(1, 0, 0).applyQuaternion(camera_quaternion);\n\n for (let i = 0; i < points.length; i++)\n {\n const left_line = new Line3(points[i].clone(), points[i].clone().add(right_dir.clone().multiplyScalar(-5000000)));\n const right_line = new Line3(points[i].clone(), points[i].clone().add(right_dir.clone().multiplyScalar(5000000)));\n\n const left_line_intersection = new Vector3();\n const right_line_intersection = new Vector3();\n\n left_plane.intersectLine(left_line, left_line_intersection);\n right_plane.intersectLine(right_line, right_line_intersection);\n\n const left_dist = left_line_intersection.distanceTo(points[i]);\n const right_dist = right_line_intersection.distanceTo(points[i]);\n\n if (left_line_intersection.length() < 0.0001)\n {\n console.log('left intersection not found', i);\n }\n if (right_line_intersection.length() < 0.0001)\n {\n console.log('right intersection not found', i);\n }\n\n if (left_dist < closest_distance_to_left_plane)\n {\n closest_distance_to_left_plane = left_dist;\n closest_left_point = points[i];\n }\n if (right_dist < closest_distance_to_right_plane)\n {\n closest_distance_to_right_plane = right_dist;\n closest_right_point = points[i];\n }\n }\n\n const correction = (closest_distance_to_right_plane - closest_distance_to_left_plane) / 2;\n // console.log(\"horizontal_correction\", correction)\n\n console.log(closest_right_point, closest_left_point);\n\n return right_dir.clone().multiplyScalar(-correction);\n }\n\n get_up_plane_normal(camera_quaternion, v_fov)\n {\n const up_plane_normal = new Vector3(0, -1, 0);\n up_plane_normal.applyQuaternion(new Quaternion().setFromAxisAngle(new Vector3(1, 0, 0), v_fov));\n up_plane_normal.applyQuaternion(camera_quaternion);\n return up_plane_normal;\n }\n\n get_down_plane_normal(camera_quaternion, v_fov)\n {\n const down_plane_normal = new Vector3(0, 1, 0);\n down_plane_normal.applyQuaternion(new Quaternion().setFromAxisAngle(new Vector3(1, 0, 0), -v_fov));\n down_plane_normal.applyQuaternion(camera_quaternion);\n return down_plane_normal;\n }\n\n get_left_plane_normal(camera_quaternion, h_fov)\n {\n const left_plane_normal = new Vector3(1, 0, 0);\n left_plane_normal.applyQuaternion(new Quaternion().setFromAxisAngle(new Vector3(0, 1, 0), h_fov));\n left_plane_normal.applyQuaternion(camera_quaternion);\n return left_plane_normal;\n }\n\n get_right_plane_normal(camera_quaternion, h_fov)\n {\n const right_plane_normal = new Vector3(-1, 0, 0);\n right_plane_normal.applyQuaternion(new Quaternion().setFromAxisAngle(new Vector3(0, 1, 0), -h_fov));\n right_plane_normal.applyQuaternion(camera_quaternion);\n return right_plane_normal;\n }\n\n get_distance_to_fit_rect(width, height, vertical_fov, aspect)\n {\n const v_fov = (vertical_fov / 2) * Math.PI / 180;\n const h_fov = (2 * Math.atan(Math.tan(v_fov) * aspect)) / 2;\n\n const distV = height / Math.tan(v_fov);\n const distH = width / Math.tan(h_fov);\n return Math.max(Math.abs(distH), Math.abs(distV));\n }\n}\n\nexport { FrustumPointFitter };\n","import { BufferAttribute } from 'three';\nimport { BufferGeometry } from 'three';\n\nclass GeometryUtilities\n{\n static convert_to_non_indexed_geometry(geometry_buffer)\n {\n const indices = geometry_buffer.index;\n const positions = geometry_buffer.getAttribute('position');\n\n const bar_coordinates = [];\n const vertices = [];\n\n for (let i = 0; i < indices.count; i += 3)\n {\n // VERTEX 1\n vertices.push(positions.getX(indices.array[i + 0]));\n vertices.push(positions.getY(indices.array[i + 0]));\n vertices.push(positions.getZ(indices.array[i + 0]));\n\n bar_coordinates.push(1);\n bar_coordinates.push(0);\n bar_coordinates.push(0);\n\n // VERTEX 2\n\n vertices.push(positions.getX(indices.array[i + 1]));\n vertices.push(positions.getY(indices.array[i + 1]));\n vertices.push(positions.getZ(indices.array[i + 1]));\n\n bar_coordinates.push(0);\n bar_coordinates.push(1);\n bar_coordinates.push(0);\n\n // VERTEX 3\n\n vertices.push(positions.getX(indices.array[i + 2]));\n vertices.push(positions.getY(indices.array[i + 2]));\n vertices.push(positions.getZ(indices.array[i + 2]));\n\n bar_coordinates.push(0);\n bar_coordinates.push(0);\n bar_coordinates.push(1);\n }\n\n const geometry = new BufferGeometry();\n // geometry.setAttribute('barycentric', new BufferAttribute( new Float32Array(bar_coordinates), 3 ));\n geometry.setAttribute('position', new BufferAttribute(new Float32Array(vertices), 3));\n GeometryUtilities.add_barycentric_attribute(geometry);\n return geometry;\n }\n\n static add_barycentric_attribute(non_indexed_geometry_buffer)\n {\n const bar_coordinates = [];\n const positions = non_indexed_geometry_buffer.getAttribute('position');\n\n for (let i = 0; i < positions.count; i += 3)\n {\n bar_coordinates.push(1);\n bar_coordinates.push(0);\n bar_coordinates.push(0);\n\n bar_coordinates.push(0);\n bar_coordinates.push(1);\n bar_coordinates.push(0);\n\n bar_coordinates.push(0);\n bar_coordinates.push(0);\n bar_coordinates.push(1);\n }\n non_indexed_geometry_buffer.setAttribute('barycentric', new BufferAttribute(new Float32Array(bar_coordinates), 3));\n }\n}\n\nexport { GeometryUtilities };\n","import { Vector4 } from 'three';\n\nclass ImageUtilities\n{\n constructor()\n { }\n\n static get_image_data(image)\n {\n const canvas = document.createElement('canvas');\n canvas.width = image.width;\n canvas.height = image.height;\n\n const context = canvas.getContext('2d');\n context.drawImage(image, 0, 0);\n\n return context.getImageData(0, 0, image.width, image.height);\n }\n\n static get_pixel(imagedata, x, y)\n {\n const position = (x + imagedata.width * y) * 4;\n const data = imagedata.data;\n return new Vector4(data[position + 0], data[position + 1], data[position + 2], data[position + 3]);\n }\n}\n\nexport { ImageUtilities };\n","import { Vector3 } from 'three';\nimport { Vector2 } from 'three';\nclass MeshSampler\n{\n constructor()\n {\n\n }\n\n sample(buffer_geometry, sample_count)\n {\n const face_areas = [];\n\n let min_area = 99999999;\n\n const vertices = buffer_geometry.getAttribute('position');\n const normals = buffer_geometry.getAttribute('normal');\n const tangents = buffer_geometry.getAttribute('tangent');\n const uvs = buffer_geometry.getAttribute('uv');\n const indices = buffer_geometry.index;\n\n const faces = [];\n\n for (let i = 0; i < indices.count; i += 3)\n {\n const index_0 = indices.array[i + 0];\n const index_1 = indices.array[i + 1];\n const index_2 = indices.array[i + 2];\n\n const v1 = new Vector3();\n v1.x = vertices.getX(index_0);\n v1.y = vertices.getY(index_0);\n v1.z = vertices.getZ(index_0);\n\n const v2 = new Vector3();\n v2.x = vertices.getX(index_1);\n v2.y = vertices.getY(index_1);\n v2.z = vertices.getZ(index_1);\n\n const v3 = new Vector3();\n v3.x = vertices.getX(index_2);\n v3.y = vertices.getY(index_2);\n v3.z = vertices.getZ(index_2);\n\n const face = {\n a: v1,\n b: v2,\n c: v3\n };\n\n if (normals)\n {\n const n1 = new Vector3();\n n1.x = normals.getX(index_0);\n n1.y = normals.getY(index_0);\n n1.z = normals.getZ(index_0);\n\n const n2 = new Vector3();\n n2.x = normals.getX(index_1);\n n2.y = normals.getY(index_1);\n n2.z = normals.getZ(index_1);\n\n const n3 = new Vector3();\n n3.x = normals.getX(index_2);\n n3.y = normals.getY(index_2);\n n3.z = normals.getZ(index_2);\n\n const normal = n1.clone().add(n2).add(n3).normalize();\n face.normal = normal;\n }\n\n if (tangents)\n {\n const n1 = new Vector3();\n n1.x = tangents.getX(index_0);\n n1.y = tangents.getY(index_0);\n n1.z = tangents.getZ(index_0);\n\n const n2 = new Vector3();\n n2.x = tangents.getX(index_1);\n n2.y = tangents.getY(index_1);\n n2.z = tangents.getZ(index_1);\n\n const n3 = new Vector3();\n n3.x = tangents.getX(index_2);\n n3.y = tangents.getY(index_2);\n n3.z = tangents.getZ(index_2);\n\n const tangent = n1.clone().add(n2).add(n3).normalize();\n face.tangent = tangent;\n }\n if (uvs)\n {\n const uv_a = new Vector2();\n uv_a.x = uvs.getX(index_0);\n uv_a.y = uvs.getY(index_0);\n\n const uv_b = new Vector2();\n uv_b.x = uvs.getX(index_1);\n uv_b.y = uvs.getY(index_1);\n\n const uv_c = new Vector2();\n uv_c.x = uvs.getX(index_2);\n uv_c.y = uvs.getY(index_2);\n\n face.uv_a = uv_a;\n face.uv_b = uv_b;\n face.uv_c = uv_c;\n }\n\n faces.push(face);\n\n const area = this.get_face_area(face);\n min_area = Math.min(area, min_area);\n face_areas.push(area);\n }\n\n const normalized_faces_array = this.get_uniform_face_distribution(face_areas, min_area, faces);\n const selected_faces = this.select_random_faces(normalized_faces_array, sample_count);\n const sampled_data = this.sample_data_from_faces(selected_faces);\n return sampled_data;\n }\n\n sample_data_from_faces(faces)\n {\n const sampled_points = [];\n const sampled_normals = [];\n const sampled_tangents = [];\n const sampled_uvs = [];\n\n for (let i = 0; i < faces.length; i++)\n {\n const face = faces[i];\n\n const w1 = Math.random();\n const w2 = Math.random();\n\n sampled_points.push(this.sample_point_in_face(w1, w2, face.a, face.b, face.c).clone());\n if (face.normal)\n {\n sampled_normals.push(face.normal.clone());\n }\n if (face.tangent)\n {\n sampled_tangents.push(face.tangent.clone());\n }\n if (face.uv_a)\n {\n sampled_uvs.push(this.sample_point_in_face(w1, w2, face.uv_a, face.uv_b, face.uv_c).clone());\n }\n }\n return { points: sampled_points, normals: sampled_normals, tangents: sampled_tangents, uvs: sampled_uvs };\n }\n\n select_random_faces(faces, amount)\n {\n const selected_faces = [];\n for (let i = 0; i < amount; i++)\n {\n const random = Math.floor(Math.random() * faces.length);\n const selected_face = faces[random];\n\n selected_faces.push(selected_face);\n }\n\n return selected_faces;\n }\n\n get_uniform_face_distribution(face_areas, minimum_area, faces)\n {\n const extended_triangle_indices = [];\n for (let i = 0; i < face_areas.length; i++)\n {\n face_areas[i] /= minimum_area;\n const repetitions_needed = Math.floor(Math.round(face_areas[i]));\n for (let j = 0; j < repetitions_needed; j++)\n {\n extended_triangle_indices.push(faces[i]);\n }\n }\n return extended_triangle_indices;\n }\n\n get_face_area(face)\n {\n const vec1 = face.b.clone().sub(face.a);\n const vec2 = face.c.clone().sub(face.a);\n return vec1.cross(vec2).length() / 2;\n }\n\n sample_point_in_face(w1, w2, v1, v2, v3)\n {\n if (w1 + w2 > 1)\n {\n w1 = 1.0 - w1;\n w2 = 1.0 - w2;\n }\n\n const w3 = 1.0 - (w1 + w2);\n\n return v1.clone().multiplyScalar(w1).add(v2.clone().multiplyScalar(w2)).add(v3.clone().multiplyScalar(w3));\n }\n}\n\nconst mesh_sampler = new MeshSampler();\nexport { mesh_sampler as MeshSampler };\n","import { Mesh } from 'three';\nimport { BufferGeometry } from 'three';\nimport { Skeleton } from 'three';\n\nclass ModelUtilities\n{\n get_mesh(scene, result_callback)\n {\n scene.traverse((child) =>\n {\n if (child instanceof Mesh)\n {\n if (child.geometry)\n {\n child.geometry = new BufferGeometry().fromGeometry(child.geometry);\n }\n result_callback(child);\n }\n });\n }\n\n get_geometries(scene)\n {\n const geometries = [];\n\n this.get_mesh(scene, (child) =>\n {\n geometries.push(child.geometry);\n });\n return geometries;\n }\n\n assign_material(scene, material, name)\n {\n scene.traverse((child) =>\n {\n if (child instanceof Mesh)\n {\n // assign to all if no name is given\n if (name === undefined)\n {\n child.material = material;\n }\n else\n {\n // if name is given, assign only to that\n if (child.name === name)\n {\n child.material = material;\n }\n }\n }\n });\n }\n\n clone_animated_gltf(gltf)\n {\n const clone = {\n animations: gltf.animations,\n scene: gltf.scene.clone(true)\n };\n\n const skinnedMeshes = {};\n\n gltf.scene.traverse(node =>\n {\n if (node.isSkinnedMesh)\n {\n skinnedMeshes[node.name] = node;\n }\n });\n\n const cloneBones = {};\n const cloneSkinnedMeshes = {};\n\n clone.scene.traverse(node =>\n {\n if (node.isBone)\n {\n cloneBones[node.name] = node;\n }\n\n if (node.isSkinnedMesh)\n {\n cloneSkinnedMeshes[node.name] = node;\n }\n });\n\n for (const name in skinnedMeshes)\n {\n const skinnedMesh = skinnedMeshes[name];\n const skeleton = skinnedMesh.skeleton;\n const cloneSkinnedMesh = cloneSkinnedMeshes[name];\n\n const orderedCloneBones = [];\n\n for (let i = 0; i < skeleton.bones.length; ++i)\n {\n const cloneBone = cloneBones[skeleton.bones[i].name];\n orderedCloneBones.push(cloneBone);\n }\n\n cloneSkinnedMesh.bind(\n new Skeleton(orderedCloneBones, skeleton.boneInverses),\n cloneSkinnedMesh.matrixWorld);\n }\n\n return clone;\n }\n\n set_shadow_config(scene, cast, receive)\n {\n scene.traverse((child) =>\n {\n if (child instanceof Mesh)\n {\n child.castShadow = cast;\n child.receiveShadow = receive;\n }\n });\n }\n\n __find_object(scene, object_name, result_callback)\n {\n scene.traverse((obj) =>\n {\n if (obj.name === object_name)\n {\n result_callback(obj);\n }\n });\n }\n\n get_object(scene, object_name)\n {\n let object = undefined;\n scene.traverse((obj) =>\n {\n if (obj.name === object_name)\n {\n object = obj;\n }\n });\n return object;\n }\n\n get_object_by_type(scene, object_type)\n {\n let object = undefined;\n scene.traverse((obj) =>\n {\n if (obj.constructor.name === object_type)\n {\n object = obj;\n }\n });\n return object;\n }\n}\n\nconst model_utilities = new ModelUtilities();\nexport { model_utilities as ModelUtilities };\n","class ObjectUtilities\r\n{\r\n static is_object(item)\r\n {\r\n return (item && typeof item === 'object' && !Array.isArray(item));\r\n }\r\n\r\n static merge_deep(target, ...sources)\r\n {\r\n if (!sources.length) return target;\r\n const source = sources.shift();\r\n\r\n if (ObjectUtilities.is_object(target) && ObjectUtilities.is_object(source))\r\n {\r\n for (const key in source)\r\n {\r\n if (ObjectUtilities.is_object(source[key]))\r\n {\r\n if (!target[key]) Object.assign(target, { [key]: {} });\r\n ObjectUtilities.merge_deep(target[key], source[key]);\r\n }\r\n else\r\n {\r\n Object.assign(target, { [key]: source[key] });\r\n }\r\n }\r\n }\r\n\r\n return ObjectUtilities.merge_deep(target, ...sources);\r\n }\r\n\r\n static xml_to_json(xml)\r\n {\r\n // Create the return object\r\n let obj = {};\r\n\r\n if (xml.nodeType === 1)\r\n { // element\r\n // do attributes\r\n if (xml.attributes.length > 0)\r\n {\r\n obj['@attributes'] = {};\r\n for (let j = 0; j < xml.attributes.length; j++)\r\n {\r\n const attribute = xml.attributes.item(j);\r\n obj['@attributes'][attribute.nodeName] = attribute.nodeValue;\r\n }\r\n }\r\n }\r\n else if (xml.nodeType === 3)\r\n { // text\r\n obj = xml.nodeValue;\r\n }\r\n\r\n // do children\r\n if (xml.hasChildNodes())\r\n {\r\n for (let i = 0; i < xml.childNodes.length; i++)\r\n {\r\n const item = xml.childNodes.item(i);\r\n const nodeName = item.nodeName;\r\n if (typeof (obj[nodeName]) === 'undefined')\r\n {\r\n obj[nodeName] = this.xml_to_json(item);\r\n }\r\n else\r\n {\r\n if (typeof (obj[nodeName].push) === 'undefined')\r\n {\r\n const old = obj[nodeName];\r\n obj[nodeName] = [];\r\n obj[nodeName].push(old);\r\n }\r\n obj[nodeName].push(this.xml_to_json(item));\r\n }\r\n }\r\n }\r\n return obj;\r\n }\r\n}\r\n\r\nexport { ObjectUtilities };\r\n","class StringUtilities\n{\n constructor()\n {}\n\n static get_random_color()\n {\n const hexValues = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C', 'D', 'E', 'F'];\n let hex = '#';\n\n for (let i = 0; i < 6; i++)\n {\n const index = Math.floor(Math.random() * hexValues.length);\n hex += hexValues[index];\n }\n\n return hex;\n }\n\n static capitalize(string)\n {\n const words = string.split(' ');\n\n for (let i = 0; i < words.length; i++)\n {\n words[i] = words[i][0].toUpperCase() + words[i].substr(1);\n }\n\n return words.join(' ');\n }\n\n static capitalize_first_letter(string)\n {\n return string.charAt(0).toUpperCase() + string.slice(1);\n }\n\n static snake_to_camelcase(string)\n {\n return string.toLowerCase().replace(/[-_][a-z0-9]/g, (group) => group.slice(-1).toUpperCase());\n }\n}\n\nexport { StringUtilities };\n","class TimeUtilities\n{\n constructor()\n {}\n\n // Converts a time string (00:00:00.45) into miliseconds\n time_str_to_ms(time_str)\n {\n time_str = time_str.split(':');\n\n let hours = Number(time_str[0]);\n hours = hours * 60 * 60 * 1000;\n\n let minutes = Number(time_str[1]);\n minutes = minutes * 60 * 1000;\n\n let seconds = Number(time_str[2]);\n seconds = seconds * 1000;\n\n return hours + minutes + seconds;\n }\n}\n\nexport { TimeUtilities };\n","import grid_frag from '../shaders/grid/grid.frag';\nimport grid_vert from '../shaders/grid/grid.vert';\n\nimport { GeometryUtilities } from '../utilities/GeometryUtilities';\n\nimport { Mesh } from 'three';\nimport { ShaderMaterial } from 'three';\nimport { Color } from 'three';\nimport { PlaneGeometry } from 'three';\n\nclass Grid extends Mesh\n{\n constructor()\n {\n const material = new ShaderMaterial({\n uniforms: {\n _Color: { value: new Color('#919191') }\n },\n vertexShader: grid_vert,\n fragmentShader: grid_frag,\n extensions: { derivatives: true },\n transparent: true,\n depthWrite: false\n });\n\n const plane_geometry = new PlaneGeometry(100, 100, 100, 100);\n\n const non_indexed_geometry = GeometryUtilities.convert_to_non_indexed_geometry(plane_geometry);\n\n super(non_indexed_geometry, material);\n\n this.rotation.x = -3.14 / 2;\n }\n}\n\nexport { Grid };\n","import line_vs from '../shaders/basic_line/basic_line.vert';\nimport line_fs from '../shaders/basic_line/basic_line.frag';\n\nimport { Mesh } from 'three';\nimport { BufferAttribute } from 'three';\nimport { BufferGeometry } from 'three';\nimport { ShaderMaterial } from 'three';\nimport { Color } from 'three';\n\nclass Line extends Mesh\n{\n constructor(points)\n {\n const geometry = new BufferGeometry();\n geometry.setAttribute('position', new BufferAttribute(new Float32Array([]), 3));\n geometry.setAttribute('next_position', new BufferAttribute(new Float32Array([]), 3));\n geometry.setAttribute('previous_position', new BufferAttribute(new Float32Array([]), 3));\n geometry.setAttribute('orientation', new BufferAttribute(new Float32Array([]), 1));\n geometry.setAttribute('coverage', new BufferAttribute(new Float32Array([]), 1));\n\n const material = new ShaderMaterial({\n uniforms: {\n _Thickness: { value: 0.2 },\n _Length: { value: 0 },\n _ElapsedTime: { value: 0 },\n _Color: { value: new Color('#FF0000') }\n },\n vertexShader: line_vs,\n fragmentShader: line_fs,\n transparent: true,\n depthWrite: false,\n extensions: { derivatives: true }\n\n });\n\n super(geometry, material);\n\n if (points)\n {\n this.setup(points);\n }\n }\n\n setup(points)\n {\n const vertices = [];\n const next_position = [];\n const previous_position = [];\n const orientation = [];\n const coverage = [];\n let accumulated_length = 0;\n\n for (let i = 0; i < points.length; i++)\n {\n vertices.push(points[i].x);\n vertices.push(points[i].y);\n vertices.push(points[i].z);\n orientation.push(1);\n\n vertices.push(points[i].x);\n vertices.push(points[i].y);\n vertices.push(points[i].z);\n orientation.push(-1);\n\n const next_point = this.__get_next_position(points, i);\n next_position.push(next_point.x);\n next_position.push(next_point.y);\n next_position.push(next_point.z);\n\n next_position.push(next_point.x);\n next_position.push(next_point.y);\n next_position.push(next_point.z);\n\n const previous_point = this.__get_previous_position(points, i);\n previous_position.push(previous_point.x);\n previous_position.push(previous_point.y);\n previous_position.push(previous_point.z);\n\n previous_position.push(previous_point.x);\n previous_position.push(previous_point.y);\n previous_position.push(previous_point.z);\n\n coverage.push(accumulated_length);\n coverage.push(accumulated_length);\n\n if (i < points.length - 1)\n {\n accumulated_length += points[i].distanceTo(next_point);\n }\n }\n const vertexList = new Float32Array(vertices);\n const nextPositionList = new Float32Array(next_position);\n const previousPositionList = new Float32Array(previous_position);\n const orientationList = new Float32Array(orientation);\n const coverageList = new Float32Array(coverage);\n\n const indices = [];\n for (let i = 0; i < ((vertexList.length / 3) - 2) / 2; i++)\n {\n const index = (i * 2) + 1;\n indices.push(index);\n indices.push(index + 1);\n indices.push(index - 1);\n\n indices.push(index);\n indices.push(index + 2);\n indices.push(index + 1);\n }\n\n this.geometry.setIndex(indices);\n this.geometry.getAttribute('position').copy(new BufferAttribute(vertexList, 3));\n this.geometry.getAttribute('next_position').copy(new BufferAttribute(nextPositionList, 3));\n this.geometry.getAttribute('previous_position').copy(new BufferAttribute(previousPositionList, 3));\n this.geometry.getAttribute('orientation').copy(new BufferAttribute(orientationList, 1));\n this.geometry.getAttribute('coverage').copy(new BufferAttribute(coverageList, 1));\n\n this.geometry.getAttribute('position').needsUpdate = true;\n this.geometry.getAttribute('next_position').needsUpdate = true;\n this.geometry.getAttribute('previous_position').needsUpdate = true;\n this.geometry.getAttribute('orientation').needsUpdate = true;\n this.geometry.getAttribute('coverage').needsUpdate = true;\n\n this.material.uniforms._Length.value = accumulated_length;\n this._length = accumulated_length;\n }\n\n set thickness(value)\n {\n this.material.uniforms._Thickness.value = value;\n }\n\n get thickness()\n {\n return this.material.uniforms._Thickness.value;\n }\n\n __get_previous_position(points, i)\n {\n if (i === 0)\n {\n return points[1].clone().sub(points[0]).multiplyScalar(-1).add(points[0]);\n }\n else\n {\n return points[i - 1];\n }\n }\n\n __get_next_position(points, i)\n {\n if (i === points.length - 1)\n {\n return points[points.length - 2].clone().sub(points[points.length - 1]).multiplyScalar(-1).add(points[points.length - 1]);\n }\n else\n {\n return points[i + 1];\n }\n }\n\n update()\n {\n }\n\n distance()\n {\n return this.accumulated_length;\n }\n\n total_length()\n {\n return this.accumulated_length;\n }\n\n dispose()\n {\n this.geometry.dispose();\n this.material.dispose();\n if (this.parent)\n {\n this.parent.remove(this);\n }\n }\n\n set color(col)\n {\n this.material.uniforms._Color.value.set(col);\n }\n\n get color()\n {\n return this.material.uniforms._Color.value;\n }\n\n copy_color(col)\n {\n this.material.uniforms._Color.value.copy(col);\n }\n}\n\nexport { Line };\n","import basic_texture_vert from '../shaders/basic_texture/basic_texture.vert';\nimport basic_texture_frag from '../shaders/basic_texture/basic_texture.frag';\n\nimport { Mesh } from 'three';\nimport { Vector2 } from 'three';\nimport { ShaderMaterial } from 'three';\nimport { DoubleSide } from 'three';\nimport { PlaneGeometry } from 'three';\nimport { Vector3 } from 'three';\n\nclass WorldImage extends Mesh\n{\n constructor(texture, pivot)\n {\n pivot = pivot || new Vector2(0, 0);\n const material = new ShaderMaterial({\n uniforms: {\n _MainTex: { value: texture },\n _ScreenAligned: { value: 0 },\n _Scale: { value: 1 },\n _Opacity: { value: 1 }\n },\n vertexShader: basic_texture_vert,\n fragmentShader: basic_texture_frag,\n transparent: true,\n depthWrite: false,\n side: DoubleSide\n });\n const geometry = new PlaneGeometry(1, 1, 1);\n geometry.translate(-pivot.x / 2, -pivot.y / 2, 0);\n const current_scale = texture.image.width / texture.image.height;\n geometry.scale(current_scale, 1, 1);\n super(geometry, material);\n this.current_scale = current_scale;\n this.geometry.computeBoundingBox();\n\n this.tmp_bb_size = new Vector3();\n this.geometry.boundingBox.getSize(this.tmp_bb_size);\n }\n\n update_texture()\n {\n this.material.uniforms._MainTex.value.needsUpdate = true;\n const img = this.material.uniforms._MainTex.value.image;\n\n this.geometry.scale(1 / this.current_scale, 1, 1);\n this.current_scale = img.width / img.height;\n this.geometry.scale(this.current_scale, 1, 1);\n this.geometry.computeBoundingBox();\n this.geometry.boundingBox.getSize(this.tmp_bb_size);\n }\n\n get size()\n {\n return this.tmp_bb_size.clone().multiplyScalar(this.scale.x);\n }\n\n set size(value)\n {\n this.scale.set(value, value, value);\n this.material.uniforms._Scale.value = value;\n }\n\n set screen_aligned(boolean)\n {\n this.material.uniforms._ScreenAligned.value = boolean === true ? 1 : 0;\n }\n\n get screen_aligned()\n {\n return this.material.uniforms._ScreenAligned.value === 1;\n }\n\n set opacity(opacity)\n {\n this.material.uniforms._Opacity.value = opacity;\n }\n\n get opacity()\n {\n return this.material.uniforms._Opacity.value;\n }\n\n dispose()\n {\n this.geometry.dispose();\n this.parent.remove(this);\n this.material.uniforms._MainTex.value.dispose();\n this.material.dispose();\n }\n}\n\nexport { WorldImage };\n","import { WorldImage } from './WorldImage';\nimport { SimpleTextDrawer } from '../canvas_drawer/SimpleTextDrawer';\n\nimport { LinearMipMapLinearFilter } from 'three';\nimport { LinearFilter } from 'three';\n\nclass Text2D extends WorldImage\n{\n constructor(text, font, color, pivot, is_static)\n {\n const simple_text_drawer = new SimpleTextDrawer(is_static);\n\n const draw_settings = {\n font: font,\n font_color: color || '#000000'\n };\n const canvas_texture = simple_text_drawer.draw_on_texture(text, draw_settings);\n\n canvas_texture.minFilter = LinearMipMapLinearFilter;\n canvas_texture.minFilter = LinearFilter;\n canvas_texture.needsUpdate = true;\n super(canvas_texture, pivot);\n\n this.simple_text_drawer = simple_text_drawer;\n this.canvas_texture = canvas_texture;\n this.draw_settings = draw_settings;\n }\n\n set text(value)\n {\n this.simple_text_drawer.draw_canvas(value, this.draw_settings);\n this.update_texture();\n }\n\n get text()\n {\n return 'not implemented';\n }\n}\n\nexport { Text2D };\n","import vert from '../shaders/ui_element/ui_element.vert';\nimport frag from '../shaders/ui_element/ui_element.frag';\n\nimport { BaseShaderMaterial } from '../materials/BaseShaderMaterial';\n\nimport { Vector2 } from 'three';\nimport { Vector3 } from 'three';\n\nimport { OScreen } from '../OScreen';\n\nclass UIElementMaterial extends BaseShaderMaterial\n{\n constructor(intensity = 1)\n {\n super(vert, frag, {\n _MainTex: { value: undefined },\n _ScreenSize: { value: new Vector2(OScreen.width, OScreen.height) },\n _TextureSize: { value: new Vector2() },\n _PixelOffset: { value: new Vector2(0, 0) },\n _NDC: { value: new Vector3() },\n _PivotPoint: { value: new Vector2() },\n _DepthOffset: { value: 0 }\n });\n this.transparent = true;\n this.depthWrite = false;\n this.depthTest = false;\n }\n}\n\nexport { UIElementMaterial };\n","import { Vector2 } from 'three';\n\nclass ScreenSpacePosition\n{\n constructor()\n {\n this.tmp_vec = new Vector2();\n }\n\n get_pos_NDC(position)\n {\n return this.tmp_vec.set(position.x, position.y);\n }\n}\n\nexport { ScreenSpacePosition };\n","import { CameraManager } from '../../CameraManager';\n\nimport { Vector2 } from 'three';\nimport { Vector3 } from 'three';\n\nclass WorldSpacePosition\n{\n constructor()\n {\n this.tmp_vec3 = new Vector3();\n this.tmp_vec2 = new Vector2();\n }\n\n get_pos_NDC(position)\n {\n this.tmp_vec3.copy(position);\n this.tmp_vec3.project(CameraManager.current);\n\n return this.tmp_vec2.set(this.tmp_vec3.x, this.tmp_vec3.y);\n }\n}\n\nexport { WorldSpacePosition };\n","class UIElementState\n{\n constructor()\n {\n\n }\n\n update(ui_element, normalized_mouse_position)\n {\n\n }\n\n on_enter(ui_element)\n {}\n\n on_exit(ui_element)\n {}\n}\n\nexport { UIElementState };\n","import { UIElementState } from './UIElementState';\n\nclass OnIdle extends UIElementState\n{\n constructor()\n {\n super();\n }\n\n update(ui_element, normalized_mouse_position)\n {\n if (ui_element.is_mouse_over(normalized_mouse_position))\n {\n ui_element.set_state(ui_element._on_enter_state);\n }\n }\n}\n\nexport { OnIdle };\n","import { UIElementState } from './UIElementState';\n\nclass OnMouseEnter extends UIElementState\n{\n constructor()\n {\n super();\n }\n\n on_enter(ui_element)\n {\n ui_element.on_mouse_enter();\n }\n\n update(ui_element, normalized_mouse_position)\n {\n if (ui_element.is_mouse_over(normalized_mouse_position))\n {\n ui_element.set_state(ui_element._on_hover_state);\n }\n else\n {\n ui_element.set_state(ui_element._on_exit_state);\n }\n }\n}\n\nexport { OnMouseEnter };\n","import { UIElementState } from './UIElementState';\n\nclass OnMouseExit extends UIElementState\n{\n constructor()\n {\n super();\n }\n\n on_enter(ui_element)\n {\n ui_element.on_mouse_exit();\n ui_element.set_state(ui_element._on_idle_state);\n }\n}\n\nexport { OnMouseExit };\n","import { UIElementState } from './UIElementState';\n\nclass OnMouseHover extends UIElementState\n{\n constructor()\n {\n super();\n }\n\n on_enter(ui_element)\n {\n this.__trigger_on_hover(ui_element);\n }\n\n update(ui_element, normalized_mouse_position)\n {\n if (ui_element.is_mouse_over(normalized_mouse_position))\n {\n this.__trigger_on_hover(ui_element);\n }\n else\n {\n ui_element.set_state(ui_element._on_exit_state);\n }\n }\n\n __trigger_on_hover(ui_element)\n {\n ui_element.on_mouse_hover();\n }\n}\n\nexport { OnMouseHover };\n","\nimport { OScreen } from '../OScreen';\n\nimport { UIElementMaterial } from '../materials/UIElementMaterial';\n\nimport { ScreenSpacePosition } from '../ui/ui_element_position/ScreenSpacePosition';\nimport { WorldSpacePosition } from '../ui/ui_element_position/WorldSpacePosition';\n\nimport { OnIdle } from '../ui/ui_element_state/OnIdle';\nimport { OnMouseEnter } from '../ui/ui_element_state/OnMouseEnter';\nimport { OnMouseExit } from '../ui/ui_element_state/OnMouseExit';\nimport { OnMouseHover } from '../ui/ui_element_state/OnMouseHover';\n\nimport { Mesh } from 'three';\nimport { PlaneGeometry } from 'three';\nimport { Vector2 } from 'three';\nimport { Vector3 } from 'three';\nimport { NearestFilter } from 'three';\nimport { Box2 } from 'three';\n\nclass UIElement extends Mesh\n{\n constructor(vert, frag)\n {\n super(new PlaneGeometry(1, 1), new UIElementMaterial());\n\n this.is_clickable = false;\n\n this.position_strategy = new WorldSpacePosition();\n this.current_state = new OnIdle();\n\n this._position = new Vector3();\n\n this._on_idle_state = new OnIdle();\n this._on_enter_state = new OnMouseEnter();\n this._on_exit_state = new OnMouseExit();\n this._on_hover_state = new OnMouseHover();\n\n this.on_enter = undefined;\n this.on_exit = undefined;\n this.on_hover = undefined;\n\n this.mouse_pos_tmp = new Vector2();\n this.cached_NDC_position = new Vector2();\n this.screen_pos_tmp = new Vector2();\n\n this.texture_size = new Vector2(1, 1);\n\n this.frustumCulled = false;\n this.matrixAutoUpdate = false;\n this.renderOrder = 0;\n\n this.size = 1;\n this.pixel_offset = new Vector2();\n }\n\n set_render_order(value)\n {\n this.renderOrder = value;\n }\n\n get pivot_point()\n {\n return this.material.uniforms._PivotPoint.value;\n }\n\n set_pixel_offset(offset)\n {\n this.pixel_offset.copy(offset);\n this.material.uniforms._PixelOffset.value.copy(offset);\n }\n\n set_state(new_state)\n {\n this.current_state.on_exit(this);\n this.current_state = new_state;\n this.current_state.on_enter(this);\n }\n\n get position()\n {\n return this._position;\n }\n\n set use_depth(boolean)\n {\n this.material.depthTest = boolean;\n }\n\n get use_depth()\n {\n return this.material.depthTest;\n }\n\n set depth_offset(value)\n {\n this.material.uniforms._DepthOffset.value = value;\n }\n\n get depth_offset()\n {\n return this.material.uniforms._DepthOffset.value;\n }\n\n clear_state()\n {\n this.visible = false;\n }\n\n set_world_space_coordinate_system()\n {\n this.position_strategy = new WorldSpacePosition();\n }\n\n set_screen_space_coordinate_system()\n {\n this.position_strategy = new ScreenSpacePosition();\n }\n\n set_texture(texture)\n {\n texture.minFilter = NearestFilter;\n texture.magFilter = NearestFilter;\n texture.needsUpdate = true;\n\n this.texture_size.set(texture.image.width, texture.image.height);\n\n this.material.uniforms._MainTex.value = texture;\n this.get_size(this.material.uniforms._TextureSize.value);\n this.visible = true;\n }\n\n update_state(normalized_mouse_pos)\n {\n this.material.uniforms._ScreenSize.value.set(OScreen.width, OScreen.height);\n this.get_size(this.material.uniforms._TextureSize.value);\n\n this.cached_NDC_position.copy(this.position_strategy.get_pos_NDC(this.position));\n this.material.uniforms._NDC.value.copy(this.position);\n this.current_state.update(this, normalized_mouse_pos);\n }\n\n is_mouse_over(normalized_mouse_pos)\n {\n this.screen_pos_tmp.copy(this.cached_NDC_position);\n this.to_screen_position(this.screen_pos_tmp);\n this.screen_pos_tmp.x += this.pixel_offset.x;\n this.screen_pos_tmp.y += this.pixel_offset.y;\n\n const rect = new Box2().setFromCenterAndSize(this.screen_pos_tmp, this.get_size());\n\n this.mouse_pos_tmp.copy(normalized_mouse_pos);\n this.to_screen_position(this.mouse_pos_tmp);\n\n return rect.containsPoint(this.mouse_pos_tmp);\n }\n\n to_screen_position(projected_pos)\n {\n projected_pos.x = (projected_pos.x * 0.5 + 0.5) * OScreen.width + this.pixel_offset.x;\n projected_pos.y = (projected_pos.y * 0.5 + 0.5) * OScreen.height + this.pixel_offset.y;\n }\n\n get_screen_space_position()\n {\n const pos = this.cached_NDC_position.clone();\n this.to_screen_position(pos);\n return pos;\n }\n\n set_screen_space_position(screen_pos)\n {\n this.position.x = (screen_pos.x / OScreen.width) * 2 - 1;\n this.position.y = (screen_pos.y / OScreen.height) * 2 - 1;\n }\n\n dispose()\n {\n if (this.material.uniforms._MainTex.value)\n {\n this.material.uniforms._MainTex.value.dispose();\n }\n // OScreen.remove_screen_material(this.material);\n this.geometry.dispose();\n this.material.dispose();\n }\n\n get_size(vector2)\n {\n if (vector2)\n {\n return vector2.copy(this.texture_size).multiplyScalar(this.size / OScreen.dpr);\n }\n else\n {\n return new Vector2().copy(this.texture_size).multiplyScalar(this.size / OScreen.dpr);\n }\n }\n\n on_mouse_enter()\n {}\n\n on_mouse_exit()\n {}\n\n on_mouse_hover()\n {}\n}\n\nexport { UIElement };\n","import { Mesh } from 'three';\n\nclass UpdatableMaterialMesh extends Mesh\n{\n constructor(geometry, material)\n {\n super(geometry, material);\n\n const self = this;\n\n this.onBeforeRender = () =>\n {\n self.material.update();\n };\n }\n}\n\nexport { UpdatableMaterialMesh };\n","import { Vector2, Vector4 } from 'three';\n\nclass TextGlyph\n{\n constructor(offset, plane_bounds, atlas_bounds)\n {\n const width = plane_bounds.right - plane_bounds.left;\n const height = plane_bounds.top - plane_bounds.bottom;\n\n this.scale = new Vector2(width, height);\n this.position = new Vector2(offset + plane_bounds.left, plane_bounds.bottom);\n\n this.atlas_bounds = new Vector4(atlas_bounds.left, atlas_bounds.right, atlas_bounds.top, atlas_bounds.bottom);\n }\n}\n\nexport { TextGlyph };\n","import { Vector3, Quaternion, Matrix4, Color, Box2, Vector2 } from 'three';\nimport { TextGlyph } from './TextGlyph';\n\nclass SDFText\n{\n constructor(glyph_layout, text = '')\n {\n this.glyph_layout = glyph_layout;\n\n this.glyphs = [];\n\n this.glyph_is_dirty = true;\n this.matrix_is_dirty = true;\n this.color_is_dirty = true;\n\n this.position = new Vector3();\n this.quaternion = new Quaternion();\n this.scale = new Vector3(1, 1, 1);\n this.matrix = new Matrix4();\n\n this.color = new Color('#FFFFFF');\n\n this.pivot_point = new Vector2();\n this.__opacity = 1;\n\n this.__text = text;\n\n this.__generate_glyphs(text);\n }\n\n set text(value)\n {\n this.__text = value;\n this.__generate_glyphs(value);\n this.matrix_is_dirty = true;\n }\n\n get text()\n {\n return this.__text;\n }\n\n update_matrix()\n {\n this.matrix.compose(this.position, this.quaternion, this.scale);\n this.matrix_is_dirty = false;\n this.glyph_is_dirty = true;\n }\n\n clear_glyph_dirty()\n {\n this.glyph_is_dirty = false;\n }\n\n clear_color_dirty()\n {\n this.color_is_dirty = false;\n }\n\n set_rotation(orientation = 0, tilt = 0) // 0..360, -90..0..90\n {\n const new_orientation = new Quaternion().setFromAxisAngle(new Vector3(0, 1, 0), (orientation / 360) * Math.PI * 2);\n const new_tilt = new Quaternion().setFromAxisAngle(new Vector3(1, 0, 0), (-tilt / 360) * Math.PI * 2);\n\n this.quaternion.copy(new_orientation.multiply(new_tilt));\n this.matrix_is_dirty = true;\n }\n\n set_position(pos)\n {\n this.position.copy(pos);\n this.matrix_is_dirty = true;\n }\n\n set_size(size)\n {\n this.scale.set(size, size, size);\n this.matrix_is_dirty = true;\n }\n\n set_color(col)\n {\n this.color.set(col);\n this.color_is_dirty = true;\n }\n\n set_pivot(pivot)\n {\n this.pivot_point.copy(pivot);\n this.update_glyphs();\n }\n\n set opacity(op)\n {\n this.__opacity = op;\n this.color_is_dirty = true;\n }\n\n get opacity()\n {\n return this.__opacity;\n }\n\n update_glyphs()\n {\n this.__generate_glyphs(this.text);\n }\n\n __generate_glyphs(text)\n {\n let cursor = 0;\n\n this.glyphs.length = 0;\n\n for (let i = 0; i < text.length; i++)\n {\n const unicode = text.charCodeAt(i);\n const glyph = this.glyph_layout.find(element => element.unicode === unicode);\n if (glyph)\n {\n if (glyph.planeBounds)\n {\n const text_glyph = new TextGlyph(cursor, glyph.planeBounds, glyph.atlasBounds);\n this.glyphs.push(text_glyph);\n }\n cursor += glyph.advance;\n }\n }\n\n const box2 = new Box2();\n const first_glyph = this.glyphs[0];\n box2.setFromCenterAndSize(first_glyph.position.clone().add(new Vector2(first_glyph.scale.x / 2, first_glyph.scale.y / 2)), first_glyph.scale);\n\n for (let i = 1; i < this.glyphs.length; i++)\n {\n const g = this.glyphs[i];\n const box = new Box2().setFromCenterAndSize(g.position.clone().add(new Vector2(g.scale.x / 2, g.scale.y / 2)), g.scale);\n box2.union(box);\n }\n\n const box2_size = new Vector2();\n box2.getSize(box2_size);\n for (let i = 0; i < this.glyphs.length; i++)\n {\n this.glyphs[i].position.x -= box2_size.x / 2;\n this.glyphs[i].position.y -= box2_size.y / 2;\n\n this.glyphs[i].position.x += (box2_size.x / 2) * this.pivot_point.x;\n this.glyphs[i].position.y += (box2_size.y / 2) * this.pivot_point.y;\n }\n\n this.glyph_is_dirty = true;\n }\n}\n\nexport { SDFText };\n","import { BaseShaderMaterial } from './BaseShaderMaterial';\n\nimport frag from '../shaders/sdf_text/sdf_text.frag';\nimport vert from '../shaders/sdf_text/sdf_text.vert';\n\nimport { Vector2, DoubleSide, LinearFilter } from 'three';\nimport { OMath } from '../utilities/OMath';\n\nclass SDFTextMaterial extends BaseShaderMaterial\n{\n constructor(texture)\n {\n super(vert, frag, {\n _Texture: { value: texture },\n _Boldness: { value: 0.5 },\n _AtlasSize: { value: new Vector2(1, 1) }\n });\n\n this.transparent = true;\n this.extensions = {\n derivatives: true\n };\n this.depthWrite = false;\n this.side = DoubleSide;\n texture.minFilter = LinearFilter;\n texture.magFilter = LinearFilter;\n texture.generateMipMaps = false;\n }\n\n set_atlas_size(size)\n {\n this.uniforms._AtlasSize.value.copy(size);\n }\n\n set_boldness(value)\n {\n this.uniforms._Boldness.value = OMath.lerp(0.5, 0.2, value);\n }\n}\n\nexport { SDFTextMaterial };\n","import { SDFText } from './SDFText';\nimport { SDFTextMaterial } from '../../materials/SDFTextMaterial';\nimport { ArrayUtilities } from '../../utilities/ArrayUtilities';\n\nimport {\n PlaneGeometry,\n Mesh,\n Vector2,\n InstancedBufferGeometry,\n InstancedBufferAttribute,\n Float32BufferAttribute,\n DynamicDrawUsage\n} from 'three';\n\nclass SDFTextBatch extends Mesh\n{\n constructor(font_layout, atlas_texture)\n {\n const max_allocations = 2000;\n\n const instanced_geometry = new InstancedBufferGeometry();\n instanced_geometry.instanceCount = 0;\n\n const geometry = new PlaneGeometry(1, 1);\n geometry.translate(0.5, 0.5, 0);\n instanced_geometry.setAttribute('position', new Float32BufferAttribute(geometry.getAttribute('position').array, 3));\n instanced_geometry.setAttribute('uv', new Float32BufferAttribute(geometry.getAttribute('uv').array, 2));\n instanced_geometry.index = geometry.index;\n\n const transformsCol0 = new InstancedBufferAttribute(new Float32Array(max_allocations * 4), 4, false);\n const transformsCol1 = new InstancedBufferAttribute(new Float32Array(max_allocations * 4), 4, false);\n const transformsCol2 = new InstancedBufferAttribute(new Float32Array(max_allocations * 4), 4, false);\n const transformsCol3 = new InstancedBufferAttribute(new Float32Array(max_allocations * 4), 4, false);\n\n const glyph_bounds = new InstancedBufferAttribute(new Float32Array(max_allocations * 4), 4, false);\n const plane_bounds = new InstancedBufferAttribute(new Float32Array(max_allocations * 4), 4, false);\n\n const color = new InstancedBufferAttribute(new Float32Array(max_allocations * 4), 4, false);\n\n transformsCol0.usage = DynamicDrawUsage;\n transformsCol1.usage = DynamicDrawUsage;\n transformsCol2.usage = DynamicDrawUsage;\n transformsCol3.usage = DynamicDrawUsage;\n glyph_bounds.usage = DynamicDrawUsage;\n plane_bounds.usage = DynamicDrawUsage;\n color.usage = DynamicDrawUsage;\n\n instanced_geometry.setAttribute('transformsCol0', transformsCol0);\n instanced_geometry.setAttribute('transformsCol1', transformsCol1);\n instanced_geometry.setAttribute('transformsCol2', transformsCol2);\n instanced_geometry.setAttribute('transformsCol3', transformsCol3);\n\n instanced_geometry.setAttribute('glyph_bounds', glyph_bounds);\n instanced_geometry.setAttribute('plane_bounds', plane_bounds);\n instanced_geometry.setAttribute('color', color);\n\n super(instanced_geometry, new SDFTextMaterial(atlas_texture));\n\n this.text_elements = [];\n this.font_layout = font_layout;\n\n this.material.set_atlas_size(new Vector2(font_layout.atlas.width, font_layout.atlas.height));\n\n this.frustumCulled = false;\n }\n\n set_boldness(value)\n {\n this.material.set_boldness(value);\n }\n\n add_text(text_str)\n {\n const elem = new SDFText(this.font_layout.glyphs, text_str);\n this.text_elements.push(elem);\n return elem;\n }\n\n remove_text(text_elem)\n {\n ArrayUtilities.remove_elem(this.text_elements, text_elem);\n this.update(true);\n }\n\n update(force_update)\n {\n const glyph_bounds_atr = this.geometry.getAttribute('glyph_bounds');\n const plane_bounds_atr = this.geometry.getAttribute('plane_bounds');\n\n const transformsCol0 = this.geometry.getAttribute('transformsCol0');\n const transformsCol1 = this.geometry.getAttribute('transformsCol1');\n const transformsCol2 = this.geometry.getAttribute('transformsCol2');\n const transformsCol3 = this.geometry.getAttribute('transformsCol3');\n\n const color_atr = this.geometry.getAttribute('color');\n\n let matrix_needs_update = force_update === true;\n let glyph_needs_update = force_update === true;\n let color_needs_update = force_update === true;\n\n let glyph_count = 0;\n for (let i = 0; i < this.text_elements.length; i++)\n {\n const text = this.text_elements[i];\n\n if (text.matrix_is_dirty)\n {\n matrix_needs_update = true;\n text.update_matrix();\n }\n\n if (text.glyph_is_dirty)\n {\n glyph_needs_update = true;\n text.clear_glyph_dirty();\n }\n\n if (text.color_is_dirty)\n {\n color_needs_update = true;\n text.clear_color_dirty();\n }\n\n const matrix = text.matrix;\n const color = text.color;\n const opacity = text.opacity;\n\n for (let glyph_i = 0; glyph_i < text.glyphs.length; glyph_i++)\n {\n const glyph = text.glyphs[glyph_i];\n\n const buffer_i = glyph_count;\n\n glyph_bounds_atr.setXYZW(buffer_i, glyph.atlas_bounds.x, glyph.atlas_bounds.y, glyph.atlas_bounds.z, glyph.atlas_bounds.w);\n plane_bounds_atr.setXYZW(buffer_i, glyph.position.x, glyph.position.y, glyph.scale.x, glyph.scale.y);\n\n transformsCol0.setXYZW(buffer_i, matrix.elements[0],\n matrix.elements[1],\n matrix.elements[2],\n matrix.elements[3]);\n\n transformsCol1.setXYZW(buffer_i, matrix.elements[4],\n matrix.elements[5],\n matrix.elements[6],\n matrix.elements[7]);\n\n transformsCol2.setXYZW(buffer_i, matrix.elements[8],\n matrix.elements[9],\n matrix.elements[10],\n matrix.elements[11]);\n\n transformsCol3.setXYZW(buffer_i, matrix.elements[12],\n matrix.elements[13],\n matrix.elements[14],\n matrix.elements[15]);\n\n color_atr.setXYZW(buffer_i, color.r, color.g, color.b, opacity);\n\n glyph_count++;\n }\n }\n\n this.geometry.instanceCount = glyph_count;\n\n if (glyph_count > this.max_allocations)\n {\n console.error('SDFTextBatch exceeded maximum glyph allocations(max/current): ', this.max_allocations, glyph_count, this);\n }\n\n if (matrix_needs_update)\n {\n transformsCol0.needsUpdate = true;\n transformsCol1.needsUpdate = true;\n transformsCol2.needsUpdate = true;\n transformsCol3.needsUpdate = true;\n }\n if (glyph_needs_update)\n {\n glyph_bounds_atr.needsUpdate = true;\n plane_bounds_atr.needsUpdate = true;\n }\n if (color_needs_update)\n {\n color_atr.needsUpdate = true;\n }\n }\n\n dispose()\n {\n this.geometry.dispose();\n this.material.dispose();\n }\n}\n\nexport { SDFTextBatch };\n","import { ActionInterpolator } from './ActionInterpolator';\n\nclass VectorInterpolator extends ActionInterpolator\n{\n constructor(attribute_name, from = 0, to = 1, easing_function = 'linear')\n {\n super(easing_function);\n\n this.attribute_name = attribute_name;\n this.from = from;\n this.to = to;\n }\n\n update(context, t)\n {\n const tmp = this.from.clone();\n tmp.lerp(this.to, this.easing_function(t));\n context[this.attribute_name].copy(tmp);\n }\n}\n\nexport { VectorInterpolator };\n","import { BlitMaterial } from '../materials/BlitMaterial';\n\nimport frag from '../shaders/median_filter/median_filter.frag';\n\nimport { Vector2 } from 'three';\n\nclass MedianFilterMaterial extends BlitMaterial\n{\n constructor()\n {\n super(frag, undefined, {\n kernel3x3: true\n });\n\n this.uniforms._SourceTex = { value: undefined };\n this.uniforms._SourceTexSize = { value: new Vector2(1, 1) };\n }\n\n set_texture(tex)\n {\n this.uniforms._SourceTex.value = tex;\n\n const size = this.get_size(tex);\n this.uniforms._SourceTexSize.value.copy(size);\n }\n\n get_size(tex)\n {\n if (tex.isVideoTexture)\n {\n return new Vector2(Math.max(1, tex.image.videoWidth), Math.max(1, tex.image.videoHeight));\n }\n if (tex.isWebGLRenderTarget)\n {\n return new Vector2(tex.width, tex.height);\n }\n if (tex.isTexture)\n {\n return new Vector2(tex.image.width, tex.image.height);\n }\n return new Vector2(1, 1);\n }\n}\n\nexport { MedianFilterMaterial };\n","import { MedianFilterMaterial } from '../materials/MedianFilterMaterial';\nimport { Graphics } from '../Graphics';\n\nimport { WebGLRenderTarget, Vector2, RGBAFormat, FloatType, NearestFilter } from 'three';\n\nclass MedianFilter\n{\n constructor(renderer)\n {\n this.RT = new WebGLRenderTarget(1, 1, {\n type: FloatType,\n format: RGBAFormat,\n minFilter: NearestFilter,\n magFilter: NearestFilter\n });\n this.RT1 = new WebGLRenderTarget(1, 1, {\n type: FloatType,\n format: RGBAFormat,\n minFilter: NearestFilter,\n magFilter: NearestFilter\n });\n\n this.median_filter_mat = new MedianFilterMaterial();\n }\n\n filter(texture)\n {\n const tex_size = this.get_size(texture);\n if (tex_size.x !== this.RT.width || tex_size.y !== this.RT.height)\n {\n this.RT.setSize(tex_size.x, tex_size.y);\n this.RT1.setSize(tex_size.x, tex_size.y);\n }\n\n this.median_filter_mat.set_texture(texture);\n Graphics.material_pass(this.median_filter_mat, this.RT);\n\n for (let i = 0; i < 0; i++)\n {\n this.median_filter_mat.set_texture(this.RT.texture);\n Graphics.material_pass(this.median_filter_mat, this.RT1);\n\n this.median_filter_mat.set_texture(this.RT1.texture);\n Graphics.material_pass(this.median_filter_mat, this.RT);\n }\n\n return this.RT;\n }\n\n get_size(tex)\n {\n if (tex.isVideoTexture)\n {\n return new Vector2(Math.max(1, tex.image.videoWidth), Math.max(1, tex.image.videoHeight));\n }\n if (tex.isWebGLRenderTarget)\n {\n return new Vector2(tex.width, tex.height);\n }\n if (tex.isTexture)\n {\n return new Vector2(tex.image.width, tex.image.height);\n }\n return new Vector2(1, 1);\n }\n}\n\nexport { MedianFilter };\n","import { BlitMaterial } from './BlitMaterial';\n\nimport downsample_frag from '../shaders/dual_filter_blur/downsample.frag';\nimport upsample_frag from '../shaders/dual_filter_blur/upsample.frag';\n\nclass DualFilteringBlurMaterial extends BlitMaterial\n{\n constructor(upsample)\n {\n super(upsample ? upsample_frag : downsample_frag);\n }\n}\n\nexport { DualFilteringBlurMaterial };\n","import { BlitMaterial } from './BlitMaterial';\n\nimport frag from '../shaders/dual_filter_blur/alpha_filter.frag';\n\nclass AlphaFilterMaterial extends BlitMaterial\n{\n constructor(use_alpha_mask, upsample)\n {\n super(frag);\n }\n\n set offset(value)\n {\n this.uniforms._Offset.value = value;\n }\n\n get offset()\n {\n return this.uniforms._Offset.value;\n }\n}\n\nexport { AlphaFilterMaterial };\n","import { DualFilteringBlurMaterial } from '../materials/DualFilteringBlurMaterial';\nimport { AlphaFilterMaterial } from '../materials/AlphaFilterMaterial';\nimport { Graphics } from '../Graphics';\nimport { WebGLRenderTarget } from 'three';\nclass DualFilteringBlurrer\n{\n constructor(use_alpha_mask)\n {\n this.current_width = 1;\n this.current_height = 1;\n this.RT0 = new WebGLRenderTarget(1, 1);\n this.RT1 = new WebGLRenderTarget(1, 1);\n this.RT2 = new WebGLRenderTarget(1, 1);\n this.RT3 = new WebGLRenderTarget(1, 1);\n this.RT4 = new WebGLRenderTarget(1, 1);\n\n this.upscale_blur_mat = new DualFilteringBlurMaterial(true);\n this.downscale_blur_mat = new DualFilteringBlurMaterial(false);\n\n this.alpha_filter_mat = new AlphaFilterMaterial();\n }\n\n blur(RT)\n {\n this.check_RT_resize(RT.width, RT.height);\n Graphics.blit(RT, this.RT1, this.alpha_filter_mat);\n\n // Graphics.blit(this.RT0, this.RT1, this.downscale_blur_mat);\n Graphics.blit(this.RT1, this.RT2, this.downscale_blur_mat);\n Graphics.blit(this.RT2, this.RT3, this.downscale_blur_mat);\n Graphics.blit(this.RT3, this.RT4, this.downscale_blur_mat);\n\n // Graphics.blit(this.RT4, this.RT3, this.upscale_blur_mat);\n // Graphics.blit(this.RT3, this.RT4, this.upscale_blur_mat);\n Graphics.blit(this.RT4, this.RT3, this.upscale_blur_mat);\n Graphics.blit(this.RT3, this.RT2, this.upscale_blur_mat);\n Graphics.blit(this.RT2, RT, this.upscale_blur_mat);\n // Graphics.blit(this.RT1, RT, this.upscale_blur_mat);\n\n // return this.RT2;\n }\n\n check_RT_resize(width, height)\n {\n if (this.current_width !== width || this.current_height !== height)\n {\n this.current_width = width;\n this.current_height = height;\n this.RT0.setSize(this.current_width / 2, this.current_height / 2);\n this.RT1.setSize(this.current_width / 2, this.current_height / 2);\n this.RT2.setSize(this.current_width / 4, this.current_height / 4);\n this.RT3.setSize(this.current_width / 8, this.current_height / 8);\n this.RT4.setSize(this.current_width / 16, this.current_height / 16);\n }\n }\n}\n\nexport { DualFilteringBlurrer };\n","import { Graphics } from '../Graphics';\n\nimport { NearestFilter } from 'three';\nimport { RGBAFormat } from 'three';\nimport { LinearEncoding } from 'three';\nimport { HalfFloatType } from 'three';\nimport { FloatType } from 'three';\nimport { WebGLRenderTarget } from 'three';\nimport { Capabilities } from '../Capabilities';\n\nclass ParticleAttribute\n{\n constructor(attr_name, update_material)\n {\n this.read = undefined;\n this.write = undefined;\n\n this.name = attr_name;\n\n this.update_material = update_material;\n }\n\n init_from_geometry(geometry)\n {\n // overrided by inheritance\n }\n\n init_from_attribute(particle_attribute)\n {\n\n }\n\n build_RT(particle_count)\n {\n const resolution = ParticleAttribute.calculate_resolution(particle_count);\n const options = {\n minFilter: NearestFilter,\n magFilter: NearestFilter,\n format: RGBAFormat,\n encoding: LinearEncoding,\n type: Capabilities.fp_textures_available ? FloatType : HalfFloatType,\n stencilBuffer: false,\n depthBuffer: false\n };\n\n return new WebGLRenderTarget(resolution.width, resolution.height, options);\n }\n\n static calculate_resolution(particle_count)\n {\n const width = Math.min(particle_count, 512);\n const height = Math.max(1, Math.ceil(particle_count / width));\n return { width, height };\n }\n\n swap_RT()\n {\n const tmp = this.read;\n this.read = this.write;\n this.write = tmp;\n }\n\n update(attribute_writter_scene)\n {\n if (this.update_material)\n {\n this.update_material.update();\n attribute_writter_scene.children[0].material = this.update_material;\n this.update_material.uniforms._MainTex.value = this.read.texture;\n Graphics.render(attribute_writter_scene, undefined, this.write);\n attribute_writter_scene.children[0].material = undefined;\n\n this.swap_RT();\n }\n }\n\n store_geometry_attribute_in_RT(attribute, RT, storage_material, attribute_writter_scene)\n {\n attribute_writter_scene.children[0].geometry.setAttribute('data', attribute);\n attribute_writter_scene.children[0].material = storage_material;\n\n Graphics.render(attribute_writter_scene, undefined, RT);\n\n attribute_writter_scene.children[0].geometry.deleteAttribute('data');\n attribute_writter_scene.children[0].material = undefined;\n }\n\n get_texture()\n {\n return this.read.texture;\n }\n}\n\nexport { ParticleAttribute };\n","import { Object3D } from 'three';\nimport { BufferAttribute } from 'three';\nimport { PlaneGeometry } from 'three';\nimport { Mesh } from 'three';\nimport { BufferGeometry } from 'three';\nimport { Scene } from 'three';\nimport { Points } from 'three';\nimport { InstancedBufferGeometry } from 'three';\nimport { InstancedBufferAttribute } from 'three';\nimport { ParticleAttribute } from './ParticleAttribute';\n\nclass GPUParticleSystem extends Object3D\n{\n constructor(particle_count, material)\n {\n super();\n this.attributes = [];\n\n this.mesh = this.build_point_mesh(particle_count, material);\n this.add(this.mesh);\n\n this.attribute_writter_mesh = this.build_attribute_writter_mesh(particle_count);\n this.attribute_writter_scene = new Scene();\n this.attribute_writter_scene.add(this.attribute_writter_mesh);\n }\n\n add_texture_attribute(buffer_attribute)\n {\n this.attributes.push(buffer_attribute);\n }\n\n add_update_attribute_array(name, array, item_size)\n {\n this.attribute_writter_mesh.geometry.setAttribute(name, new BufferAttribute(array, item_size, false));\n }\n\n add_attribute_array(name, array, item_size)\n {\n this.mesh.geometry.setAttribute(name, new InstancedBufferAttribute(array, item_size, false));\n }\n\n update()\n {\n this.mesh.material.update();\n for (let i = 0; i < this.attributes.length; i++)\n {\n this.attributes[i].update(this.attribute_writter_scene);\n }\n }\n\n dispose()\n {\n this.mesh.geometry.dispose();\n this.mesh.material.dispose();\n }\n\n build_point_mesh(instance_count = 1, material)\n {\n const geo = new PlaneGeometry();\n\n const instanced_geo = new InstancedBufferGeometry();\n instanced_geo.setAttribute('position', geo.getAttribute('position'));\n instanced_geo.index = geo.index;\n\n instanced_geo.setAttribute('storage_uv', this.build_uv_storage_attribute(instance_count));\n instanced_geo.instanceCount = instance_count;\n const mesh = new Mesh(instanced_geo, material);\n mesh.frustumCulled = false;\n return mesh;\n }\n\n build_attribute_writter_mesh(particle_count)\n {\n const { width, height } = ParticleAttribute.calculate_resolution(particle_count);\n\n const uvs = new Float32Array(particle_count * 3);\n\n for (let i = 0; i < particle_count; i++)\n {\n const x = i % width;\n const y = Math.floor(i / width);\n uvs[i * 3 + 0] = (x + 0.5) / width;\n uvs[i * 3 + 1] = (y + 0.5) / height;\n uvs[i * 3 + 2] = i;\n }\n const geo = new BufferGeometry();\n geo.setAttribute('position', new BufferAttribute(uvs, 3, false));\n\n const points = new Points(geo);\n points.frustumCulled = false;\n return points;\n }\n\n build_uv_storage_attribute(particle_count)\n {\n const { width, height } = ParticleAttribute.calculate_resolution(particle_count);\n\n const uvs = new Float32Array(particle_count * 2);\n\n for (let i = 0; i < particle_count; i++)\n {\n const x = i % width;\n const y = Math.floor(i / width);\n uvs[i * 2 + 0] = (x + 0.5) / width;\n uvs[i * 2 + 1] = (y + 0.5) / height;\n }\n return new InstancedBufferAttribute(uvs, 2, false);\n }\n}\n\nexport { GPUParticleSystem };\n","import frag from '../../shaders/gpu_particles/generic_storage.frag';\n\nimport { ShaderMaterial } from 'three';\nimport { NoBlending } from 'three';\nimport { AlwaysDepth } from 'three';\n\nclass ParticleStorageMaterial extends ShaderMaterial\n{\n constructor()\n {\n const vert = `\n varying vec4 value;\n attribute vec4 data;\n\n void main()\n {\n gl_Position = vec4(position.xy * 2.0 - 1.0, 1.0,1.0);\n gl_PointSize = 1.0;\n\n value = data;\n }\n `;\n super({\n uniforms: {\n\n },\n vertexShader: vert,\n fragmentShader: frag,\n depthWrite: false,\n blending: NoBlending,\n depthTest: false,\n depthFunc: AlwaysDepth\n });\n }\n}\n\nexport { ParticleStorageMaterial };\n","import { BufferAttribute } from 'three';\n\nimport { ParticleAttribute } from '../gpu_particles/ParticleAttribute';\nimport { ParticleStorageMaterial } from '../materials/gpu_particles/ParticleStorageMaterial';\n\nclass ParticlePositionAttribute extends ParticleAttribute\n{\n constructor(update_material)\n {\n super('_Position', update_material);\n }\n\n store_geometry(geometry, attribute_writter_scene)\n {\n const pos_attr = geometry.getAttribute('position');\n this.read = this.build_RT(pos_attr.count);\n this.write = this.build_RT(pos_attr.count);\n\n const mat = new ParticleStorageMaterial();\n this.store_geometry_attribute_in_RT(geometry.getAttribute('position'), this.read, mat, attribute_writter_scene);\n }\n\n store_positions(positions, attribute_writter_scene)\n {\n this.read = this.build_RT(positions.length);\n this.write = this.build_RT(positions.length);\n\n const arr = new Float32Array(positions.length * 4);\n\n for (let i = 0; i < positions.length; i++)\n {\n arr[i * 4 + 0] = positions[i].x;\n arr[i * 4 + 1] = positions[i].y;\n arr[i * 4 + 2] = positions[i].z;\n arr[i * 4 + 3] = (Math.random() * 2 - 1) * 10;\n }\n const mat = new ParticleStorageMaterial();\n this.store_geometry_attribute_in_RT(new BufferAttribute(arr, 4), this.read, mat, attribute_writter_scene);\n }\n}\n\nexport { ParticlePositionAttribute };\n","import { DataTexture } from 'three';\n\nclass CustomDataTexture extends DataTexture\n{\n constructor(data, width, height, format, type)\n {\n super(data, width, height, format, type);\n this.multiplier = 1;\n }\n\n set_rgba(index, r, g, b, a)\n {\n this.data[index * 3 + 0] = r * this.multiplier;\n this.data[index * 3 + 1] = g * this.multiplier;\n this.data[index * 3 + 2] = b * this.multiplier;\n this.data[index * 3 + 3] = a * this.multiplier;\n this.needsUpdate = true;\n }\n\n set_rgb(index, r, g, b)\n {\n this.data[index * 3 + 0] = r * this.multiplier;\n this.data[index * 3 + 1] = g * this.multiplier;\n this.data[index * 3 + 2] = b * this.multiplier;\n this.needsUpdate = true;\n }\n\n set_r(index, value)\n {\n this.data[index * 3 + 0] = value * this.multiplier;\n this.needsUpdate = true;\n }\n\n set_g(index, value)\n {\n this.data[index * 3 + 1] = value * this.multiplier;\n this.needsUpdate = true;\n }\n\n set_b(index, value)\n {\n this.data[index * 3 + 2] = value * this.multiplier;\n this.needsUpdate = true;\n }\n\n set_a(index, value)\n {\n this.data[index * 3 + 2] = value * this.multiplier;\n this.needsUpdate = true;\n }\n}\n\nexport { CustomDataTexture };\n","import { CustomDataTexture } from './CustomDataTexture';\nimport { RGBFormat } from 'three';\n\nclass RGBDataTexture extends CustomDataTexture\n{\n constructor(width, height)\n {\n const data = new Uint8Array(width * height * 3);\n super(data, width, height, RGBFormat);\n this.multiplier = 255;\n }\n}\n\nexport { RGBDataTexture };\n","import { CustomDataTexture } from './CustomDataTexture';\nimport { RGBAFormat } from 'three';\n\nclass RGBADataTexture extends CustomDataTexture\n{\n constructor(width, height)\n {\n const data = new Uint8Array(width * height * 4);\n super(data, width, height, RGBAFormat);\n this.multiplier = 255;\n }\n}\n\nexport { RGBADataTexture };\n","import { CustomDataTexture } from './CustomDataTexture';\nimport { FloatType } from 'three';\nimport { RGBFormat } from 'three';\n\nclass RGBFloatDataTexture extends CustomDataTexture\n{\n constructor(width, height)\n {\n const data = new Float32Array(width * height * 3);\n super(data, width, height, RGBFormat, FloatType);\n }\n}\n\nexport { RGBFloatDataTexture };\n","import { CustomDataTexture } from './CustomDataTexture';\nimport { FloatType } from 'three';\nimport { RGBAFormat } from 'three';\n\nclass RGBAFloatDataTexture extends CustomDataTexture\n{\n constructor(width, height)\n {\n const data = new Float32Array(width * height * 4);\n super(data, width, height, RGBAFormat, FloatType);\n }\n}\n\nexport { RGBAFloatDataTexture };\n","import { Mesh } from 'three';\nimport { RGBDataTexture } from '../data_textures/RGBDataTexture';\nimport { RGBADataTexture } from '../data_textures/RGBADataTexture';\nimport { RGBFloatDataTexture } from '../data_textures/RGBFloatDataTexture';\nimport { RGBAFloatDataTexture } from '../data_textures/RGBAFloatDataTexture';\n\nclass BatchedMesh extends Mesh\n{\n constructor(id_table, geometry, material, max_texture_width)\n {\n super(geometry, material);\n\n this.id_table = id_table;\n this.batched_count = Object.keys(id_table).length;\n this.max_texture_width = max_texture_width;\n this.batch_width = this.batched_count % max_texture_width;\n this.batch_height = Math.ceil(this.batched_count / max_texture_width);\n }\n\n attach_rgb_texture(uniform_name)\n {\n this.material.uniforms[uniform_name].value = new RGBDataTexture(this.batch_width, this.batch_height);\n }\n\n attach_rgba_texture(uniform_name)\n {\n this.material.uniforms[uniform_name].value = new RGBADataTexture(this.batch_width, this.batch_height);\n }\n\n attach_rgb_float_texture(uniform_name)\n {\n this.material.uniforms[uniform_name].value = new RGBFloatDataTexture(this.batch_width, this.batch_height);\n }\n\n attach_rgba_float_texture(uniform_name)\n {\n this.material.uniforms[uniform_name].value = new RGBAFloatDataTexture(this.batch_width, this.batch_height);\n }\n\n get_mesh_index(name)\n {\n return this.id_table[name];\n }\n\n set_rgb_value(uniform_name, mesh_name, r, g, b)\n {\n this.material.uniforms[uniform_name].set_rgb(this.get_mesh_index(mesh_name), r, g, b);\n }\n\n set_rgba_value(uniform_name, mesh_name, r, g, b, a)\n {\n this.material.uniforms[uniform_name].set_rgba(this.get_mesh_index(mesh_name), r, g, b, a);\n }\n}\n\nexport { BatchedMesh };\n","import { BatchedMesh } from './BatchedMesh';\n\nimport * as BufferGeometryUtils from 'three/examples/jsm/utils/BufferGeometryUtils.js';\n\nimport { BufferAttribute } from 'three';\n\nclass MeshBatcher\n{\n batch(meshes, material)\n {\n const max_texture_width = 2048;\n // let texture_width = meshes.length % max_texture_width;\n // let texture_height = Math.ceil(meshes.length / max_texture_width);\n\n // console.log(\"Store count: \" + buffer_geometries.length + \", Texture size: \" +texture_width);\n\n const geometries = [];\n const id_table = {};\n\n const attr_mesh_id = [];\n\n for (let i = 0; i < meshes.length; i++)\n {\n const mesh = meshes[i];\n const vertex_count = mesh.geometry.getAttribute('position').count;\n\n for (let count = 0; count < vertex_count; count++)\n {\n attr_mesh_id.push(i);\n }\n\n geometries.push(mesh.geometry);\n\n if (id_table[mesh.name] === undefined)\n {\n id_table[mesh.name] = i;\n }\n else\n {\n console.error('Mesh name is duplicated when trying to merge meshes. Non-unique id error.', mesh.name, id_table);\n }\n }\n\n const buffer_geometry = BufferGeometryUtils.mergeBufferGeometries(geometries);\n\n const buffer_attribute = new BufferAttribute(new Float32Array(attr_mesh_id), 1);\n buffer_geometry.setAttribute('mesh_id', buffer_attribute);\n\n return this.create_batched_mesh(id_table, buffer_geometry, material, max_texture_width);\n }\n\n create_batched_mesh(id_table, buffer_geometry, material, max_texture_width)\n {\n return new BatchedMesh(id_table, buffer_geometry, material, max_texture_width);\n }\n}\n\nexport { MeshBatcher };\n","import { Audio as TAudio } from 'three';\nimport { PositionalAudio as TPositionalAudio } from 'three';\n\nclass AudioClip\n{\n constructor(buffer, loop = true, volume = 1, positional = false)\n {\n this.buffer = buffer;\n this.loop = loop;\n this.volume = volume;\n this.positional = positional;\n\n this.audio = undefined;\n }\n\n init(audio_listener)\n {\n if (this.positional)\n {\n this.audio = new TPositionalAudio(audio_listener);\n }\n else\n {\n this.audio = new TAudio(audio_listener);\n }\n\n this.audio.setBuffer(this.buffer);\n this.audio.setLoop(this.loop);\n\n // This prevents undesired volume at the beginning of playing\n this.audio.gain.gain.value = 0;\n\n this.audio.setVolume(this.loop ? 0 : this.volume);\n }\n\n play()\n {\n this.audio.play();\n }\n\n pause()\n {\n this.audio.pause();\n }\n\n stop()\n {\n this.audio.stop();\n }\n\n get is_playing()\n {\n return this.audio.isPlaying;\n }\n}\n\nexport { AudioClip };\n","import { AudioContext } from 'three';\r\n\r\nimport { AudioClip } from '../components/AudioClip';\r\nimport { AbstractLoader } from './AbstractLoader';\r\n\r\nclass AudioLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, loop = true, volume = 0, size, positional = false)\r\n {\r\n super(resource_id, url, size);\r\n this.loop = loop;\r\n this.volume = volume;\r\n this.positional = positional;\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n // if (!window.user_interaction_for_audio)\r\n // {\r\n // setTimeout(this.on_preloaded_finished.bind(this, resource_container), 100);\r\n // }\r\n // else\r\n // {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n this.instantiate_audio(resource_container);\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n // }\r\n }\r\n\r\n instantiate_audio(resource_container)\r\n {\r\n const context = AudioContext.getContext();\r\n\r\n const buffer = context.createBuffer(2, 22050, 44100);\r\n\r\n fetch(this.url).then(r => r.blob()).then((response) =>\r\n {\r\n if (response.arrayBuffer)\r\n {\r\n response.arrayBuffer().then((array_buffer) =>\r\n {\r\n context.decodeAudioData(array_buffer, (audio_buffer) =>\r\n {\r\n resource_container.set_resource(\r\n this.resource_id,\r\n this.url,\r\n new AudioClip(audio_buffer, this.loop, this.volume, this.positional)\r\n );\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n });\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(\r\n this.resource_id,\r\n this.url,\r\n new AudioClip(buffer, this.loop, this.volume, this.positional)\r\n );\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n });\r\n }\r\n}\r\n\r\nexport { AudioLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\n\n// import { sRGBEncoding } from 'three';\n\nclass BasisLoader extends AbstractLoader\n{\n constructor(resource_id, url, loader, size)\n {\n super(resource_id, url, size);\n\n this.loader = loader;\n }\n\n on_preloaded_finished(resource_container)\n {\n if (resource_container.resources_by_url[this.url] === undefined)\n {\n this.loader.load(this.url, (basis) =>\n {\n // basis.encoding = sRGBEncoding;\n\n resource_container.set_resource(this.resource_id, this.url, basis);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n },\n (xhr) =>\n {\n // if (xhr)\n // {\n // let total = xhr.total || this.total_bytes;\n // this.__update_downloaded_bytes(xhr.loaded, total);\n // }\n },\n (msg) =>\n {\n this.__set_error(msg + '\\n\\n\\t If the error says something about unexpected token < in JSON then the probably the problem is related to the file not being found. Check the name and path of the resource');\n this.__loading_ended();\n });\n }\n else\n {\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n }\n }\n}\n\nexport { BasisLoader };\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { CubeTextureLoader } from 'three';\r\n\r\nclass CubemapLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, extension, size)\r\n {\r\n super(resource_id, url, size);\r\n this.loader = new CubeTextureLoader();\r\n this.loader.setPath(url + '/');\r\n this.urls = [\r\n `px.${extension}`,\r\n `nx.${extension}`,\r\n `py.${extension}`,\r\n `ny.${extension}`,\r\n `pz.${extension}`,\r\n `nz.${extension}`\r\n ];\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n this.loader.load(this.urls, (image) =>\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, image);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n },\r\n (xhr) =>\r\n {\r\n // if (xhr)\r\n // {\r\n // let total = xhr.total || this.total_bytes;\r\n // this.__update_downloaded_bytes(xhr.loaded, total);\r\n // }\r\n },\r\n (error) =>\r\n {\r\n this.__set_error('Image could not be loaded. Maybe wrong name or path, I don\\'t know' + '¯\\\\_(ツ)_/¯', error);\r\n this.__loading_ended();\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { CubemapLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { ColladaLoader } from 'three/examples/jsm/loaders/ColladaLoader.js';\r\n\r\nclass DAELoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, size)\r\n {\r\n super(resource_id, url, size);\r\n this.loader = new ColladaLoader();\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n this.loader.load(this.url, (gltf) =>\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, gltf);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n },\r\n (xhr) =>\r\n {\r\n // if (xhr)\r\n // {\r\n // let total = xhr.total || this.total_bytes;\r\n // this.__update_downloaded_bytes(xhr.loaded, total);\r\n // }\r\n },\r\n (msg) =>\r\n {\r\n this.__set_error(msg + '\\n\\n\\t If the error says something about unexpected token < in JSON then the probably the problem is related to the file not being found. Check the name and path of the resource');\r\n this.__loading_ended();\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { DAELoader };\r\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { FileLoader as TFileLoader } from 'three';\r\n\r\nclass FileLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, size)\r\n {\r\n super(resource_id, url, size);\r\n this.loader = new TFileLoader();\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n this.loader.load(this.url, (file) =>\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, file);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n },\r\n (xhr) =>\r\n {\r\n // if (xhr)\r\n // {\r\n // let total = xhr.total || this.total_bytes;\r\n // this.__update_downloaded_bytes(xhr.loaded, total);\r\n // }\r\n },\r\n (msg) =>\r\n {\r\n this.__set_error(msg);\r\n this.__loading_ended();\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { FileLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\n\nimport { FontLoader as TFontLoader } from 'three/examples/jsm/loaders/FontLoader.js';\n\nclass FontLoader extends AbstractLoader\n{\n constructor(resource_id, url, size)\n {\n super(resource_id, url, size);\n this.loader = new TFontLoader();\n }\n\n on_preloaded_finished(resource_container)\n {\n if (resource_container.resources_by_url[this.url] === undefined)\n {\n this.loader.load(this.url, (font) =>\n {\n resource_container.set_resource(this.resource_id, this.url, font);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n },\n (xhr) =>\n {\n // if (xhr)\n // {\n // let total = xhr.total || this.total_bytes;\n // this.__update_downloaded_bytes(xhr.loaded, total);\n // }\n },\n (msg) =>\n {\n this.__set_error(msg + '\\n\\n\\t If the error says something about unexpected token < in JSON then probably the problem is related to the file not being found. Check the name and path of the resource');\n this.__loading_ended();\n });\n }\n else\n {\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n }\n }\n}\n\nexport { FontLoader };\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { GLTFLoader as TGLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';\r\n\r\nclass GLTFLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, size)\r\n {\r\n super(resource_id, url, size);\r\n this.loader = new TGLTFLoader();\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n this.loader.load(this.url, (gltf) =>\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, gltf);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n },\r\n (xhr) =>\r\n {\r\n // if (xhr)\r\n // {\r\n // let total = xhr.total || this.total_bytes;\r\n\r\n // this.__update_downloaded_bytes(xhr.loaded, total);\r\n // }\r\n },\r\n (msg) =>\r\n {\r\n this.__set_error(msg + '\\n\\n\\t If the error says something about unexpected token < in JSON then the probably the problem is related to the file not being found. Check the name and path of the resource');\r\n this.__loading_ended();\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { GLTFLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';\r\n\r\nclass GLTFDRACOLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, loader, size)\r\n {\r\n super(resource_id, url, size);\r\n this.loader = new GLTFLoader();\r\n\r\n this.loader.setDRACOLoader(loader);\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n this.loader.load(this.url, (gltf) =>\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, gltf);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n },\r\n (xhr) =>\r\n {\r\n // if (xhr)\r\n // {\r\n // let total = xhr.total || this.total_bytes;\r\n // this.__update_downloaded_bytes(xhr.loaded, total);\r\n // }\r\n },\r\n (msg) =>\r\n {\r\n this.__set_error(msg + '\\n\\n\\t If the error says something about unexpected token < in JSON then the probably the problem is related to the file not being found. Check the name and path of the resource');\r\n this.__loading_ended();\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { GLTFDRACOLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { HDRCubeTextureLoader as THDRCubeTextureLoader } from 'three/examples/jsm/loaders/HDRCubeTextureLoader.js';\r\nimport { UnsignedByteType } from 'three';\r\n\r\nclass HDRCubeTextureLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, size)\r\n {\r\n super(resource_id, url, size);\r\n this.loader = new THDRCubeTextureLoader();\r\n this.url_suffix = ['/px.hdr', '/nx.hdr', '/py.hdr', '/ny.hdr', '/pz.hdr', '/nz.hdr'];\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n this.loader.setPath(this.url)\r\n .setDataType(UnsignedByteType)\r\n .load(this.url_suffix, (hdr) =>\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, hdr);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n },\r\n (xhr) =>\r\n {\r\n // if (xhr)\r\n // {\r\n // let total = xhr.total || this.total_bytes;\r\n // this.__update_downloaded_bytes(xhr.loaded, total);\r\n // }\r\n },\r\n (msg) =>\r\n {\r\n this.__set_error(msg + '\\n\\n\\t If the error says something about unexpected token < in JSON then the probably the problem is related to the file not being found. Check the name and path of the resource');\r\n this.__loading_ended();\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { HDRCubeTextureLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\n\nclass JSONLoader extends AbstractLoader\n{\n constructor(resource_id, url, size)\n {\n super(resource_id, url, size);\n }\n\n on_preloaded_finished(resource_container, response)\n {\n if (resource_container.resources_by_url[this.url] === undefined)\n {\n response.json().then((json) =>\n {\n resource_container.set_resource(this.resource_id, this.url, json);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n });\n }\n else\n {\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n }\n }\n}\n\nexport { JSONLoader };\n","import { AbstractLoader } from './AbstractLoader';\n\nimport { OBJLoader as TOBJLoader } from 'three/examples/jsm/loaders/OBJLoader.js';\n\nclass OBJLoader extends AbstractLoader\n{\n constructor(resource_id, url, size)\n {\n super(resource_id, url, size);\n this.loader = new TOBJLoader();\n }\n\n on_preloaded_finished(resource_container)\n {\n if (resource_container.resources_by_url[this.url] === undefined)\n {\n this.loader.load(this.url, (obj) =>\n {\n resource_container.set_resource(this.resource_id, this.url, obj);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n },\n (xhr) =>\n {\n // if (xhr)\n // {\n // let total = xhr.total || this.total_bytes;\n // this.__update_downloaded_bytes(xhr.loaded, total);\n // }\n },\n (msg) =>\n {\n this.__set_error(msg + '\\n\\n\\t If the error says something about unexpected token < in JSON then probably the problem is related to the file not being found. Check the name and path of the resource');\n this.__loading_ended();\n });\n }\n else\n {\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n }\n }\n}\n\nexport { OBJLoader };\n","import { AbstractLoader } from './AbstractLoader';\n\nimport { Vector3 } from 'three';\nimport { FileLoader } from 'three';\n\nclass PointArrayLoader extends AbstractLoader\n{\n constructor(resource_id, url, size)\n {\n super(resource_id, url, size);\n this.loader = new FileLoader();\n }\n\n on_preloaded_finished(resource_container)\n {\n if (resource_container.resources_by_url[this.url] === undefined)\n {\n this.loader.load(this.url, (text) =>\n {\n resource_container.set_resource(this.resource_id, this.url, this.parse_path(text));\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n },\n (xhr) =>\n {\n // if (xhr)\n // {\n // let total = xhr.total || this.total_bytes;\n // this.__update_downloaded_bytes(xhr.loaded, total);\n // }\n },\n (msg) =>\n {\n this.__set_error(msg);\n this.__loading_ended();\n });\n }\n else\n {\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n }\n }\n\n parse_path(raw_data)\n {\n const string_array = raw_data.split('\\n');\n\n if (string_array[string_array.length - 1] === '')\n {\n string_array.pop();\n }\n\n const positions = [];\n\n for (let i = 0; i < string_array.length; i += 3)\n {\n const x = parseFloat(string_array[i + 0]);\n const y = parseFloat(string_array[i + 1]);\n const z = parseFloat(string_array[i + 2]);\n positions.push(new Vector3(x, y, z));\n }\n return positions;\n // let curve = new THREE.CatmullRomCurve3(positions);\n // return curve.getPoints(100);\n }\n}\n\nexport { PointArrayLoader };\n","import { AbstractLoader } from './AbstractLoader';\n\nimport { RGBELoader } from 'three/examples/jsm/loaders/RGBELoader.js';\n\nclass RGBETextureLoader extends AbstractLoader\n{\n constructor(resource_id, url, size)\n {\n super(resource_id, url, size);\n this.loader = new RGBELoader();\n }\n\n on_preloaded_finished(resource_container)\n {\n if (resource_container.resources_by_url[this.url] === undefined)\n {\n this.loader.load(this.url, (hdr) =>\n {\n resource_container.set_resource(this.resource_id, this.url, hdr);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n },\n (xhr) =>\n {\n // if (xhr)\n // {\n // let total = xhr.total || this.total_bytes;\n // this.__update_downloaded_bytes(xhr.loaded, total);\n // }\n },\n (msg) =>\n {\n this.__set_error(msg + '\\n\\n\\t If the error says something about unexpected token < in JSON then the probably the problem is related to the file not being found. Check the name and path of the resource');\n this.__loading_ended();\n });\n }\n else\n {\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n }\n }\n}\n\nexport { RGBETextureLoader };\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { FileLoader as TFileLoader } from 'three';\r\n\r\nclass TextLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, size)\r\n {\r\n super(resource_id, url, size);\r\n this.loader = new TFileLoader();\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n this.loader.load(this.url, (gltf) =>\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, gltf);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n },\r\n (xhr) =>\r\n {\r\n // if (xhr)\r\n // {\r\n // let total = xhr.total || this.total_bytes;\r\n // this.__update_downloaded_bytes(xhr.loaded, total);\r\n // }\r\n },\r\n (msg) =>\r\n {\r\n this.__set_error(msg);\r\n this.__loading_ended();\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { TextLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { Texture } from 'three';\r\nimport { Browser } from '../Browser';\r\n\r\nclass AsyncTextureLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, size)\r\n {\r\n super(resource_id, url, size);\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n if (Browser.is_safari && Browser.version < 15)\r\n {\r\n this.load_with_old_method(resource_container);\r\n }\r\n else\r\n {\r\n this.load_with_new_method(resource_container);\r\n }\r\n }\r\n\r\n load_with_old_method(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n const texture = new Texture();\r\n const image = new Image();\r\n\r\n image.src = this.url;\r\n\r\n image.onload = () =>\r\n {\r\n texture.image = image;\r\n texture.needsUpdate = true;\r\n\r\n resource_container.set_resource(this.resource_id, this.url, texture);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n };\r\n\r\n image.onerror = () =>\r\n {\r\n console.error('Error loading texture. Maybe the resource is not an image?', this.url, this.original_url);\r\n };\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n\r\n load_with_new_method(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n const fetchOptions = {};\r\n fetchOptions.credentials = 'same-origin';\r\n // fetchOptions.headers = this.requestHeader;\r\n\r\n fetch(this.url, fetchOptions).then((res) =>\r\n {\r\n return res.blob();\r\n }).then((blob) =>\r\n {\r\n return createImageBitmap(blob, { colorSpaceConversion: 'none' });\r\n }).then((imageBitmap) =>\r\n {\r\n const texture = new Texture(imageBitmap);\r\n texture.needsUpdate = true;\r\n\r\n resource_container.set_resource(this.resource_id, this.url, texture);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }).catch(function(e)\r\n {\r\n console.error(e);\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { AsyncTextureLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { Texture } from 'three';\r\n\r\nclass TextureLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, size)\r\n {\r\n super(resource_id, url, size);\r\n }\r\n\r\n on_preloaded_finished(resource_container, response)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n response.blob().then((blob) =>\r\n {\r\n const texture = new Texture();\r\n\r\n const url = URL.createObjectURL(blob);\r\n\r\n const image = new Image();\r\n image.src = url;\r\n\r\n image.onload = () =>\r\n {\r\n texture.image = image;\r\n texture.needsUpdate = true;\r\n\r\n resource_container.set_resource(this.resource_id, this.url, texture);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n };\r\n\r\n image.onerror = () =>\r\n {\r\n console.error('Error loading texture. Maybe the resource is not an image?', this.url);\r\n };\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { TextureLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\n\nclass VideoLoader extends AbstractLoader\n{\n constructor(resource_id, url, size)\n {\n super(resource_id, url, size);\n }\n\n on_preloaded_finished(resource_container, response)\n {\n if (resource_container.resources_by_url[this.url] === undefined)\n {\n response.blob().then((blob) =>\n {\n resource_container.set_resource(this.resource_id, this.url, URL.createObjectURL(blob));\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n });\n }\n else\n {\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n }\n }\n}\n\nexport { VideoLoader };\n","import { ResourceContainer } from '../ResourceContainer';\r\n\r\nclass ResourceBatch\r\n{\r\n constructor(batch_name)\r\n {\r\n this.resource_loaders = [];\r\n this.batch_name = batch_name || 'unnamed batch';\r\n }\r\n\r\n add_loader(loader)\r\n {\r\n this.resource_loaders.push(loader);\r\n }\r\n\r\n load(resource_container)\r\n {\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n this.resource_loaders[i].load(resource_container || ResourceContainer);\r\n }\r\n }\r\n\r\n get loading_finished()\r\n {\r\n let finished = true;\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n finished = finished && this.resource_loaders[i].has_finished;\r\n }\r\n return finished;\r\n }\r\n\r\n get has_errors()\r\n {\r\n let has_error = false;\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n has_error = has_error || this.resource_loaders[i].has_error;\r\n }\r\n return has_error;\r\n }\r\n\r\n print_errors()\r\n {\r\n console.error('Batch <' + this.batch_name + '> could not load successfully');\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n if (this.resource_loaders[i].has_error)\r\n {\r\n this.resource_loaders[i].print_error();\r\n }\r\n }\r\n }\r\n\r\n get_progress()\r\n {\r\n return this.get_loaded_bytes() / this.get_total_bytes();\r\n }\r\n\r\n get_loaded_bytes()\r\n {\r\n let loaded_bytes = 1;\r\n\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n loaded_bytes += this.resource_loaders[i].loaded_bytes;\r\n }\r\n\r\n return loaded_bytes;\r\n }\r\n\r\n get_total_bytes()\r\n {\r\n let total_bytes = 1;\r\n\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n total_bytes += this.resource_loaders[i].total_bytes;\r\n }\r\n\r\n return total_bytes;\r\n }\r\n}\r\n\r\nexport { ResourceBatch };\r\n"],"names":["browser","[object Object]","this","browser_name","agent","window","navigator","userAgent","toLowerCase","vrBrowserKeywords","vrBrowser","find","keyword","includes","hasWebXRSupport","indexOf","opr","chrome","version","get_version","name","is_safari","is_chrome","is_edge","is_edge_chromium","is_vr","has_webm","is_firefox","has_hvec","preferred_video_extension","ua","tem","M","match","test","exec","slice","join","replace","appName","appVersion","splice","Number","split","Validation","n","is_int","is_float","str","JSON","parse","e","AbstractLoader","resource_id","url","size","loaded_bytes","total_bytes","has_finished","has_error","error_message","loaded","total","is_number","console","warn","message","error","resource_container","undefined","resources_by_url","cache","Browser","fetch","method","mode","credentials","redirect","then","on_progress","bind","catch","__on_error","set_resource","__update_downloaded_bytes","__loading_ended","response","response_clone","clone","reader","body","getReader","contentLength","headers","get","receivedLength","done","value","read","length","on_preloaded_finished","data","OMath","from_range_start_value","from_range_end_value","to_range_start_value","to_range_end_value","min","max","number","divisor","rgb","r","Math","round","toString","g","b","points","plane","projected_point","Vector3","points_on_plane","i","projectPoint","push","from","to","target","t","elements","lerp","x1","x2","abs","x","y","m","euclideanModulo","degrees","PI","radians","v","w","z","center","add","multiplyScalar","arr","col","floor","random","clamp","ActionSequencer","context","elapsed_time","playback_speed","__get_playback_speed","playing","action_events","initial_context","stringify","tmp_t","channels","channel_names","Object","keys","duration","get_duration","__play_clips","delta_time","time","trigger_time","action","interpolator","use_dynamic_from_value","keyframes","attribute_name","keyframe","__get_current_keyframe","evaluate","__linear_map_01","easing_function","EPSILON","trigger","evaluate_keyframe","channel_name","initial","saturate","current","Infinity","distance","transitions_velocity","URLSearchParams","location","search","EasingFunctions","cos","sin","pow","sqrt","c4","ease_out_bounce","n1","d1","sign","ActionInterpolator","NumberInterpolator","super","view_context","app","ActionEvent","args","ViewContext","DrawIOAnimationSheet","xml_document","animation_nodes","DOMParser","parseFromString","querySelectorAll","animation_tracks","triggers","node","parent_node","parentElement","getAttribute","get_node_x_position","parseFloat","split_data","trigger_name","trigger_method","at_time","value_data","to_value","from_time","to_time","sort","a","x_pos","ActionSequencerBuilder","default_state_data","animation_data","current_context","tracks","initial_tracks","state_to_tracks","get_longest_time","element","sequencer","add_action_interpolator","action_event","add_action_event","state","longest_time","xml","transition_data","track_time","event_manager","queue","zoom_changed_evt","store_clickd_evt","point_selected_evt","config_changed","path_substep_completed","path_completed","go_to_store_requested_evt","resource_loaded_evt","service_clicked_evt","unit_pos_updated_evt","floor_changed_evt","on_enter_floor_navigation","on_exit_floor_navigation","on_enter_floor_selection","on_exit_floor_selection","on_enter_outside_navigation","on_exit_outside_navigation","step_selected_evt","event","payload","callback","zoom","fire","store_id","hit_data","step_number","step_index","resource","service","unit_data","floor_id","resources","EventManager","fire_resource_loaded","HTMLUtilities","container","images","image","dataset","src","image_objects","image_object","videos","video","iframes","iframe","selector","TransitionTable","transitions","from_state_name","to_state_name","from_animation_sheet","delta_buffer","___time","Clock","__raw_delta_time","__elapsed_time","__allocated_time","Vector2","shader_time","getDelta","getElapsedTime","shift","__calculate_delta_time","ViewState","global_view_data","transition_progress","action_sequencer","update_transition","ViewStateTransitionHandler","transition_table","last_state","current_state","current_state_data","transitioning","skip","__exit_last_state","before_exit","show","before_enter","play","update","__update_transitions","is_finished","on_enter","assign","Time","update_exit_transition","get_progress","update_enter_transition","hide","on_exit","view_manager","views","transition_handler","view_change_subscribers","browser_title_suffix","__set_views_opacities","view_name","change_url","go_to_state","__change_browser_url","__change_browser_title","notify_view_change","scene_name","next_view","transition_view","set_next_view","go_to_view","subscriber","on_view_change","view","add_transitions","set_transitions","set_state","title_suffix","get_by_url","set_default_state_data","history","pushState","title","__capitalize","document","set_opacity","string","aux_string","toUpperCase","__snake_to_whitespace","group","ApplicationView","ResourceContainer","ViewManager","register_view","classList","remove","load_images","load_videos","style","opacity","BaseApplication","BaseRender","renderer","BaseShaderMaterial","ShaderMaterial","vert","frag","uniforms","vertexShader","basic_vert","fragmentShader","basic_frag","_Color","Color","BlitMaterial","frag_shader","vert_shader","defines","_MainTex","_Resolution","_TargetResolution","depthWrite","blending","NoBlending","depthTest","depthFunc","AlwaysDepth","AddMaterial","nMips","_SecondTex","tex","UnrealBloomComposeMaterial","NUM_MIPS","_BlurredTex","_BloomStrength","blurTexture1","blurTexture2","blurTexture3","blurTexture4","blurTexture5","bloomStrength","bloomFactors","bloomRadius","bloomTintColors","rt","col_string","set","camera_manager","_current","_spectator","camera","spectator","capabilities","max_anisotropy","vertex_texture_sampler_available","fp_textures_available","CanvasDrawer","uses_dynamic_font","__textHeight","canvas","createElement","ctx","getContext","fontStyle","getElementsByTagName","dummy","dummyText","createTextNode","appendChild","setAttribute","offsetHeight","removeChild","text","font","ceil","measureText","width","getFontHeight","ctxOptions","font_color","__draw","draw_canvas","canvas_texture","CanvasTexture","UVMapping","ClampToEdgeWrapping","NearestFilter","generateMipMaps","needsUpdate","height","radius","fill","stroke","tl","tr","br","bl","defaultRadius","side","beginPath","moveTo","lineTo","quadraticCurveTo","closePath","configuration","parameters","dpr","json","Idle","is_animating","Animating","easing_function_t","animator","set_property_value","set_current_state","finished_callback","CSSAnimator","css_property","value_prefix","value_suffix","ease_in_out_cubic","AxisHelper","Object3D","scale","blue_points","blue_axis_mat","LineBasicMaterial","color","blue_axis_geo","BufferGeometry","setFromPoints","blue_axis_line","Line","renderOrder","green_points","green_axis_mat","green_axis_geo","green_axis_line","red_points","red_axis_mat","red_axis_geo","red_axis_line","scene_manager","Scene","scene","traverse","child","geometry","dispose","material","children","Cube","Mesh","segments","BoxGeometry","MeshBasicMaterial","Sphere","SphereBufferGeometry","Arrow","dir","cylinder_height","cylinder_geo","CylinderBufferGeometry","translate","cone_geometry","ConeBufferGeometry","cone_height","buffer_geometry","BufferGeometryUtils","mergeBufferGeometries","rotateX","quaternion","setFromUnitVectors","_dir","oscreen","position","render_width","render_height","width_height","pixel_size","size_changed","vector2","aspect_ratio","portrait","ScreenSpaceTextureMaterial","h","_ScreenSpacePosition","_ScreenSize","_TextureSize","PerspectiveCamera","TPerspectiveCamera","fov","aspect","near","far","clear_color","clear_alpha","copy","debug","Vector3_one","Vector3_zero","canvas_renderer","display_texture_meshes","origin","arrow","normalize","SceneManager","axis","RT","rt_debug","position_2d","fillStyle","fillRect","clearRect","strokeStyle","line","frustumCulled","pos","cube","depth","distanceTo","sub","forward_dir","PlaneGeometry","Vector4","basic_color_vert","basic_color_frag","transparent","box","Box3","setFromCenterAndSize","helper","Box3Helper","sphere","input_points","open","catmull","CatmullRomCurve3","updateArcLengths","getSpacedPoints","draw_line","SphereGeometry","sphere_mesh","sphere1","bb","curve","options","offset","mesh","set_texture","graphics","set_screen_size","OScreen","render","ClearDepthNormalMaterial","clear_depth","clear_normal","_DepthNormal","DepthNormalMaterial","_FarPlane","far_plane","DepthAndNormalsRenderer","WebGLRenderTarget","clear_depth_normal_mat","depth_normal_material","__resize_RT_if_necessary","clear","blit_clear_with_material","CameraManager","setSize","render_target","Blitter","_blit_scene","_blit_material","_blit_quad","_blit_camera","OrthographicCamera","dst","src_texture","isWebGLRenderTarget","texture","src_width","src_height","getSize","__render","mat","dst_RT","current_rt","getRenderTarget","setRenderTarget","core_attributes","context_attributes","threejs_attributes","_renderer","blitter","no_render","current_render_mode","generateDepthNormalTexture","depth_and_normals_renderer","is_webgl2","canvas_context","force_webgl2","xr_enabled","alpha","antialias","desynchronized","failIfMajorPerformanceCaveat","powerPreference","premultipliedAlpha","preserveDrawingBuffer","stencil","logarithmicDepthBuffer","constructor","WebGLRenderer","xr","enabled","autoClear","setPixelRatio","Configuration","extensions","domElement","Capabilities","getMaxAnisotropy","maxVertexTextures","is_floating_point_texture_available","resize_observer","ResizeObserver","on_resize","observe","dom_element","depth_normals_RT","new_state","__update_current_camera","updateProjectionMatrix","updateMatrix","updateMatrixWorld","override_mat","__apply_override_material","on_pre_render","on_post_render","overrideMaterial","buffer","readRenderTargetPixels","clear_stencil","setClearColor","entries","entry","update_position","contentRect","update_size","setViewport","material_pass","src_RT","blit_with_material","blit","blob_callback","old_width","old_height","new_width","new_height","tile_width","tile_height","divisions_x","parseInt","divisions_y","old_dpr","getPixelRatio","ctx_2D","setViewOffset","drawImage","toBlob","clearViewOffset","blob","link","download","href","URL","createObjectURL","click","onclick","requestAnimationFrame","revokeObjectURL","removeAttribute","minFilter","magFilter","format","RGBAFormat","encoding","LinearEncoding","type","FloatType","stencilBuffer","depthBuffer","output","Float32Array","NormalMaterial","DebugNormalsRender","Graphics","KeyboardInput","ctrlz_pressed","ctrlz_fired","keys_keys","addEventListener","on_key_down","on_key_up","keyCode","ctrlKey","code","press_key","release_key","pressed","released","key_name","key","fired","down","removeEventListener","os","operating_systems","ANDROID","IOS","LINUX","MAC","WINDOWS","is_mobile","is_ipad","maxTouchPoints","is_ios","is_android","get_os","is_linux","is_mac","is_windows","platform","reflection_plane_context","target_geometry","target_position","GeometryBatch","batch_width","data_textures","object_names","zero_offset","write_offset","uniform_dirty_count","tmp_uploaded_data_count","uniform_name","default_value_v3","src_tex","__create_rgb_texture","dst_tex","one_pixel_tex","new_data_tex","__add_data_texture","__flood_data_texture_rgb","default_value_v4","__create_rgba_texture","__flood_data_texture_rgba","__create_rgba_float_texture","object_name","vector3","use_r","use_g","use_b","obj_index","__get_object_index","data_texture","__get_data_texture","__set_pixel_rgb","one_pixel","last_accessed_index","dirty_count","vector4","use_a","__set_pixel_rgba","upload_budget","__partial_texture_data_upload","__full_texture_data_upload","texture_data","copyTextureToTexture","index","v3","v4","Uint8Array","DataTexture","RGBFormat","dst_texture","one_pixel_text","geometry_batcher","batches","buffer_geometries","attr_accessor_uvs","texture_width","ceilPowerOfTwo","__init_uv_array","uv_index","vertex_count","count","buffer_attribute","BufferAttribute","upload_texture_data","uvs","ui","input","ui_elements","_tmp_normalized_pos","ss_scene","matrixWorldAutoUpdate","ws_scene","ss_camera","elem","set_screen_space_coordinate_system","set_world_space_coordinate_system","NDC","update_state","current_clicked_element","PerspectiveFrustumPointFitter","camera_quaternion","vertical_fov","v_fov","degToRad","h_fov","atan","tan","up_plane_normal","get_up_plane_normal","down_plane_normal","get_down_plane_normal","left_plane_normal","get_left_plane_normal","right_plane_normal","get_right_plane_normal","camera_forward_dir","applyQuaternion","sphere_center","pull_back_distance","get_distance_to_fit_rect","far_pos","up_plane","Plane","setFromNormalAndCoplanarPoint","down_plane","left_plane","right_plane","apply_center_correction_to_pos","closest_distance","inverse_dir","Line3","up_line_intersection","down_line_intersection","left_line_intersection","right_line_intersection","intersectLine","log","new_up_distance","new_down_distance","new_left_distance","new_right_distance","vertical_min","horizontal_min","forward_correction","target_pos","vertical_offset","get_vertical_correction","horizontal_offset","get_horizontal_correction","closest_distance_to_up_plane","closest_distance_to_down_plane","up_dir","down_line","up_line","down_dist","up_dist","correction","closest_distance_to_right_plane","closest_distance_to_left_plane","right_dir","left_line","right_line","left_dist","right_dist","Quaternion","setFromAxisAngle","distV","distH","OrthographicFrustumPointFitter","inverse_camera_quat","inverse","inverted_points","getCenter","distance_to_center","camera_utilities","tmp_mat","Matrix4","ray","Ray","tmp_size","tmp_unproj","tmp_vec","plane_position","plane_normal","get_forward_dir","isPerspectiveCamera","unproject_mouse_position","unproject","intersectPlane","zoom_scale","world_space_center","camera_forward","project_points_on_plane","projected_points_center","up","right","cross","inverse_mat","getInverse","applyMatrix4","projected_center","get_zoom_to_fit_rect","isOrthographicCamera","obj_x","obj_y","object_aspect","object","getWorldPosition","project","left","top","bottom","p1","p2","p3","p4","p5","p6","p7","p8","fit_points","camera_backward_dir","fitter","camera_pos","reference_position_plane","camera_ray","reference_position","camera_position","result","reference_rotation","reference_zoom","forward","initializer","init","CameraUtilities","GeometryBatcher","OS","ReflectionPlaneContext","UI","Debug","render_loop","SSAOMaterial","_InverseProjMatrix","_ProjectionMatrix","_Bias","_Radius","_SampleKernel","__get_sample_kernel","_RandomRotation","__get_rotation_kernel","sample_kernel","rotation_kernel","rotation_texture","wrapS","RepeatWrapping","wrapT","SSAOComposeMaterial","_AO","DisplayNormalTextureMaterial","depth_normals_vert","BoxBlurMaterial","_SampleDir","Blurrer","RT1","RT2","box_blur_mat","NormalAORender","ssao_mat","ssao_compose_mat","debug_normals","ssaa","use_ssaa","main_RT","SSAO_RT","blurrer","__check_RT_size","__update_uniforms","blur","projectionMatrix","NormalRender","VRRender","render_spectator_camera","spectator_camera","isPresenting","xrCam","getCamera","currentRenderTarget","GaussianBlurMaterial","kernel_radius","KERNEL_RADIUS","SIGMA","texSize","direction","LuminosityHighPassMaterial","luminosityThreshold","smoothWidth","defaultColor","defaultOpacity","GaussianBlurrer","current_width","current_height","separableBlurMaterials","renderTargetsHorizontal","renderTargetsVertical","kernelSizeArray","rt_pars","LinearFilter","renderTargetBright","generateMipmaps","init_materials","init_RT","luminosity_high_pass_mat","use_luminosity_high_pass","resize_RT","inputRenderTarget","set_direction","dispose_RT","hor","ver","texture_height","set_size","dispose_materials","UnrealBloomRender","bloom_compose_mat","blur_RT","add_mat","set_RT_0","set_RT_1","set_RT_2","set_RT_3","set_RT_4","set_bloom_strength","set_bloom_radius","set_add_texture","val","set_tint_color_0","set_tint_color_1","set_tint_color_2","set_tint_color_3","set_tint_color_4","TOrthographicCamera","view_component_manager","components","enabled_components","Set","__set_components_opacities","component","delete","component_name","RenderLoop","target_application","is_running","frames_passed","__update","on_post_start","ViewComponentManager","on_frame_end","setAnimationLoop","stop","screen","apply_pixel_density_v2","apply_pixel_density","get_pixel_size","SimpleTextDrawer","text_margin","text_size","get_text_size","globalAlpha","textBaseline","textAlign","fillText","ViewComponent","hidden","register_component","enable_component","disable_component","toggle_hidden","HorizontalPlane","VerticalPlane","ArrayUtilities","source","apply","array","items_left_count","closest_point","obj","ids","FrustumPointFitter","get_hozirontal_correction","closest_up_point","closest_down_point","closest_right_point","closest_left_point","GeometryUtilities","geometry_buffer","indices","positions","vertices","getX","getY","getZ","add_barycentric_attribute","non_indexed_geometry_buffer","bar_coordinates","ImageUtilities","getImageData","imagedata","mesh_sampler","sample_count","face_areas","min_area","normals","tangents","faces","index_0","index_1","index_2","v1","v2","face","c","n2","n3","normal","tangent","uv_a","uv_b","uv_c","area","get_face_area","normalized_faces_array","get_uniform_face_distribution","selected_faces","select_random_faces","sample_data_from_faces","sampled_points","sampled_normals","sampled_tangents","sampled_uvs","w1","w2","sample_point_in_face","amount","selected_face","minimum_area","extended_triangle_indices","repetitions_needed","j","vec1","vec2","w3","model_utilities","result_callback","fromGeometry","geometries","get_mesh","gltf","animations","skinnedMeshes","isSkinnedMesh","cloneBones","cloneSkinnedMeshes","isBone","skeleton","cloneSkinnedMesh","orderedCloneBones","bones","cloneBone","Skeleton","boneInverses","matrixWorld","cast","receive","castShadow","receiveShadow","object_type","ObjectUtilities","item","Array","isArray","sources","is_object","merge_deep","nodeType","attributes","attribute","nodeName","nodeValue","hasChildNodes","childNodes","xml_to_json","old","StringUtilities","hexValues","hex","words","substr","charAt","TimeUtilities","time_str","hours","minutes","seconds","Grid","derivatives","plane_geometry","convert_to_non_indexed_geometry","rotation","_Thickness","_Length","_ElapsedTime","setup","next_position","previous_position","orientation","coverage","accumulated_length","next_point","__get_next_position","previous_point","__get_previous_position","vertexList","nextPositionList","previousPositionList","orientationList","coverageList","setIndex","_length","thickness","parent","WorldImage","pivot","_ScreenAligned","_Scale","_Opacity","DoubleSide","current_scale","computeBoundingBox","tmp_bb_size","boundingBox","img","screen_aligned","boolean","Text2D","is_static","simple_text_drawer","draw_settings","draw_on_texture","LinearMipMapLinearFilter","update_texture","UIElementMaterial","intensity","_PixelOffset","_NDC","_PivotPoint","_DepthOffset","ScreenSpacePosition","WorldSpacePosition","tmp_vec3","tmp_vec2","UIElementState","ui_element","normalized_mouse_position","OnIdle","is_mouse_over","_on_enter_state","OnMouseEnter","on_mouse_enter","_on_hover_state","_on_exit_state","OnMouseExit","on_mouse_exit","_on_idle_state","OnMouseHover","__trigger_on_hover","on_mouse_hover","UIElement","is_clickable","position_strategy","_position","on_hover","mouse_pos_tmp","cached_NDC_position","screen_pos_tmp","texture_size","matrixAutoUpdate","pixel_offset","pivot_point","use_depth","depth_offset","visible","get_size","normalized_mouse_pos","get_pos_NDC","to_screen_position","rect","Box2","containsPoint","projected_pos","screen_pos","UpdatableMaterialMesh","self","onBeforeRender","TextGlyph","plane_bounds","atlas_bounds","SDFText","glyph_layout","glyphs","glyph_is_dirty","matrix_is_dirty","color_is_dirty","matrix","__opacity","__text","__generate_glyphs","compose","tilt","new_orientation","new_tilt","multiply","update_glyphs","op","cursor","unicode","charCodeAt","glyph","planeBounds","text_glyph","atlasBounds","advance","box2","first_glyph","union","box2_size","SDFTextMaterial","_Texture","_Boldness","_AtlasSize","SDFTextBatch","font_layout","atlas_texture","instanced_geometry","InstancedBufferGeometry","instanceCount","Float32BufferAttribute","transformsCol0","InstancedBufferAttribute","max_allocations","transformsCol1","transformsCol2","transformsCol3","glyph_bounds","usage","DynamicDrawUsage","text_elements","set_atlas_size","atlas","set_boldness","text_str","text_elem","remove_elem","force_update","glyph_bounds_atr","plane_bounds_atr","color_atr","matrix_needs_update","glyph_needs_update","color_needs_update","glyph_count","update_matrix","clear_glyph_dirty","clear_color_dirty","glyph_i","buffer_i","setXYZW","VectorInterpolator","tmp","MedianFilterMaterial","kernel3x3","_SourceTex","_SourceTexSize","isVideoTexture","videoWidth","videoHeight","isTexture","MedianFilter","median_filter_mat","tex_size","DualFilteringBlurMaterial","upsample","AlphaFilterMaterial","use_alpha_mask","_Offset","DualFilteringBlurrer","RT0","RT3","RT4","upscale_blur_mat","downscale_blur_mat","alpha_filter_mat","check_RT_resize","ParticleAttribute","attr_name","update_material","write","particle_attribute","particle_count","resolution","calculate_resolution","HalfFloatType","attribute_writter_scene","swap_RT","storage_material","deleteAttribute","GPUParticleSystem","build_point_mesh","attribute_writter_mesh","build_attribute_writter_mesh","item_size","instance_count","geo","instanced_geo","build_uv_storage_attribute","Points","ParticleStorageMaterial","ParticlePositionAttribute","pos_attr","build_RT","store_geometry_attribute_in_RT","CustomDataTexture","multiplier","RGBDataTexture","RGBADataTexture","RGBFloatDataTexture","RGBAFloatDataTexture","BatchedMesh","id_table","max_texture_width","batched_count","batch_height","mesh_name","set_rgb","get_mesh_index","set_rgba","MeshBatcher","meshes","attr_mesh_id","create_batched_mesh","AudioClip","loop","volume","positional","audio","audio_listener","TPositionalAudio","TAudio","setBuffer","setLoop","gain","setVolume","pause","is_playing","isPlaying","AudioLoader","instantiate_audio","AudioContext","createBuffer","arrayBuffer","array_buffer","decodeAudioData","audio_buffer","BasisLoader","loader","load","basis","xhr","msg","__set_error","CubemapLoader","extension","CubeTextureLoader","setPath","urls","DAELoader","ColladaLoader","FileLoader","TFileLoader","file","FontLoader","TFontLoader","GLTFLoader","TGLTFLoader","GLTFDRACOLoader","setDRACOLoader","HDRCubeTextureLoader","THDRCubeTextureLoader","url_suffix","setDataType","UnsignedByteType","hdr","JSONLoader","OBJLoader","TOBJLoader","PointArrayLoader","parse_path","raw_data","string_array","pop","RGBETextureLoader","RGBELoader","TextLoader","AsyncTextureLoader","load_with_old_method","load_with_new_method","Texture","Image","onload","onerror","original_url","fetchOptions","res","createImageBitmap","colorSpaceConversion","imageBitmap","TextureLoader","VideoLoader","ResourceBatch","batch_name","resource_loaders","loading_finished","finished","has_errors","print_error","get_loaded_bytes","get_total_bytes"],"mappings":"qqDAyHK,MAACA,GAAU,IAxHhB,MAEEC,OAWE,OATAC,KAAKC,aAAe,GACpBD,KAAKE,MAAQC,OAAOC,UAAUC,UAAUC,cAGxCN,KAAKO,kBAAoB,CAAC,SAAU,OAAQ,OAAQ,YAAa,YAAa,YAC9EP,KAAKQ,UAAYR,KAAKO,kBAAkBE,MAAKC,GAAWV,KAAKE,MAAMS,SAASD,KAE5EV,KAAKY,gBAAkB,OAAQR,WAEvB,GAER,KAAKJ,KAAKE,MAAMW,QAAQ,SAAW,EACjCb,KAAKC,aAAe,UACpB,MACF,KAAKD,KAAKE,MAAMW,QAAQ,QAAU,EAChCb,KAAKC,aAAe,gBACpB,MACF,KAAKD,KAAKE,MAAMW,QAAQ,QAAU,KAAOV,OAAOW,IAC9Cd,K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AAImE,EAAI,EAAGA,EAAIzH,KAAKymD,iBAAiBxgD,OAAQwB,IAEhDnE,GAAgBtD,KAAKymD,iBAAiBh/C,GAAGnE,aAG3C,OAAOA,EAGTvD,kBAEE,IAAIwD,EAAc,EAElB,IAAK,IAAIkE,EAAI,EAAGA,EAAIzH,KAAKymD,iBAAiBxgD,OAAQwB,IAEhDlE,GAAevD,KAAKymD,iBAAiBh/C,GAAGlE,YAG1C,OAAOA"}
|
|
1
|
+
{"version":3,"file":"index.module.js","sources":["../src/Browser.js","../src/utilities/Validation.js","../src/resource_loader/AbstractLoader.js","../src/utilities/OMath.js","../src/action_sequencer/ActionSequencer.js","../src/utilities/EasingFunctions.js","../src/action_sequencer/ActionInterpolator.js","../src/action_sequencer/NumberInterpolator.js","../src/view_components/ViewContext.js","../src/action_sequencer/ActionEvent.js","../src/view_components/transition/DrawIOAnimationSheet.js","../src/view_components/transition/ActionSequencerBuilder.js","../src/EventManager.js","../src/ResourceContainer.js","../src/utilities/HTMLUtilities.js","../src/view_components/transition/TransitionTable.js","../src/Time.js","../src/view_components/ViewState.js","../src/view_components/transition/ViewStateTransitionHandler.js","../src/view_components/ViewManager.js","../src/view_components/ApplicationView.js","../src/BaseApplication.js","../src/render_mode/BaseRender.js","../src/materials/BaseShaderMaterial.js","../src/materials/BlitMaterial.js","../src/materials/AddMaterial.js","../src/materials/UnrealBloomComposeMaterial.js","../src/CameraManager.js","../src/Capabilities.js","../src/canvas_drawer/CanvasDrawer.js","../src/Configuration.js","../src/html_utilities/css_animator_states/Idle.js","../src/html_utilities/css_animator_states/Animating.js","../src/html_utilities/CSSAnimator.js","../src/components/AxisHelper.js","../src/SceneManager.js","../src/primitives/Cube.js","../src/primitives/Sphere.js","../src/primitives/Arrow.js","../src/OScreen.js","../src/materials/ScreenSpaceTextureMaterial.js","../src/PerspectiveCamera.js","../src/Debug.js","../src/materials/ClearDepthNormalMaterial.js","../src/materials/DepthNormalMaterial.js","../src/render_utilities/DepthAndNormalsRenderer.js","../src/render_utilities/Blitter.js","../src/Graphics.js","../src/materials/NormalMaterial.js","../src/render_mode/DebugNormalsRender.js","../src/KeyboardInput.js","../src/OS.js","../src/ReflectionPlaneContext.js","../src/static_batcher/GeometryBatch.js","../src/static_batcher/GeometryBatcher.js","../src/UI.js","../src/utilities/PerspectiveFrustumPointFitter.js","../src/utilities/OrthographicFrustumPointFitter.js","../src/utilities/CameraUtilities.js","../src/Initializer.js","../src/materials/SSAOMaterial.js","../src/materials/SSAOComposeMaterial.js","../src/materials/DisplayNormalTextureMaterial.js","../src/materials/BoxBlurMaterial.js","../src/render_utilities/Blurrer.js","../src/render_mode/NormalAORender.js","../src/render_mode/NormalRender.js","../src/render_mode/VRRender.js","../src/materials/GaussianBlurMaterial.js","../src/materials/LuminosityHighPassMaterial.js","../src/render_utilities/GaussianBlurrer.js","../src/render_mode/UnrealBloomRender.js","../src/OrthographicCamera.js","../src/view_components/ViewComponentManager.js","../src/RenderLoop.js","../src/Screen.js","../src/canvas_drawer/SimpleTextDrawer.js","../src/view_components/ViewComponent.js","../src/primitives/HorizontalPlane.js","../src/primitives/VerticalPlane.js","../src/utilities/ArrayUtilities.js","../src/utilities/FrustumPointFitter.js","../src/utilities/GeometryUtilities.js","../src/utilities/ImageUtilities.js","../src/utilities/MeshSampler.js","../src/utilities/ModelUtilities.js","../src/utilities/ObjectUtilities.js","../src/utilities/StringUtilities.js","../src/utilities/TimeUtilities.js","../src/components/Grid.js","../src/components/Line.js","../src/components/WorldImage.js","../src/components/Text2D.js","../src/materials/UIElementMaterial.js","../src/ui/ui_element_position/ScreenSpacePosition.js","../src/ui/ui_element_position/WorldSpacePosition.js","../src/ui/ui_element_state/UIElementState.js","../src/ui/ui_element_state/OnIdle.js","../src/ui/ui_element_state/OnMouseEnter.js","../src/ui/ui_element_state/OnMouseExit.js","../src/ui/ui_element_state/OnMouseHover.js","../src/components/UIElement.js","../src/components/UpdatableMaterialMesh.js","../src/components/sdf_text/TextGlyph.js","../src/components/sdf_text/SDFText.js","../src/materials/SDFTextMaterial.js","../src/components/sdf_text/SDFTextBatch.js","../src/action_sequencer/VectorInterpolator.js","../src/materials/MedianFilterMaterial.js","../src/render_utilities/MedianFilter.js","../src/materials/DualFilteringBlurMaterial.js","../src/materials/AlphaFilterMaterial.js","../src/render_utilities/DualFilteringBlurrer.js","../src/gpu_particles/ParticleAttribute.js","../src/gpu_particles/GPUParticleSystem.js","../src/materials/gpu_particles/ParticleStorageMaterial.js","../src/gpu_particles/ParticlePositionAttribute.js","../src/data_textures/CustomDataTexture.js","../src/data_textures/RGBDataTexture.js","../src/data_textures/RGBADataTexture.js","../src/data_textures/RGBFloatDataTexture.js","../src/data_textures/RGBAFloatDataTexture.js","../src/static_batcher/BatchedMesh.js","../src/static_batcher/MeshBatcher.js","../src/components/AudioClip.js","../src/resource_loader/AudioLoader.js","../src/resource_loader/BasisLoader.js","../src/resource_loader/CubemapLoader.js","../src/resource_loader/DAELoader.js","../src/resource_loader/FileLoader.js","../src/resource_loader/FontLoader.js","../src/resource_loader/GLTFLoader.js","../src/resource_loader/GLTFDRACOLoader.js","../src/resource_loader/HDRCubeTextureLoader.js","../src/resource_loader/JSONLoader.js","../src/resource_loader/OBJLoader.js","../src/resource_loader/PointArrayLoader.js","../src/resource_loader/RGBETextureLoader.js","../src/resource_loader/TextLoader.js","../src/resource_loader/AsyncTextureLoader.js","../src/resource_loader/TextureLoader.js","../src/resource_loader/VideoLoader.js","../src/resource_loader/ResourceBatch.js"],"sourcesContent":["\nclass Browser\n{\n init()\n {\n this.browser_name = '';\n this.agent = window.navigator.userAgent.toLowerCase();\n\n // vr specific\n this.vrBrowserKeywords = ['OculusBrowser', 'oculus', 'vive', 'rift', 'windowsmr', 'cardboard', 'daydream'];\n this.vrBrowser = this.vrBrowserKeywords.find(keyword => this.agent.includes(keyword));\n // Check for WebXR support (indicating VR capabilities)\n this.hasWebXRSupport = 'xr' in navigator;\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 case this.vrBrowser && this.hasWebXRSupport:\n this.browser_name = this.vrBrowser;\n break;\n default:\n this.browser_name = 'other';\n break;\n }\n\n this.version = this.get_version();\n }\n\n get name()\n {\n return this.browser_name;\n }\n\n get is_safari()\n {\n return this.browser_name === 'safari';\n }\n\n get is_chrome()\n {\n return this.browser_name === 'chrome';\n }\n\n get is_edge()\n {\n return this.browser_name === 'edge_ie';\n }\n\n get is_edge_chromium()\n {\n return this.browser_name === 'edge_chromium';\n }\n\n get is_vr()\n {\n return this.vrBrowserKeywords.includes(this.browser_name);\n }\n\n get has_webm()\n {\n return !!(this.is_chrome || this.is_firefox || this.is_edge_chromium);\n }\n\n get has_hvec()\n {\n return this.is_safari;\n }\n\n get preferred_video_extension()\n {\n return this.has_webm ? 'webm' : this.has_hvec ? 'hvec.mp4' : 'mp4';\n }\n\n get_version()\n {\n const ua = navigator.userAgent;\n let tem = '';\n let version = 0;\n\n let M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\\/))\\/?\\s*(\\d+)/i) || [];\n\n if (/trident/i.test(M[1]))\n {\n tem = /\\brv[ :]+(\\d+)/g.exec(ua) || [];\n version = 'IE ' + (tem[1] || '');\n }\n if (M[1] === 'Chrome')\n {\n tem = ua.match(/\\b(OPR|Edge)\\/(\\d+)/);\n if (tem != null) version = tem.slice(1).join(' ').replace('OPR', 'Opera');\n }\n\n M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, '-?'];\n if ((tem = ua.match(/version\\/(\\d+(\\.\\d+)?)/i)) != null) M.splice(1, 1, tem[1]);\n\n version = M.join(' ');\n\n return Number(version.split(' ')[1]);\n }\n}\n\nconst browser = new Browser();\nexport { browser as Browser };\n","class Validation\n{\n constructor()\n {}\n\n static is_int(n)\n {\n return Number(n) === n && n % 1 === 0;\n }\n\n static is_float(n)\n {\n return Number(n) === n && n % 1 !== 0;\n }\n\n static is_number(n)\n {\n return this.is_int(n) || this.is_float(n);\n }\n\n static is_json(str)\n {\n try\n {\n JSON.parse(str);\n }\n catch (e)\n {\n return false;\n }\n\n return true;\n }\n}\n\nexport { Validation };\n","import { Browser } from '../Browser';\r\nimport { Validation } from '../utilities/Validation';\r\n\r\nclass AbstractLoader\r\n{\r\n constructor(resource_id, url, size = 1)\r\n {\r\n this.resource_id = resource_id;\r\n this.url = url;\r\n this.loaded_bytes = 0;\r\n this.total_bytes = size;\r\n\r\n this.has_finished = false;\r\n this.has_error = false;\r\n this.error_message = 'none';\r\n }\r\n\r\n __update_downloaded_bytes(loaded, total)\r\n {\r\n loaded = Validation.is_number(loaded) ? loaded : 1;\r\n total = Validation.is_number(total) ? total : 1;\r\n\r\n this.loaded_bytes = loaded;\r\n\r\n if (total > 0)\r\n {\r\n this.total_bytes = total;\r\n }\r\n\r\n if (this.loaded_bytes > this.total_bytes)\r\n {\r\n console.warn('Total bytes is smaller than loaded ones. Please set total bytes by hand to:', this.url);\r\n }\r\n }\r\n\r\n __loading_ended()\r\n {\r\n this.has_finished = true;\r\n }\r\n\r\n __set_error(message)\r\n {\r\n this.has_error = true;\r\n this.error_message = message;\r\n }\r\n\r\n print_error()\r\n {\r\n console.error('Error while loading ' + this.resource_id + '\\n\\t path: ' + this.url + '\\n\\t\\t' + this.error_message);\r\n }\r\n\r\n load(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n const cache = Browser.is_safari ? 'no-cache' : 'default';\r\n\r\n fetch(this.url, {\r\n method: 'GET', // *GET, POST, PUT, DELETE, etc.\r\n mode: 'cors', // no-cors, *cors, same-origin\r\n cache: cache, // *default, no-cache, reload, force-cache, only-if-cached\r\n credentials: 'same-origin', // include, *same-origin, omit\r\n redirect: 'follow' // manual, *follow, error\r\n })\r\n .then(this.on_progress.bind(this, resource_container))\r\n .catch(this.__on_error.bind(this));\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n\r\n async on_progress(resource_container, response)\r\n {\r\n const response_clone = response.clone();\r\n const reader = response.body.getReader();\r\n\r\n // Step 2: get total length\r\n const contentLength = +response.headers.get('Content-Length');\r\n\r\n // Step 3: read the data\r\n let receivedLength = 0; // received that many bytes at the moment\r\n\r\n while (true)\r\n {\r\n const { done, value } = await reader.read();\r\n\r\n if (done)\r\n {\r\n break;\r\n }\r\n\r\n receivedLength += value.length;\r\n\r\n this.__update_downloaded_bytes(receivedLength, contentLength);\r\n // console.log(`Received ${receivedLength} of ${contentLength}`);\r\n }\r\n\r\n this.on_preloaded_finished(resource_container, response_clone);\r\n }\r\n\r\n on_preloaded_finished(resource_container, response)\r\n {\r\n }\r\n\r\n __on_error(data)\r\n {\r\n console.error(data);\r\n }\r\n}\r\n\r\nexport { AbstractLoader };\r\n","import { Vector3 } from 'three';\n\nclass OMath\n{\n constructor()\n {}\n\n static linear_map(value,\n from_range_start_value,\n from_range_end_value,\n to_range_start_value,\n to_range_end_value)\n {\n return ((value - from_range_start_value) / (from_range_end_value - from_range_start_value)) * (to_range_end_value - to_range_start_value) + to_range_start_value;\n }\n\n static between(value, min, max)\n {\n return (value >= min && value <= max);\n }\n\n static mod(number, divisor)\n {\n return ((number % divisor) + divisor) % divisor;\n }\n\n static rgb_to_hex(rgb)\n {\n rgb.r = Math.round(rgb.r * 255).toString(16);\n rgb.g = Math.round(rgb.g * 255).toString(16);\n rgb.b = Math.round(rgb.b * 255).toString(16);\n\n if (rgb.r.length === 1)\n {\n rgb.r = '0' + rgb.r;\n }\n if (rgb.g.length === 1)\n {\n rgb.g = '0' + rgb.g;\n }\n if (rgb.b.length === 1)\n {\n rgb.b = '0' + rgb.b;\n }\n\n return '#' + rgb.r + rgb.g + rgb.b;\n }\n\n static project_points_on_plane(points, plane)\n {\n const projected_point = new Vector3();\n const points_on_plane = [];\n for (let i = 0; i < points.length; i++)\n {\n plane.projectPoint(points[i], projected_point);\n points_on_plane.push(projected_point.clone());\n }\n\n return points_on_plane;\n }\n\n static matrix4_lerp(from, to, target, t)\n {\n for (let i = 0; i < 16; i++)\n {\n target.elements[i] = this.lerp(from.elements[i], to.elements[i], t);\n }\n }\n\n static equals(x1, x2)\n {\n return Math.abs(x1 - x2) < 0.000001;\n }\n\n static lerp(x, y, t)\n {\n return (1 - t) * x + t * y;\n }\n\n static clamp(value, min, max)\n {\n return Math.max(min, Math.min(max, value));\n }\n\n static euclideanModulo(n, m)\n {\n return ((n % m) + m) % m;\n }\n\n static pingpong(x, length = 1)\n {\n return length - Math.abs(OMath.euclideanModulo(x, length * 2) - length);\n }\n\n static degToRad(degrees)\n {\n return degrees * (Math.PI / 180);\n }\n\n static radToDeg(radians)\n {\n return radians * (180 / Math.PI);\n }\n\n static deg_to_rad(degrees)\n {\n return degrees * (Math.PI / 180);\n }\n\n static rad_to_deg(radians)\n {\n return radians * (180 / Math.PI);\n }\n\n static perspective_divide(v)\n {\n v.x /= v.w;\n v.y /= v.w;\n v.z /= v.w;\n return v;\n }\n\n static points_average(points)\n {\n const center = points[0].clone();\n for (let i = 1; i < points.length; i++)\n {\n center.add(points[i]);\n }\n center.multiplyScalar(1 / points.length);\n return center;\n }\n\n static get_random_color()\n {\n const arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'a', 'b', 'c', 'd', 'e', 'f'];\n\n let col = '#';\n col += arr[Math.floor(Math.random() * 16)];\n col += arr[Math.floor(Math.random() * 16)];\n\n col += arr[Math.floor(Math.random() * 16)];\n col += arr[Math.floor(Math.random() * 16)];\n\n col += arr[Math.floor(Math.random() * 16)];\n col += arr[Math.floor(Math.random() * 16)];\n return col;\n }\n\n static saturate(x)\n {\n return OMath.clamp(x, 0, 1);\n }\n}\n\nexport { OMath };\n","\nimport { OMath } from '../utilities/OMath';\n\nclass ActionSequencer\n{\n constructor(context = {})\n {\n this.previous_elapsed_time = -0.00001;\n this.elapsed_time = -0.00001;\n this.playback_speed = this.__get_playback_speed();\n this.playing = true;\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.previous_elapsed_time = this.elapsed_time;\n this.elapsed_time += delta_time * this.playback_speed;\n this.__play_clips(this.previous_elapsed_time, this.elapsed_time);\n }\n }\n\n set_progress(time)\n {\n this.previous_elapsed_time = this.elapsed_time;\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.previous_elapsed_time = this.elapsed_time;\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 if (this.elapsed_time > this.previous_elapsed_time)\n {\n this.__play_events(this.previous_elapsed_time, this.elapsed_time);\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 __play_events(from, to)\n {\n for (let i = 0; i < this.action_events.length; i++)\n {\n const trigger_time = this.action_events[i].trigger_time;\n if (OMath.between(trigger_time, from, to))\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 }\n\n evaluate_keyframe(keyframe, time)\n {\n this.tmp_t = this.__linear_map_01(time, keyframe.from, keyframe.to);\n\n return keyframe.interpolator.evaluate(OMath.clamp(this.tmp_t, 0, 1));\n }\n\n get_keyframes(channel_name)\n {\n return this.channels[channel_name];\n }\n\n is_channel_redefined(channel_name)\n {\n for (let i = 0; i < this.channels[channel_name].length; i++)\n {\n const keyframe = this.channels[channel_name][i];\n\n if (keyframe.interpolator.initial)\n {\n return false;\n }\n }\n\n return true;\n }\n\n __linear_map_01(value,\n from_range_start_value,\n from_range_end_value)\n {\n return OMath.saturate(((value - from_range_start_value) / (from_range_end_value - from_range_start_value)) * (1 - 0) + 0);\n }\n\n __get_current_keyframe(channel_name, time)\n {\n let current = undefined;\n\n const keyframes = this.channels[channel_name];\n\n for (let i = 0; i < keyframes.length; i++)\n {\n const keyframe = keyframes[i];\n\n if (time >= keyframe.from && time <= keyframe.to)\n {\n current = keyframe;\n return current;\n }\n }\n\n let min = Infinity;\n\n for (let i = 0; i < keyframes.length; i++)\n {\n const keyframe = keyframes[i];\n const distance = Math.abs(keyframe.to - time);\n\n if (distance < min)\n {\n current = keyframe;\n min = distance;\n }\n }\n\n return current;\n }\n\n __get_playback_speed()\n {\n const url_params = new URLSearchParams(window.location.search);\n\n const transitions_velocity = url_params.get('transitions_velocity');\n\n if (transitions_velocity)\n {\n return Number(transitions_velocity);\n }\n else\n {\n return 1;\n }\n }\n}\n\nexport { ActionSequencer };\n","class EasingFunctions\n{\n constructor()\n {}\n\n static linear(x)\n {\n return x;\n }\n\n static triangular(x)\n {\n return 1 - Math.abs((x * 2) % (1 * 2) - 1);\n }\n\n static ease_in_sine(x)\n {\n return 1 - Math.cos(x * 3.1415926 / 2);\n }\n\n static ease_out_sine(x)\n {\n return Math.sin(x * 3.1415926 / 2);\n }\n\n static ease_in_out_sine(x)\n {\n return -(Math.cos(3.1415926 * x) - 1) / 2;\n }\n\n static ease_in_cubic(x)\n {\n return x * x * x;\n }\n\n static ease_out_cubic(x)\n {\n return 1 - Math.pow(1 - x, 3);\n }\n\n static ease_in_out_cubic(x)\n {\n return x < 0.5\n ? 4 * x * x * x\n : 1 - Math.pow(-2 * x + 2, 3) / 2;\n }\n\n static ease_in_quad(x)\n {\n return x * x;\n }\n\n static ease_out_quad(x)\n {\n return 1 - (1 - x) * (1 - x);\n }\n\n static ease_in_out_quad(x)\n {\n return x < 0.5\n ? 2 * x * x\n : 1 - Math.pow(-2 * x + 2, 2) / 2;\n }\n\n static ease_in_quart(x)\n {\n return x * x * x * x;\n }\n\n static ease_out_quart(x)\n {\n return 1 - Math.pow(1 - x, 4);\n }\n\n static ease_in_out_quart(x)\n {\n return x < 0.5\n ? 8 * x * x * x * x\n : 1 - Math.pow(-2 * x + 2, 4) / 2;\n }\n\n static ease_in_quint(x)\n {\n return x * x * x * x * x;\n }\n\n static ease_out_quint(x)\n {\n return 1 - Math.pow(1 - x, 5);\n }\n\n static ease_in_out_quint(x)\n {\n return x < 0.5\n ? 16 * x * x * x * x * x\n : 1 - Math.pow(-2 * x + 2, 5) / 2;\n }\n\n static ease_in_expo(x)\n {\n return x === 0 ? 0 : Math.pow(2, 10 * x - 10);\n }\n\n static ease_out_expo(x)\n {\n return x === 1 ? 1 : 1 - Math.pow(2, -10 * x);\n }\n\n static ease_in_out_expo(x)\n {\n return x === 0\n ? 0\n : x === 1\n ? 1\n : x < 0.5\n ? Math.pow(2, 20 * x - 10) / 2\n : (2 - Math.pow(2, -20 * x + 10)) / 2;\n }\n\n static ease_in_circ(x)\n {\n return 1 - Math.sqrt(1 - Math.pow(x, 2));\n }\n\n static ease_out_circ(x)\n {\n return Math.sqrt(1 - Math.pow(x - 1, 2));\n }\n\n static ease_in_out_circ(x)\n {\n return x < 0.5\n ? (1 - Math.sqrt(1 - Math.pow(2 * x, 2))) / 2\n : (Math.sqrt(1 - Math.pow(-2 * x + 2, 2)) + 1) / 2;\n }\n\n static ease_in_back(x)\n {\n return 2.7015 * x * x * x - 1.7015 * x * x;\n }\n\n static ease_out_back(x)\n {\n return 1 + 2.7015 * Math.pow(x - 1, 3) + 1.7015 * Math.pow(x - 1, 2);\n }\n\n static ease_in_out_back(x)\n {\n return x < 0.5\n ? (Math.pow(2 * x, 2) * ((2.5949095 + 1) * 2 * x - 2.5949095)) / 2\n : (Math.pow(2 * x - 2, 2) * ((2.5949095 + 1) * (x * 2 - 2) + 2.5949095) + 2) / 2;\n }\n\n static ease_in_elastic(x)\n {\n const c4 = (2 * Math.PI) / 3;\n\n return x === 0\n ? 0\n : x === 1\n ? 1\n : -Math.pow(2, 10 * x - 10) * Math.sin((x * 10 - 10.75) * c4);\n }\n\n static ease_out_elastic(x)\n {\n return x === 0\n ? 0\n : x === 1\n ? 1\n : Math.pow(2, -10 * x) * Math.sin((x * 10 - 0.75) * 2.0943950) + 1;\n }\n\n static ease_in_out_elastic(x)\n {\n return x === 0\n ? 0\n : x === 1\n ? 1\n : x < 0.5\n ? -(Math.pow(2, 20 * x - 10) * Math.sin((20 * x - 11.125) * 1.3962633)) / 2\n : Math.pow(2, -20 * x + 10) * Math.sin((20 * x - 11.125) * 1.3962633) / 2 + 1;\n }\n\n static ease_in_bounce(x)\n {\n return 1 - this.ease_out_bounce(1 - x);\n }\n\n static ease_out_bounce(x)\n {\n const n1 = 7.5625;\n const d1 = 2.75;\n\n if (x < 1 / d1)\n {\n return n1 * x * x;\n }\n else if (x < 2 / d1)\n {\n return n1 * (x -= 1.5 / d1) * x + 0.75;\n }\n else if (x < 2.5 / d1)\n {\n return n1 * (x -= 2.25 / d1) * x + 0.9375;\n }\n else\n {\n return n1 * (x -= 2.625 / d1) * x + 0.984375;\n }\n }\n\n static ease_in_out_bounce(x)\n {\n return x < 0.5\n ? (1 - this.ease_out_bounce(1 - 2 * x)) / 2\n : (1 + this.ease_out_bounce(2 * x - 1)) / 2;\n }\n\n static heartbeat(t)\n {\n return 1.0 - Math.pow(Math.abs(Math.sin(t + 1.0)), 63.0) * Math.sign(Math.sin(t)) * Math.sin(t + 1.5 + 1.0) * 0.8;\n }\n}\n\nexport { EasingFunctions };\n","import { EasingFunctions } from '../utilities/EasingFunctions';\n\nclass ActionInterpolator\n{\n constructor(easing_function = 'linear')\n {\n this.easing_function = undefined;\n\n if (typeof easing_function === 'string')\n {\n this.easing_function = EasingFunctions[easing_function];\n }\n else\n {\n this.easing_function = easing_function;\n }\n }\n\n update(context, t)\n {\n\n }\n}\n\nexport { ActionInterpolator };\n","import { ActionInterpolator } from './ActionInterpolator';\nimport { OMath } from '../utilities/OMath';\n\nclass NumberInterpolator extends ActionInterpolator\n{\n constructor(attribute_name, from = 0, to = 1, initial = false, easing_function = 'linear')\n {\n super(easing_function);\n\n this.attribute_name = attribute_name;\n this.from = from;\n this.to = to;\n this.initial = initial;\n }\n\n update(context, t)\n {\n context[this.attribute_name] = OMath.lerp(this.from, this.to, this.easing_function(t));\n }\n\n evaluate(t)\n {\n return OMath.lerp(this.from, this.to, this.easing_function(t));\n }\n}\n\nexport { NumberInterpolator };\n","class ViewContext\n{\n constructor()\n {\n this.app = undefined;\n }\n\n set_app(app)\n {\n this.app = app;\n }\n}\n\nconst view_context = new ViewContext();\nexport { view_context as ViewContext };\n","import { ViewContext } from '../view_components/ViewContext';\n\nclass ActionEvent\n{\n constructor(name, method, args)\n {\n this.name = name;\n this.method = method;\n this.args = args;\n }\n\n trigger()\n {\n ViewContext.app[this.name][this.method](...this.args.split(','));\n }\n}\n\nexport { ActionEvent };\n","class DrawIOAnimationSheet\n{\n constructor()\n {\n\n }\n\n parse(xml_document)\n {\n const doc = new DOMParser().parseFromString(xml_document, 'text/xml');\n\n const animation_nodes = doc.querySelectorAll('mxGeometry');\n\n const animation_tracks = [];\n const triggers = [];\n\n for (let i = 0; i < animation_nodes.length; i++)\n {\n const node = animation_nodes[i];\n const parent_node = node.parentElement;\n const data = parent_node.getAttribute('value');\n\n const x_pos = this.get_node_x_position(node);\n\n const from = x_pos / 100;\n const duration = parseFloat(node.getAttribute('width')) / 100;\n\n // is trigger\n if (parent_node.getAttribute('style').includes('rhombus;'))\n {\n const split_data = data.split('.');\n const trigger_name = split_data[0];\n const trigger_method = split_data[1];\n\n triggers.push({\n name: trigger_name,\n method: trigger_method,\n at_time: from + duration * 0.5\n });\n }\n\n const valid_element = parent_node.getAttribute('style').includes('rounded=0;') &&\n !parent_node.getAttribute('style').includes('text;');\n\n if (valid_element && data !== '' && !data.includes(' '))\n {\n const split_data = data.split('=');\n\n const attribute_name = split_data[0];\n\n const value_data = split_data[1].split('--');\n const to_value = parseFloat(value_data[0]);\n const easing_function = value_data[1];\n\n if (split_data.length !== 2)\n {\n console.error('DrawIO data is malformed:', data);\n }\n\n if (value_data.length !== 2)\n {\n console.error('DrawIO data is malformed:', data);\n }\n\n animation_tracks.push({\n attribute_name: attribute_name,\n from_time: from,\n to_time: from + duration,\n to_value: to_value,\n easing_function: easing_function\n });\n }\n }\n\n animation_tracks.sort((a, b) =>\n {\n return a.from_time - b.from_time;\n });\n return {\n animation_tracks: animation_tracks,\n triggers: triggers\n };\n }\n\n get_node_x_position(node)\n {\n const x_pos = node.getAttribute('x');\n return x_pos === null ? 0 : parseFloat(x_pos);\n }\n}\n\nexport { DrawIOAnimationSheet };\n","import { ActionSequencer } from '../../action_sequencer/ActionSequencer';\nimport { NumberInterpolator } from '../../action_sequencer/NumberInterpolator';\nimport { ActionEvent } from '../../action_sequencer/ActionEvent';\nimport { DrawIOAnimationSheet } from './DrawIOAnimationSheet';\n\nclass ActionSequencerBuilder\n{\n constructor(default_state_data)\n {\n this.default_state_data = default_state_data;\n }\n\n from_animation_sheet(animation_data, current_context, initial_context)\n {\n initial_context = initial_context || this.default_state_data;\n const tracks = animation_data.animation_tracks;\n const triggers = animation_data.triggers;\n\n const initial_tracks = this.state_to_tracks(this.default_state_data, this.get_longest_time(animation_data.animation_tracks));\n\n for (let i = 0; i < initial_tracks.length; i++)\n {\n if (tracks.find(element => element.attribute_name === initial_tracks[i].attribute_name) === undefined)\n {\n tracks.push(initial_tracks[i]);\n }\n }\n\n const sequencer = new ActionSequencer(current_context);\n\n for (let i = 0; i < tracks.length; i++)\n {\n const t = tracks[i];\n const interpolator = new NumberInterpolator(\n t.attribute_name,\n current_context[t.attribute_name],\n t.to_value,\n t.initial,\n t.easing_function\n );\n\n sequencer.add_action_interpolator(t.from_time, t.to_time, interpolator, true);\n }\n\n for (let i = 0; i < triggers.length; i++)\n {\n const t = triggers[i];\n const action_event = new ActionEvent(t.name, t.method, t.args);\n sequencer.add_action_event(t.at_time, action_event);\n }\n\n return sequencer;\n }\n\n state_to_tracks(state, longest_time)\n {\n const tracks = [];\n\n const keys = Object.keys(state);\n\n for (let i = 0; i < keys.length; i++)\n {\n tracks.push({\n attribute_name: keys[i],\n from_time: 0,\n to_time: longest_time < 1 ? longest_time : 1,\n to_value: state[keys[i]],\n initial: true,\n easing_function: 'ease_in_out_cubic'\n });\n }\n\n return tracks;\n }\n\n from_draw_io(xml, context)\n {\n const transition_data = (new DrawIOAnimationSheet()).parse(xml);\n const tracks = transition_data.animation_tracks;\n const triggers = transition_data.triggers;\n const sequencer = new ActionSequencer(context);\n\n for (let i = 0; i < tracks.length; i++)\n {\n const t = tracks[i];\n const interpolator = new NumberInterpolator(\n t.attribute_name,\n context[t.attribute_name],\n t.to_value,\n t.initial,\n t.easing_function\n );\n\n sequencer.add_action_interpolator(t.from_time, t.to_time, interpolator, true);\n }\n\n for (let i = 0; i < triggers.length; i++)\n {\n const t = triggers[i];\n const action_event = new ActionEvent(t.name, t.method);\n sequencer.add_action_event(t.at_time, action_event);\n }\n\n return sequencer;\n }\n\n get_longest_time(tracks)\n {\n let longest_time = -1;\n\n for (let i = 0; i < tracks.length; i++)\n {\n const track = tracks[i];\n\n const track_time = track.to_time;\n\n longest_time = track_time > longest_time ? track_time : longest_time;\n }\n\n return longest_time;\n }\n}\n\nexport { ActionSequencerBuilder };\n","class EventManager\n{\n init()\n {\n this.queue = {};\n\n this.zoom_changed_evt = 'zoom_changed';\n this.store_clickd_evt = 'store_clicked';\n this.point_selected_evt = 'point_selected';\n this.config_changed = 'config_changed';\n\n this.path_substep_completed = 'path_substep_completed';\n this.path_completed = 'path_completed';\n this.go_to_store_requested_evt = 'go_to_store_requested';\n\n this.resource_loaded_evt = 'resource_loaded';\n this.service_clicked_evt = 'service_clicked';\n this.unit_pos_updated_evt = 'unit_position_updated';\n\n this.floor_changed_evt = 'floor_changed';\n\n this.on_enter_floor_navigation = 'on_enter_floor_navigation';\n this.on_exit_floor_navigation = 'on_exit_floor_navigation';\n\n this.on_enter_floor_selection = 'on_enter_floor_selection';\n this.on_exit_floor_selection = 'on_exit_floor_selection';\n\n this.on_enter_outside_navigation = 'on_enter_outside_navigation';\n this.on_exit_outside_navigation = 'on_exit_outside_navigation';\n\n this.step_selected_evt = 'step_selected';\n }\n\n fire(event, payload)\n {\n const queue = this.queue[event];\n\n if (queue === undefined)\n {\n return;\n }\n let i = queue.length;\n while (i--)\n {\n queue[i](payload);\n }\n }\n\n on(event, callback)\n {\n if (typeof this.queue[event] === 'undefined')\n {\n this.queue[event] = [];\n }\n\n this.queue[event].push(callback);\n }\n\n fire_zoom_changed(zoom)\n {\n this.fire(this.zoom_changed_evt, zoom);\n }\n\n fire_store_selected(store_id)\n {\n this.fire(this.store_clickd_evt, store_id);\n }\n\n fire_point_selected(hit_data)\n {\n this.fire(this.point_selected_evt, hit_data);\n }\n\n fire_config_changed()\n {\n this.fire(this.config_changed);\n }\n\n fire_path_substep_completed(step_number)\n {\n this.fire(this.path_substep_completed, step_number);\n }\n\n fire_path_completed()\n {\n this.fire(this.path_completed);\n }\n\n fire_step_selected(step_index)\n {\n this.fire(this.step_selected_evt, step_index);\n }\n\n fire_go_to_store_requested(store_id)\n {\n this.fire(this.go_to_store_requested_evt, store_id);\n }\n\n fire_resource_loaded(resource)\n {\n this.fire(this.resource_loaded_evt, resource);\n }\n\n fire_service_clicked(service)\n {\n this.fire(this.service_clicked_evt, service);\n }\n\n fire_unit_position_updated(unit_data)\n {\n this.fire(this.unit_pos_updated_evt, unit_data);\n }\n\n fire_floor_switched(floor_id)\n {\n this.fire(this.floor_changed_evt, floor_id);\n }\n\n fire_on_enter_floor_navigation(state)\n {\n this.fire(this.on_enter_floor_navigation, state);\n }\n\n fire_on_exit_floor_navigation(state)\n {\n this.fire(this.on_exit_floor_navigation, state);\n }\n\n fire_on_enter_floor_selection(state)\n {\n this.fire(this.on_enter_floor_selection, state);\n }\n\n fire_on_exit_floor_selection(state)\n {\n this.fire(this.on_exit_floor_selection, state);\n }\n\n fire_on_enter_outside_navigation(state)\n {\n this.fire(this.on_enter_outside_navigation, state);\n }\n\n fire_on_exit_outside_navigation(state)\n {\n this.fire(this.on_exit_outside_navigation, state);\n }\n}\n\nconst event_manager = new EventManager();\nexport { event_manager as EventManager };\n","import { EventManager } from './EventManager';\n\nclass ResourceContainer\n{\n init()\n {\n this.resources = {};\n this.resources_by_url = {};\n }\n\n set_resource(name, url, resource)\n {\n const urls = Object.keys(this.resources_by_url);\n\n if (urls.includes(url))\n {\n this.resources[name] = this.resources_by_url[url];\n }\n else\n {\n this.resources[name] = resource;\n this.resources_by_url[url] = resource;\n }\n\n EventManager.fire_resource_loaded({ name: name, value: resource });\n }\n\n get_resource(name)\n {\n return this.resources[name];\n }\n\n get(name)\n {\n return this.resources[name];\n }\n}\n\nconst resource_container = new ResourceContainer();\nexport { resource_container as ResourceContainer };\n","class HTMLUtilities\n{\n static load_images(container)\n {\n const images = container.querySelectorAll('img');\n\n for (let i = 0; i < images.length; i++)\n {\n const image = images[i];\n\n if (image.dataset.src)\n {\n image.src = image.dataset.src;\n }\n }\n\n const image_objects = container.querySelectorAll('object');\n\n for (let i = 0; i < image_objects.length; i++)\n {\n const image_object = image_objects[i];\n\n if (image_object.dataset.src)\n {\n image_object.data = image_object.dataset.src;\n }\n }\n }\n\n static load_videos(container)\n {\n const videos = container.querySelectorAll('video');\n\n for (let i = 0; i < videos.length; i++)\n {\n const video = videos[i];\n\n if (video.dataset.src)\n {\n video.src = video.dataset.src;\n }\n }\n }\n\n static load_iframes(container)\n {\n const iframes = container.querySelectorAll('iframe');\n\n for (let i = 0; i < iframes.length; i++)\n {\n const iframe = iframes[i];\n\n if (iframe.dataset.src)\n {\n iframe.src = iframe.dataset.src;\n }\n }\n }\n\n static load_elements(container, selector)\n {\n const elements = container.querySelectorAll(selector);\n\n for (let i = 0; i < elements.length; i++)\n {\n const element = elements[i];\n\n if (element.dataset.src)\n {\n element.src = element.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.__delta_time = 0;\n this.__smooth_delta_time = 0;\n this.__elapsed_time = 0;\n this.__allocated_time = new Vector2(0, 0);\n this.__frame_interpolation_t = 0;\n this.fixed_delta_time = 1 / 30;\n }\n\n get elapsed_time()\n {\n return this.__elapsed_time;\n }\n\n get delta_time()\n {\n return this.__delta_time;\n }\n\n get smooth_delta_time()\n {\n return this.__smooth_delta_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 get frame_interpolation()\n {\n return this.__frame_interpolation_t;\n }\n\n get fdt()\n {\n return this.fixed_delta_time;\n }\n\n get dt()\n {\n return this.delta_time;\n }\n\n get sdt()\n {\n return this.smooth_delta_time;\n }\n\n __set_frame_interpolation(value)\n {\n this.__frame_interpolation_t = value;\n }\n\n __update()\n {\n this.__delta_time = this.___time.getDelta();\n this.__elapsed_time = this.___time.getElapsedTime();\n\n this.__delta_buffer.shift();\n this.__delta_buffer.push(this.delta_time < 0.32 ? this.delta_time : 0.032);\n\n this.__calculate_smooth_delta_time();\n }\n\n __calculate_smooth_delta_time()\n {\n this.__smooth_delta_time = 0;\n\n for (let i = 0; i < this.__delta_buffer.length; i++)\n {\n this.__smooth_delta_time += this.__delta_buffer[i];\n }\n\n this.__smooth_delta_time = this.__smooth_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 before_update()\n {\n }\n\n update()\n {\n }\n\n fixed_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 before_update()\n {\n this.current_state.before_update();\n }\n\n fixed_update()\n {\n this.current_state.fixed_update();\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 before_update()\n {\n this.transition_handler.before_update();\n }\n\n update()\n {\n this.transition_handler.update();\n\n this.__set_views_opacities();\n }\n\n fixed_update()\n {\n this.transition_handler.fixed_update();\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 before_update()\n {}\n\n update()\n {}\n\n fixed_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';\nimport { CameraManager } from './CameraManager';\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(60, OScreen.aspect_ratio, 0.1, 1000);\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 this.scene.add(arrow);\n return arrow;\n }\n\n draw_axis()\n {\n const axis = new AxisHelper();\n this.scene.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 this.scene.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 this.scene.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 this.scene.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 this.scene.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 this.scene.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, CameraManager.current);\n }\n }\n}\n\nconst debug = new Debug();\nexport { debug as Debug };\n","import { BlitMaterial } from '../materials/BlitMaterial';\n\nimport frag from '../shaders/clear/clear_depth_normal.frag';\n\nimport { Vector4 } from 'three';\n\nclass ClearDepthNormalMaterial extends BlitMaterial\n{\n constructor(clear_depth, clear_normal)\n {\n super(frag);\n this.uniforms._DepthNormal = { value: new Vector4(clear_depth, clear_normal.x, clear_normal.y, clear_normal.z) };\n }\n}\n\nexport { ClearDepthNormalMaterial };\n","import vert from '../shaders/depth_normals/depth_normals.vert';\nimport frag from '../shaders/depth_normals/depth_normals.frag';\n\nimport { ShaderMaterial } from 'three';\n\nclass DepthNormalMaterial extends ShaderMaterial\n{\n constructor()\n {\n super({\n uniforms: {\n _FarPlane: { value: 1 }\n },\n vertexShader: vert,\n fragmentShader: frag\n });\n }\n\n set far_plane(value)\n {\n this.uniforms._FarPlane.value = value;\n }\n\n get far_plane()\n {\n return this.uniforms._FarPlane.value;\n }\n}\n\nexport { DepthNormalMaterial };\n","import { CameraManager } from '../CameraManager';\nimport { OScreen } from '../OScreen';\n\nimport { ClearDepthNormalMaterial } from '../materials/ClearDepthNormalMaterial';\nimport { DepthNormalMaterial } from '../materials/DepthNormalMaterial';\n\nimport { WebGLRenderTarget } from 'three';\nimport { Vector3 } from 'three';\n\nclass DepthAndNormalsRenderer\n{\n constructor()\n {\n this.RT = new WebGLRenderTarget(OScreen.width, OScreen.height);\n\n this.clear_depth_normal_mat = new ClearDepthNormalMaterial(1, new Vector3(0, 0, 1));\n this.depth_normal_material = new DepthNormalMaterial();\n }\n\n render(graphics)\n {\n this.__resize_RT_if_necessary();\n\n graphics.clear(this.RT, undefined, true, true);\n\n graphics.blit_clear_with_material(this.RT, this.clear_depth_normal_mat);\n\n this.depth_normal_material.far_plane = CameraManager.current.far;\n\n graphics.render(undefined, undefined, this.RT, this.depth_normal_material);\n }\n\n __resize_RT_if_necessary()\n {\n if (this.RT.width !== OScreen.width || this.RT.height !== OScreen.height)\n {\n this.RT.setSize(OScreen.width, OScreen.height);\n }\n }\n\n get render_target()\n {\n return this.RT;\n }\n}\n\nexport { DepthAndNormalsRenderer };\n","import { BlitMaterial } from '../materials/BlitMaterial';\n\nimport { Scene } from 'three';\nimport { Mesh } from 'three';\nimport { PlaneGeometry } from 'three';\nimport { OrthographicCamera } from 'three';\n\nclass Blitter\n{\n constructor(renderer)\n {\n this.renderer = renderer;\n this._blit_scene = new Scene();\n this._blit_material = new BlitMaterial();\n this._blit_quad = new Mesh(\n new PlaneGeometry(1, 1), this._blit_material);\n this._blit_scene.add(this._blit_quad);\n this._blit_camera = new OrthographicCamera(-1, 1, 1, -1, -10000, 10000);\n }\n\n blit(src, dst)\n {\n this._blit_quad.material = this._blit_material;\n\n const src_texture = src.isWebGLRenderTarget === true ? src.texture : src;\n const src_width = src.isWebGLRenderTarget === true ? src.width : src.image.width;\n const src_height = src.isWebGLRenderTarget === true ? src.height : src.image.height;\n\n this._blit_quad.material.uniforms._MainTex.value = src_texture;\n this._blit_quad.material.uniforms._Resolution.value.set(src_width, src_height);\n\n if (dst)\n {\n this._blit_quad.material.uniforms._TargetResolution.value.set(dst.width, dst.height);\n }\n else\n {\n this.renderer.getSize(this._blit_quad.material.uniforms._TargetResolution.value);\n }\n\n this.__render(dst);\n }\n\n material_pass(mat, dst)\n {\n this._blit_quad.material = mat;\n // this._blit_quad.material.uniforms._MainTex.value = undefined;\n // this._blit_quad.material.uniforms._Resolution.value.set(1, 1);\n\n this.__render(dst);\n }\n\n blit_with_material(src, dst, mat)\n {\n const src_texture = src.isWebGLRenderTarget === true ? src.texture : src;\n const src_width = src.isWebGLRenderTarget === true ? src.width : src.image.width;\n const src_height = src.isWebGLRenderTarget === true ? src.height : src.image.height;\n\n this._blit_quad.material = mat;\n this._blit_quad.material.uniforms._MainTex.value = src_texture;\n this._blit_quad.material.uniforms._Resolution.value.set(src_width, src_height);\n\n if (dst)\n {\n this._blit_quad.material.uniforms._TargetResolution.value.set(dst.width, dst.height);\n }\n else\n {\n this.renderer.getSize(this._blit_quad.material.uniforms._TargetResolution.value);\n }\n\n this.__render(dst);\n }\n\n blit_clear_with_material(dst_RT, mat)\n {\n this._blit_quad.material = mat;\n\n this.__render(dst_RT);\n }\n\n dispose()\n {\n this._blit_quad.geometry.dispose();\n this._blit_quad.material.dispose();\n }\n\n __render(RT)\n {\n RT = RT === undefined ? null : RT;\n\n const current_rt = this.renderer.getRenderTarget();\n\n this.renderer.setRenderTarget(RT === undefined ? null : RT);\n this.renderer.render(this._blit_scene, this._blit_camera);\n\n this.renderer.setRenderTarget(current_rt);\n }\n}\n\nexport { Blitter };\n","import { Configuration } from './Configuration';\nimport { BaseRender } from './render_mode/BaseRender';\nimport { OScreen } from './OScreen';\nimport { CameraManager } from './CameraManager';\nimport { SceneManager } from './SceneManager';\nimport { Capabilities } from './Capabilities';\nimport { DepthAndNormalsRenderer } from './render_utilities/DepthAndNormalsRenderer';\nimport { Blitter } from './render_utilities/Blitter';\n\nimport {\n NearestFilter,\n RGBAFormat,\n LinearEncoding,\n FloatType,\n WebGLRenderTarget,\n ShaderMaterial,\n NoBlending,\n AlwaysDepth\n} from 'three';\n\nimport { WebGLRenderer } from 'three';\n\nclass Graphics\n{\n init(canvas, core_attributes, context_attributes, threejs_attributes)\n {\n this._renderer = undefined;\n this.blitter = undefined;\n this.canvas = undefined;\n this.no_render = undefined;\n this.current_render_mode = undefined;\n this.generateDepthNormalTexture = false;\n this.depth_and_normals_renderer = undefined;\n\n this.is_webgl2 = false;\n this.canvas_context = undefined;\n this.context_attributes = undefined;\n\n this.core_attributes = {\n force_webgl2: true,\n xr_enabled: false\n };\n\n this.context_attributes = {\n alpha: true,\n antialias: false,\n depth: true,\n desynchronized: false,\n failIfMajorPerformanceCaveat: false,\n powerPreference: 'high-performance',\n premultipliedAlpha: true,\n preserveDrawingBuffer: true,\n stencil: false\n };\n\n this.threejs_attributes = {\n logarithmicDepthBuffer: false\n };\n\n Object.assign(this.core_attributes, core_attributes);\n Object.assign(this.context_attributes, context_attributes);\n\n Object.assign(this.threejs_attributes, this.context_attributes);\n Object.assign(this.threejs_attributes, threejs_attributes);\n\n if (this.core_attributes.force_webgl2)\n {\n this.canvas_context = canvas.getContext('webgl2', this.context_attributes) ||\n canvas.getContext('webgl', this.context_attributes) ||\n canvas.getContext('experimental-webgl', this.context_attributes);\n }\n else\n {\n this.canvas_context = canvas.getContext('webgl', this.context_attributes) ||\n canvas.getContext('experimental-webgl', this.context_attributes);\n }\n\n this.is_webgl2 = this.canvas_context.constructor.name === 'WebGL2RenderingContext';\n\n // console.log(`Using WebGL ${this.is_webgl2 ? 2 : 1}`);\n\n this.threejs_attributes.canvas = canvas;\n this.threejs_attributes.context = this.canvas_context;\n\n this._renderer = new WebGLRenderer(this.threejs_attributes);\n\n if (this.core_attributes.xr_enabled)\n {\n this._renderer.xr.enabled = true;\n }\n else\n {\n this._renderer.autoClear = false;\n }\n\n this._renderer.setPixelRatio(1);\n\n OScreen.dpr = Configuration.dpr;\n\n if (!this.is_webgl2)\n {\n this._renderer.extensions.get('ANGLE_instanced_arrays');\n }\n\n this.blitter = new Blitter(this._renderer);\n\n this.canvas = this._renderer.domElement;\n\n this.no_render = new BaseRender();\n\n this.current_render_mode = this.no_render;\n Capabilities.max_anisotropy = this._renderer.capabilities.getMaxAnisotropy();\n Capabilities.vertex_texture_sampler_available = this._renderer.capabilities.maxVertexTextures > 0;\n Capabilities.fp_textures_available = this.is_floating_point_texture_available();\n\n this.generateDepthNormalTexture = false;\n\n this.depth_and_normals_renderer = new DepthAndNormalsRenderer();\n\n this.resize_observer = new ResizeObserver(this.on_resize.bind(this));\n this.resize_observer.observe(this.canvas);\n }\n\n get dom_element()\n {\n return this._renderer.domElement;\n }\n\n get depth_normals_RT()\n {\n return this.depth_and_normals_renderer.render_target;\n }\n\n set_state(new_state)\n {\n // console.log('VIEWAPI - map render mode switch to: ' + new_state.constructor.name);\n\n this.current_render_mode.on_exit(this, this._renderer);\n this.current_render_mode = new_state;\n this.current_render_mode.on_enter(this, this._renderer);\n }\n\n update()\n {\n if (this.generateDepthNormalTexture)\n {\n this.depth_and_normals_renderer.render(this);\n }\n\n this.__update_current_camera();\n\n if (CameraManager.current)\n {\n this.current_render_mode.render();\n }\n\n OScreen.update();\n }\n\n __update_current_camera()\n {\n if (CameraManager.current)\n {\n CameraManager.current.aspect = OScreen.aspect_ratio;\n CameraManager.current.updateProjectionMatrix();\n CameraManager.current.updateMatrix();\n CameraManager.current.updateMatrixWorld(true);\n }\n }\n\n render(scene, camera, RT, override_mat)\n {\n this.__apply_override_material(scene, override_mat);\n\n this._renderer.setRenderTarget(RT === undefined ? null : RT);\n this._renderer.render(scene || SceneManager.current,\n camera || CameraManager.current);\n\n this.__apply_override_material(scene, undefined);\n }\n\n render_scene(scene)\n {\n if (scene.on_pre_render)\n {\n scene.on_pre_render();\n }\n\n if (scene.render)\n {\n scene.render();\n }\n else\n {\n this.render(scene, undefined);\n }\n\n if (scene.on_post_render)\n {\n scene.on_post_render();\n }\n }\n\n __apply_override_material(scene, mat)\n {\n mat = mat === undefined ? null : mat;\n if (scene)\n {\n scene.overrideMaterial = mat;\n }\n else\n {\n SceneManager.current.overrideMaterial = mat;\n }\n }\n\n readback_RT(RT, buffer)\n {\n this._renderer.readRenderTargetPixels(RT, 0, 0, RT.width, RT.height, buffer);\n }\n\n clear(RT, camera, clear_depth, clear_stencil)\n {\n this._renderer.setRenderTarget(RT === undefined ? null : RT);\n\n if (camera)\n {\n this._renderer.setClearColor(camera.clear_color, camera.clear_alpha);\n }\n\n this._renderer.clear(!!camera, // clear color\n !!clear_depth,\n !!clear_stencil);\n }\n\n on_resize(entries)\n {\n for (const entry of entries)\n {\n OScreen.dpr = Configuration.dpr;\n OScreen.update_position(entry.contentRect.x, entry.contentRect.y);\n OScreen.update_size(entry.contentRect.width, entry.contentRect.height);\n\n this.canvas.width = OScreen.render_width;\n this.canvas.height = OScreen.render_height;\n\n this._renderer.setViewport(0, 0, OScreen.render_width, OScreen.render_height);\n\n this.__update_current_camera();\n }\n }\n\n material_pass(mat, dst)\n {\n this.blitter.material_pass(mat, dst);\n }\n\n blit(src_RT, dst_RT, mat)\n {\n if (mat)\n {\n this.blitter.blit_with_material(src_RT, dst_RT, mat);\n }\n else\n {\n this.blitter.blit(src_RT, dst_RT);\n }\n }\n\n blit_clear_with_material(dst_RT, mat)\n {\n this.blitter.blit_clear_with_material(dst_RT, mat);\n }\n\n take_screenshot(blob_callback, width = OScreen.width, height = OScreen.height)\n {\n // const ctx = this;\n\n const old_width = OScreen.width;\n const old_height = OScreen.height;\n\n const new_width = width;\n const new_height = height;\n\n const tile_width = 1024;\n const tile_height = 1024;\n\n const divisions_x = parseInt(Math.ceil(new_width / tile_width));\n const divisions_y = parseInt(Math.ceil(new_height / tile_height));\n\n OScreen.update_size(tile_width, tile_height);\n const old_dpr = this._renderer.getPixelRatio();\n this._renderer.setPixelRatio(1);\n\n this._renderer.setSize(tile_width, tile_height, false);\n\n const canvas_2d = document.createElement('canvas');\n const ctx_2D = canvas_2d.getContext('2d');\n\n ctx_2D.canvas.width = new_width;\n ctx_2D.canvas.height = new_height;\n\n CameraManager.current.aspect = OScreen.aspect_ratio;\n CameraManager.current.updateMatrix();\n CameraManager.current.updateMatrixWorld(true);\n\n for (let x = 0; x < divisions_x; x++)\n {\n for (let y = 0; y < divisions_y; y++)\n {\n CameraManager.current.setViewOffset(new_width, new_height,\n OScreen.width * x, OScreen.height * y,\n OScreen.width, OScreen.height);\n this.current_render_mode.render();\n\n ctx_2D.drawImage(this._renderer.domElement, OScreen.width * x, OScreen.height * y);\n }\n }\n\n // transform the result canvas into a blob\n // } from them the callback turns into a ULR and download it\n ctx_2D.canvas.toBlob(blob_callback, 'image/png;base64;');\n\n CameraManager.current.clearViewOffset();\n\n OScreen.update_size(old_width, old_height);\n this._renderer.setPixelRatio(old_dpr);\n this._renderer.setSize(old_width, old_height, false);\n\n CameraManager.current.aspect = OScreen.aspect_ratio;\n CameraManager.current.updateMatrix();\n CameraManager.current.updateMatrixWorld(true);\n }\n\n download_screenshot(blob)\n {\n const link = document.createElement('a');\n link.download = 'Snapshot.png';\n\n link.href = URL.createObjectURL(blob);\n link.click();\n\n link.onclick = function()\n {\n requestAnimationFrame(function()\n {\n URL.revokeObjectURL(link.href);\n });\n link.removeAttribute('href');\n };\n }\n\n dispose()\n {\n this._renderer.dispose();\n this.current_render_mode.dispose();\n this.blitter.dispose();\n }\n\n is_floating_point_texture_available()\n {\n const RT = new WebGLRenderTarget(1, 1, {\n minFilter: NearestFilter,\n magFilter: NearestFilter,\n format: RGBAFormat,\n encoding: LinearEncoding,\n type: FloatType,\n stencilBuffer: false,\n depthBuffer: false\n });\n\n const vert = `\n void main()\n {\n gl_Position = vec4(uv * 2.0 - 1.0, 1.0, 1.0);\n }\n `;\n const frag = `\n void main()\n {\n gl_FragColor = vec4(0.0, 4865.35, 0.0, 1.0);\n }\n `;\n\n const mat = new ShaderMaterial({\n vertexShader: vert,\n fragmentShader: frag,\n depthWrite: false,\n blending: NoBlending,\n depthTest: false,\n depthFunc: AlwaysDepth\n });\n\n this.material_pass(mat, RT);\n\n const output = new Float32Array(4);\n this._renderer.readRenderTargetPixels(RT, 0, 0, 1, 1, output);\n\n return Math.abs(output[1] - 4865.35) < 0.001;\n }\n}\n\nconst graphics = new Graphics();\nexport { graphics as Graphics };\n","import frag from '../shaders/normal/normal.frag';\nimport vert from '../shaders/normal/normal.vert';\n\nimport { ShaderMaterial } from 'three';\n\nclass NormalMaterial extends ShaderMaterial\n{\n constructor()\n {\n super({\n uniforms: {\n },\n vertexShader: vert,\n fragmentShader: frag\n });\n }\n}\n\nexport { NormalMaterial };\n","import { CameraManager } from '../CameraManager';\nimport { SceneManager } from '../SceneManager';\nimport { BaseRender } from '../render_mode/BaseRender';\nimport { Graphics } from '../Graphics';\nimport { NormalMaterial } from '../materials/NormalMaterial';\n\nclass DebugNormalsRender extends BaseRender\n{\n constructor()\n {\n super();\n }\n\n render()\n {\n Graphics.clear(undefined, CameraManager.current, true, true);\n\n Graphics.render(SceneManager.current, CameraManager.current, undefined, new NormalMaterial());\n }\n}\n\nexport { DebugNormalsRender };\n","class KeyboardInput\n{\n init(container)\n {\n this.ctrlz_pressed = false;\n this.ctrlz_fired = false;\n\n this.keys = {};\n this.keys_keys = [];\n this.container = container;\n\n this.container.addEventListener('keydown', this.on_key_down.bind(this), false);\n this.container.addEventListener('keyup', this.on_key_up.bind(this), false);\n }\n\n on_key_down(e)\n {\n if (e.keyCode === 90 && e.ctrlKey && !this.ctrlz_fired)\n {\n this.ctrlz_pressed = true;\n this.ctrlz_fired = true;\n }\n\n if (e.code)\n {\n this.press_key(e.code);\n }\n }\n\n on_key_up(e)\n {\n this.release_key(e.code);\n }\n\n clear()\n {\n this.ctrlz_pressed = false;\n\n for (let i = 0; i < this.keys_keys.length; i++)\n {\n this.keys[this.keys_keys[i]].pressed = false;\n this.keys[this.keys_keys[i]].released = false;\n }\n }\n\n release_key(key_name)\n {\n const key = this.keys[key_name];\n if (key)\n {\n key.fired = false;\n key.down = false;\n key.released = true;\n }\n }\n\n release_keys()\n {\n this.ctrlz_fired = false;\n\n for (let i = 0; i < this.keys_keys.length; i++)\n {\n this.keys[this.keys_keys[i]].fired = false;\n this.keys[this.keys_keys[i]].down = false;\n }\n }\n\n press_key(key_name)\n {\n const key = this.keys[key_name];\n if (key)\n {\n if (key.down === false)\n {\n key.pressed = true;\n }\n key.down = true;\n key.fired = true;\n }\n }\n\n is_key_pressed(key_name)\n {\n const key = this.keys[key_name];\n if (key)\n {\n return key.pressed;\n }\n return false;\n }\n\n is_key_down(key_name)\n {\n const key = this.keys[key_name];\n if (key)\n {\n return key.down;\n }\n return false;\n }\n\n is_key_released(key_name)\n {\n const key = this.keys[key_name];\n if (key)\n {\n return key.released;\n }\n\n return false;\n }\n\n register_key(key)\n {\n this.keys[key] =\n {\n key_name: key,\n pressed: false,\n down: false,\n fired: false\n };\n\n this.keys_keys = Object.keys(this.keys);\n }\n\n unregister_key(key_name)\n {\n delete this.keys[key_name];\n }\n\n dispose()\n {\n this.container.removeEventListener('keydown', this.on_key_down.bind(this), false);\n this.container.removeEventListener('keyup', this.on_key_up.bind(this), false);\n }\n}\n\nexport { KeyboardInput };\n","\nclass OS\n{\n init()\n {\n this.operating_systems = {\n ANDROID: 'android',\n IOS: 'ios',\n LINUX: 'linux',\n MAC: 'mac',\n WINDOWS: 'windows'\n };\n\n this.is_mobile = !!(navigator.userAgent.match(/(iPhone|iPod|iPad|Android|playbook|silk|BlackBerry|BB10|Windows Phone|Tizen|Bada|webOS|IEMobile|Opera Mini)/));\n this.is_ipad = !!(navigator.userAgent.match(/Mac/) && navigator.maxTouchPoints && navigator.maxTouchPoints > 2);\n this.is_ios = !!navigator.userAgent.match(/(iPhone|iPod|iPad)/) || this.is_ipad;\n\n this.is_android = this.get_os() === this.operating_systems.ANDROID;\n this.is_linux = this.get_os() === this.operating_systems.LINUX;\n this.is_mac = this.get_os() === this.operating_systems.MAC;\n this.is_windows = this.get_os() === this.operating_systems.WINDOWS;\n }\n\n get_os()\n {\n const userAgent = window.navigator.userAgent;\n const platform = window.navigator.platform;\n const macosPlatforms = ['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K'];\n const windowsPlatforms = ['Win32', 'Win64', 'Windows', 'WinCE'];\n const iosPlatforms = ['iPhone', 'iPad', 'iPod'];\n let os = null;\n\n if (macosPlatforms.indexOf(platform) !== -1)\n {\n os = this.operating_systems.MAC;\n }\n else if (iosPlatforms.indexOf(platform) !== -1)\n {\n os = this.operating_systems.IOS;\n }\n else if (windowsPlatforms.indexOf(platform) !== -1)\n {\n os = this.operating_systems.WINDOWS;\n }\n else if (/Android/.test(userAgent))\n {\n os = this.operating_systems.ANDROID;\n }\n else if (!os && /Linux/.test(platform))\n {\n os = this.operating_systems.LINUX;\n }\n\n return os;\n }\n}\n\nconst os = new OS();\nexport { os as OS };\n","import { Vector3 } from 'three';\n\nclass ReflectionPlaneContext\n{\n init()\n {\n this.target_geometry = undefined;\n this.target_position = new Vector3();\n }\n\n set_target_geometry(geometry)\n {\n this.target_geometry = geometry;\n }\n}\n\nconst reflection_plane_context = new ReflectionPlaneContext();\nexport { reflection_plane_context as ReflectionPlaneContext };\n","import { Vector2 } from 'three';\nimport { ShaderMaterial } from 'three';\nimport { Mesh } from 'three';\nimport { DataTexture } from 'three';\nimport { RGBAFormat } from 'three';\nimport { RGBFormat } from 'three';\nimport { FloatType } from 'three';\n\nclass GeometryBatch\n{\n constructor(geometry, batch_width)\n {\n this.geometry = geometry;\n\n this.material = undefined;\n this.uniforms = {};\n this.batch_width = batch_width;\n\n this.data_textures = [];\n\n this.object_names = undefined;\n\n this.zero_offset = new Vector2();\n this.write_offset = new Vector2();\n\n this.uniform_dirty_count = 0;\n\n this.tmp_uploaded_data_count = 0;\n }\n\n init(object_names, vert_shader, frag_shader)\n {\n this.material = new ShaderMaterial({\n uniforms: this.uniforms,\n vertexShader: vert_shader,\n fragmentShader: frag_shader\n });\n this.object_names = object_names;\n }\n\n add_global_uniform(name, data)\n {\n this.uniforms[name] = { value: data };\n this.material.needsUpdate = true;\n }\n\n set_global_uniform(name, data)\n {\n this.uniforms[name].value = data;\n }\n\n add_object_uniform_v3(uniform_name, default_value_v3)\n {\n const src_tex = this.__create_rgb_texture(this.batch_width);\n const dst_tex = this.__create_rgb_texture(this.batch_width);\n const one_pixel_tex = this.__create_rgb_texture(1);\n\n const new_data_tex = this.__add_data_texture(uniform_name, src_tex, dst_tex, one_pixel_tex);\n\n if (default_value_v3)\n {\n this.__flood_data_texture_rgb(new_data_tex, default_value_v3);\n }\n }\n\n add_object_uniform_v4(uniform_name, default_value_v4)\n {\n const src_tex = this.__create_rgba_texture(this.batch_width);\n const dst_tex = this.__create_rgba_texture(this.batch_width);\n const one_pixel_tex = this.__create_rgba_texture(1);\n\n const new_data_tex = this.__add_data_texture(uniform_name, src_tex, dst_tex, one_pixel_tex);\n\n if (default_value_v4)\n {\n this.__flood_data_texture_rgba(new_data_tex, default_value_v4);\n }\n }\n\n add_object_uniform_v4_float(uniform_name, default_value_v4)\n {\n const src_tex = this.__create_rgba_float_texture(this.batch_width);\n const dst_tex = this.__create_rgba_float_texture(this.batch_width);\n const one_pixel_tex = this.__create_rgba_float_texture(1);\n\n const new_data_tex = this.__add_data_texture(uniform_name, src_tex, dst_tex, one_pixel_tex);\n\n if (default_value_v4)\n {\n this.__flood_data_texture_rgba(new_data_tex, default_value_v4);\n }\n }\n\n set_object_uniform_v3(object_name, uniform_name, vector3, use_r, use_g, use_b)\n {\n const obj_index = this.__get_object_index(object_name);\n const data_texture = this.__get_data_texture(uniform_name);\n\n this.__set_pixel_rgb(data_texture.src, obj_index, vector3, use_r, use_g, use_b);\n this.__set_pixel_rgb(data_texture.one_pixel, 0, vector3, use_r, use_g, use_b);\n\n data_texture.last_accessed_index = obj_index;\n\n data_texture.dirty_count++;\n }\n\n set_object_uniform_v4(object_name, uniform_name, vector4, use_r, use_g, use_b, use_a)\n {\n const obj_index = this.__get_object_index(object_name);\n const data_texture = this.__get_data_texture(uniform_name);\n\n this.__set_pixel_rgba(data_texture.src, obj_index, vector4, use_r, use_g, use_b, use_a);\n this.__set_pixel_rgba(data_texture.one_pixel, 0, vector4, use_r, use_g, use_b, use_a);\n data_texture.last_accessed_index = obj_index;\n\n data_texture.dirty_count++;\n }\n\n upload_texture_data(renderer, upload_budget)\n {\n for (let i = 0; i < this.data_textures.length; i++)\n {\n if (upload_budget > 0 && this.data_textures[i].dirty_count > 0)\n {\n if (this.data_textures[i].dirty_count === 1)\n {\n this.__partial_texture_data_upload(renderer, this.data_textures[i]);\n }\n if (this.data_textures[i].dirty_count > 1)\n {\n this.__full_texture_data_upload(renderer, this.data_textures[i]);\n }\n\n this.data_textures[i].dirty_count = 0;\n\n upload_budget--;\n }\n }\n }\n\n get_uniform_dirty_count()\n {\n this.uniform_dirty_count = 0;\n for (let i = 0; i < this.data_textures.length; i++)\n {\n if (this.data_textures[i].dirty_count > 0)\n {\n this.uniform_dirty_count++;\n }\n }\n return this.uniform_dirty_count;\n }\n\n __full_texture_data_upload(renderer, texture_data)\n {\n // console.log(\"full texture update of\"+ texture_data.name);\n texture_data.dst.needsUpdate = true;\n renderer.copyTextureToTexture(\n this.zero_offset,\n texture_data.src,\n texture_data.dst\n );\n }\n\n __partial_texture_data_upload(renderer, texture_data)\n {\n // console.log(\"partial texture update\"+ texture_data.name);\n const index = texture_data.last_accessed_index;\n if (index === -1)\n {\n return;\n }\n\n this.write_offset.y = Math.floor(index / this.batch_width);\n this.write_offset.x = index - this.batch_width * this.write_offset.y;\n renderer.copyTextureToTexture(\n this.write_offset,\n texture_data.one_pixel,\n texture_data.dst\n );\n }\n\n get_mesh()\n {\n return new Mesh(this.geometry, this.material);\n }\n\n __set_pixel_rgb(data_texture, index, vector3, use_r, use_g, use_b)\n {\n if (use_r)\n {\n data_texture.image.data[index * 3 + 0] = vector3.x;\n }\n if (use_g)\n {\n data_texture.image.data[index * 3 + 1] = vector3.y;\n }\n if (use_b)\n {\n data_texture.image.data[index * 3 + 2] = vector3.z;\n }\n }\n\n __set_pixel_rgba(data_texture, index, vector4, use_r, use_g, use_b, use_a)\n {\n if (use_r)\n {\n data_texture.image.data[index * 4 + 0] = vector4.x;\n }\n if (use_g)\n {\n data_texture.image.data[index * 4 + 1] = vector4.y;\n }\n if (use_b)\n {\n data_texture.image.data[index * 4 + 2] = vector4.z;\n }\n if (use_a)\n {\n data_texture.image.data[index * 4 + 3] = vector4.w;\n }\n }\n\n __flood_data_texture_rgb(data_texture, v3)\n {\n for (let i = 0; i < this.batch_width * this.batch_width; i++)\n {\n this.__set_pixel_rgb(data_texture.src, i, v3, true, true, true);\n data_texture.dirty_count++;\n }\n }\n\n __flood_data_texture_rgba(data_texture, v4)\n {\n for (let i = 0; i < this.batch_width * this.batch_width; i++)\n {\n this.__set_pixel_rgba(data_texture.src, i, v4, true, true, true, true);\n data_texture.dirty_count++;\n }\n }\n\n __create_rgb_texture(width)\n {\n const data = new Uint8Array(3 * width * width);\n return new DataTexture(data, width, width, RGBFormat);\n }\n\n __create_rgba_texture(width)\n {\n const data = new Uint8Array(4 * width * width);\n return new DataTexture(data, width, width, RGBAFormat);\n }\n\n __create_rgba_float_texture(width)\n {\n const data = new Float32Array(4 * width * width);\n return new DataTexture(data, width, width, RGBAFormat, FloatType);\n }\n\n __get_data_texture(uniform_name)\n {\n for (let i = 0; i < this.data_textures.length; i++)\n {\n if (this.data_textures[i].name === uniform_name)\n {\n return this.data_textures[i];\n }\n }\n console.error('Data texture ' + uniform_name + ' does not exist');\n return undefined;\n }\n\n __get_object_index(name)\n {\n for (let i = 0; i < this.object_names.length; i++)\n {\n if (this.object_names[i] === name)\n {\n return i;\n }\n }\n console.error('the name ' + name + ' is not contained in this batch');\n return undefined;\n }\n\n __add_data_texture(uniform_name, src_texture, dst_texture, one_pixel_text)\n {\n dst_texture.needsUpdate = true;\n\n this.data_textures.push({\n name: uniform_name,\n src: src_texture,\n dst: dst_texture,\n one_pixel: one_pixel_text,\n last_accessed_index: -1,\n dirty_count: 0\n });\n\n this.uniforms[uniform_name] = { value: dst_texture };\n return this.data_textures[this.data_textures.length - 1];\n }\n\n dispose()\n {\n for (let i = 0; i < this.data_textures.length; i++)\n {\n this.data_textures[i].src.dispose();\n this.data_textures[i].dst.dispose();\n this.data_textures[i].one_pixel.dispose();\n }\n }\n}\n\nexport { GeometryBatch };\n","import { GeometryBatch } from './GeometryBatch';\n\nimport * as BufferGeometryUtils from 'three/examples/jsm/utils/BufferGeometryUtils.js';\n\nimport { BufferAttribute } from 'three';\nimport { OMath } from '../utilities/OMath';\n\nclass GeometryBatcher\n{\n init()\n {\n this.batches = [];\n }\n\n batch(buffer_geometries)\n {\n const attr_accessor_uvs = [];\n const texture_width = OMath.ceilPowerOfTwo(Math.sqrt(buffer_geometries.length));\n // console.log(\"Store count: \" + buffer_geometries.length + \", Texture size: \" +texture_width);\n\n this.__init_uv_array(attr_accessor_uvs, texture_width);\n\n let uv_index = 0;\n\n for (let i = 0; i < buffer_geometries.length; i++)\n {\n const vertex_count = buffer_geometries[i].getAttribute('position').count;\n const y = Math.floor(i / texture_width);\n const x = i - texture_width * y;\n for (let count = 0; count < vertex_count; count++)\n {\n attr_accessor_uvs[uv_index] = (x / texture_width) + 0.5 / texture_width;\n attr_accessor_uvs[uv_index + 1] = (y / texture_width) + 0.5 / texture_width;\n uv_index += 2;\n }\n }\n\n const buffer_attribute = new BufferAttribute(new Float32Array(attr_accessor_uvs), 2);\n const buffer_geometry = BufferGeometryUtils.mergeBufferGeometries(buffer_geometries);\n buffer_geometry.setAttribute('attr_accessor_uv', buffer_attribute);\n\n this.batches.push(new GeometryBatch(buffer_geometry, texture_width));\n return this.batches[this.batches.length - 1];\n }\n\n upload_texture_data(renderer)\n {\n for (let i = 0; i < this.batches.length; i++)\n {\n this.batches[i].upload_texture_data(renderer, 1);\n }\n }\n\n __init_uv_array(uvs, texture_width)\n {\n for (let i = 0; i < texture_width * texture_width * 2; i++)\n {\n uvs.push(0);\n }\n }\n}\n\nconst geometry_batcher = new GeometryBatcher();\nexport { geometry_batcher as GeometryBatcher };\n","import { CameraManager } from './CameraManager';\nimport { Graphics } from './Graphics';\n\nimport { Vector2 } from 'three';\nimport { Scene } from 'three';\nimport { OrthographicCamera } from 'three';\n\nclass UI\n{\n init(input)\n {\n this.input = input;\n this.ui_elements = [];\n this._tmp_normalized_pos = new Vector2();\n this.ss_scene = new Scene();\n this.ss_scene.matrixWorldAutoUpdate = false;\n this.ss_scene.frustumCulled = false;\n\n this.ws_scene = new Scene();\n this.ws_scene.matrixWorldAutoUpdate = false;\n this.ws_scene.frustumCulled = false;\n\n this.ss_camera = new OrthographicCamera(-1, 1, 1, -1, -100, 100);\n }\n\n delete_element(elem)\n {\n const index = this.ui_elements.indexOf(elem);\n if (index > -1)\n {\n this.ui_elements.splice(index, 1);\n }\n\n this.ss_scene.remove(elem);\n this.ws_scene.remove(elem);\n\n elem.dispose();\n }\n\n add_screen_space_element(elem)\n {\n this.ui_elements.push(elem);\n this.ss_scene.add(elem);\n\n elem.set_screen_space_coordinate_system();\n }\n\n add_world_space_element(elem)\n {\n this.ui_elements.push(elem);\n this.ws_scene.add(elem);\n\n elem.set_world_space_coordinate_system();\n }\n\n update()\n {\n // this.ss_camera.left = -OScreen.width / 2;\n // this.ss_camera.right = OScreen.width / 2;\n // this.ss_camera.top = OScreen.top / 2;\n // this.ss_camera.right = -OScreen.bottom / 2;\n this.ss_camera.updateProjectionMatrix();\n\n this._tmp_normalized_pos.copy(this.input.NDC);\n for (let i = 0; i < this.ui_elements.length; i++)\n {\n this.ui_elements[i].update_state(this._tmp_normalized_pos);\n }\n }\n\n render(renderer)\n {\n // renderer.render_ui(this.scene);\n if (this.ss_scene.children.length > 0)\n {\n Graphics.render(this.ss_scene, this.ss_camera);\n }\n if (this.ws_scene.children.length > 0)\n {\n Graphics.render(this.ws_scene, CameraManager.current);\n }\n }\n\n clear()\n {\n this.current_clicked_element = undefined;\n }\n}\n\nconst ui = new UI();\nexport { ui as UI };\n","import { Vector3, Plane, Quaternion, Sphere, Line3 } from 'three';\nimport { OMath } from './OMath';\n\nclass PerspectiveFrustumPointFitter\n{\n constructor()\n {\n this.sphere = new Sphere();\n }\n\n fit_points(points, camera_quaternion, vertical_fov, aspect)\n {\n this.sphere.setFromPoints(points);\n\n const v_fov = OMath.degToRad(vertical_fov / 2);\n const h_fov = (2 * Math.atan(Math.tan(v_fov) * aspect)) / 2;\n\n const up_plane_normal = this.get_up_plane_normal(camera_quaternion, v_fov);\n const down_plane_normal = this.get_down_plane_normal(camera_quaternion, v_fov);\n const left_plane_normal = this.get_left_plane_normal(camera_quaternion, h_fov);\n const right_plane_normal = this.get_right_plane_normal(camera_quaternion, h_fov);\n\n const camera_forward_dir = new Vector3(0, 0, -1).applyQuaternion(camera_quaternion);\n\n const sphere_center = this.sphere.center.clone();\n\n const pull_back_distance = this.get_distance_to_fit_rect(this.sphere.radius * 2, this.sphere.radius * 2, vertical_fov, aspect);\n const far_pos = sphere_center.clone().add(camera_forward_dir.clone().multiplyScalar(pull_back_distance * -1));\n\n const up_plane = new Plane().setFromNormalAndCoplanarPoint(up_plane_normal, far_pos);\n const down_plane = new Plane().setFromNormalAndCoplanarPoint(down_plane_normal, far_pos);\n\n const left_plane = new Plane().setFromNormalAndCoplanarPoint(left_plane_normal, far_pos);\n const right_plane = new Plane().setFromNormalAndCoplanarPoint(right_plane_normal, far_pos);\n\n this.apply_center_correction_to_pos(far_pos, points, camera_quaternion, up_plane, down_plane, left_plane, right_plane);\n\n up_plane.setFromNormalAndCoplanarPoint(up_plane_normal, far_pos);\n down_plane.setFromNormalAndCoplanarPoint(down_plane_normal, far_pos);\n\n left_plane.setFromNormalAndCoplanarPoint(left_plane_normal, far_pos);\n right_plane.setFromNormalAndCoplanarPoint(right_plane_normal, far_pos);\n\n let closest_distance = Infinity;\n\n const inverse_dir = camera_forward_dir.clone().multiplyScalar(pull_back_distance * -2);\n for (let i = 0; i < points.length; i++)\n {\n const line = new Line3(points[i].clone(), points[i].clone().add(inverse_dir));\n\n const up_line_intersection = new Vector3();\n const down_line_intersection = new Vector3();\n\n const left_line_intersection = new Vector3();\n const right_line_intersection = new Vector3();\n\n up_plane.intersectLine(line, up_line_intersection);\n down_plane.intersectLine(line, down_line_intersection);\n\n left_plane.intersectLine(line, left_line_intersection);\n right_plane.intersectLine(line, right_line_intersection);\n\n if (up_line_intersection.length() < 0.0001)\n {\n console.log('up intersection not found', i);\n }\n if (down_line_intersection.length() < 0.0001)\n {\n console.log('down intersection not found', i);\n }\n if (left_line_intersection.length() < 0.0001)\n {\n console.log('left intersection not found', i);\n }\n if (right_line_intersection.length() < 0.0001)\n {\n console.log('right intersection not found', i);\n }\n\n const new_up_distance = points[i].clone().sub(up_line_intersection).length();\n const new_down_distance = points[i].clone().sub(down_line_intersection).length();\n\n const new_left_distance = points[i].clone().sub(left_line_intersection).length();\n const new_right_distance = points[i].clone().sub(right_line_intersection).length();\n\n const vertical_min = Math.min(new_up_distance, new_down_distance);\n const horizontal_min = Math.min(new_left_distance, new_right_distance);\n\n const min = Math.min(vertical_min, horizontal_min);\n\n if (min < closest_distance)\n {\n closest_distance = min;\n }\n }\n\n const forward_correction = camera_forward_dir.clone().multiplyScalar(closest_distance);\n const closest_position = far_pos.clone().add(forward_correction);\n\n return closest_position;\n }\n\n apply_center_correction_to_pos(target_pos, points, camera_quaternion, up_plane, down_plane, left_plane, right_plane)\n {\n const vertical_offset = this.get_vertical_correction(points, down_plane, up_plane, camera_quaternion);\n const horizontal_offset = this.get_horizontal_correction(points, left_plane, right_plane, camera_quaternion);\n\n target_pos.add(vertical_offset);\n target_pos.add(horizontal_offset);\n }\n\n get_vertical_correction(points, down_plane, up_plane, camera_quaternion)\n {\n let closest_distance_to_up_plane = Infinity;\n let closest_distance_to_down_plane = Infinity;\n // let closest_up_point = undefined;\n // let closest_down_point = undefined;\n\n const up_dir = new Vector3(0, 1, 0).applyQuaternion(camera_quaternion);\n for (let i = 0; i < points.length; i++)\n {\n const down_line = new Line3(points[i].clone(), points[i].clone().add(up_dir.clone().multiplyScalar(-5000000)));\n const up_line = new Line3(points[i].clone(), points[i].clone().add(up_dir.clone().multiplyScalar(5000000)));\n\n const down_line_intersection = new Vector3();\n const up_line_intersection = new Vector3();\n\n down_plane.intersectLine(down_line, down_line_intersection);\n up_plane.intersectLine(up_line, up_line_intersection);\n\n const down_dist = down_line_intersection.distanceTo(points[i]);\n const up_dist = up_line_intersection.distanceTo(points[i]);\n\n if (up_line_intersection.length() < 0.0001)\n {\n console.log('vertical up intersection not found', i);\n }\n if (down_line_intersection.length() < 0.0001)\n {\n console.log('vertical down intersection not found', i);\n }\n\n if (down_dist < closest_distance_to_down_plane)\n {\n closest_distance_to_down_plane = down_dist;\n // closest_down_point = points[i];\n }\n if (up_dist < closest_distance_to_up_plane)\n {\n closest_distance_to_up_plane = up_dist;\n // closest_up_point = points[i];\n }\n }\n\n const correction = (closest_distance_to_up_plane - closest_distance_to_down_plane) / 2;\n\n // console.log(\"vertical_correction\", correction)\n return up_dir.clone().multiplyScalar(-correction);\n }\n\n get_horizontal_correction(points, left_plane, right_plane, camera_quaternion)\n {\n let closest_distance_to_right_plane = Infinity;\n let closest_distance_to_left_plane = Infinity;\n // let closest_right_point = undefined;\n // let closest_left_point = undefined;\n\n const right_dir = new Vector3(1, 0, 0).applyQuaternion(camera_quaternion);\n\n for (let i = 0; i < points.length; i++)\n {\n const left_line = new Line3(points[i].clone(), points[i].clone().add(right_dir.clone().multiplyScalar(-5000000)));\n const right_line = new Line3(points[i].clone(), points[i].clone().add(right_dir.clone().multiplyScalar(5000000)));\n\n const left_line_intersection = new Vector3();\n const right_line_intersection = new Vector3();\n\n left_plane.intersectLine(left_line, left_line_intersection);\n right_plane.intersectLine(right_line, right_line_intersection);\n\n const left_dist = left_line_intersection.distanceTo(points[i]);\n const right_dist = right_line_intersection.distanceTo(points[i]);\n\n if (left_line_intersection.length() < 0.0001)\n {\n console.log('left intersection not found', i);\n }\n if (right_line_intersection.length() < 0.0001)\n {\n console.log('right intersection not found', i);\n }\n\n if (left_dist < closest_distance_to_left_plane)\n {\n closest_distance_to_left_plane = left_dist;\n // closest_left_point = points[i];\n }\n if (right_dist < closest_distance_to_right_plane)\n {\n closest_distance_to_right_plane = right_dist;\n // closest_right_point = points[i];\n }\n }\n\n const correction = (closest_distance_to_right_plane - closest_distance_to_left_plane) / 2;\n // console.log(\"horizontal_correction\", correction)\n\n return right_dir.clone().multiplyScalar(-correction);\n }\n\n get_up_plane_normal(camera_quaternion, v_fov)\n {\n const up_plane_normal = new Vector3(0, -1, 0);\n up_plane_normal.applyQuaternion(new Quaternion().setFromAxisAngle(new Vector3(1, 0, 0), v_fov));\n up_plane_normal.applyQuaternion(camera_quaternion);\n return up_plane_normal;\n }\n\n get_down_plane_normal(camera_quaternion, v_fov)\n {\n const down_plane_normal = new Vector3(0, 1, 0);\n down_plane_normal.applyQuaternion(new Quaternion().setFromAxisAngle(new Vector3(1, 0, 0), -v_fov));\n down_plane_normal.applyQuaternion(camera_quaternion);\n return down_plane_normal;\n }\n\n get_left_plane_normal(camera_quaternion, h_fov)\n {\n const left_plane_normal = new Vector3(1, 0, 0);\n left_plane_normal.applyQuaternion(new Quaternion().setFromAxisAngle(new Vector3(0, 1, 0), h_fov));\n left_plane_normal.applyQuaternion(camera_quaternion);\n return left_plane_normal;\n }\n\n get_right_plane_normal(camera_quaternion, h_fov)\n {\n const right_plane_normal = new Vector3(-1, 0, 0);\n right_plane_normal.applyQuaternion(new Quaternion().setFromAxisAngle(new Vector3(0, 1, 0), -h_fov));\n right_plane_normal.applyQuaternion(camera_quaternion);\n return right_plane_normal;\n }\n\n get_distance_to_fit_rect(width, height, vertical_fov, aspect)\n {\n const v_fov = (vertical_fov / 2) * Math.PI / 180;\n const h_fov = (2 * Math.atan(Math.tan(v_fov) * aspect)) / 2;\n\n const distV = height / Math.tan(v_fov);\n const distH = width / Math.tan(h_fov);\n return Math.max(Math.abs(distH), Math.abs(distV));\n }\n}\n\nexport { PerspectiveFrustumPointFitter };\n","import { Vector3, Box3 } from 'three';\n\nclass OrthographicFrustumPointFitter\n{\n constructor()\n {\n\n }\n\n fit_points(points, camera_quaternion, vertical_fov, aspect)\n {\n const inverse_camera_quat = camera_quaternion.clone().inverse();\n\n const inverted_points = [];\n\n for (let i = 0; i < points.length; i++)\n {\n inverted_points.push(points[i].clone().applyQuaternion(inverse_camera_quat));\n }\n\n const box = new Box3().setFromPoints(inverted_points);\n const size = new Vector3();\n box.getSize(size);\n\n const distance = this.get_distance_to_fit_rect(size.x / 2, size.y / 2, vertical_fov, aspect);\n\n const center = new Vector3();\n box.getCenter(center);\n\n center.applyQuaternion(camera_quaternion);\n\n return {\n center: center,\n distance_to_center: distance\n };\n }\n\n get_distance_to_fit_rect(width, height, vertical_fov, aspect)\n {\n const v_fov = (vertical_fov / 2) * Math.PI / 180;\n const h_fov = (2 * Math.atan(Math.tan(v_fov) * aspect)) / 2;\n\n const distV = height / Math.tan(v_fov);\n const distH = width / Math.tan(h_fov);\n return Math.max(Math.abs(distH), Math.abs(distV));\n }\n}\n\nexport { OrthographicFrustumPointFitter };\n","import { CameraManager } from '../CameraManager';\nimport { OMath } from '../utilities/OMath';\nimport { OScreen } from '../OScreen';\n\nimport { Vector3 } from 'three';\nimport { Matrix4 } from 'three';\nimport { Plane } from 'three';\nimport { Ray } from 'three';\nimport { Sphere } from 'three';\nimport { Box3 } from 'three';\nimport { PerspectiveFrustumPointFitter } from './PerspectiveFrustumPointFitter';\nimport { OrthographicFrustumPointFitter } from './OrthographicFrustumPointFitter';\n\nclass CameraUtilities\n{\n init(input)\n {\n this.tmp_mat = new Matrix4();\n this.plane = new Plane();\n this.ray = new Ray();\n\n this.tmp_size = new Vector3();\n this.tmp_unproj = new Vector3();\n\n this.input = input;\n }\n\n get_up_dir(camera)\n {\n camera = camera || CameraManager.current;\n const tmp_vec = new Vector3();\n\n tmp_vec.set(0, 1, 0);\n tmp_vec.applyQuaternion(camera.quaternion);\n\n return tmp_vec;\n }\n\n get_forward_dir(camera)\n {\n camera = camera || CameraManager.current;\n const tmp_vec = new Vector3();\n\n tmp_vec.set(0, 0, -1);\n tmp_vec.applyQuaternion(camera.quaternion);\n\n return tmp_vec;\n }\n\n get_right_dir(camera)\n {\n camera = camera || CameraManager.current;\n const tmp_vec = new Vector3();\n\n tmp_vec.set(1, 0, 0);\n tmp_vec.applyQuaternion(camera.quaternion);\n return tmp_vec;\n }\n\n unproject_mouse_position(NDC, camera)\n {\n camera = camera || CameraManager.current;\n const tmp_vec = new Vector3();\n\n const v_fov = (camera.fov / 2) * Math.PI / 180;\n const h_fov = (2 * Math.atan(Math.tan(v_fov) * camera.aspect)) / 2;\n\n const distV = Math.tan(v_fov) * camera.far;\n const distH = Math.tan(h_fov) * camera.far;\n\n tmp_vec.set(distH * NDC.x, distV * NDC.y, -camera.far).normalize();\n\n return tmp_vec.applyQuaternion(camera.quaternion);\n }\n\n get_plane_intersection(plane_position, plane_normal, NDC, camera)\n {\n camera = camera || CameraManager.current;\n NDC = NDC || this.input.NDC;\n\n const tmp_vec = new Vector3();\n\n this.plane.setFromNormalAndCoplanarPoint(plane_normal || this.get_forward_dir(camera), plane_position);\n if (camera.isPerspectiveCamera)\n {\n this.ray.set(camera.position, this.unproject_mouse_position(NDC, camera));\n }\n else\n {\n this.tmp_unproj.set(NDC.x, NDC.y, 1).unproject(camera);\n this.ray.set(camera.position, this.tmp_unproj);\n }\n\n this.ray.intersectPlane(this.plane, tmp_vec);\n return tmp_vec;\n }\n\n fit_points_on_camera(points, zoom_scale = 1)\n {\n const points_sphere = new Sphere().setFromPoints(points);\n const world_space_center = points_sphere.center;\n const camera_forward = this.get_forward_dir(CameraManager.current).clone();\n\n const plane = new Plane().setFromNormalAndCoplanarPoint(camera_forward, world_space_center);\n\n const points_on_plane = OMath.project_points_on_plane(points, plane);\n\n const projected_points_center = new Vector3();\n let box = new Box3().setFromPoints(points_on_plane);\n box.getCenter(projected_points_center);\n\n const up = new Vector3(0, 1, 0).applyQuaternion(CameraManager.current.quaternion);\n const right = up.clone().cross(camera_forward).normalize();\n const mat = new Matrix4().set(right.x, up.x, camera_forward.x, world_space_center.x,\n right.y, up.y, camera_forward.y, world_space_center.y,\n right.z, up.z, camera_forward.z, world_space_center.z,\n 0, 0, 0, 1);\n\n const inverse_mat = new Matrix4().getInverse(mat);\n for (let i = 0; i < points_on_plane.length; i++)\n {\n points_on_plane[i].applyMatrix4(inverse_mat);\n }\n\n const size = new Vector3();\n box = new Box3().setFromPoints(points_on_plane);\n box.getSize(size);\n size.multiplyScalar(zoom_scale);\n const projected_center = new Vector3();\n box.getCenter(projected_center);\n\n return {\n position: projected_points_center,\n zoom: this.get_zoom_to_fit_rect(size.x / 2, size.y / 2)\n };\n }\n\n get_zoom_to_fit_rect(width, height)\n {\n const v_fov = (CameraManager.current.fov / 2) * Math.PI / 180;\n const h_fov = (2 * Math.atan(Math.tan(v_fov) * CameraManager.current.aspect)) / 2;\n\n const distV = height / Math.tan(v_fov);\n const distH = width / Math.tan(h_fov);\n\n return Math.max(Math.abs(distH), Math.abs(distV));\n }\n\n get_zoom_to_fit_box(bb, camera)\n {\n if (camera.isOrthographicCamera)\n {\n bb.getSize(this.tmp_size);\n\n const obj_x = this.tmp_size.x;\n const obj_y = this.tmp_size.y;\n const object_aspect = obj_x / obj_y;\n if (OScreen.aspect_ratio / object_aspect > 1)\n {\n return OScreen.height / obj_y;\n }\n else\n {\n return OScreen.width / obj_x;\n }\n }\n else\n {\n // return this.fit_points_on_camera([bb.min, bb.max], 1).zoom;\n const size = new Vector3();\n bb.getSize(size);\n return this.get_zoom_to_fit_rect(size.x, size.y);\n }\n }\n\n get_html_screen_pos(object, camera)\n {\n camera = camera || CameraManager.current;\n const tmp_vec = new Vector3();\n\n object.getWorldPosition(tmp_vec);\n tmp_vec.project(camera);\n\n tmp_vec.x = (tmp_vec.x * 0.5 + 0.5) * (OScreen.width);\n tmp_vec.y = (1 - (tmp_vec.y * 0.5 + 0.5)) * OScreen.height;\n return tmp_vec;\n }\n\n world_pos_to_screen(pos, camera)\n {\n camera = camera || CameraManager.current;\n const tmp_vec = new Vector3();\n\n tmp_vec.copy(pos);\n tmp_vec.project(camera);\n\n tmp_vec.x = (tmp_vec.x * 0.5 + 0.5) * (OScreen.width);\n tmp_vec.y = (1 - (tmp_vec.y * 0.5 + 0.5)) * OScreen.height;\n return tmp_vec;\n }\n\n update_projection(camera)\n {\n camera.left = -OScreen.width / 2;\n camera.right = OScreen.width / 2;\n camera.top = OScreen.height / 2;\n camera.bottom = -OScreen.height / 2;\n camera.aspect = OScreen.aspect_ratio;\n camera.updateProjectionMatrix(true);\n }\n\n fit_bounding_box_points(camera, bb, scale = 1)\n {\n const dir = new Vector3();\n dir.copy(bb.max).sub(bb.min);\n\n const p1 = bb.min.clone();\n\n const p2 = p1.clone().add(new Vector3(dir.x, 0, 0));\n const p3 = p1.clone().add(new Vector3(0, dir.y, 0));\n const p4 = p1.clone().add(new Vector3(0, 0, dir.z));\n\n const p5 = p1.clone().add(new Vector3(dir.x, 0, dir.z));\n const p6 = p1.clone().add(new Vector3(0, dir.y, dir.z));\n const p7 = bb.max.clone();\n const p8 = p1.clone().add(new Vector3(dir.x, dir.y, 0));\n return this.fit_points(camera, [p1, p2, p3, p4, p5, p6, p7, p8], scale);\n }\n\n fit_points(camera, points, zoom_scale = 1)\n {\n if (camera.isPerspectiveCamera)\n {\n const camera_forward_dir = new Vector3(0, 0, -1).applyQuaternion(camera.quaternion);\n const camera_backward_dir = camera_forward_dir.clone().multiplyScalar(-1);\n\n const fitter = new PerspectiveFrustumPointFitter();\n\n const aspect_ratio = OScreen.aspect_ratio;\n\n const camera_pos = fitter.fit_points(points, camera.quaternion, camera.fov * zoom_scale, aspect_ratio);\n const box = new Box3().setFromPoints(points);\n const center = new Vector3();\n box.getCenter(center);\n\n const reference_position_plane = new Plane().setFromNormalAndCoplanarPoint(camera_backward_dir, center);\n\n const camera_ray = new Ray(camera_pos, camera_forward_dir);\n\n const reference_position = new Vector3();\n camera_ray.intersectPlane(reference_position_plane, reference_position);\n\n const zoom = camera_pos.distanceTo(reference_position);\n\n return {\n zoom: zoom,\n reference_position: reference_position,\n camera_position: camera_pos\n };\n }\n else\n {\n const fitter = new OrthographicFrustumPointFitter();\n const result = fitter.fit_points(points, this.reference_rotation, camera.fov * zoom_scale, OScreen.aspect_ratio);\n\n this.reference_position.copy(result.center);\n this.reference_zoom = result.distance_to_center;\n\n const forward = new Vector3(0, 0, 1).applyQuaternion(camera.quaternion);\n return {\n zoom: result.distance_to_center,\n reference_position: result.center,\n camera_position: forward.multiplyScalar(result.distance_to_center)\n };\n }\n }\n}\n\nconst camera_utilities = new CameraUtilities();\nexport { camera_utilities as CameraUtilities };\n","import { Browser } from './Browser';\nimport { CameraManager } from './CameraManager';\nimport { Capabilities } from './Capabilities';\nimport { Configuration } from './Configuration';\nimport { Debug } from './Debug';\nimport { EventManager } from './EventManager';\nimport { Graphics } from './Graphics';\nimport { OS } from './OS';\nimport { OScreen } from './OScreen';\nimport { ReflectionPlaneContext } from './ReflectionPlaneContext';\nimport { ResourceContainer } from './ResourceContainer';\nimport { SceneManager } from './SceneManager';\nimport { GeometryBatcher } from './static_batcher/GeometryBatcher';\nimport { Time } from './Time';\nimport { UI } from './UI';\nimport { CameraUtilities } from './utilities/CameraUtilities';\n\nclass Initializer\n{\n constructor()\n {\n }\n\n init(input)\n {\n CameraManager.init();\n CameraUtilities.init(input);\n Capabilities.init();\n Configuration.init();\n EventManager.init();\n GeometryBatcher.init();\n\n OS.init();\n Browser.init();\n ReflectionPlaneContext.init();\n ResourceContainer.init();\n SceneManager.init();\n OScreen.init();\n Time.init();\n UI.init(input);\n\n Debug.init();\n }\n\n dispose(render_loop)\n {\n Graphics.dispose();\n SceneManager.dispose();\n\n render_loop.dispose();\n }\n}\n\nconst initializer = new Initializer();\nexport { initializer as Initializer };\n","import { BlitMaterial } from '../materials/BlitMaterial';\n\nimport frag from '../shaders/ssao/ssao.frag';\nimport vert from '../shaders/ssao/ssao.vert';\n\nimport { Matrix4 } from 'three';\nimport { Vector3 } from 'three';\nimport { DataTexture } from 'three';\nimport { RGBFormat } from 'three';\nimport { RepeatWrapping } from 'three';\n\nimport { OMath } from '../utilities/OMath';\nclass SSAOMaterial extends BlitMaterial\n{\n constructor()\n {\n super(frag, vert);\n\n this.uniforms._InverseProjMatrix = { value: new Matrix4() };\n this.uniforms._ProjectionMatrix = { value: new Matrix4() };\n\n this.uniforms._Bias = { value: 0.0125 };\n this.uniforms._Radius = { value: 0.3 };\n this.uniforms._FarPlane = { value: 100 };\n\n this.uniforms._SampleKernel = { value: this.__get_sample_kernel() };\n this.uniforms._RandomRotation = { value: this.__get_rotation_kernel() };\n }\n\n __get_sample_kernel()\n {\n const sample_kernel = [];\n const kernel_size = 64;\n\n for (let i = 0; i < kernel_size; i++)\n {\n const dir = new Vector3(Math.random() * 2 - 1,\n Math.random() * 2 - 1,\n Math.random());\n dir.normalize();\n let scale = i / kernel_size;\n scale = OMath.lerp(0.1, 1.0, scale * scale);\n dir.multiplyScalar(scale);\n\n sample_kernel.push(dir);\n }\n return sample_kernel;\n }\n\n __get_rotation_kernel()\n {\n const rotation_kernel = new Uint8Array(3 * 16);\n for (let i = 0; i < 16; i++)\n {\n rotation_kernel[i * 3 + 1] = Math.floor(Math.random() * 255);\n rotation_kernel[i * 3 + 2] = Math.floor(Math.random() * 255);\n rotation_kernel[i * 3 + 3] = 0;\n }\n\n const rotation_texture = new DataTexture(rotation_kernel, 4, 4, RGBFormat);\n rotation_texture.wrapS = RepeatWrapping;\n rotation_texture.wrapT = RepeatWrapping;\n\n rotation_texture.needsUpdate = true;\n return rotation_texture;\n }\n}\n\nexport { SSAOMaterial };\n","import { BlitMaterial } from '../materials/BlitMaterial';\n\nimport frag from '../shaders/ssao/ssao_compose.frag';\n\nclass SSAOComposeMaterial extends BlitMaterial\n{\n constructor()\n {\n super(frag);\n this.uniforms._AO = { value: undefined };\n }\n}\n\nexport { SSAOComposeMaterial };\n","import { BlitMaterial } from '../materials/BlitMaterial';\n\nimport frag from '../shaders/depth_normals/debug_normals.frag';\nimport depth_normals_vert from '../shaders/ssao/ssao.vert';\n\nimport { Matrix4 } from 'three';\n\nclass DisplayNormalTextureMaterial extends BlitMaterial\n{\n constructor()\n {\n super(frag, depth_normals_vert);\n this.uniforms._FarPlane = { value: 1 };\n this.uniforms._InverseProjMatrix = { value: new Matrix4() };\n }\n}\n\nexport { DisplayNormalTextureMaterial };\n","import { BlitMaterial } from '../materials/BlitMaterial';\n\nimport frag from '../shaders/box_blur/box_blur.frag';\n\nimport { Vector2 } from 'three';\n\nclass BoxBlurMaterial extends BlitMaterial\n{\n constructor()\n {\n super(frag);\n this.uniforms._SampleDir = { value: new Vector2() };\n }\n}\n\nexport { BoxBlurMaterial };\n","import { BoxBlurMaterial } from '../materials/BoxBlurMaterial';\nimport { Graphics } from '../Graphics';\n\nimport { WebGLRenderTarget } from 'three';\n\nclass Blurrer\n{\n constructor(renderer)\n {\n this.RT1 = new WebGLRenderTarget(1, 1);\n this.RT2 = new WebGLRenderTarget(1, 1);\n this.box_blur_mat = new BoxBlurMaterial();\n }\n\n blur(RT)\n {\n if (RT.width !== this.RT1.width || RT.height !== this.RT1.height)\n {\n this.RT1.setSize(RT.width, RT.height);\n this.RT2.setSize(RT.width, RT.height);\n }\n\n this.box_blur_mat.uniforms._SampleDir.value.set(1, 0);\n Graphics.blit(RT, this.RT1, this.box_blur_mat);\n this.box_blur_mat.uniforms._SampleDir.value.set(0, 1);\n Graphics.blit(this.RT1, RT, this.box_blur_mat);\n // return this.RT2;\n }\n}\n\nexport { Blurrer };\n","import { CameraManager } from '../CameraManager';\nimport { SceneManager } from '../SceneManager';\nimport { OScreen } from '../OScreen';\nimport { BaseRender } from '../render_mode/BaseRender';\nimport { Configuration } from '../Configuration';\nimport { SSAOMaterial } from '../materials/SSAOMaterial';\nimport { SSAOComposeMaterial } from '../materials/SSAOComposeMaterial';\nimport { DisplayNormalTextureMaterial } from '../materials/DisplayNormalTextureMaterial';\nimport { Blurrer } from '../render_utilities/Blurrer';\nimport { Graphics } from '../Graphics';\n\nimport { WebGLRenderTarget } from 'three';\n\nclass NormalAORender extends BaseRender\n{\n constructor()\n {\n super();\n\n this.ssao_mat = new SSAOMaterial();\n this.ssao_compose_mat = new SSAOComposeMaterial();\n this.debug_normals = new DisplayNormalTextureMaterial();\n\n this.ssaa = Configuration.use_ssaa ? 2 : 1;\n\n this.main_RT = new WebGLRenderTarget(OScreen.width * this.ssaa, OScreen.height * this.ssaa);\n\n this.SSAO_RT = new WebGLRenderTarget(OScreen.width, OScreen.height);\n\n this.blurrer = new Blurrer();\n Graphics.generateDepthNormalTexture = true;\n }\n\n render()\n {\n this.__check_RT_size();\n\n Graphics.clear(this.main_RT, CameraManager.current, true, false);\n Graphics.render(SceneManager.current, CameraManager.current, this.main_RT);\n\n this.__update_uniforms();\n\n Graphics.blit(Graphics.depth_normals_RT, this.SSAO_RT, this.ssao_mat);\n\n // // BLUR\n this.blurrer.blur(this.SSAO_RT);\n Graphics.blit(this.SSAO_RT, undefined);\n\n // // COMPOSE\n this.ssao_compose_mat.uniforms._AO.value = this.SSAO_RT.texture;\n Graphics.blit(this.main_RT, undefined, this.ssao_compose_mat);\n\n // Graphics.blit(this.SSAO_RT, undefined);\n }\n\n __update_uniforms()\n {\n this.ssao_mat.uniforms._InverseProjMatrix.value.getInverse(CameraManager.current.projectionMatrix);\n this.ssao_mat.uniforms._ProjectionMatrix.value.copy(CameraManager.current.projectionMatrix);\n this.ssao_mat.uniforms._FarPlane.value = CameraManager.current.far;\n }\n\n __check_RT_size()\n {\n if (this.main_RT.width !== OScreen.width * this.ssaa || this.main_RT.height !== OScreen.height * this.ssaa)\n {\n this.main_RT.setSize(OScreen.width * this.ssaa, OScreen.height * this.ssaa);\n this.SSAO_RT.setSize(OScreen.width, OScreen.height);\n }\n }\n}\n\nexport { NormalAORender };\n","import { CameraManager } from '../CameraManager';\nimport { SceneManager } from '../SceneManager';\nimport { BaseRender } from '../render_mode/BaseRender';\nimport { Graphics } from '../Graphics';\n\nclass NormalRender extends BaseRender\n{\n constructor()\n {\n super();\n }\n\n render()\n {\n Graphics.clear(undefined, CameraManager.current, true, true);\n\n if (SceneManager.current.on_pre_render)\n {\n SceneManager.current.on_pre_render();\n }\n\n if (SceneManager.current.render)\n {\n SceneManager.current.render();\n }\n else\n {\n Graphics.render(SceneManager.current, CameraManager.current);\n }\n\n if (SceneManager.current.on_post_render)\n {\n SceneManager.current.on_post_render();\n }\n }\n}\n\nexport { NormalRender };\n","import { CameraManager } from '../CameraManager';\nimport { SceneManager } from '../SceneManager';\nimport { BaseRender } from '../render_mode/BaseRender';\nimport { Graphics } from '../Graphics';\n\nclass VRRender extends BaseRender\n{\n constructor()\n {\n super();\n }\n\n render()\n {\n // Graphics.clear(undefined, CameraManager.current, true, true);\n\n if (SceneManager.current.on_pre_render)\n {\n SceneManager.current.on_pre_render();\n }\n\n if (SceneManager.current.render)\n {\n SceneManager.current.render();\n }\n else\n {\n Graphics.render(SceneManager.current, CameraManager.current, Graphics._renderer.getRenderTarget());\n }\n\n this.render_spectator_camera();\n\n if (SceneManager.current.on_post_render)\n {\n SceneManager.current.on_post_render();\n }\n }\n\n render_spectator_camera()\n {\n const spectator_camera = CameraManager.spectator;\n\n if (spectator_camera && Graphics._renderer.xr.isPresenting)\n {\n // Copy the XR Camera's position and rotation, but use your\n // main camera's projection matrix\n const xrCam = Graphics._renderer.xr.getCamera(CameraManager.current);\n\n spectator_camera.projectionMatrix.copy(CameraManager.current.projectionMatrix);\n\n spectator_camera.position.copy(xrCam.position);\n spectator_camera.quaternion.copy(xrCam.quaternion);\n\n // we'll restore this later\n const currentRenderTarget = Graphics._renderer.getRenderTarget();\n\n // turn off the WebXR rendering\n Graphics._renderer.xr.isPresenting = false;\n\n // render to the canvas on our main display\n Graphics._renderer.setRenderTarget(null);\n Graphics._renderer.render(SceneManager.current, spectator_camera);\n\n // reset back to enable WebXR\n Graphics._renderer.setRenderTarget(currentRenderTarget);\n Graphics._renderer.xr.isPresenting = true;\n }\n }\n}\n\nexport { VRRender };\n","import { BlitMaterial } from './BlitMaterial';\n\nimport frag from '../shaders/gaussian_blur/gaussian_blur.frag';\n\nimport { Vector2 } from 'three';\n\nclass GaussianBlurMaterial extends BlitMaterial\n{\n constructor(kernel_radius)\n {\n super(frag, undefined, {\n KERNEL_RADIUS: kernel_radius,\n SIGMA: kernel_radius\n });\n\n this.uniforms.texSize = { value: new Vector2(0.5, 0.5) };\n this.uniforms.direction = { value: new Vector2(0.5, 0.5) };\n }\n\n set_size(w, h)\n {\n this.uniforms.texSize.value.x = w;\n this.uniforms.texSize.value.y = h;\n }\n\n set_direction(x, y)\n {\n this.uniforms.direction.value.set(x, y);\n }\n}\n\nexport { GaussianBlurMaterial };\n","import { BlitMaterial } from './BlitMaterial';\n\nimport frag from '../shaders/luminosity_high_pass/luminosity_high_pass.frag';\n\nimport { Color } from 'three';\nclass LuminosityHighPassMaterial extends BlitMaterial\n{\n constructor(kernel_radius)\n {\n super(frag);\n\n this.uniforms.luminosityThreshold = { value: 0.23 };\n this.uniforms.smoothWidth = { value: 0.01 };\n this.uniforms.defaultColor = { value: new Color('#000000') };\n this.uniforms.defaultOpacity = { value: 0.0 };\n }\n}\n\nexport { LuminosityHighPassMaterial };\n","import { GaussianBlurMaterial } from '../materials/GaussianBlurMaterial';\nimport { LuminosityHighPassMaterial } from '../materials/LuminosityHighPassMaterial';\nimport { Graphics } from '../Graphics';\n\nimport { WebGLRenderTarget, LinearFilter, RGBAFormat } from 'three';\n\nclass GaussianBlurrer\n{\n constructor(nMips = 5)\n {\n this.current_width = 1;\n this.current_height = 1;\n\n this.separableBlurMaterials = [];\n this.renderTargetsHorizontal = [];\n this.renderTargetsVertical = [];\n\n this.nMips = nMips;\n this.kernelSizeArray = [3, 5, 7, 9, 11];\n this.rt_pars = { minFilter: LinearFilter, magFilter: LinearFilter, format: RGBAFormat };\n\n this.renderTargetBright = new WebGLRenderTarget(1, 1, this.rt_pars);\n this.renderTargetBright.texture.generateMipmaps = false;\n\n this.init_materials();\n this.init_RT();\n\n this.luminosity_high_pass_mat = new LuminosityHighPassMaterial();\n }\n\n blur(RT, use_luminosity_high_pass)\n {\n this.resize_RT(RT.width, RT.height);\n\n if (use_luminosity_high_pass)\n {\n Graphics.blit(RT, this.renderTargetBright, this.luminosity_high_pass_mat);\n }\n else\n {\n Graphics.blit(RT, this.renderTargetBright);\n }\n\n let inputRenderTarget = this.renderTargetBright;\n\n for (let i = 0; i < this.nMips; i++)\n {\n const mat = this.separableBlurMaterials[i];\n\n mat.set_direction(1, 0);\n Graphics.blit(inputRenderTarget, this.renderTargetsHorizontal[i], mat);\n\n mat.set_direction(0, 1);\n Graphics.blit(this.renderTargetsHorizontal[i], this.renderTargetsVertical[i], mat);\n\n inputRenderTarget = this.renderTargetsVertical[i];\n }\n }\n\n get_blurred_texture()\n {\n return this.renderTargetsHorizontal[0].texture;\n }\n\n get_blurred_RT()\n {\n return this.renderTargetsHorizontal[0];\n }\n\n init_RT()\n {\n this.dispose_RT();\n\n this.renderTargetBright.setSize(1, 1);\n\n for (let i = 0; i < this.nMips; i++)\n {\n const hor = new WebGLRenderTarget(1, 1, this.rt_pars);\n const ver = new WebGLRenderTarget(1, 1, this.rt_pars);\n\n hor.texture.generateMipmaps = false;\n ver.texture.generateMipmaps = false;\n\n this.renderTargetsHorizontal.push(hor);\n this.renderTargetsVertical.push(ver);\n }\n }\n\n resize_RT(texture_width, texture_height)\n {\n if (this.current_width === texture_width && this.current_height === texture_height)\n {\n return;\n }\n\n this.current_width = texture_width;\n this.current_height = texture_height;\n\n let width = Math.round(texture_width / 2);\n let height = Math.round(texture_height / 2);\n\n this.renderTargetBright.setSize(width, height);\n\n for (let i = 0; i < this.nMips; i++)\n {\n this.renderTargetsVertical[i].setSize(width, height);\n this.renderTargetsHorizontal[i].setSize(width, height);\n this.separableBlurMaterials[i].set_size(width, height);\n\n width = Math.round(width / 2);\n height = Math.round(height / 2);\n }\n }\n\n init_materials(texture_width, texture_height)\n {\n this.dispose_materials();\n\n for (let i = 0; i < this.nMips; i++)\n {\n this.separableBlurMaterials.push(new GaussianBlurMaterial(this.kernelSizeArray[i]));\n }\n }\n\n dispose_materials()\n {\n for (let i = 0; i < this.separableBlurMaterials.length; i++)\n {\n this.separableBlurMaterials[i].dispose();\n }\n this.separableBlurMaterials.length = 0;\n }\n\n dispose_RT()\n {\n for (let i = 0; i < this.renderTargetsVertical.length; i++)\n {\n this.renderTargetsHorizontal[i].dispose();\n this.renderTargetsVertical[i].dispose();\n }\n this.renderTargetBright.dispose();\n\n this.renderTargetsHorizontal.length = 0;\n this.renderTargetsVertical.length = 0;\n }\n}\n\nexport { GaussianBlurrer };\n","import { OScreen } from '../OScreen';\nimport { BaseRender } from '../render_mode/BaseRender';\nimport { UnrealBloomComposeMaterial } from '../materials/UnrealBloomComposeMaterial';\nimport { AddMaterial } from '../materials/AddMaterial';\n\nimport { WebGLRenderTarget } from 'three';\n\nimport { GaussianBlurrer } from '../render_utilities/GaussianBlurrer';\nimport { Graphics } from '../Graphics';\nimport { CameraManager } from '../CameraManager';\nimport { SceneManager } from '../SceneManager';\n\nclass UnrealBloomRender extends BaseRender\n{\n constructor()\n {\n super();\n\n this.bloom_compose_mat = undefined;\n\n this.main_RT = undefined;\n this.blur_RT = undefined;\n this.blurrer = undefined;\n\n this.add_mat = new AddMaterial();\n }\n\n on_enter()\n {\n this.blurrer = new GaussianBlurrer();\n this.main_RT = new WebGLRenderTarget(OScreen.width, OScreen.height);\n this.blur_RT = new WebGLRenderTarget(OScreen.width, OScreen.height);\n\n this.bloom_compose_mat = new UnrealBloomComposeMaterial(5);\n this.blurrer = new GaussianBlurrer(5);\n\n this.bloom_compose_mat.set_RT_0(this.blurrer.renderTargetsVertical[0].texture);\n this.bloom_compose_mat.set_RT_1(this.blurrer.renderTargetsVertical[1].texture);\n this.bloom_compose_mat.set_RT_2(this.blurrer.renderTargetsVertical[2].texture);\n this.bloom_compose_mat.set_RT_3(this.blurrer.renderTargetsVertical[3].texture);\n this.bloom_compose_mat.set_RT_4(this.blurrer.renderTargetsVertical[4].texture);\n\n this.bloom_compose_mat.set_bloom_strength(1);\n this.bloom_compose_mat.set_bloom_radius(1);\n\n this.add_mat.set_add_texture(this.blurrer.renderTargetsHorizontal[0].texture);\n }\n\n set_bloom_strength(val)\n {\n this.bloom_compose_mat.set_bloom_strength(val);\n }\n\n set_bloom_radius(val)\n {\n this.bloom_compose_mat.set_bloom_radius(val);\n }\n\n set_tint_color_0(col_string)\n {\n this.bloom_compose_mat.set_tint_color_0(col_string);\n }\n\n set_tint_color_1(col_string)\n {\n this.bloom_compose_mat.set_tint_color_1(col_string);\n }\n\n set_tint_color_2(col_string)\n {\n this.bloom_compose_mat.set_tint_color_2(col_string);\n }\n\n set_tint_color_3(col_string)\n {\n this.bloom_compose_mat.set_tint_color_3(col_string);\n }\n\n set_tint_color_4(col_string)\n {\n this.bloom_compose_mat.set_tint_color_4(col_string);\n }\n\n render()\n {\n this.__check_RT_size();\n\n Graphics.clear(this.main_RT, CameraManager.current, true, false);\n Graphics.render(SceneManager.current, CameraManager.current, this.main_RT);\n\n // // BLUR\n this.blurrer.blur(this.main_RT, true);\n\n // Blur compose\n Graphics.material_pass(this.bloom_compose_mat, this.blurrer.renderTargetsHorizontal[0]);\n\n // Additive blend\n Graphics.blit(this.main_RT, undefined, this.add_mat);\n }\n\n __check_RT_size()\n {\n if (this.main_RT.width !== OScreen.width || this.main_RT.height !== OScreen.height)\n {\n this.main_RT.setSize(OScreen.width, OScreen.height);\n this.blur_RT.setSize(OScreen.width, OScreen.height);\n }\n }\n}\n\nexport { UnrealBloomRender };\n","import { Color } from 'three';\nimport { OrthographicCamera as TOrthographicCamera } from 'three';\n\nclass OrthographicCamera extends TOrthographicCamera\n{\n constructor(left, right, top, bottom, near, far)\n {\n super(left, right, top, bottom, near, far);\n\n this.clear_color = new Color('#000000');\n this.clear_alpha = 1;\n }\n\n copy(camera)\n {\n super.copy(camera);\n this.clear_color.copy(camera.clear_color);\n this.clear_alpha = camera.clear_alpha;\n return this;\n }\n}\n\nexport { OrthographicCamera };\n","import { ViewManager } from './ViewManager';\n\nclass ViewComponentManager\n{\n constructor()\n {\n this.components = [];\n this.enabled_components = new Set();\n }\n\n update()\n {\n this.__set_components_opacities();\n\n for (const component of this.enabled_components)\n {\n component.update(ViewManager.transition_handler.current_state_data);\n }\n }\n\n register_component(component)\n {\n this.components.push(component);\n }\n\n enable_component(component)\n {\n // const component_to_enable = this.get_component_by_name(component_name);\n\n this.enabled_components.add(component);\n }\n\n disable_component(component)\n {\n // const component_to_disable = this.get_component_by_name(component_name);\n\n this.enabled_components.delete(component);\n }\n\n get_component_by_name(component_name)\n {\n console.warn('DEPRECATED. Use ViewComponentManager.get instead');\n this.get(component_name);\n }\n\n get(component_name)\n {\n for (let i = 0; i < this.components.length; i++)\n {\n if (this.components[i].name === component_name)\n {\n return this.components[i];\n }\n }\n console.error('[ViewComponentManager.get] no component found for: ', component_name);\n return undefined;\n }\n\n __set_components_opacities()\n {\n for (let i = 0; i < this.components.length; i++)\n {\n this.components[i].set_opacity(ViewManager.transition_handler.current_state_data);\n }\n }\n}\n\nconst view_component_manager = new ViewComponentManager();\nexport { view_component_manager as ViewComponentManager };\n","import { Time } from './Time';\nimport { UI } from './UI';\nimport { Debug } from './Debug';\nimport { BaseApplication } from './BaseApplication';\nimport { ViewManager } from './view_components/ViewManager';\nimport { ViewComponentManager } from './view_components/ViewComponentManager';\n\nclass RenderLoop\n{\n constructor(target_application, graphics, input)\n {\n target_application = target_application || new BaseApplication();\n\n this.target_application = target_application;\n this.graphics = graphics;\n this.input = input;\n\n this.is_running = false;\n this.frames_passed = 0;\n\n this.time_accumulator = 0;\n }\n\n update()\n {\n if (!this.is_running)\n {\n return;\n }\n Time.__update();\n\n // ###### START CYCLE ######\n if (this.frames_passed === 1)\n {\n this.target_application.on_post_start();\n }\n\n this.input.update();\n\n this.time_accumulator += Time.delta_time;\n\n this.target_application.before_update();\n ViewManager.before_update();\n\n while (this.time_accumulator > Time.fixed_delta_time)\n {\n this.target_application.fixed_update();\n ViewManager.fixed_update();\n this.time_accumulator -= Time.fixed_delta_time;\n }\n Time.__set_frame_interpolation(this.time_accumulator / Time.fixed_delta_time);\n\n this.target_application.update();\n\n ViewManager.update();\n ViewComponentManager.update();\n\n this.target_application.on_pre_render();\n\n this.graphics.update(); // render scene\n UI.update(); // update after new camera matrix has been calculated\n UI.render(this.graphics); // render ui layer on top\n this.target_application.on_post_render();\n\n Debug.render(this.graphics); // render debug layer\n\n // ###### END CYCLE #######\n\n this.target_application.on_frame_end();\n this.frames_passed++;\n\n this.input.clear();\n UI.clear();\n Debug.clear();\n }\n\n start()\n {\n if (this.is_running) return; // sanity check\n\n if (this.frames_passed === 0)\n {\n this.target_application.on_enter();\n }\n\n this.is_running = true;\n\n this.graphics._renderer.setAnimationLoop(this.update.bind(this));\n }\n\n stop()\n {\n if (this.is_running === false) return; // sanity check\n\n this.is_running = false;\n this.target_application.on_exit();\n\n this.graphics._renderer.setAnimationLoop(null);\n }\n\n set_state(new_state)\n {\n this.target_application.on_exit(this);\n this.target_application = new_state;\n this.target_application.on_enter(this);\n }\n\n dispose()\n {\n this.stop();\n this.frames_passed = 0;\n }\n}\n\nexport { RenderLoop };\n","import { OScreen } from './OScreen';\n\nclass Screen\n{\n init()\n {\n console.warn('Screen Singleton is deprecated. Please use OScreen.');\n OScreen.init();\n }\n\n update_position(x, y)\n {\n console.warn('Screen Singleton is deprecated. Please use OScreen.');\n OScreen.update_position(x, y);\n }\n\n update()\n {\n console.warn('Screen Singleton is deprecated. Please use OScreen.');\n OScreen.update();\n }\n\n update_size(width, height)\n {\n console.warn('Screen Singleton is deprecated. Please use OScreen.');\n OScreen.update_size(width, height);\n }\n\n apply_pixel_density_v2(vector2)\n {\n console.warn('Screen Singleton is deprecated. Please use OScreen.');\n return OScreen.apply_pixel_density_v2(vector2);\n }\n\n apply_pixel_density(value)\n {\n console.warn('Screen Singleton is deprecated. Please use OScreen.');\n return OScreen.apply_pixel_density(value);\n }\n\n get_pixel_size()\n {\n console.warn('Screen Singleton is deprecated. Please use OScreen.');\n return OScreen.get_pixel_size();\n }\n\n get aspect_ratio()\n {\n console.warn('Screen Singleton is deprecated. Please use OScreen.');\n return OScreen.aspect_ratio;\n }\n}\n\nconst screen = new Screen();\nexport { screen as Screen };\n","\nimport { CanvasDrawer } from './CanvasDrawer';\n\nimport { Vector2 } from 'three';\n\nclass SimpleTextDrawer extends CanvasDrawer\n{\n constructor()\n {\n super();\n this.text_margin = new Vector2(2, 0);\n }\n\n __draw(text, ctxOptions, canvas, ctx)\n {\n ctx.font = ctxOptions.font;\n\n const text_size = this.get_text_size(text, ctxOptions.font);\n // canvas.width = Math.ceilPowerOfTwo(text_size.x+this.text_margin.x*2);\n // canvas.height = Math.ceilPowerOfTwo(text_size.y+ this.text_margin.y*2);\n canvas.width = Math.ceil(text_size.x + this.text_margin.x * 2);\n canvas.height = Math.ceil(text_size.y + this.text_margin.y * 2);\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n\n // turn this on for debugging\n ctx.globalAlpha = 0.0;\n ctx.fillStyle = ctxOptions.font_color || '#000000';\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n ctx.globalAlpha = 1;\n\n ctx.globalAlpha = 1;\n\n ctx.font = ctxOptions.font;\n ctx.fillStyle = ctxOptions.font_color || '#000000';\n ctx.textBaseline = 'middle';\n\n ctx.textAlign = ctxOptions.textAlign || 'center';\n if (ctx.textAlign === 'center')\n {\n ctx.fillText(text, canvas.width / 2, canvas.height / 2);\n }\n else\n {\n ctx.fillText(text, 0, canvas.height / 2);\n }\n }\n}\n\nexport { SimpleTextDrawer };\n","import { HTMLUtilities } from '../utilities/HTMLUtilities';\nimport { ViewComponentManager } from './ViewComponentManager';\n\nclass ViewComponent\n{\n constructor({ name, container })\n {\n this.name = name;\n this.container = container;\n this.hidden = true;\n\n ViewComponentManager.register_component(this);\n }\n\n start()\n {\n }\n\n on_enter()\n {\n this.container.classList.remove('hidden');\n ViewComponentManager.enable_component(this);\n\n this.hidden = false;\n }\n\n update()\n {\n }\n\n on_exit()\n {\n this.container.classList.add('hidden');\n ViewComponentManager.disable_component(this);\n\n this.hidden = true;\n }\n\n set_opacity(current_state_data)\n {\n this.container.style.opacity = current_state_data[`${this.name}_opacity`];\n this.toggle_hidden();\n }\n\n toggle_hidden()\n {\n if (this.container.style.opacity > 0.001)\n {\n if (this.hidden)\n {\n this.on_enter();\n }\n }\n else\n {\n if (!this.hidden)\n {\n this.on_exit();\n }\n }\n }\n\n load_html_images()\n {\n HTMLUtilities.load_images(this.container);\n }\n\n load_html_videos()\n {\n HTMLUtilities.load_videos(this.container);\n }\n}\n\nexport { ViewComponent };\n","import { Mesh } from 'three';\nimport { MeshBasicMaterial } from 'three';\nimport { PlaneGeometry } from 'three';\n\nclass HorizontalPlane extends Mesh\n{\n constructor(width, height, color, material)\n {\n width = width || 1;\n height = height || 1;\n color = color || '#FF0000';\n material = material || new MeshBasicMaterial({ color: color });\n\n const geometry = new PlaneGeometry(width, height);\n geometry.rotateX(-3.14 / 2);\n super(geometry, material);\n }\n}\n\nexport { HorizontalPlane };\n","import { Mesh } from 'three';\nimport { PlaneGeometry } from 'three';\nimport { MeshBasicMaterial } from 'three';\n\nclass VerticalPlane extends Mesh\n{\n constructor(width, height, color, material)\n {\n width = width || 1;\n height = height || 1;\n color = color || '#FF0000';\n material = material || new MeshBasicMaterial({ color: color });\n\n const geometry = new PlaneGeometry(width, height);\n super(geometry, material);\n }\n}\n\nexport { VerticalPlane };\n","class ArrayUtilities\n{\n constructor()\n {}\n\n static merge_from_to(source, target)\n {\n target.push.apply(target, source);\n }\n\n static expand_vec3_array(array, size)\n {\n const items_left_count = size - array.length;\n\n for (let i = 0; i < items_left_count; i++)\n {\n array.push(array[i].clone());\n }\n }\n\n static remove_elem(array, elem)\n {\n const index = array.indexOf(elem);\n if (index > -1)\n {\n array.splice(index, 1);\n }\n }\n\n static get_closest_point(points, target)\n {\n let closest_point = points[0];\n let closest_distance = closest_point.distanceTo(target);\n for (let i = 1; i < points.length; i++)\n {\n if (points[i].distanceTo(target) < closest_distance)\n {\n closest_point = points[i];\n closest_distance = points[i].distanceTo(target);\n }\n }\n return closest_point;\n }\n\n static object_values_to_array(obj)\n {\n const ids = Object.keys(obj);\n const arr = [];\n for (let i = 0; i < ids.length; i++)\n {\n arr.push(obj[ids[i]]);\n }\n return arr;\n }\n}\n\nexport { ArrayUtilities };\n","import { Line3, Plane, Quaternion, Sphere, Vector3 } from 'three';\n\nclass FrustumPointFitter\n{\n constructor()\n {\n this.sphere = new Sphere();\n }\n\n fit_points(points, camera_quaternion, vertical_fov, aspect)\n {\n this.sphere.setFromPoints(points);\n\n const v_fov = Math.degToRad(vertical_fov / 2);\n const h_fov = (2 * Math.atan(Math.tan(v_fov) * aspect)) / 2;\n\n const up_plane_normal = this.get_up_plane_normal(camera_quaternion, v_fov);\n const down_plane_normal = this.get_down_plane_normal(camera_quaternion, v_fov);\n const left_plane_normal = this.get_left_plane_normal(camera_quaternion, h_fov);\n const right_plane_normal = this.get_right_plane_normal(camera_quaternion, h_fov);\n\n const camera_forward_dir = new Vector3(0, 0, -1).applyQuaternion(camera_quaternion);\n\n const sphere_center = this.sphere.center.clone();\n\n const pull_back_distance = this.get_distance_to_fit_rect(this.sphere.radius * 2, this.sphere.radius * 2, vertical_fov, aspect);\n const far_pos = sphere_center.clone().add(camera_forward_dir.clone().multiplyScalar(pull_back_distance * -1));\n\n const up_plane = new Plane().setFromNormalAndCoplanarPoint(up_plane_normal, far_pos);\n const down_plane = new Plane().setFromNormalAndCoplanarPoint(down_plane_normal, far_pos);\n\n const left_plane = new Plane().setFromNormalAndCoplanarPoint(left_plane_normal, far_pos);\n const right_plane = new Plane().setFromNormalAndCoplanarPoint(right_plane_normal, far_pos);\n\n this.apply_center_correction_to_pos(far_pos, points, camera_quaternion, up_plane, down_plane, left_plane, right_plane);\n\n up_plane.setFromNormalAndCoplanarPoint(up_plane_normal, far_pos);\n down_plane.setFromNormalAndCoplanarPoint(down_plane_normal, far_pos);\n\n left_plane.setFromNormalAndCoplanarPoint(left_plane_normal, far_pos);\n right_plane.setFromNormalAndCoplanarPoint(right_plane_normal, far_pos);\n\n let closest_distance = Infinity;\n\n const inverse_dir = camera_forward_dir.clone().multiplyScalar(pull_back_distance * -2);\n for (let i = 0; i < points.length; i++)\n {\n const line = new Line3(points[i].clone(), points[i].clone().add(inverse_dir));\n\n const up_line_intersection = new Vector3();\n const down_line_intersection = new Vector3();\n\n const left_line_intersection = new Vector3();\n const right_line_intersection = new Vector3();\n\n up_plane.intersectLine(line, up_line_intersection);\n down_plane.intersectLine(line, down_line_intersection);\n\n left_plane.intersectLine(line, left_line_intersection);\n right_plane.intersectLine(line, right_line_intersection);\n\n if (up_line_intersection.length() < 0.0001)\n {\n console.log('up intersection not found', i);\n }\n if (down_line_intersection.length() < 0.0001)\n {\n console.log('down intersection not found', i);\n }\n if (left_line_intersection.length() < 0.0001)\n {\n console.log('left intersection not found', i);\n }\n if (right_line_intersection.length() < 0.0001)\n {\n console.log('right intersection not found', i);\n }\n\n const new_up_distance = points[i].clone().sub(up_line_intersection).length();\n const new_down_distance = points[i].clone().sub(down_line_intersection).length();\n\n const new_left_distance = points[i].clone().sub(left_line_intersection).length();\n const new_right_distance = points[i].clone().sub(right_line_intersection).length();\n\n const vertical_min = Math.min(new_up_distance, new_down_distance);\n const horizontal_min = Math.min(new_left_distance, new_right_distance);\n\n const min = Math.min(vertical_min, horizontal_min);\n\n if (min < closest_distance)\n {\n closest_distance = min;\n }\n }\n\n const forward_correction = camera_forward_dir.clone().multiplyScalar(closest_distance);\n const closest_position = far_pos.clone().add(forward_correction);\n\n return closest_position;\n }\n\n apply_center_correction_to_pos(target_pos, points, camera_quaternion, up_plane, down_plane, left_plane, right_plane)\n {\n const vertical_offset = this.get_vertical_correction(points, down_plane, up_plane, camera_quaternion);\n const horizontal_offset = this.get_hozirontal_correction(points, left_plane, right_plane, camera_quaternion);\n\n target_pos.add(vertical_offset);\n target_pos.add(horizontal_offset);\n }\n\n get_vertical_correction(points, down_plane, up_plane, camera_quaternion)\n {\n let closest_distance_to_up_plane = Infinity;\n let closest_distance_to_down_plane = Infinity;\n let closest_up_point = undefined;\n let closest_down_point = undefined;\n\n const up_dir = new Vector3(0, 1, 0).applyQuaternion(camera_quaternion);\n for (let i = 0; i < points.length; i++)\n {\n const down_line = new Line3(points[i].clone(), points[i].clone().add(up_dir.clone().multiplyScalar(-5000000)));\n const up_line = new Line3(points[i].clone(), points[i].clone().add(up_dir.clone().multiplyScalar(5000000)));\n\n const down_line_intersection = new Vector3();\n const up_line_intersection = new Vector3();\n\n down_plane.intersectLine(down_line, down_line_intersection);\n up_plane.intersectLine(up_line, up_line_intersection);\n\n const down_dist = down_line_intersection.distanceTo(points[i]);\n const up_dist = up_line_intersection.distanceTo(points[i]);\n\n if (up_line_intersection.length() < 0.0001)\n {\n console.log('vertical up intersection not found', i);\n }\n if (down_line_intersection.length() < 0.0001)\n {\n console.log('vertical down intersection not found', i);\n }\n\n if (down_dist < closest_distance_to_down_plane)\n {\n closest_distance_to_down_plane = down_dist;\n closest_down_point = points[i];\n }\n if (up_dist < closest_distance_to_up_plane)\n {\n closest_distance_to_up_plane = up_dist;\n closest_up_point = points[i];\n }\n }\n\n console.log(closest_up_point, closest_down_point);\n\n const correction = (closest_distance_to_up_plane - closest_distance_to_down_plane) / 2;\n\n // console.log(\"vertical_correction\", correction)\n return up_dir.clone().multiplyScalar(-correction);\n }\n\n get_hozirontal_correction(points, left_plane, right_plane, camera_quaternion)\n {\n let closest_distance_to_right_plane = Infinity;\n let closest_distance_to_left_plane = Infinity;\n let closest_right_point = undefined;\n let closest_left_point = undefined;\n\n const right_dir = new Vector3(1, 0, 0).applyQuaternion(camera_quaternion);\n\n for (let i = 0; i < points.length; i++)\n {\n const left_line = new Line3(points[i].clone(), points[i].clone().add(right_dir.clone().multiplyScalar(-5000000)));\n const right_line = new Line3(points[i].clone(), points[i].clone().add(right_dir.clone().multiplyScalar(5000000)));\n\n const left_line_intersection = new Vector3();\n const right_line_intersection = new Vector3();\n\n left_plane.intersectLine(left_line, left_line_intersection);\n right_plane.intersectLine(right_line, right_line_intersection);\n\n const left_dist = left_line_intersection.distanceTo(points[i]);\n const right_dist = right_line_intersection.distanceTo(points[i]);\n\n if (left_line_intersection.length() < 0.0001)\n {\n console.log('left intersection not found', i);\n }\n if (right_line_intersection.length() < 0.0001)\n {\n console.log('right intersection not found', i);\n }\n\n if (left_dist < closest_distance_to_left_plane)\n {\n closest_distance_to_left_plane = left_dist;\n closest_left_point = points[i];\n }\n if (right_dist < closest_distance_to_right_plane)\n {\n closest_distance_to_right_plane = right_dist;\n closest_right_point = points[i];\n }\n }\n\n const correction = (closest_distance_to_right_plane - closest_distance_to_left_plane) / 2;\n // console.log(\"horizontal_correction\", correction)\n\n console.log(closest_right_point, closest_left_point);\n\n return right_dir.clone().multiplyScalar(-correction);\n }\n\n get_up_plane_normal(camera_quaternion, v_fov)\n {\n const up_plane_normal = new Vector3(0, -1, 0);\n up_plane_normal.applyQuaternion(new Quaternion().setFromAxisAngle(new Vector3(1, 0, 0), v_fov));\n up_plane_normal.applyQuaternion(camera_quaternion);\n return up_plane_normal;\n }\n\n get_down_plane_normal(camera_quaternion, v_fov)\n {\n const down_plane_normal = new Vector3(0, 1, 0);\n down_plane_normal.applyQuaternion(new Quaternion().setFromAxisAngle(new Vector3(1, 0, 0), -v_fov));\n down_plane_normal.applyQuaternion(camera_quaternion);\n return down_plane_normal;\n }\n\n get_left_plane_normal(camera_quaternion, h_fov)\n {\n const left_plane_normal = new Vector3(1, 0, 0);\n left_plane_normal.applyQuaternion(new Quaternion().setFromAxisAngle(new Vector3(0, 1, 0), h_fov));\n left_plane_normal.applyQuaternion(camera_quaternion);\n return left_plane_normal;\n }\n\n get_right_plane_normal(camera_quaternion, h_fov)\n {\n const right_plane_normal = new Vector3(-1, 0, 0);\n right_plane_normal.applyQuaternion(new Quaternion().setFromAxisAngle(new Vector3(0, 1, 0), -h_fov));\n right_plane_normal.applyQuaternion(camera_quaternion);\n return right_plane_normal;\n }\n\n get_distance_to_fit_rect(width, height, vertical_fov, aspect)\n {\n const v_fov = (vertical_fov / 2) * Math.PI / 180;\n const h_fov = (2 * Math.atan(Math.tan(v_fov) * aspect)) / 2;\n\n const distV = height / Math.tan(v_fov);\n const distH = width / Math.tan(h_fov);\n return Math.max(Math.abs(distH), Math.abs(distV));\n }\n}\n\nexport { FrustumPointFitter };\n","import { BufferAttribute } from 'three';\nimport { BufferGeometry } from 'three';\n\nclass GeometryUtilities\n{\n static convert_to_non_indexed_geometry(geometry_buffer)\n {\n const indices = geometry_buffer.index;\n const positions = geometry_buffer.getAttribute('position');\n\n const bar_coordinates = [];\n const vertices = [];\n\n for (let i = 0; i < indices.count; i += 3)\n {\n // VERTEX 1\n vertices.push(positions.getX(indices.array[i + 0]));\n vertices.push(positions.getY(indices.array[i + 0]));\n vertices.push(positions.getZ(indices.array[i + 0]));\n\n bar_coordinates.push(1);\n bar_coordinates.push(0);\n bar_coordinates.push(0);\n\n // VERTEX 2\n\n vertices.push(positions.getX(indices.array[i + 1]));\n vertices.push(positions.getY(indices.array[i + 1]));\n vertices.push(positions.getZ(indices.array[i + 1]));\n\n bar_coordinates.push(0);\n bar_coordinates.push(1);\n bar_coordinates.push(0);\n\n // VERTEX 3\n\n vertices.push(positions.getX(indices.array[i + 2]));\n vertices.push(positions.getY(indices.array[i + 2]));\n vertices.push(positions.getZ(indices.array[i + 2]));\n\n bar_coordinates.push(0);\n bar_coordinates.push(0);\n bar_coordinates.push(1);\n }\n\n const geometry = new BufferGeometry();\n // geometry.setAttribute('barycentric', new BufferAttribute( new Float32Array(bar_coordinates), 3 ));\n geometry.setAttribute('position', new BufferAttribute(new Float32Array(vertices), 3));\n GeometryUtilities.add_barycentric_attribute(geometry);\n return geometry;\n }\n\n static add_barycentric_attribute(non_indexed_geometry_buffer)\n {\n const bar_coordinates = [];\n const positions = non_indexed_geometry_buffer.getAttribute('position');\n\n for (let i = 0; i < positions.count; i += 3)\n {\n bar_coordinates.push(1);\n bar_coordinates.push(0);\n bar_coordinates.push(0);\n\n bar_coordinates.push(0);\n bar_coordinates.push(1);\n bar_coordinates.push(0);\n\n bar_coordinates.push(0);\n bar_coordinates.push(0);\n bar_coordinates.push(1);\n }\n non_indexed_geometry_buffer.setAttribute('barycentric', new BufferAttribute(new Float32Array(bar_coordinates), 3));\n }\n}\n\nexport { GeometryUtilities };\n","import { Vector4 } from 'three';\n\nclass ImageUtilities\n{\n constructor()\n { }\n\n static get_image_data(image)\n {\n const canvas = document.createElement('canvas');\n canvas.width = image.width;\n canvas.height = image.height;\n\n const context = canvas.getContext('2d');\n context.drawImage(image, 0, 0);\n\n return context.getImageData(0, 0, image.width, image.height);\n }\n\n static get_pixel(imagedata, x, y)\n {\n const position = (x + imagedata.width * y) * 4;\n const data = imagedata.data;\n return new Vector4(data[position + 0], data[position + 1], data[position + 2], data[position + 3]);\n }\n}\n\nexport { ImageUtilities };\n","import { Vector3 } from 'three';\nimport { Vector2 } from 'three';\nclass MeshSampler\n{\n constructor()\n {\n\n }\n\n sample(buffer_geometry, sample_count)\n {\n const face_areas = [];\n\n let min_area = 99999999;\n\n const vertices = buffer_geometry.getAttribute('position');\n const normals = buffer_geometry.getAttribute('normal');\n const tangents = buffer_geometry.getAttribute('tangent');\n const uvs = buffer_geometry.getAttribute('uv');\n const indices = buffer_geometry.index;\n\n const faces = [];\n\n for (let i = 0; i < indices.count; i += 3)\n {\n const index_0 = indices.array[i + 0];\n const index_1 = indices.array[i + 1];\n const index_2 = indices.array[i + 2];\n\n const v1 = new Vector3();\n v1.x = vertices.getX(index_0);\n v1.y = vertices.getY(index_0);\n v1.z = vertices.getZ(index_0);\n\n const v2 = new Vector3();\n v2.x = vertices.getX(index_1);\n v2.y = vertices.getY(index_1);\n v2.z = vertices.getZ(index_1);\n\n const v3 = new Vector3();\n v3.x = vertices.getX(index_2);\n v3.y = vertices.getY(index_2);\n v3.z = vertices.getZ(index_2);\n\n const face = {\n a: v1,\n b: v2,\n c: v3\n };\n\n if (normals)\n {\n const n1 = new Vector3();\n n1.x = normals.getX(index_0);\n n1.y = normals.getY(index_0);\n n1.z = normals.getZ(index_0);\n\n const n2 = new Vector3();\n n2.x = normals.getX(index_1);\n n2.y = normals.getY(index_1);\n n2.z = normals.getZ(index_1);\n\n const n3 = new Vector3();\n n3.x = normals.getX(index_2);\n n3.y = normals.getY(index_2);\n n3.z = normals.getZ(index_2);\n\n const normal = n1.clone().add(n2).add(n3).normalize();\n face.normal = normal;\n }\n\n if (tangents)\n {\n const n1 = new Vector3();\n n1.x = tangents.getX(index_0);\n n1.y = tangents.getY(index_0);\n n1.z = tangents.getZ(index_0);\n\n const n2 = new Vector3();\n n2.x = tangents.getX(index_1);\n n2.y = tangents.getY(index_1);\n n2.z = tangents.getZ(index_1);\n\n const n3 = new Vector3();\n n3.x = tangents.getX(index_2);\n n3.y = tangents.getY(index_2);\n n3.z = tangents.getZ(index_2);\n\n const tangent = n1.clone().add(n2).add(n3).normalize();\n face.tangent = tangent;\n }\n if (uvs)\n {\n const uv_a = new Vector2();\n uv_a.x = uvs.getX(index_0);\n uv_a.y = uvs.getY(index_0);\n\n const uv_b = new Vector2();\n uv_b.x = uvs.getX(index_1);\n uv_b.y = uvs.getY(index_1);\n\n const uv_c = new Vector2();\n uv_c.x = uvs.getX(index_2);\n uv_c.y = uvs.getY(index_2);\n\n face.uv_a = uv_a;\n face.uv_b = uv_b;\n face.uv_c = uv_c;\n }\n\n faces.push(face);\n\n const area = this.get_face_area(face);\n min_area = Math.min(area, min_area);\n face_areas.push(area);\n }\n\n const normalized_faces_array = this.get_uniform_face_distribution(face_areas, min_area, faces);\n const selected_faces = this.select_random_faces(normalized_faces_array, sample_count);\n const sampled_data = this.sample_data_from_faces(selected_faces);\n return sampled_data;\n }\n\n sample_data_from_faces(faces)\n {\n const sampled_points = [];\n const sampled_normals = [];\n const sampled_tangents = [];\n const sampled_uvs = [];\n\n for (let i = 0; i < faces.length; i++)\n {\n const face = faces[i];\n\n const w1 = Math.random();\n const w2 = Math.random();\n\n sampled_points.push(this.sample_point_in_face(w1, w2, face.a, face.b, face.c).clone());\n if (face.normal)\n {\n sampled_normals.push(face.normal.clone());\n }\n if (face.tangent)\n {\n sampled_tangents.push(face.tangent.clone());\n }\n if (face.uv_a)\n {\n sampled_uvs.push(this.sample_point_in_face(w1, w2, face.uv_a, face.uv_b, face.uv_c).clone());\n }\n }\n return { points: sampled_points, normals: sampled_normals, tangents: sampled_tangents, uvs: sampled_uvs };\n }\n\n select_random_faces(faces, amount)\n {\n const selected_faces = [];\n for (let i = 0; i < amount; i++)\n {\n const random = Math.floor(Math.random() * faces.length);\n const selected_face = faces[random];\n\n selected_faces.push(selected_face);\n }\n\n return selected_faces;\n }\n\n get_uniform_face_distribution(face_areas, minimum_area, faces)\n {\n const extended_triangle_indices = [];\n for (let i = 0; i < face_areas.length; i++)\n {\n face_areas[i] /= minimum_area;\n const repetitions_needed = Math.floor(Math.round(face_areas[i]));\n for (let j = 0; j < repetitions_needed; j++)\n {\n extended_triangle_indices.push(faces[i]);\n }\n }\n return extended_triangle_indices;\n }\n\n get_face_area(face)\n {\n const vec1 = face.b.clone().sub(face.a);\n const vec2 = face.c.clone().sub(face.a);\n return vec1.cross(vec2).length() / 2;\n }\n\n sample_point_in_face(w1, w2, v1, v2, v3)\n {\n if (w1 + w2 > 1)\n {\n w1 = 1.0 - w1;\n w2 = 1.0 - w2;\n }\n\n const w3 = 1.0 - (w1 + w2);\n\n return v1.clone().multiplyScalar(w1).add(v2.clone().multiplyScalar(w2)).add(v3.clone().multiplyScalar(w3));\n }\n}\n\nconst mesh_sampler = new MeshSampler();\nexport { mesh_sampler as MeshSampler };\n","import { Mesh } from 'three';\nimport { BufferGeometry } from 'three';\nimport { Skeleton } from 'three';\n\nclass ModelUtilities\n{\n get_mesh(scene, result_callback)\n {\n scene.traverse((child) =>\n {\n if (child instanceof Mesh)\n {\n if (child.geometry)\n {\n child.geometry = new BufferGeometry().fromGeometry(child.geometry);\n }\n result_callback(child);\n }\n });\n }\n\n get_geometries(scene)\n {\n const geometries = [];\n\n this.get_mesh(scene, (child) =>\n {\n geometries.push(child.geometry);\n });\n return geometries;\n }\n\n assign_material(scene, material, name)\n {\n scene.traverse((child) =>\n {\n if (child instanceof Mesh)\n {\n // assign to all if no name is given\n if (name === undefined)\n {\n child.material = material;\n }\n else\n {\n // if name is given, assign only to that\n if (child.name === name)\n {\n child.material = material;\n }\n }\n }\n });\n }\n\n clone_animated_gltf(gltf)\n {\n const clone = {\n animations: gltf.animations,\n scene: gltf.scene.clone(true)\n };\n\n const skinnedMeshes = {};\n\n gltf.scene.traverse(node =>\n {\n if (node.isSkinnedMesh)\n {\n skinnedMeshes[node.name] = node;\n }\n });\n\n const cloneBones = {};\n const cloneSkinnedMeshes = {};\n\n clone.scene.traverse(node =>\n {\n if (node.isBone)\n {\n cloneBones[node.name] = node;\n }\n\n if (node.isSkinnedMesh)\n {\n cloneSkinnedMeshes[node.name] = node;\n }\n });\n\n for (const name in skinnedMeshes)\n {\n const skinnedMesh = skinnedMeshes[name];\n const skeleton = skinnedMesh.skeleton;\n const cloneSkinnedMesh = cloneSkinnedMeshes[name];\n\n const orderedCloneBones = [];\n\n for (let i = 0; i < skeleton.bones.length; ++i)\n {\n const cloneBone = cloneBones[skeleton.bones[i].name];\n orderedCloneBones.push(cloneBone);\n }\n\n cloneSkinnedMesh.bind(\n new Skeleton(orderedCloneBones, skeleton.boneInverses),\n cloneSkinnedMesh.matrixWorld);\n }\n\n return clone;\n }\n\n set_shadow_config(scene, cast, receive)\n {\n scene.traverse((child) =>\n {\n if (child instanceof Mesh)\n {\n child.castShadow = cast;\n child.receiveShadow = receive;\n }\n });\n }\n\n __find_object(scene, object_name, result_callback)\n {\n scene.traverse((obj) =>\n {\n if (obj.name === object_name)\n {\n result_callback(obj);\n }\n });\n }\n\n get_object(scene, object_name)\n {\n let object = undefined;\n scene.traverse((obj) =>\n {\n if (obj.name === object_name)\n {\n object = obj;\n }\n });\n return object;\n }\n\n get_object_by_type(scene, object_type)\n {\n let object = undefined;\n scene.traverse((obj) =>\n {\n if (obj.constructor.name === object_type)\n {\n object = obj;\n }\n });\n return object;\n }\n}\n\nconst model_utilities = new ModelUtilities();\nexport { model_utilities as ModelUtilities };\n","class ObjectUtilities\r\n{\r\n static is_object(item)\r\n {\r\n return (item && typeof item === 'object' && !Array.isArray(item));\r\n }\r\n\r\n static merge_deep(target, ...sources)\r\n {\r\n if (!sources.length) return target;\r\n const source = sources.shift();\r\n\r\n if (ObjectUtilities.is_object(target) && ObjectUtilities.is_object(source))\r\n {\r\n for (const key in source)\r\n {\r\n if (ObjectUtilities.is_object(source[key]))\r\n {\r\n if (!target[key]) Object.assign(target, { [key]: {} });\r\n ObjectUtilities.merge_deep(target[key], source[key]);\r\n }\r\n else\r\n {\r\n Object.assign(target, { [key]: source[key] });\r\n }\r\n }\r\n }\r\n\r\n return ObjectUtilities.merge_deep(target, ...sources);\r\n }\r\n\r\n static xml_to_json(xml)\r\n {\r\n // Create the return object\r\n let obj = {};\r\n\r\n if (xml.nodeType === 1)\r\n { // element\r\n // do attributes\r\n if (xml.attributes.length > 0)\r\n {\r\n obj['@attributes'] = {};\r\n for (let j = 0; j < xml.attributes.length; j++)\r\n {\r\n const attribute = xml.attributes.item(j);\r\n obj['@attributes'][attribute.nodeName] = attribute.nodeValue;\r\n }\r\n }\r\n }\r\n else if (xml.nodeType === 3)\r\n { // text\r\n obj = xml.nodeValue;\r\n }\r\n\r\n // do children\r\n if (xml.hasChildNodes())\r\n {\r\n for (let i = 0; i < xml.childNodes.length; i++)\r\n {\r\n const item = xml.childNodes.item(i);\r\n const nodeName = item.nodeName;\r\n if (typeof (obj[nodeName]) === 'undefined')\r\n {\r\n obj[nodeName] = this.xml_to_json(item);\r\n }\r\n else\r\n {\r\n if (typeof (obj[nodeName].push) === 'undefined')\r\n {\r\n const old = obj[nodeName];\r\n obj[nodeName] = [];\r\n obj[nodeName].push(old);\r\n }\r\n obj[nodeName].push(this.xml_to_json(item));\r\n }\r\n }\r\n }\r\n return obj;\r\n }\r\n}\r\n\r\nexport { ObjectUtilities };\r\n","class StringUtilities\n{\n constructor()\n {}\n\n static get_random_color()\n {\n const hexValues = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C', 'D', 'E', 'F'];\n let hex = '#';\n\n for (let i = 0; i < 6; i++)\n {\n const index = Math.floor(Math.random() * hexValues.length);\n hex += hexValues[index];\n }\n\n return hex;\n }\n\n static capitalize(string)\n {\n const words = string.split(' ');\n\n for (let i = 0; i < words.length; i++)\n {\n words[i] = words[i][0].toUpperCase() + words[i].substr(1);\n }\n\n return words.join(' ');\n }\n\n static capitalize_first_letter(string)\n {\n return string.charAt(0).toUpperCase() + string.slice(1);\n }\n\n static snake_to_camelcase(string)\n {\n return string.toLowerCase().replace(/[-_][a-z0-9]/g, (group) => group.slice(-1).toUpperCase());\n }\n}\n\nexport { StringUtilities };\n","class TimeUtilities\n{\n constructor()\n {}\n\n // Converts a time string (00:00:00.45) into miliseconds\n time_str_to_ms(time_str)\n {\n time_str = time_str.split(':');\n\n let hours = Number(time_str[0]);\n hours = hours * 60 * 60 * 1000;\n\n let minutes = Number(time_str[1]);\n minutes = minutes * 60 * 1000;\n\n let seconds = Number(time_str[2]);\n seconds = seconds * 1000;\n\n return hours + minutes + seconds;\n }\n}\n\nexport { TimeUtilities };\n","import grid_frag from '../shaders/grid/grid.frag';\nimport grid_vert from '../shaders/grid/grid.vert';\n\nimport { GeometryUtilities } from '../utilities/GeometryUtilities';\n\nimport { Mesh } from 'three';\nimport { ShaderMaterial } from 'three';\nimport { Color } from 'three';\nimport { PlaneGeometry } from 'three';\n\nclass Grid extends Mesh\n{\n constructor()\n {\n const material = new ShaderMaterial({\n uniforms: {\n _Color: { value: new Color('#919191') }\n },\n vertexShader: grid_vert,\n fragmentShader: grid_frag,\n extensions: { derivatives: true },\n transparent: true,\n depthWrite: false\n });\n\n const plane_geometry = new PlaneGeometry(100, 100, 100, 100);\n\n const non_indexed_geometry = GeometryUtilities.convert_to_non_indexed_geometry(plane_geometry);\n\n super(non_indexed_geometry, material);\n\n this.rotation.x = -3.14 / 2;\n }\n}\n\nexport { Grid };\n","import line_vs from '../shaders/basic_line/basic_line.vert';\nimport line_fs from '../shaders/basic_line/basic_line.frag';\n\nimport { Mesh } from 'three';\nimport { BufferAttribute } from 'three';\nimport { BufferGeometry } from 'three';\nimport { ShaderMaterial } from 'three';\nimport { Color } from 'three';\n\nclass Line extends Mesh\n{\n constructor(points)\n {\n const geometry = new BufferGeometry();\n geometry.setAttribute('position', new BufferAttribute(new Float32Array([]), 3));\n geometry.setAttribute('next_position', new BufferAttribute(new Float32Array([]), 3));\n geometry.setAttribute('previous_position', new BufferAttribute(new Float32Array([]), 3));\n geometry.setAttribute('orientation', new BufferAttribute(new Float32Array([]), 1));\n geometry.setAttribute('coverage', new BufferAttribute(new Float32Array([]), 1));\n\n const material = new ShaderMaterial({\n uniforms: {\n _Thickness: { value: 0.2 },\n _Length: { value: 0 },\n _ElapsedTime: { value: 0 },\n _Color: { value: new Color('#FF0000') }\n },\n vertexShader: line_vs,\n fragmentShader: line_fs,\n transparent: true,\n depthWrite: false,\n extensions: { derivatives: true }\n\n });\n\n super(geometry, material);\n\n if (points)\n {\n this.setup(points);\n }\n }\n\n setup(points)\n {\n const vertices = [];\n const next_position = [];\n const previous_position = [];\n const orientation = [];\n const coverage = [];\n let accumulated_length = 0;\n\n for (let i = 0; i < points.length; i++)\n {\n vertices.push(points[i].x);\n vertices.push(points[i].y);\n vertices.push(points[i].z);\n orientation.push(1);\n\n vertices.push(points[i].x);\n vertices.push(points[i].y);\n vertices.push(points[i].z);\n orientation.push(-1);\n\n const next_point = this.__get_next_position(points, i);\n next_position.push(next_point.x);\n next_position.push(next_point.y);\n next_position.push(next_point.z);\n\n next_position.push(next_point.x);\n next_position.push(next_point.y);\n next_position.push(next_point.z);\n\n const previous_point = this.__get_previous_position(points, i);\n previous_position.push(previous_point.x);\n previous_position.push(previous_point.y);\n previous_position.push(previous_point.z);\n\n previous_position.push(previous_point.x);\n previous_position.push(previous_point.y);\n previous_position.push(previous_point.z);\n\n coverage.push(accumulated_length);\n coverage.push(accumulated_length);\n\n if (i < points.length - 1)\n {\n accumulated_length += points[i].distanceTo(next_point);\n }\n }\n const vertexList = new Float32Array(vertices);\n const nextPositionList = new Float32Array(next_position);\n const previousPositionList = new Float32Array(previous_position);\n const orientationList = new Float32Array(orientation);\n const coverageList = new Float32Array(coverage);\n\n const indices = [];\n for (let i = 0; i < ((vertexList.length / 3) - 2) / 2; i++)\n {\n const index = (i * 2) + 1;\n indices.push(index);\n indices.push(index + 1);\n indices.push(index - 1);\n\n indices.push(index);\n indices.push(index + 2);\n indices.push(index + 1);\n }\n\n this.geometry.setIndex(indices);\n this.geometry.getAttribute('position').copy(new BufferAttribute(vertexList, 3));\n this.geometry.getAttribute('next_position').copy(new BufferAttribute(nextPositionList, 3));\n this.geometry.getAttribute('previous_position').copy(new BufferAttribute(previousPositionList, 3));\n this.geometry.getAttribute('orientation').copy(new BufferAttribute(orientationList, 1));\n this.geometry.getAttribute('coverage').copy(new BufferAttribute(coverageList, 1));\n\n this.geometry.getAttribute('position').needsUpdate = true;\n this.geometry.getAttribute('next_position').needsUpdate = true;\n this.geometry.getAttribute('previous_position').needsUpdate = true;\n this.geometry.getAttribute('orientation').needsUpdate = true;\n this.geometry.getAttribute('coverage').needsUpdate = true;\n\n this.material.uniforms._Length.value = accumulated_length;\n this._length = accumulated_length;\n }\n\n set thickness(value)\n {\n this.material.uniforms._Thickness.value = value;\n }\n\n get thickness()\n {\n return this.material.uniforms._Thickness.value;\n }\n\n __get_previous_position(points, i)\n {\n if (i === 0)\n {\n return points[1].clone().sub(points[0]).multiplyScalar(-1).add(points[0]);\n }\n else\n {\n return points[i - 1];\n }\n }\n\n __get_next_position(points, i)\n {\n if (i === points.length - 1)\n {\n return points[points.length - 2].clone().sub(points[points.length - 1]).multiplyScalar(-1).add(points[points.length - 1]);\n }\n else\n {\n return points[i + 1];\n }\n }\n\n update()\n {\n }\n\n distance()\n {\n return this.accumulated_length;\n }\n\n total_length()\n {\n return this.accumulated_length;\n }\n\n dispose()\n {\n this.geometry.dispose();\n this.material.dispose();\n if (this.parent)\n {\n this.parent.remove(this);\n }\n }\n\n set color(col)\n {\n this.material.uniforms._Color.value.set(col);\n }\n\n get color()\n {\n return this.material.uniforms._Color.value;\n }\n\n copy_color(col)\n {\n this.material.uniforms._Color.value.copy(col);\n }\n}\n\nexport { Line };\n","import basic_texture_vert from '../shaders/basic_texture/basic_texture.vert';\nimport basic_texture_frag from '../shaders/basic_texture/basic_texture.frag';\n\nimport { Mesh } from 'three';\nimport { Vector2 } from 'three';\nimport { ShaderMaterial } from 'three';\nimport { DoubleSide } from 'three';\nimport { PlaneGeometry } from 'three';\nimport { Vector3 } from 'three';\n\nclass WorldImage extends Mesh\n{\n constructor(texture, pivot)\n {\n pivot = pivot || new Vector2(0, 0);\n const material = new ShaderMaterial({\n uniforms: {\n _MainTex: { value: texture },\n _ScreenAligned: { value: 0 },\n _Scale: { value: 1 },\n _Opacity: { value: 1 }\n },\n vertexShader: basic_texture_vert,\n fragmentShader: basic_texture_frag,\n transparent: true,\n depthWrite: false,\n side: DoubleSide\n });\n const geometry = new PlaneGeometry(1, 1, 1);\n geometry.translate(-pivot.x / 2, -pivot.y / 2, 0);\n const current_scale = texture.image.width / texture.image.height;\n geometry.scale(current_scale, 1, 1);\n super(geometry, material);\n this.current_scale = current_scale;\n this.geometry.computeBoundingBox();\n\n this.tmp_bb_size = new Vector3();\n this.geometry.boundingBox.getSize(this.tmp_bb_size);\n }\n\n update_texture()\n {\n this.material.uniforms._MainTex.value.needsUpdate = true;\n const img = this.material.uniforms._MainTex.value.image;\n\n this.geometry.scale(1 / this.current_scale, 1, 1);\n this.current_scale = img.width / img.height;\n this.geometry.scale(this.current_scale, 1, 1);\n this.geometry.computeBoundingBox();\n this.geometry.boundingBox.getSize(this.tmp_bb_size);\n }\n\n get size()\n {\n return this.tmp_bb_size.clone().multiplyScalar(this.scale.x);\n }\n\n set size(value)\n {\n this.scale.set(value, value, value);\n this.material.uniforms._Scale.value = value;\n }\n\n set screen_aligned(boolean)\n {\n this.material.uniforms._ScreenAligned.value = boolean === true ? 1 : 0;\n }\n\n get screen_aligned()\n {\n return this.material.uniforms._ScreenAligned.value === 1;\n }\n\n set opacity(opacity)\n {\n this.material.uniforms._Opacity.value = opacity;\n }\n\n get opacity()\n {\n return this.material.uniforms._Opacity.value;\n }\n\n dispose()\n {\n this.geometry.dispose();\n this.parent.remove(this);\n this.material.uniforms._MainTex.value.dispose();\n this.material.dispose();\n }\n}\n\nexport { WorldImage };\n","import { WorldImage } from './WorldImage';\nimport { SimpleTextDrawer } from '../canvas_drawer/SimpleTextDrawer';\n\nimport { LinearMipMapLinearFilter } from 'three';\nimport { LinearFilter } from 'three';\n\nclass Text2D extends WorldImage\n{\n constructor(text, font, color, pivot, is_static)\n {\n const simple_text_drawer = new SimpleTextDrawer(is_static);\n\n const draw_settings = {\n font: font,\n font_color: color || '#000000'\n };\n const canvas_texture = simple_text_drawer.draw_on_texture(text, draw_settings);\n\n canvas_texture.minFilter = LinearMipMapLinearFilter;\n canvas_texture.minFilter = LinearFilter;\n canvas_texture.needsUpdate = true;\n super(canvas_texture, pivot);\n\n this.simple_text_drawer = simple_text_drawer;\n this.canvas_texture = canvas_texture;\n this.draw_settings = draw_settings;\n }\n\n set text(value)\n {\n this.simple_text_drawer.draw_canvas(value, this.draw_settings);\n this.update_texture();\n }\n\n get text()\n {\n return 'not implemented';\n }\n}\n\nexport { Text2D };\n","import vert from '../shaders/ui_element/ui_element.vert';\nimport frag from '../shaders/ui_element/ui_element.frag';\n\nimport { BaseShaderMaterial } from '../materials/BaseShaderMaterial';\n\nimport { Vector2 } from 'three';\nimport { Vector3 } from 'three';\n\nimport { OScreen } from '../OScreen';\n\nclass UIElementMaterial extends BaseShaderMaterial\n{\n constructor(intensity = 1)\n {\n super(vert, frag, {\n _MainTex: { value: undefined },\n _ScreenSize: { value: new Vector2(OScreen.width, OScreen.height) },\n _TextureSize: { value: new Vector2() },\n _PixelOffset: { value: new Vector2(0, 0) },\n _NDC: { value: new Vector3() },\n _PivotPoint: { value: new Vector2() },\n _DepthOffset: { value: 0 }\n });\n this.transparent = true;\n this.depthWrite = false;\n this.depthTest = false;\n }\n}\n\nexport { UIElementMaterial };\n","import { Vector2 } from 'three';\n\nclass ScreenSpacePosition\n{\n constructor()\n {\n this.tmp_vec = new Vector2();\n }\n\n get_pos_NDC(position)\n {\n return this.tmp_vec.set(position.x, position.y);\n }\n}\n\nexport { ScreenSpacePosition };\n","import { CameraManager } from '../../CameraManager';\n\nimport { Vector2 } from 'three';\nimport { Vector3 } from 'three';\n\nclass WorldSpacePosition\n{\n constructor()\n {\n this.tmp_vec3 = new Vector3();\n this.tmp_vec2 = new Vector2();\n }\n\n get_pos_NDC(position)\n {\n this.tmp_vec3.copy(position);\n this.tmp_vec3.project(CameraManager.current);\n\n return this.tmp_vec2.set(this.tmp_vec3.x, this.tmp_vec3.y);\n }\n}\n\nexport { WorldSpacePosition };\n","class UIElementState\n{\n constructor()\n {\n\n }\n\n update(ui_element, normalized_mouse_position)\n {\n\n }\n\n on_enter(ui_element)\n {}\n\n on_exit(ui_element)\n {}\n}\n\nexport { UIElementState };\n","import { UIElementState } from './UIElementState';\n\nclass OnIdle extends UIElementState\n{\n constructor()\n {\n super();\n }\n\n update(ui_element, normalized_mouse_position)\n {\n if (ui_element.is_mouse_over(normalized_mouse_position))\n {\n ui_element.set_state(ui_element._on_enter_state);\n }\n }\n}\n\nexport { OnIdle };\n","import { UIElementState } from './UIElementState';\n\nclass OnMouseEnter extends UIElementState\n{\n constructor()\n {\n super();\n }\n\n on_enter(ui_element)\n {\n ui_element.on_mouse_enter();\n }\n\n update(ui_element, normalized_mouse_position)\n {\n if (ui_element.is_mouse_over(normalized_mouse_position))\n {\n ui_element.set_state(ui_element._on_hover_state);\n }\n else\n {\n ui_element.set_state(ui_element._on_exit_state);\n }\n }\n}\n\nexport { OnMouseEnter };\n","import { UIElementState } from './UIElementState';\n\nclass OnMouseExit extends UIElementState\n{\n constructor()\n {\n super();\n }\n\n on_enter(ui_element)\n {\n ui_element.on_mouse_exit();\n ui_element.set_state(ui_element._on_idle_state);\n }\n}\n\nexport { OnMouseExit };\n","import { UIElementState } from './UIElementState';\n\nclass OnMouseHover extends UIElementState\n{\n constructor()\n {\n super();\n }\n\n on_enter(ui_element)\n {\n this.__trigger_on_hover(ui_element);\n }\n\n update(ui_element, normalized_mouse_position)\n {\n if (ui_element.is_mouse_over(normalized_mouse_position))\n {\n this.__trigger_on_hover(ui_element);\n }\n else\n {\n ui_element.set_state(ui_element._on_exit_state);\n }\n }\n\n __trigger_on_hover(ui_element)\n {\n ui_element.on_mouse_hover();\n }\n}\n\nexport { OnMouseHover };\n","\nimport { OScreen } from '../OScreen';\n\nimport { UIElementMaterial } from '../materials/UIElementMaterial';\n\nimport { ScreenSpacePosition } from '../ui/ui_element_position/ScreenSpacePosition';\nimport { WorldSpacePosition } from '../ui/ui_element_position/WorldSpacePosition';\n\nimport { OnIdle } from '../ui/ui_element_state/OnIdle';\nimport { OnMouseEnter } from '../ui/ui_element_state/OnMouseEnter';\nimport { OnMouseExit } from '../ui/ui_element_state/OnMouseExit';\nimport { OnMouseHover } from '../ui/ui_element_state/OnMouseHover';\n\nimport { Mesh } from 'three';\nimport { PlaneGeometry } from 'three';\nimport { Vector2 } from 'three';\nimport { Vector3 } from 'three';\nimport { NearestFilter } from 'three';\nimport { Box2 } from 'three';\n\nclass UIElement extends Mesh\n{\n constructor(vert, frag)\n {\n super(new PlaneGeometry(1, 1), new UIElementMaterial());\n\n this.is_clickable = false;\n\n this.position_strategy = new WorldSpacePosition();\n this.current_state = new OnIdle();\n\n this._position = new Vector3();\n\n this._on_idle_state = new OnIdle();\n this._on_enter_state = new OnMouseEnter();\n this._on_exit_state = new OnMouseExit();\n this._on_hover_state = new OnMouseHover();\n\n this.on_enter = undefined;\n this.on_exit = undefined;\n this.on_hover = undefined;\n\n this.mouse_pos_tmp = new Vector2();\n this.cached_NDC_position = new Vector2();\n this.screen_pos_tmp = new Vector2();\n\n this.texture_size = new Vector2(1, 1);\n\n this.frustumCulled = false;\n this.matrixAutoUpdate = false;\n this.renderOrder = 0;\n\n this.size = 1;\n this.pixel_offset = new Vector2();\n }\n\n set_render_order(value)\n {\n this.renderOrder = value;\n }\n\n get pivot_point()\n {\n return this.material.uniforms._PivotPoint.value;\n }\n\n set_pixel_offset(offset)\n {\n this.pixel_offset.copy(offset);\n this.material.uniforms._PixelOffset.value.copy(offset);\n }\n\n set_state(new_state)\n {\n this.current_state.on_exit(this);\n this.current_state = new_state;\n this.current_state.on_enter(this);\n }\n\n get position()\n {\n return this._position;\n }\n\n set use_depth(boolean)\n {\n this.material.depthTest = boolean;\n }\n\n get use_depth()\n {\n return this.material.depthTest;\n }\n\n set depth_offset(value)\n {\n this.material.uniforms._DepthOffset.value = value;\n }\n\n get depth_offset()\n {\n return this.material.uniforms._DepthOffset.value;\n }\n\n clear_state()\n {\n this.visible = false;\n }\n\n set_world_space_coordinate_system()\n {\n this.position_strategy = new WorldSpacePosition();\n }\n\n set_screen_space_coordinate_system()\n {\n this.position_strategy = new ScreenSpacePosition();\n }\n\n set_texture(texture)\n {\n texture.minFilter = NearestFilter;\n texture.magFilter = NearestFilter;\n texture.needsUpdate = true;\n\n this.texture_size.set(texture.image.width, texture.image.height);\n\n this.material.uniforms._MainTex.value = texture;\n this.get_size(this.material.uniforms._TextureSize.value);\n this.visible = true;\n }\n\n update_state(normalized_mouse_pos)\n {\n this.material.uniforms._ScreenSize.value.set(OScreen.width, OScreen.height);\n this.get_size(this.material.uniforms._TextureSize.value);\n\n this.cached_NDC_position.copy(this.position_strategy.get_pos_NDC(this.position));\n this.material.uniforms._NDC.value.copy(this.position);\n this.current_state.update(this, normalized_mouse_pos);\n }\n\n is_mouse_over(normalized_mouse_pos)\n {\n this.screen_pos_tmp.copy(this.cached_NDC_position);\n this.to_screen_position(this.screen_pos_tmp);\n this.screen_pos_tmp.x += this.pixel_offset.x;\n this.screen_pos_tmp.y += this.pixel_offset.y;\n\n const rect = new Box2().setFromCenterAndSize(this.screen_pos_tmp, this.get_size());\n\n this.mouse_pos_tmp.copy(normalized_mouse_pos);\n this.to_screen_position(this.mouse_pos_tmp);\n\n return rect.containsPoint(this.mouse_pos_tmp);\n }\n\n to_screen_position(projected_pos)\n {\n projected_pos.x = (projected_pos.x * 0.5 + 0.5) * OScreen.width + this.pixel_offset.x;\n projected_pos.y = (projected_pos.y * 0.5 + 0.5) * OScreen.height + this.pixel_offset.y;\n }\n\n get_screen_space_position()\n {\n const pos = this.cached_NDC_position.clone();\n this.to_screen_position(pos);\n return pos;\n }\n\n set_screen_space_position(screen_pos)\n {\n this.position.x = (screen_pos.x / OScreen.width) * 2 - 1;\n this.position.y = (screen_pos.y / OScreen.height) * 2 - 1;\n }\n\n dispose()\n {\n if (this.material.uniforms._MainTex.value)\n {\n this.material.uniforms._MainTex.value.dispose();\n }\n // OScreen.remove_screen_material(this.material);\n this.geometry.dispose();\n this.material.dispose();\n }\n\n get_size(vector2)\n {\n if (vector2)\n {\n return vector2.copy(this.texture_size).multiplyScalar(this.size / OScreen.dpr);\n }\n else\n {\n return new Vector2().copy(this.texture_size).multiplyScalar(this.size / OScreen.dpr);\n }\n }\n\n on_mouse_enter()\n {}\n\n on_mouse_exit()\n {}\n\n on_mouse_hover()\n {}\n}\n\nexport { UIElement };\n","import { Mesh } from 'three';\n\nclass UpdatableMaterialMesh extends Mesh\n{\n constructor(geometry, material)\n {\n super(geometry, material);\n\n const self = this;\n\n this.onBeforeRender = () =>\n {\n self.material.update();\n };\n }\n}\n\nexport { UpdatableMaterialMesh };\n","import { Vector2, Vector4 } from 'three';\n\nclass TextGlyph\n{\n constructor(offset, plane_bounds, atlas_bounds)\n {\n const width = plane_bounds.right - plane_bounds.left;\n const height = plane_bounds.top - plane_bounds.bottom;\n\n this.scale = new Vector2(width, height);\n this.position = new Vector2(offset + plane_bounds.left, plane_bounds.bottom);\n\n this.atlas_bounds = new Vector4(atlas_bounds.left, atlas_bounds.right, atlas_bounds.top, atlas_bounds.bottom);\n }\n}\n\nexport { TextGlyph };\n","import { Vector3, Quaternion, Matrix4, Color, Box2, Vector2 } from 'three';\nimport { TextGlyph } from './TextGlyph';\n\nclass SDFText\n{\n constructor(glyph_layout, text = '')\n {\n this.glyph_layout = glyph_layout;\n\n this.glyphs = [];\n\n this.glyph_is_dirty = true;\n this.matrix_is_dirty = true;\n this.color_is_dirty = true;\n\n this.position = new Vector3();\n this.quaternion = new Quaternion();\n this.scale = new Vector3(1, 1, 1);\n this.matrix = new Matrix4();\n\n this.color = new Color('#FFFFFF');\n\n this.pivot_point = new Vector2();\n this.__opacity = 1;\n\n this.__text = text;\n\n this.__generate_glyphs(text);\n }\n\n set text(value)\n {\n this.__text = value;\n this.__generate_glyphs(value);\n this.matrix_is_dirty = true;\n }\n\n get text()\n {\n return this.__text;\n }\n\n update_matrix()\n {\n this.matrix.compose(this.position, this.quaternion, this.scale);\n this.matrix_is_dirty = false;\n this.glyph_is_dirty = true;\n }\n\n clear_glyph_dirty()\n {\n this.glyph_is_dirty = false;\n }\n\n clear_color_dirty()\n {\n this.color_is_dirty = false;\n }\n\n set_rotation(orientation = 0, tilt = 0) // 0..360, -90..0..90\n {\n const new_orientation = new Quaternion().setFromAxisAngle(new Vector3(0, 1, 0), (orientation / 360) * Math.PI * 2);\n const new_tilt = new Quaternion().setFromAxisAngle(new Vector3(1, 0, 0), (-tilt / 360) * Math.PI * 2);\n\n this.quaternion.copy(new_orientation.multiply(new_tilt));\n this.matrix_is_dirty = true;\n }\n\n set_position(pos)\n {\n this.position.copy(pos);\n this.matrix_is_dirty = true;\n }\n\n set_size(size)\n {\n this.scale.set(size, size, size);\n this.matrix_is_dirty = true;\n }\n\n set_color(col)\n {\n this.color.set(col);\n this.color_is_dirty = true;\n }\n\n set_pivot(pivot)\n {\n this.pivot_point.copy(pivot);\n this.update_glyphs();\n }\n\n set opacity(op)\n {\n this.__opacity = op;\n this.color_is_dirty = true;\n }\n\n get opacity()\n {\n return this.__opacity;\n }\n\n update_glyphs()\n {\n this.__generate_glyphs(this.text);\n }\n\n __generate_glyphs(text)\n {\n let cursor = 0;\n\n this.glyphs.length = 0;\n\n for (let i = 0; i < text.length; i++)\n {\n const unicode = text.charCodeAt(i);\n const glyph = this.glyph_layout.find(element => element.unicode === unicode);\n if (glyph)\n {\n if (glyph.planeBounds)\n {\n const text_glyph = new TextGlyph(cursor, glyph.planeBounds, glyph.atlasBounds);\n this.glyphs.push(text_glyph);\n }\n cursor += glyph.advance;\n }\n }\n\n const box2 = new Box2();\n const first_glyph = this.glyphs[0];\n box2.setFromCenterAndSize(first_glyph.position.clone().add(new Vector2(first_glyph.scale.x / 2, first_glyph.scale.y / 2)), first_glyph.scale);\n\n for (let i = 1; i < this.glyphs.length; i++)\n {\n const g = this.glyphs[i];\n const box = new Box2().setFromCenterAndSize(g.position.clone().add(new Vector2(g.scale.x / 2, g.scale.y / 2)), g.scale);\n box2.union(box);\n }\n\n const box2_size = new Vector2();\n box2.getSize(box2_size);\n for (let i = 0; i < this.glyphs.length; i++)\n {\n this.glyphs[i].position.x -= box2_size.x / 2;\n this.glyphs[i].position.y -= box2_size.y / 2;\n\n this.glyphs[i].position.x += (box2_size.x / 2) * this.pivot_point.x;\n this.glyphs[i].position.y += (box2_size.y / 2) * this.pivot_point.y;\n }\n\n this.glyph_is_dirty = true;\n }\n}\n\nexport { SDFText };\n","import { BaseShaderMaterial } from './BaseShaderMaterial';\n\nimport frag from '../shaders/sdf_text/sdf_text.frag';\nimport vert from '../shaders/sdf_text/sdf_text.vert';\n\nimport { Vector2, DoubleSide, LinearFilter } from 'three';\nimport { OMath } from '../utilities/OMath';\n\nclass SDFTextMaterial extends BaseShaderMaterial\n{\n constructor(texture)\n {\n super(vert, frag, {\n _Texture: { value: texture },\n _Boldness: { value: 0.5 },\n _AtlasSize: { value: new Vector2(1, 1) }\n });\n\n this.transparent = true;\n this.extensions = {\n derivatives: true\n };\n this.depthWrite = false;\n this.side = DoubleSide;\n texture.minFilter = LinearFilter;\n texture.magFilter = LinearFilter;\n texture.generateMipMaps = false;\n }\n\n set_atlas_size(size)\n {\n this.uniforms._AtlasSize.value.copy(size);\n }\n\n set_boldness(value)\n {\n this.uniforms._Boldness.value = OMath.lerp(0.5, 0.2, value);\n }\n}\n\nexport { SDFTextMaterial };\n","import { SDFText } from './SDFText';\nimport { SDFTextMaterial } from '../../materials/SDFTextMaterial';\nimport { ArrayUtilities } from '../../utilities/ArrayUtilities';\n\nimport {\n PlaneGeometry,\n Mesh,\n Vector2,\n InstancedBufferGeometry,\n InstancedBufferAttribute,\n Float32BufferAttribute,\n DynamicDrawUsage\n} from 'three';\n\nclass SDFTextBatch extends Mesh\n{\n constructor(font_layout, atlas_texture)\n {\n const max_allocations = 2000;\n\n const instanced_geometry = new InstancedBufferGeometry();\n instanced_geometry.instanceCount = 0;\n\n const geometry = new PlaneGeometry(1, 1);\n geometry.translate(0.5, 0.5, 0);\n instanced_geometry.setAttribute('position', new Float32BufferAttribute(geometry.getAttribute('position').array, 3));\n instanced_geometry.setAttribute('uv', new Float32BufferAttribute(geometry.getAttribute('uv').array, 2));\n instanced_geometry.index = geometry.index;\n\n const transformsCol0 = new InstancedBufferAttribute(new Float32Array(max_allocations * 4), 4, false);\n const transformsCol1 = new InstancedBufferAttribute(new Float32Array(max_allocations * 4), 4, false);\n const transformsCol2 = new InstancedBufferAttribute(new Float32Array(max_allocations * 4), 4, false);\n const transformsCol3 = new InstancedBufferAttribute(new Float32Array(max_allocations * 4), 4, false);\n\n const glyph_bounds = new InstancedBufferAttribute(new Float32Array(max_allocations * 4), 4, false);\n const plane_bounds = new InstancedBufferAttribute(new Float32Array(max_allocations * 4), 4, false);\n\n const color = new InstancedBufferAttribute(new Float32Array(max_allocations * 4), 4, false);\n\n transformsCol0.usage = DynamicDrawUsage;\n transformsCol1.usage = DynamicDrawUsage;\n transformsCol2.usage = DynamicDrawUsage;\n transformsCol3.usage = DynamicDrawUsage;\n glyph_bounds.usage = DynamicDrawUsage;\n plane_bounds.usage = DynamicDrawUsage;\n color.usage = DynamicDrawUsage;\n\n instanced_geometry.setAttribute('transformsCol0', transformsCol0);\n instanced_geometry.setAttribute('transformsCol1', transformsCol1);\n instanced_geometry.setAttribute('transformsCol2', transformsCol2);\n instanced_geometry.setAttribute('transformsCol3', transformsCol3);\n\n instanced_geometry.setAttribute('glyph_bounds', glyph_bounds);\n instanced_geometry.setAttribute('plane_bounds', plane_bounds);\n instanced_geometry.setAttribute('color', color);\n\n super(instanced_geometry, new SDFTextMaterial(atlas_texture));\n\n this.text_elements = [];\n this.font_layout = font_layout;\n\n this.material.set_atlas_size(new Vector2(font_layout.atlas.width, font_layout.atlas.height));\n\n this.frustumCulled = false;\n }\n\n set_boldness(value)\n {\n this.material.set_boldness(value);\n }\n\n add_text(text_str)\n {\n const elem = new SDFText(this.font_layout.glyphs, text_str);\n this.text_elements.push(elem);\n return elem;\n }\n\n remove_text(text_elem)\n {\n ArrayUtilities.remove_elem(this.text_elements, text_elem);\n this.update(true);\n }\n\n update(force_update)\n {\n const glyph_bounds_atr = this.geometry.getAttribute('glyph_bounds');\n const plane_bounds_atr = this.geometry.getAttribute('plane_bounds');\n\n const transformsCol0 = this.geometry.getAttribute('transformsCol0');\n const transformsCol1 = this.geometry.getAttribute('transformsCol1');\n const transformsCol2 = this.geometry.getAttribute('transformsCol2');\n const transformsCol3 = this.geometry.getAttribute('transformsCol3');\n\n const color_atr = this.geometry.getAttribute('color');\n\n let matrix_needs_update = force_update === true;\n let glyph_needs_update = force_update === true;\n let color_needs_update = force_update === true;\n\n let glyph_count = 0;\n for (let i = 0; i < this.text_elements.length; i++)\n {\n const text = this.text_elements[i];\n\n if (text.matrix_is_dirty)\n {\n matrix_needs_update = true;\n text.update_matrix();\n }\n\n if (text.glyph_is_dirty)\n {\n glyph_needs_update = true;\n text.clear_glyph_dirty();\n }\n\n if (text.color_is_dirty)\n {\n color_needs_update = true;\n text.clear_color_dirty();\n }\n\n const matrix = text.matrix;\n const color = text.color;\n const opacity = text.opacity;\n\n for (let glyph_i = 0; glyph_i < text.glyphs.length; glyph_i++)\n {\n const glyph = text.glyphs[glyph_i];\n\n const buffer_i = glyph_count;\n\n glyph_bounds_atr.setXYZW(buffer_i, glyph.atlas_bounds.x, glyph.atlas_bounds.y, glyph.atlas_bounds.z, glyph.atlas_bounds.w);\n plane_bounds_atr.setXYZW(buffer_i, glyph.position.x, glyph.position.y, glyph.scale.x, glyph.scale.y);\n\n transformsCol0.setXYZW(buffer_i, matrix.elements[0],\n matrix.elements[1],\n matrix.elements[2],\n matrix.elements[3]);\n\n transformsCol1.setXYZW(buffer_i, matrix.elements[4],\n matrix.elements[5],\n matrix.elements[6],\n matrix.elements[7]);\n\n transformsCol2.setXYZW(buffer_i, matrix.elements[8],\n matrix.elements[9],\n matrix.elements[10],\n matrix.elements[11]);\n\n transformsCol3.setXYZW(buffer_i, matrix.elements[12],\n matrix.elements[13],\n matrix.elements[14],\n matrix.elements[15]);\n\n color_atr.setXYZW(buffer_i, color.r, color.g, color.b, opacity);\n\n glyph_count++;\n }\n }\n\n this.geometry.instanceCount = glyph_count;\n\n if (glyph_count > this.max_allocations)\n {\n console.error('SDFTextBatch exceeded maximum glyph allocations(max/current): ', this.max_allocations, glyph_count, this);\n }\n\n if (matrix_needs_update)\n {\n transformsCol0.needsUpdate = true;\n transformsCol1.needsUpdate = true;\n transformsCol2.needsUpdate = true;\n transformsCol3.needsUpdate = true;\n }\n if (glyph_needs_update)\n {\n glyph_bounds_atr.needsUpdate = true;\n plane_bounds_atr.needsUpdate = true;\n }\n if (color_needs_update)\n {\n color_atr.needsUpdate = true;\n }\n }\n\n dispose()\n {\n this.geometry.dispose();\n this.material.dispose();\n }\n}\n\nexport { SDFTextBatch };\n","import { ActionInterpolator } from './ActionInterpolator';\n\nclass VectorInterpolator extends ActionInterpolator\n{\n constructor(attribute_name, from = 0, to = 1, easing_function = 'linear')\n {\n super(easing_function);\n\n this.attribute_name = attribute_name;\n this.from = from;\n this.to = to;\n }\n\n update(context, t)\n {\n const tmp = this.from.clone();\n tmp.lerp(this.to, this.easing_function(t));\n context[this.attribute_name].copy(tmp);\n }\n}\n\nexport { VectorInterpolator };\n","import { BlitMaterial } from '../materials/BlitMaterial';\n\nimport frag from '../shaders/median_filter/median_filter.frag';\n\nimport { Vector2 } from 'three';\n\nclass MedianFilterMaterial extends BlitMaterial\n{\n constructor()\n {\n super(frag, undefined, {\n kernel3x3: true\n });\n\n this.uniforms._SourceTex = { value: undefined };\n this.uniforms._SourceTexSize = { value: new Vector2(1, 1) };\n }\n\n set_texture(tex)\n {\n this.uniforms._SourceTex.value = tex;\n\n const size = this.get_size(tex);\n this.uniforms._SourceTexSize.value.copy(size);\n }\n\n get_size(tex)\n {\n if (tex.isVideoTexture)\n {\n return new Vector2(Math.max(1, tex.image.videoWidth), Math.max(1, tex.image.videoHeight));\n }\n if (tex.isWebGLRenderTarget)\n {\n return new Vector2(tex.width, tex.height);\n }\n if (tex.isTexture)\n {\n return new Vector2(tex.image.width, tex.image.height);\n }\n return new Vector2(1, 1);\n }\n}\n\nexport { MedianFilterMaterial };\n","import { MedianFilterMaterial } from '../materials/MedianFilterMaterial';\nimport { Graphics } from '../Graphics';\n\nimport { WebGLRenderTarget, Vector2, RGBAFormat, FloatType, NearestFilter } from 'three';\n\nclass MedianFilter\n{\n constructor(renderer)\n {\n this.RT = new WebGLRenderTarget(1, 1, {\n type: FloatType,\n format: RGBAFormat,\n minFilter: NearestFilter,\n magFilter: NearestFilter\n });\n this.RT1 = new WebGLRenderTarget(1, 1, {\n type: FloatType,\n format: RGBAFormat,\n minFilter: NearestFilter,\n magFilter: NearestFilter\n });\n\n this.median_filter_mat = new MedianFilterMaterial();\n }\n\n filter(texture)\n {\n const tex_size = this.get_size(texture);\n if (tex_size.x !== this.RT.width || tex_size.y !== this.RT.height)\n {\n this.RT.setSize(tex_size.x, tex_size.y);\n this.RT1.setSize(tex_size.x, tex_size.y);\n }\n\n this.median_filter_mat.set_texture(texture);\n Graphics.material_pass(this.median_filter_mat, this.RT);\n\n for (let i = 0; i < 0; i++)\n {\n this.median_filter_mat.set_texture(this.RT.texture);\n Graphics.material_pass(this.median_filter_mat, this.RT1);\n\n this.median_filter_mat.set_texture(this.RT1.texture);\n Graphics.material_pass(this.median_filter_mat, this.RT);\n }\n\n return this.RT;\n }\n\n get_size(tex)\n {\n if (tex.isVideoTexture)\n {\n return new Vector2(Math.max(1, tex.image.videoWidth), Math.max(1, tex.image.videoHeight));\n }\n if (tex.isWebGLRenderTarget)\n {\n return new Vector2(tex.width, tex.height);\n }\n if (tex.isTexture)\n {\n return new Vector2(tex.image.width, tex.image.height);\n }\n return new Vector2(1, 1);\n }\n}\n\nexport { MedianFilter };\n","import { BlitMaterial } from './BlitMaterial';\n\nimport downsample_frag from '../shaders/dual_filter_blur/downsample.frag';\nimport upsample_frag from '../shaders/dual_filter_blur/upsample.frag';\n\nclass DualFilteringBlurMaterial extends BlitMaterial\n{\n constructor(upsample)\n {\n super(upsample ? upsample_frag : downsample_frag);\n }\n}\n\nexport { DualFilteringBlurMaterial };\n","import { BlitMaterial } from './BlitMaterial';\n\nimport frag from '../shaders/dual_filter_blur/alpha_filter.frag';\n\nclass AlphaFilterMaterial extends BlitMaterial\n{\n constructor(use_alpha_mask, upsample)\n {\n super(frag);\n }\n\n set offset(value)\n {\n this.uniforms._Offset.value = value;\n }\n\n get offset()\n {\n return this.uniforms._Offset.value;\n }\n}\n\nexport { AlphaFilterMaterial };\n","import { DualFilteringBlurMaterial } from '../materials/DualFilteringBlurMaterial';\nimport { AlphaFilterMaterial } from '../materials/AlphaFilterMaterial';\nimport { Graphics } from '../Graphics';\nimport { WebGLRenderTarget } from 'three';\nclass DualFilteringBlurrer\n{\n constructor(use_alpha_mask)\n {\n this.current_width = 1;\n this.current_height = 1;\n this.RT0 = new WebGLRenderTarget(1, 1);\n this.RT1 = new WebGLRenderTarget(1, 1);\n this.RT2 = new WebGLRenderTarget(1, 1);\n this.RT3 = new WebGLRenderTarget(1, 1);\n this.RT4 = new WebGLRenderTarget(1, 1);\n\n this.upscale_blur_mat = new DualFilteringBlurMaterial(true);\n this.downscale_blur_mat = new DualFilteringBlurMaterial(false);\n\n this.alpha_filter_mat = new AlphaFilterMaterial();\n }\n\n blur(RT)\n {\n this.check_RT_resize(RT.width, RT.height);\n Graphics.blit(RT, this.RT1, this.alpha_filter_mat);\n\n // Graphics.blit(this.RT0, this.RT1, this.downscale_blur_mat);\n Graphics.blit(this.RT1, this.RT2, this.downscale_blur_mat);\n Graphics.blit(this.RT2, this.RT3, this.downscale_blur_mat);\n Graphics.blit(this.RT3, this.RT4, this.downscale_blur_mat);\n\n // Graphics.blit(this.RT4, this.RT3, this.upscale_blur_mat);\n // Graphics.blit(this.RT3, this.RT4, this.upscale_blur_mat);\n Graphics.blit(this.RT4, this.RT3, this.upscale_blur_mat);\n Graphics.blit(this.RT3, this.RT2, this.upscale_blur_mat);\n Graphics.blit(this.RT2, RT, this.upscale_blur_mat);\n // Graphics.blit(this.RT1, RT, this.upscale_blur_mat);\n\n // return this.RT2;\n }\n\n check_RT_resize(width, height)\n {\n if (this.current_width !== width || this.current_height !== height)\n {\n this.current_width = width;\n this.current_height = height;\n this.RT0.setSize(this.current_width / 2, this.current_height / 2);\n this.RT1.setSize(this.current_width / 2, this.current_height / 2);\n this.RT2.setSize(this.current_width / 4, this.current_height / 4);\n this.RT3.setSize(this.current_width / 8, this.current_height / 8);\n this.RT4.setSize(this.current_width / 16, this.current_height / 16);\n }\n }\n}\n\nexport { DualFilteringBlurrer };\n","import { Graphics } from '../Graphics';\n\nimport { NearestFilter } from 'three';\nimport { RGBAFormat } from 'three';\nimport { LinearEncoding } from 'three';\nimport { HalfFloatType } from 'three';\nimport { FloatType } from 'three';\nimport { WebGLRenderTarget } from 'three';\nimport { Capabilities } from '../Capabilities';\n\nclass ParticleAttribute\n{\n constructor(attr_name, update_material)\n {\n this.read = undefined;\n this.write = undefined;\n\n this.name = attr_name;\n\n this.update_material = update_material;\n }\n\n init_from_geometry(geometry)\n {\n // overrided by inheritance\n }\n\n init_from_attribute(particle_attribute)\n {\n\n }\n\n build_RT(particle_count)\n {\n const resolution = ParticleAttribute.calculate_resolution(particle_count);\n const options = {\n minFilter: NearestFilter,\n magFilter: NearestFilter,\n format: RGBAFormat,\n encoding: LinearEncoding,\n type: Capabilities.fp_textures_available ? FloatType : HalfFloatType,\n stencilBuffer: false,\n depthBuffer: false\n };\n\n return new WebGLRenderTarget(resolution.width, resolution.height, options);\n }\n\n static calculate_resolution(particle_count)\n {\n const width = Math.min(particle_count, 512);\n const height = Math.max(1, Math.ceil(particle_count / width));\n return { width, height };\n }\n\n swap_RT()\n {\n const tmp = this.read;\n this.read = this.write;\n this.write = tmp;\n }\n\n update(attribute_writter_scene)\n {\n if (this.update_material)\n {\n this.update_material.update();\n attribute_writter_scene.children[0].material = this.update_material;\n this.update_material.uniforms._MainTex.value = this.read.texture;\n Graphics.render(attribute_writter_scene, undefined, this.write);\n attribute_writter_scene.children[0].material = undefined;\n\n this.swap_RT();\n }\n }\n\n store_geometry_attribute_in_RT(attribute, RT, storage_material, attribute_writter_scene)\n {\n attribute_writter_scene.children[0].geometry.setAttribute('data', attribute);\n attribute_writter_scene.children[0].material = storage_material;\n\n Graphics.render(attribute_writter_scene, undefined, RT);\n\n attribute_writter_scene.children[0].geometry.deleteAttribute('data');\n attribute_writter_scene.children[0].material = undefined;\n }\n\n get_texture()\n {\n return this.read.texture;\n }\n}\n\nexport { ParticleAttribute };\n","import { Object3D } from 'three';\nimport { BufferAttribute } from 'three';\nimport { PlaneGeometry } from 'three';\nimport { Mesh } from 'three';\nimport { BufferGeometry } from 'three';\nimport { Scene } from 'three';\nimport { Points } from 'three';\nimport { InstancedBufferGeometry } from 'three';\nimport { InstancedBufferAttribute } from 'three';\nimport { ParticleAttribute } from './ParticleAttribute';\n\nclass GPUParticleSystem extends Object3D\n{\n constructor(particle_count, material)\n {\n super();\n this.attributes = [];\n\n this.mesh = this.build_point_mesh(particle_count, material);\n this.add(this.mesh);\n\n this.attribute_writter_mesh = this.build_attribute_writter_mesh(particle_count);\n this.attribute_writter_scene = new Scene();\n this.attribute_writter_scene.add(this.attribute_writter_mesh);\n }\n\n add_texture_attribute(buffer_attribute)\n {\n this.attributes.push(buffer_attribute);\n }\n\n add_update_attribute_array(name, array, item_size)\n {\n this.attribute_writter_mesh.geometry.setAttribute(name, new BufferAttribute(array, item_size, false));\n }\n\n add_attribute_array(name, array, item_size)\n {\n this.mesh.geometry.setAttribute(name, new InstancedBufferAttribute(array, item_size, false));\n }\n\n update()\n {\n this.mesh.material.update();\n for (let i = 0; i < this.attributes.length; i++)\n {\n this.attributes[i].update(this.attribute_writter_scene);\n }\n }\n\n dispose()\n {\n this.mesh.geometry.dispose();\n this.mesh.material.dispose();\n }\n\n build_point_mesh(instance_count = 1, material)\n {\n const geo = new PlaneGeometry();\n\n const instanced_geo = new InstancedBufferGeometry();\n instanced_geo.setAttribute('position', geo.getAttribute('position'));\n instanced_geo.index = geo.index;\n\n instanced_geo.setAttribute('storage_uv', this.build_uv_storage_attribute(instance_count));\n instanced_geo.instanceCount = instance_count;\n const mesh = new Mesh(instanced_geo, material);\n mesh.frustumCulled = false;\n return mesh;\n }\n\n build_attribute_writter_mesh(particle_count)\n {\n const { width, height } = ParticleAttribute.calculate_resolution(particle_count);\n\n const uvs = new Float32Array(particle_count * 3);\n\n for (let i = 0; i < particle_count; i++)\n {\n const x = i % width;\n const y = Math.floor(i / width);\n uvs[i * 3 + 0] = (x + 0.5) / width;\n uvs[i * 3 + 1] = (y + 0.5) / height;\n uvs[i * 3 + 2] = i;\n }\n const geo = new BufferGeometry();\n geo.setAttribute('position', new BufferAttribute(uvs, 3, false));\n\n const points = new Points(geo);\n points.frustumCulled = false;\n return points;\n }\n\n build_uv_storage_attribute(particle_count)\n {\n const { width, height } = ParticleAttribute.calculate_resolution(particle_count);\n\n const uvs = new Float32Array(particle_count * 2);\n\n for (let i = 0; i < particle_count; i++)\n {\n const x = i % width;\n const y = Math.floor(i / width);\n uvs[i * 2 + 0] = (x + 0.5) / width;\n uvs[i * 2 + 1] = (y + 0.5) / height;\n }\n return new InstancedBufferAttribute(uvs, 2, false);\n }\n}\n\nexport { GPUParticleSystem };\n","import frag from '../../shaders/gpu_particles/generic_storage.frag';\n\nimport { ShaderMaterial } from 'three';\nimport { NoBlending } from 'three';\nimport { AlwaysDepth } from 'three';\n\nclass ParticleStorageMaterial extends ShaderMaterial\n{\n constructor()\n {\n const vert = `\n varying vec4 value;\n attribute vec4 data;\n\n void main()\n {\n gl_Position = vec4(position.xy * 2.0 - 1.0, 1.0,1.0);\n gl_PointSize = 1.0;\n\n value = data;\n }\n `;\n super({\n uniforms: {\n\n },\n vertexShader: vert,\n fragmentShader: frag,\n depthWrite: false,\n blending: NoBlending,\n depthTest: false,\n depthFunc: AlwaysDepth\n });\n }\n}\n\nexport { ParticleStorageMaterial };\n","import { BufferAttribute } from 'three';\n\nimport { ParticleAttribute } from '../gpu_particles/ParticleAttribute';\nimport { ParticleStorageMaterial } from '../materials/gpu_particles/ParticleStorageMaterial';\n\nclass ParticlePositionAttribute extends ParticleAttribute\n{\n constructor(update_material)\n {\n super('_Position', update_material);\n }\n\n store_geometry(geometry, attribute_writter_scene)\n {\n const pos_attr = geometry.getAttribute('position');\n this.read = this.build_RT(pos_attr.count);\n this.write = this.build_RT(pos_attr.count);\n\n const mat = new ParticleStorageMaterial();\n this.store_geometry_attribute_in_RT(geometry.getAttribute('position'), this.read, mat, attribute_writter_scene);\n }\n\n store_positions(positions, attribute_writter_scene)\n {\n this.read = this.build_RT(positions.length);\n this.write = this.build_RT(positions.length);\n\n const arr = new Float32Array(positions.length * 4);\n\n for (let i = 0; i < positions.length; i++)\n {\n arr[i * 4 + 0] = positions[i].x;\n arr[i * 4 + 1] = positions[i].y;\n arr[i * 4 + 2] = positions[i].z;\n arr[i * 4 + 3] = (Math.random() * 2 - 1) * 10;\n }\n const mat = new ParticleStorageMaterial();\n this.store_geometry_attribute_in_RT(new BufferAttribute(arr, 4), this.read, mat, attribute_writter_scene);\n }\n}\n\nexport { ParticlePositionAttribute };\n","import { DataTexture } from 'three';\n\nclass CustomDataTexture extends DataTexture\n{\n constructor(data, width, height, format, type)\n {\n super(data, width, height, format, type);\n this.multiplier = 1;\n }\n\n set_rgba(index, r, g, b, a)\n {\n this.data[index * 3 + 0] = r * this.multiplier;\n this.data[index * 3 + 1] = g * this.multiplier;\n this.data[index * 3 + 2] = b * this.multiplier;\n this.data[index * 3 + 3] = a * this.multiplier;\n this.needsUpdate = true;\n }\n\n set_rgb(index, r, g, b)\n {\n this.data[index * 3 + 0] = r * this.multiplier;\n this.data[index * 3 + 1] = g * this.multiplier;\n this.data[index * 3 + 2] = b * this.multiplier;\n this.needsUpdate = true;\n }\n\n set_r(index, value)\n {\n this.data[index * 3 + 0] = value * this.multiplier;\n this.needsUpdate = true;\n }\n\n set_g(index, value)\n {\n this.data[index * 3 + 1] = value * this.multiplier;\n this.needsUpdate = true;\n }\n\n set_b(index, value)\n {\n this.data[index * 3 + 2] = value * this.multiplier;\n this.needsUpdate = true;\n }\n\n set_a(index, value)\n {\n this.data[index * 3 + 2] = value * this.multiplier;\n this.needsUpdate = true;\n }\n}\n\nexport { CustomDataTexture };\n","import { CustomDataTexture } from './CustomDataTexture';\nimport { RGBFormat } from 'three';\n\nclass RGBDataTexture extends CustomDataTexture\n{\n constructor(width, height)\n {\n const data = new Uint8Array(width * height * 3);\n super(data, width, height, RGBFormat);\n this.multiplier = 255;\n }\n}\n\nexport { RGBDataTexture };\n","import { CustomDataTexture } from './CustomDataTexture';\nimport { RGBAFormat } from 'three';\n\nclass RGBADataTexture extends CustomDataTexture\n{\n constructor(width, height)\n {\n const data = new Uint8Array(width * height * 4);\n super(data, width, height, RGBAFormat);\n this.multiplier = 255;\n }\n}\n\nexport { RGBADataTexture };\n","import { CustomDataTexture } from './CustomDataTexture';\nimport { FloatType } from 'three';\nimport { RGBFormat } from 'three';\n\nclass RGBFloatDataTexture extends CustomDataTexture\n{\n constructor(width, height)\n {\n const data = new Float32Array(width * height * 3);\n super(data, width, height, RGBFormat, FloatType);\n }\n}\n\nexport { RGBFloatDataTexture };\n","import { CustomDataTexture } from './CustomDataTexture';\nimport { FloatType } from 'three';\nimport { RGBAFormat } from 'three';\n\nclass RGBAFloatDataTexture extends CustomDataTexture\n{\n constructor(width, height)\n {\n const data = new Float32Array(width * height * 4);\n super(data, width, height, RGBAFormat, FloatType);\n }\n}\n\nexport { RGBAFloatDataTexture };\n","import { Mesh } from 'three';\nimport { RGBDataTexture } from '../data_textures/RGBDataTexture';\nimport { RGBADataTexture } from '../data_textures/RGBADataTexture';\nimport { RGBFloatDataTexture } from '../data_textures/RGBFloatDataTexture';\nimport { RGBAFloatDataTexture } from '../data_textures/RGBAFloatDataTexture';\n\nclass BatchedMesh extends Mesh\n{\n constructor(id_table, geometry, material, max_texture_width)\n {\n super(geometry, material);\n\n this.id_table = id_table;\n this.batched_count = Object.keys(id_table).length;\n this.max_texture_width = max_texture_width;\n this.batch_width = this.batched_count % max_texture_width;\n this.batch_height = Math.ceil(this.batched_count / max_texture_width);\n }\n\n attach_rgb_texture(uniform_name)\n {\n this.material.uniforms[uniform_name].value = new RGBDataTexture(this.batch_width, this.batch_height);\n }\n\n attach_rgba_texture(uniform_name)\n {\n this.material.uniforms[uniform_name].value = new RGBADataTexture(this.batch_width, this.batch_height);\n }\n\n attach_rgb_float_texture(uniform_name)\n {\n this.material.uniforms[uniform_name].value = new RGBFloatDataTexture(this.batch_width, this.batch_height);\n }\n\n attach_rgba_float_texture(uniform_name)\n {\n this.material.uniforms[uniform_name].value = new RGBAFloatDataTexture(this.batch_width, this.batch_height);\n }\n\n get_mesh_index(name)\n {\n return this.id_table[name];\n }\n\n set_rgb_value(uniform_name, mesh_name, r, g, b)\n {\n this.material.uniforms[uniform_name].set_rgb(this.get_mesh_index(mesh_name), r, g, b);\n }\n\n set_rgba_value(uniform_name, mesh_name, r, g, b, a)\n {\n this.material.uniforms[uniform_name].set_rgba(this.get_mesh_index(mesh_name), r, g, b, a);\n }\n}\n\nexport { BatchedMesh };\n","import { BatchedMesh } from './BatchedMesh';\n\nimport * as BufferGeometryUtils from 'three/examples/jsm/utils/BufferGeometryUtils.js';\n\nimport { BufferAttribute } from 'three';\n\nclass MeshBatcher\n{\n batch(meshes, material)\n {\n const max_texture_width = 2048;\n // let texture_width = meshes.length % max_texture_width;\n // let texture_height = Math.ceil(meshes.length / max_texture_width);\n\n // console.log(\"Store count: \" + buffer_geometries.length + \", Texture size: \" +texture_width);\n\n const geometries = [];\n const id_table = {};\n\n const attr_mesh_id = [];\n\n for (let i = 0; i < meshes.length; i++)\n {\n const mesh = meshes[i];\n const vertex_count = mesh.geometry.getAttribute('position').count;\n\n for (let count = 0; count < vertex_count; count++)\n {\n attr_mesh_id.push(i);\n }\n\n geometries.push(mesh.geometry);\n\n if (id_table[mesh.name] === undefined)\n {\n id_table[mesh.name] = i;\n }\n else\n {\n console.error('Mesh name is duplicated when trying to merge meshes. Non-unique id error.', mesh.name, id_table);\n }\n }\n\n const buffer_geometry = BufferGeometryUtils.mergeBufferGeometries(geometries);\n\n const buffer_attribute = new BufferAttribute(new Float32Array(attr_mesh_id), 1);\n buffer_geometry.setAttribute('mesh_id', buffer_attribute);\n\n return this.create_batched_mesh(id_table, buffer_geometry, material, max_texture_width);\n }\n\n create_batched_mesh(id_table, buffer_geometry, material, max_texture_width)\n {\n return new BatchedMesh(id_table, buffer_geometry, material, max_texture_width);\n }\n}\n\nexport { MeshBatcher };\n","import { Audio as TAudio } from 'three';\nimport { PositionalAudio as TPositionalAudio } from 'three';\n\nclass AudioClip\n{\n constructor(buffer, loop = true, volume = 1, positional = false)\n {\n this.buffer = buffer;\n this.loop = loop;\n this.volume = volume;\n this.positional = positional;\n\n this.audio = undefined;\n }\n\n init(audio_listener)\n {\n if (this.positional)\n {\n this.audio = new TPositionalAudio(audio_listener);\n }\n else\n {\n this.audio = new TAudio(audio_listener);\n }\n\n this.audio.setBuffer(this.buffer);\n this.audio.setLoop(this.loop);\n\n // This prevents undesired volume at the beginning of playing\n this.audio.gain.gain.value = 0;\n\n this.audio.setVolume(this.loop ? 0 : this.volume);\n }\n\n play()\n {\n this.audio.play();\n }\n\n pause()\n {\n this.audio.pause();\n }\n\n stop()\n {\n this.audio.stop();\n }\n\n get is_playing()\n {\n return this.audio.isPlaying;\n }\n}\n\nexport { AudioClip };\n","import { AudioContext } from 'three';\r\n\r\nimport { AudioClip } from '../components/AudioClip';\r\nimport { AbstractLoader } from './AbstractLoader';\r\n\r\nclass AudioLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, loop = true, volume = 0, size, positional = false)\r\n {\r\n super(resource_id, url, size);\r\n this.loop = loop;\r\n this.volume = volume;\r\n this.positional = positional;\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n // if (!window.user_interaction_for_audio)\r\n // {\r\n // setTimeout(this.on_preloaded_finished.bind(this, resource_container), 100);\r\n // }\r\n // else\r\n // {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n this.instantiate_audio(resource_container);\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n // }\r\n }\r\n\r\n instantiate_audio(resource_container)\r\n {\r\n const context = AudioContext.getContext();\r\n\r\n const buffer = context.createBuffer(2, 22050, 44100);\r\n\r\n fetch(this.url).then(r => r.blob()).then((response) =>\r\n {\r\n if (response.arrayBuffer)\r\n {\r\n response.arrayBuffer().then((array_buffer) =>\r\n {\r\n context.decodeAudioData(array_buffer, (audio_buffer) =>\r\n {\r\n resource_container.set_resource(\r\n this.resource_id,\r\n this.url,\r\n new AudioClip(audio_buffer, this.loop, this.volume, this.positional)\r\n );\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n });\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(\r\n this.resource_id,\r\n this.url,\r\n new AudioClip(buffer, this.loop, this.volume, this.positional)\r\n );\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n });\r\n }\r\n}\r\n\r\nexport { AudioLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\n\n// import { sRGBEncoding } from 'three';\n\nclass BasisLoader extends AbstractLoader\n{\n constructor(resource_id, url, loader, size)\n {\n super(resource_id, url, size);\n\n this.loader = loader;\n }\n\n on_preloaded_finished(resource_container)\n {\n if (resource_container.resources_by_url[this.url] === undefined)\n {\n this.loader.load(this.url, (basis) =>\n {\n // basis.encoding = sRGBEncoding;\n\n resource_container.set_resource(this.resource_id, this.url, basis);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n },\n (xhr) =>\n {\n // if (xhr)\n // {\n // let total = xhr.total || this.total_bytes;\n // this.__update_downloaded_bytes(xhr.loaded, total);\n // }\n },\n (msg) =>\n {\n this.__set_error(msg + '\\n\\n\\t If the error says something about unexpected token < in JSON then the probably the problem is related to the file not being found. Check the name and path of the resource');\n this.__loading_ended();\n });\n }\n else\n {\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n }\n }\n}\n\nexport { BasisLoader };\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { CubeTextureLoader } from 'three';\r\n\r\nclass CubemapLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, extension, size)\r\n {\r\n super(resource_id, url, size);\r\n this.loader = new CubeTextureLoader();\r\n this.loader.setPath(url + '/');\r\n this.urls = [\r\n `px.${extension}`,\r\n `nx.${extension}`,\r\n `py.${extension}`,\r\n `ny.${extension}`,\r\n `pz.${extension}`,\r\n `nz.${extension}`\r\n ];\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n this.loader.load(this.urls, (image) =>\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, image);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n },\r\n (xhr) =>\r\n {\r\n // if (xhr)\r\n // {\r\n // let total = xhr.total || this.total_bytes;\r\n // this.__update_downloaded_bytes(xhr.loaded, total);\r\n // }\r\n },\r\n (error) =>\r\n {\r\n this.__set_error('Image could not be loaded. Maybe wrong name or path, I don\\'t know' + '¯\\\\_(ツ)_/¯', error);\r\n this.__loading_ended();\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { CubemapLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { ColladaLoader } from 'three/examples/jsm/loaders/ColladaLoader.js';\r\n\r\nclass DAELoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, size)\r\n {\r\n super(resource_id, url, size);\r\n this.loader = new ColladaLoader();\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n this.loader.load(this.url, (gltf) =>\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, gltf);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n },\r\n (xhr) =>\r\n {\r\n // if (xhr)\r\n // {\r\n // let total = xhr.total || this.total_bytes;\r\n // this.__update_downloaded_bytes(xhr.loaded, total);\r\n // }\r\n },\r\n (msg) =>\r\n {\r\n this.__set_error(msg + '\\n\\n\\t If the error says something about unexpected token < in JSON then the probably the problem is related to the file not being found. Check the name and path of the resource');\r\n this.__loading_ended();\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { DAELoader };\r\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { FileLoader as TFileLoader } from 'three';\r\n\r\nclass FileLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, size)\r\n {\r\n super(resource_id, url, size);\r\n this.loader = new TFileLoader();\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n this.loader.load(this.url, (file) =>\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, file);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n },\r\n (xhr) =>\r\n {\r\n // if (xhr)\r\n // {\r\n // let total = xhr.total || this.total_bytes;\r\n // this.__update_downloaded_bytes(xhr.loaded, total);\r\n // }\r\n },\r\n (msg) =>\r\n {\r\n this.__set_error(msg);\r\n this.__loading_ended();\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { FileLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\n\nimport { FontLoader as TFontLoader } from 'three/examples/jsm/loaders/FontLoader.js';\n\nclass FontLoader extends AbstractLoader\n{\n constructor(resource_id, url, size)\n {\n super(resource_id, url, size);\n this.loader = new TFontLoader();\n }\n\n on_preloaded_finished(resource_container)\n {\n if (resource_container.resources_by_url[this.url] === undefined)\n {\n this.loader.load(this.url, (font) =>\n {\n resource_container.set_resource(this.resource_id, this.url, font);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n },\n (xhr) =>\n {\n // if (xhr)\n // {\n // let total = xhr.total || this.total_bytes;\n // this.__update_downloaded_bytes(xhr.loaded, total);\n // }\n },\n (msg) =>\n {\n this.__set_error(msg + '\\n\\n\\t If the error says something about unexpected token < in JSON then probably the problem is related to the file not being found. Check the name and path of the resource');\n this.__loading_ended();\n });\n }\n else\n {\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n }\n }\n}\n\nexport { FontLoader };\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { GLTFLoader as TGLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';\r\n\r\nclass GLTFLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, size)\r\n {\r\n super(resource_id, url, size);\r\n this.loader = new TGLTFLoader();\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n this.loader.load(this.url, (gltf) =>\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, gltf);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n },\r\n (xhr) =>\r\n {\r\n // if (xhr)\r\n // {\r\n // let total = xhr.total || this.total_bytes;\r\n\r\n // this.__update_downloaded_bytes(xhr.loaded, total);\r\n // }\r\n },\r\n (msg) =>\r\n {\r\n this.__set_error(msg + '\\n\\n\\t If the error says something about unexpected token < in JSON then the probably the problem is related to the file not being found. Check the name and path of the resource');\r\n this.__loading_ended();\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { GLTFLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';\r\n\r\nclass GLTFDRACOLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, loader, size)\r\n {\r\n super(resource_id, url, size);\r\n this.loader = new GLTFLoader();\r\n\r\n this.loader.setDRACOLoader(loader);\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n this.loader.load(this.url, (gltf) =>\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, gltf);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n },\r\n (xhr) =>\r\n {\r\n // if (xhr)\r\n // {\r\n // let total = xhr.total || this.total_bytes;\r\n // this.__update_downloaded_bytes(xhr.loaded, total);\r\n // }\r\n },\r\n (msg) =>\r\n {\r\n this.__set_error(msg + '\\n\\n\\t If the error says something about unexpected token < in JSON then the probably the problem is related to the file not being found. Check the name and path of the resource');\r\n this.__loading_ended();\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { GLTFDRACOLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { HDRCubeTextureLoader as THDRCubeTextureLoader } from 'three/examples/jsm/loaders/HDRCubeTextureLoader.js';\r\nimport { UnsignedByteType } from 'three';\r\n\r\nclass HDRCubeTextureLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, size)\r\n {\r\n super(resource_id, url, size);\r\n this.loader = new THDRCubeTextureLoader();\r\n this.url_suffix = ['/px.hdr', '/nx.hdr', '/py.hdr', '/ny.hdr', '/pz.hdr', '/nz.hdr'];\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n this.loader.setPath(this.url)\r\n .setDataType(UnsignedByteType)\r\n .load(this.url_suffix, (hdr) =>\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, hdr);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n },\r\n (xhr) =>\r\n {\r\n // if (xhr)\r\n // {\r\n // let total = xhr.total || this.total_bytes;\r\n // this.__update_downloaded_bytes(xhr.loaded, total);\r\n // }\r\n },\r\n (msg) =>\r\n {\r\n this.__set_error(msg + '\\n\\n\\t If the error says something about unexpected token < in JSON then the probably the problem is related to the file not being found. Check the name and path of the resource');\r\n this.__loading_ended();\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { HDRCubeTextureLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\n\nclass JSONLoader extends AbstractLoader\n{\n constructor(resource_id, url, size)\n {\n super(resource_id, url, size);\n }\n\n on_preloaded_finished(resource_container, response)\n {\n if (resource_container.resources_by_url[this.url] === undefined)\n {\n response.json().then((json) =>\n {\n resource_container.set_resource(this.resource_id, this.url, json);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n });\n }\n else\n {\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n }\n }\n}\n\nexport { JSONLoader };\n","import { AbstractLoader } from './AbstractLoader';\n\nimport { OBJLoader as TOBJLoader } from 'three/examples/jsm/loaders/OBJLoader.js';\n\nclass OBJLoader extends AbstractLoader\n{\n constructor(resource_id, url, size)\n {\n super(resource_id, url, size);\n this.loader = new TOBJLoader();\n }\n\n on_preloaded_finished(resource_container)\n {\n if (resource_container.resources_by_url[this.url] === undefined)\n {\n this.loader.load(this.url, (obj) =>\n {\n resource_container.set_resource(this.resource_id, this.url, obj);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n },\n (xhr) =>\n {\n // if (xhr)\n // {\n // let total = xhr.total || this.total_bytes;\n // this.__update_downloaded_bytes(xhr.loaded, total);\n // }\n },\n (msg) =>\n {\n this.__set_error(msg + '\\n\\n\\t If the error says something about unexpected token < in JSON then probably the problem is related to the file not being found. Check the name and path of the resource');\n this.__loading_ended();\n });\n }\n else\n {\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n }\n }\n}\n\nexport { OBJLoader };\n","import { AbstractLoader } from './AbstractLoader';\n\nimport { Vector3 } from 'three';\nimport { FileLoader } from 'three';\n\nclass PointArrayLoader extends AbstractLoader\n{\n constructor(resource_id, url, size)\n {\n super(resource_id, url, size);\n this.loader = new FileLoader();\n }\n\n on_preloaded_finished(resource_container)\n {\n if (resource_container.resources_by_url[this.url] === undefined)\n {\n this.loader.load(this.url, (text) =>\n {\n resource_container.set_resource(this.resource_id, this.url, this.parse_path(text));\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n },\n (xhr) =>\n {\n // if (xhr)\n // {\n // let total = xhr.total || this.total_bytes;\n // this.__update_downloaded_bytes(xhr.loaded, total);\n // }\n },\n (msg) =>\n {\n this.__set_error(msg);\n this.__loading_ended();\n });\n }\n else\n {\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n }\n }\n\n parse_path(raw_data)\n {\n const string_array = raw_data.split('\\n');\n\n if (string_array[string_array.length - 1] === '')\n {\n string_array.pop();\n }\n\n const positions = [];\n\n for (let i = 0; i < string_array.length; i += 3)\n {\n const x = parseFloat(string_array[i + 0]);\n const y = parseFloat(string_array[i + 1]);\n const z = parseFloat(string_array[i + 2]);\n positions.push(new Vector3(x, y, z));\n }\n return positions;\n // let curve = new THREE.CatmullRomCurve3(positions);\n // return curve.getPoints(100);\n }\n}\n\nexport { PointArrayLoader };\n","import { AbstractLoader } from './AbstractLoader';\n\nimport { RGBELoader } from 'three/examples/jsm/loaders/RGBELoader.js';\n\nclass RGBETextureLoader extends AbstractLoader\n{\n constructor(resource_id, url, size)\n {\n super(resource_id, url, size);\n this.loader = new RGBELoader();\n }\n\n on_preloaded_finished(resource_container)\n {\n if (resource_container.resources_by_url[this.url] === undefined)\n {\n this.loader.load(this.url, (hdr) =>\n {\n resource_container.set_resource(this.resource_id, this.url, hdr);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n },\n (xhr) =>\n {\n // if (xhr)\n // {\n // let total = xhr.total || this.total_bytes;\n // this.__update_downloaded_bytes(xhr.loaded, total);\n // }\n },\n (msg) =>\n {\n this.__set_error(msg + '\\n\\n\\t If the error says something about unexpected token < in JSON then the probably the problem is related to the file not being found. Check the name and path of the resource');\n this.__loading_ended();\n });\n }\n else\n {\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n }\n }\n}\n\nexport { RGBETextureLoader };\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { FileLoader as TFileLoader } from 'three';\r\n\r\nclass TextLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, size)\r\n {\r\n super(resource_id, url, size);\r\n this.loader = new TFileLoader();\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n this.loader.load(this.url, (gltf) =>\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, gltf);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n },\r\n (xhr) =>\r\n {\r\n // if (xhr)\r\n // {\r\n // let total = xhr.total || this.total_bytes;\r\n // this.__update_downloaded_bytes(xhr.loaded, total);\r\n // }\r\n },\r\n (msg) =>\r\n {\r\n this.__set_error(msg);\r\n this.__loading_ended();\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { TextLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { Texture } from 'three';\r\nimport { Browser } from '../Browser';\r\n\r\nclass AsyncTextureLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, size)\r\n {\r\n super(resource_id, url, size);\r\n }\r\n\r\n on_preloaded_finished(resource_container)\r\n {\r\n if (Browser.is_safari && Browser.version < 15)\r\n {\r\n this.load_with_old_method(resource_container);\r\n }\r\n else\r\n {\r\n this.load_with_new_method(resource_container);\r\n }\r\n }\r\n\r\n load_with_old_method(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n const texture = new Texture();\r\n const image = new Image();\r\n\r\n image.src = this.url;\r\n\r\n image.onload = () =>\r\n {\r\n texture.image = image;\r\n texture.needsUpdate = true;\r\n\r\n resource_container.set_resource(this.resource_id, this.url, texture);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n };\r\n\r\n image.onerror = () =>\r\n {\r\n console.error('Error loading texture. Maybe the resource is not an image?', this.url, this.original_url);\r\n };\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n\r\n load_with_new_method(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n const fetchOptions = {};\r\n fetchOptions.credentials = 'same-origin';\r\n // fetchOptions.headers = this.requestHeader;\r\n\r\n fetch(this.url, fetchOptions).then((res) =>\r\n {\r\n return res.blob();\r\n }).then((blob) =>\r\n {\r\n return createImageBitmap(blob, { colorSpaceConversion: 'none' });\r\n }).then((imageBitmap) =>\r\n {\r\n const texture = new Texture(imageBitmap);\r\n texture.needsUpdate = true;\r\n\r\n resource_container.set_resource(this.resource_id, this.url, texture);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }).catch(function(e)\r\n {\r\n console.error(e);\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { AsyncTextureLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { Texture } from 'three';\r\n\r\nclass TextureLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, size)\r\n {\r\n super(resource_id, url, size);\r\n }\r\n\r\n on_preloaded_finished(resource_container, response)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n response.blob().then((blob) =>\r\n {\r\n const texture = new Texture();\r\n\r\n const url = URL.createObjectURL(blob);\r\n\r\n const image = new Image();\r\n image.src = url;\r\n\r\n image.onload = () =>\r\n {\r\n texture.image = image;\r\n texture.needsUpdate = true;\r\n\r\n resource_container.set_resource(this.resource_id, this.url, texture);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n };\r\n\r\n image.onerror = () =>\r\n {\r\n console.error('Error loading texture. Maybe the resource is not an image?', this.url);\r\n };\r\n });\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n}\r\n\r\nexport { TextureLoader };\r\n","import { AbstractLoader } from './AbstractLoader';\n\nclass VideoLoader extends AbstractLoader\n{\n constructor(resource_id, url, size)\n {\n super(resource_id, url, size);\n }\n\n on_preloaded_finished(resource_container, response)\n {\n if (resource_container.resources_by_url[this.url] === undefined)\n {\n response.blob().then((blob) =>\n {\n resource_container.set_resource(this.resource_id, this.url, URL.createObjectURL(blob));\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n });\n }\n else\n {\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\n\n this.__update_downloaded_bytes(1, 1);\n this.__loading_ended();\n }\n }\n}\n\nexport { VideoLoader };\n","import { ResourceContainer } from '../ResourceContainer';\r\n\r\nclass ResourceBatch\r\n{\r\n constructor(batch_name)\r\n {\r\n this.resource_loaders = [];\r\n this.batch_name = batch_name || 'unnamed batch';\r\n }\r\n\r\n add_loader(loader)\r\n {\r\n this.resource_loaders.push(loader);\r\n }\r\n\r\n load(resource_container)\r\n {\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n this.resource_loaders[i].load(resource_container || ResourceContainer);\r\n }\r\n }\r\n\r\n get loading_finished()\r\n {\r\n let finished = true;\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n finished = finished && this.resource_loaders[i].has_finished;\r\n }\r\n return finished;\r\n }\r\n\r\n get has_errors()\r\n {\r\n let has_error = false;\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n has_error = has_error || this.resource_loaders[i].has_error;\r\n }\r\n return has_error;\r\n }\r\n\r\n print_errors()\r\n {\r\n console.error('Batch <' + this.batch_name + '> could not load successfully');\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n if (this.resource_loaders[i].has_error)\r\n {\r\n this.resource_loaders[i].print_error();\r\n }\r\n }\r\n }\r\n\r\n get_progress()\r\n {\r\n return this.get_loaded_bytes() / this.get_total_bytes();\r\n }\r\n\r\n get_loaded_bytes()\r\n {\r\n let loaded_bytes = 1;\r\n\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n loaded_bytes += this.resource_loaders[i].loaded_bytes;\r\n }\r\n\r\n return loaded_bytes;\r\n }\r\n\r\n get_total_bytes()\r\n {\r\n let total_bytes = 1;\r\n\r\n for (let i = 0; i < this.resource_loaders.length; i++)\r\n {\r\n total_bytes += this.resource_loaders[i].total_bytes;\r\n }\r\n\r\n return total_bytes;\r\n }\r\n}\r\n\r\nexport { ResourceBatch };\r\n"],"names":["browser","[object Object]","this","browser_name","agent","window","navigator","userAgent","toLowerCase","vrBrowserKeywords","vrBrowser","find","keyword","includes","hasWebXRSupport","indexOf","opr","chrome","version","get_version","name","is_safari","is_chrome","is_edge","is_edge_chromium","is_vr","has_webm","is_firefox","has_hvec","preferred_video_extension","ua","tem","M","match","test","exec","slice","join","replace","appName","appVersion","splice","Number","split","Validation","n","is_int","is_float","str","JSON","parse","e","AbstractLoader","resource_id","url","size","loaded_bytes","total_bytes","has_finished","has_error","error_message","loaded","total","is_number","console","warn","message","error","resource_container","undefined","resources_by_url","cache","Browser","fetch","method","mode","credentials","redirect","then","on_progress","bind","catch","__on_error","set_resource","__update_downloaded_bytes","__loading_ended","response","response_clone","clone","reader","body","getReader","contentLength","headers","get","receivedLength","done","value","read","length","on_preloaded_finished","data","OMath","from_range_start_value","from_range_end_value","to_range_start_value","to_range_end_value","min","max","number","divisor","rgb","r","Math","round","toString","g","b","points","plane","projected_point","Vector3","points_on_plane","i","projectPoint","push","from","to","target","t","elements","lerp","x1","x2","abs","x","y","m","euclideanModulo","degrees","PI","radians","v","w","z","center","add","multiplyScalar","arr","col","floor","random","clamp","ActionSequencer","context","previous_elapsed_time","elapsed_time","playback_speed","__get_playback_speed","playing","action_events","initial_context","stringify","tmp_t","channels","channel_names","Object","keys","duration","get_duration","__play_clips","delta_time","time","trigger_time","action","interpolator","use_dynamic_from_value","keyframes","attribute_name","keyframe","__get_current_keyframe","evaluate","__linear_map_01","easing_function","__play_events","evaluate_keyframe","between","log","constructor","trigger","channel_name","initial","saturate","current","Infinity","distance","transitions_velocity","URLSearchParams","location","search","EasingFunctions","cos","sin","pow","sqrt","c4","ease_out_bounce","n1","d1","sign","ActionInterpolator","NumberInterpolator","super","view_context","app","ActionEvent","args","ViewContext","DrawIOAnimationSheet","xml_document","animation_nodes","DOMParser","parseFromString","querySelectorAll","animation_tracks","triggers","node","parent_node","parentElement","getAttribute","get_node_x_position","parseFloat","split_data","trigger_name","trigger_method","at_time","value_data","to_value","from_time","to_time","sort","a","x_pos","ActionSequencerBuilder","default_state_data","animation_data","current_context","tracks","initial_tracks","state_to_tracks","get_longest_time","element","sequencer","add_action_interpolator","action_event","add_action_event","state","longest_time","xml","transition_data","track_time","event_manager","queue","zoom_changed_evt","store_clickd_evt","point_selected_evt","config_changed","path_substep_completed","path_completed","go_to_store_requested_evt","resource_loaded_evt","service_clicked_evt","unit_pos_updated_evt","floor_changed_evt","on_enter_floor_navigation","on_exit_floor_navigation","on_enter_floor_selection","on_exit_floor_selection","on_enter_outside_navigation","on_exit_outside_navigation","step_selected_evt","event","payload","callback","zoom","fire","store_id","hit_data","step_number","step_index","resource","service","unit_data","floor_id","resources","EventManager","fire_resource_loaded","HTMLUtilities","container","images","image","dataset","src","image_objects","image_object","videos","video","iframes","iframe","selector","TransitionTable","transitions","from_state_name","to_state_name","from_animation_sheet","__delta_buffer","___time","Clock","__delta_time","__smooth_delta_time","__elapsed_time","__allocated_time","Vector2","__frame_interpolation_t","fixed_delta_time","smooth_delta_time","shader_time","frame_interpolation","fdt","dt","sdt","getDelta","getElapsedTime","shift","__calculate_smooth_delta_time","ViewState","global_view_data","transition_progress","action_sequencer","update_transition","ViewStateTransitionHandler","transition_table","last_state","current_state","current_state_data","transitioning","skip","__exit_last_state","before_exit","show","before_enter","play","update","__update_transitions","is_finished","on_enter","before_update","fixed_update","assign","Time","update_exit_transition","get_progress","update_enter_transition","hide","on_exit","view_manager","views","transition_handler","view_change_subscribers","browser_title_suffix","__set_views_opacities","view_name","change_url","go_to_state","__change_browser_url","__change_browser_title","notify_view_change","scene_name","next_view","transition_view","set_next_view","go_to_view","subscriber","on_view_change","view","add_transitions","set_transitions","set_state","title_suffix","get_by_url","set_default_state_data","history","pushState","title","__capitalize","document","set_opacity","string","aux_string","toUpperCase","__snake_to_whitespace","group","ApplicationView","ResourceContainer","ViewManager","register_view","classList","remove","load_images","load_videos","style","opacity","BaseApplication","BaseRender","renderer","BaseShaderMaterial","ShaderMaterial","vert","frag","uniforms","vertexShader","basic_vert","fragmentShader","basic_frag","_Color","Color","BlitMaterial","frag_shader","vert_shader","defines","_MainTex","_Resolution","_TargetResolution","depthWrite","blending","NoBlending","depthTest","depthFunc","AlwaysDepth","AddMaterial","nMips","_SecondTex","tex","UnrealBloomComposeMaterial","NUM_MIPS","_BlurredTex","_BloomStrength","blurTexture1","blurTexture2","blurTexture3","blurTexture4","blurTexture5","bloomStrength","bloomFactors","bloomRadius","bloomTintColors","rt","col_string","set","camera_manager","_current","_spectator","camera","spectator","capabilities","max_anisotropy","vertex_texture_sampler_available","fp_textures_available","CanvasDrawer","uses_dynamic_font","__textHeight","canvas","createElement","ctx","getContext","fontStyle","getElementsByTagName","dummy","dummyText","createTextNode","appendChild","setAttribute","offsetHeight","removeChild","text","font","ceil","measureText","width","getFontHeight","ctxOptions","font_color","__draw","draw_canvas","canvas_texture","CanvasTexture","UVMapping","ClampToEdgeWrapping","NearestFilter","generateMipMaps","needsUpdate","height","radius","fill","stroke","tl","tr","br","bl","defaultRadius","side","beginPath","moveTo","lineTo","quadraticCurveTo","closePath","configuration","parameters","dpr","json","Idle","is_animating","Animating","easing_function_t","animator","set_property_value","set_current_state","finished_callback","CSSAnimator","css_property","value_prefix","value_suffix","ease_in_out_cubic","AxisHelper","Object3D","scale","blue_points","blue_axis_mat","LineBasicMaterial","color","blue_axis_geo","BufferGeometry","setFromPoints","blue_axis_line","Line","renderOrder","green_points","green_axis_mat","green_axis_geo","green_axis_line","red_points","red_axis_mat","red_axis_geo","red_axis_line","scene_manager","Scene","scene","traverse","child","geometry","dispose","material","children","Cube","Mesh","segments","BoxGeometry","MeshBasicMaterial","Sphere","SphereBufferGeometry","Arrow","dir","cylinder_height","cylinder_geo","CylinderBufferGeometry","translate","cone_geometry","ConeBufferGeometry","cone_height","buffer_geometry","BufferGeometryUtils","mergeBufferGeometries","rotateX","quaternion","setFromUnitVectors","_dir","oscreen","position","render_width","render_height","width_height","pixel_size","size_changed","vector2","aspect_ratio","portrait","ScreenSpaceTextureMaterial","h","_ScreenSpacePosition","_ScreenSize","_TextureSize","PerspectiveCamera","TPerspectiveCamera","fov","aspect","near","far","clear_color","clear_alpha","copy","debug","Vector3_one","Vector3_zero","canvas_renderer","display_texture_meshes","OScreen","origin","arrow","normalize","axis","RT","rt_debug","position_2d","fillStyle","fillRect","clearRect","strokeStyle","line","frustumCulled","pos","cube","depth","distanceTo","sub","forward_dir","PlaneGeometry","Vector4","basic_color_vert","basic_color_frag","transparent","box","Box3","setFromCenterAndSize","helper","Box3Helper","sphere","input_points","open","catmull","CatmullRomCurve3","updateArcLengths","getSpacedPoints","draw_line","SphereGeometry","sphere_mesh","SceneManager","sphere1","bb","curve","options","offset","mesh","set_texture","graphics","set_screen_size","render","CameraManager","ClearDepthNormalMaterial","clear_depth","clear_normal","_DepthNormal","DepthNormalMaterial","_FarPlane","far_plane","DepthAndNormalsRenderer","WebGLRenderTarget","clear_depth_normal_mat","depth_normal_material","__resize_RT_if_necessary","clear","blit_clear_with_material","setSize","render_target","Blitter","_blit_scene","_blit_material","_blit_quad","_blit_camera","OrthographicCamera","dst","src_texture","isWebGLRenderTarget","texture","src_width","src_height","getSize","__render","mat","dst_RT","current_rt","getRenderTarget","setRenderTarget","core_attributes","context_attributes","threejs_attributes","_renderer","blitter","no_render","current_render_mode","generateDepthNormalTexture","depth_and_normals_renderer","is_webgl2","canvas_context","force_webgl2","xr_enabled","alpha","antialias","desynchronized","failIfMajorPerformanceCaveat","powerPreference","premultipliedAlpha","preserveDrawingBuffer","stencil","logarithmicDepthBuffer","WebGLRenderer","xr","enabled","autoClear","setPixelRatio","Configuration","extensions","domElement","Capabilities","getMaxAnisotropy","maxVertexTextures","is_floating_point_texture_available","resize_observer","ResizeObserver","on_resize","observe","dom_element","depth_normals_RT","new_state","__update_current_camera","updateProjectionMatrix","updateMatrix","updateMatrixWorld","override_mat","__apply_override_material","on_pre_render","on_post_render","overrideMaterial","buffer","readRenderTargetPixels","clear_stencil","setClearColor","entries","entry","update_position","contentRect","update_size","setViewport","material_pass","src_RT","blit_with_material","blit","blob_callback","old_width","old_height","new_width","new_height","tile_width","tile_height","divisions_x","parseInt","divisions_y","old_dpr","getPixelRatio","ctx_2D","setViewOffset","drawImage","toBlob","clearViewOffset","blob","link","download","href","URL","createObjectURL","click","onclick","requestAnimationFrame","revokeObjectURL","removeAttribute","minFilter","magFilter","format","RGBAFormat","encoding","LinearEncoding","type","FloatType","stencilBuffer","depthBuffer","output","Float32Array","NormalMaterial","DebugNormalsRender","Graphics","KeyboardInput","ctrlz_pressed","ctrlz_fired","keys_keys","addEventListener","on_key_down","on_key_up","keyCode","ctrlKey","code","press_key","release_key","pressed","released","key_name","key","fired","down","removeEventListener","os","operating_systems","ANDROID","IOS","LINUX","MAC","WINDOWS","is_mobile","is_ipad","maxTouchPoints","is_ios","is_android","get_os","is_linux","is_mac","is_windows","platform","reflection_plane_context","target_geometry","target_position","GeometryBatch","batch_width","data_textures","object_names","zero_offset","write_offset","uniform_dirty_count","tmp_uploaded_data_count","uniform_name","default_value_v3","src_tex","__create_rgb_texture","dst_tex","one_pixel_tex","new_data_tex","__add_data_texture","__flood_data_texture_rgb","default_value_v4","__create_rgba_texture","__flood_data_texture_rgba","__create_rgba_float_texture","object_name","vector3","use_r","use_g","use_b","obj_index","__get_object_index","data_texture","__get_data_texture","__set_pixel_rgb","one_pixel","last_accessed_index","dirty_count","vector4","use_a","__set_pixel_rgba","upload_budget","__partial_texture_data_upload","__full_texture_data_upload","texture_data","copyTextureToTexture","index","v3","v4","Uint8Array","DataTexture","RGBFormat","dst_texture","one_pixel_text","geometry_batcher","batches","buffer_geometries","attr_accessor_uvs","texture_width","ceilPowerOfTwo","__init_uv_array","uv_index","vertex_count","count","buffer_attribute","BufferAttribute","upload_texture_data","uvs","ui","input","ui_elements","_tmp_normalized_pos","ss_scene","matrixWorldAutoUpdate","ws_scene","ss_camera","elem","set_screen_space_coordinate_system","set_world_space_coordinate_system","NDC","update_state","current_clicked_element","PerspectiveFrustumPointFitter","camera_quaternion","vertical_fov","v_fov","degToRad","h_fov","atan","tan","up_plane_normal","get_up_plane_normal","down_plane_normal","get_down_plane_normal","left_plane_normal","get_left_plane_normal","right_plane_normal","get_right_plane_normal","camera_forward_dir","applyQuaternion","sphere_center","pull_back_distance","get_distance_to_fit_rect","far_pos","up_plane","Plane","setFromNormalAndCoplanarPoint","down_plane","left_plane","right_plane","apply_center_correction_to_pos","closest_distance","inverse_dir","Line3","up_line_intersection","down_line_intersection","left_line_intersection","right_line_intersection","intersectLine","new_up_distance","new_down_distance","new_left_distance","new_right_distance","vertical_min","horizontal_min","forward_correction","target_pos","vertical_offset","get_vertical_correction","horizontal_offset","get_horizontal_correction","closest_distance_to_up_plane","closest_distance_to_down_plane","up_dir","down_line","up_line","down_dist","up_dist","correction","closest_distance_to_right_plane","closest_distance_to_left_plane","right_dir","left_line","right_line","left_dist","right_dist","Quaternion","setFromAxisAngle","distV","distH","OrthographicFrustumPointFitter","inverse_camera_quat","inverse","inverted_points","getCenter","distance_to_center","camera_utilities","tmp_mat","Matrix4","ray","Ray","tmp_size","tmp_unproj","tmp_vec","plane_position","plane_normal","get_forward_dir","isPerspectiveCamera","unproject_mouse_position","unproject","intersectPlane","zoom_scale","world_space_center","camera_forward","project_points_on_plane","projected_points_center","up","right","cross","inverse_mat","getInverse","applyMatrix4","projected_center","get_zoom_to_fit_rect","isOrthographicCamera","obj_x","obj_y","object_aspect","object","getWorldPosition","project","left","top","bottom","p1","p2","p3","p4","p5","p6","p7","p8","fit_points","camera_backward_dir","fitter","camera_pos","reference_position_plane","camera_ray","reference_position","camera_position","result","reference_rotation","reference_zoom","forward","initializer","init","CameraUtilities","GeometryBatcher","OS","ReflectionPlaneContext","UI","Debug","render_loop","SSAOMaterial","_InverseProjMatrix","_ProjectionMatrix","_Bias","_Radius","_SampleKernel","__get_sample_kernel","_RandomRotation","__get_rotation_kernel","sample_kernel","rotation_kernel","rotation_texture","wrapS","RepeatWrapping","wrapT","SSAOComposeMaterial","_AO","DisplayNormalTextureMaterial","depth_normals_vert","BoxBlurMaterial","_SampleDir","Blurrer","RT1","RT2","box_blur_mat","NormalAORender","ssao_mat","ssao_compose_mat","debug_normals","ssaa","use_ssaa","main_RT","SSAO_RT","blurrer","__check_RT_size","__update_uniforms","blur","projectionMatrix","NormalRender","VRRender","render_spectator_camera","spectator_camera","isPresenting","xrCam","getCamera","currentRenderTarget","GaussianBlurMaterial","kernel_radius","KERNEL_RADIUS","SIGMA","texSize","direction","LuminosityHighPassMaterial","luminosityThreshold","smoothWidth","defaultColor","defaultOpacity","GaussianBlurrer","current_width","current_height","separableBlurMaterials","renderTargetsHorizontal","renderTargetsVertical","kernelSizeArray","rt_pars","LinearFilter","renderTargetBright","generateMipmaps","init_materials","init_RT","luminosity_high_pass_mat","use_luminosity_high_pass","resize_RT","inputRenderTarget","set_direction","dispose_RT","hor","ver","texture_height","set_size","dispose_materials","UnrealBloomRender","bloom_compose_mat","blur_RT","add_mat","set_RT_0","set_RT_1","set_RT_2","set_RT_3","set_RT_4","set_bloom_strength","set_bloom_radius","set_add_texture","val","set_tint_color_0","set_tint_color_1","set_tint_color_2","set_tint_color_3","set_tint_color_4","TOrthographicCamera","view_component_manager","components","enabled_components","Set","__set_components_opacities","component","delete","component_name","RenderLoop","target_application","is_running","frames_passed","time_accumulator","__update","on_post_start","__set_frame_interpolation","ViewComponentManager","on_frame_end","setAnimationLoop","stop","screen","apply_pixel_density_v2","apply_pixel_density","get_pixel_size","SimpleTextDrawer","text_margin","text_size","get_text_size","globalAlpha","textBaseline","textAlign","fillText","ViewComponent","hidden","register_component","enable_component","disable_component","toggle_hidden","HorizontalPlane","VerticalPlane","ArrayUtilities","source","apply","array","items_left_count","closest_point","obj","ids","FrustumPointFitter","get_hozirontal_correction","closest_up_point","closest_down_point","closest_right_point","closest_left_point","GeometryUtilities","geometry_buffer","indices","positions","vertices","getX","getY","getZ","add_barycentric_attribute","non_indexed_geometry_buffer","bar_coordinates","ImageUtilities","getImageData","imagedata","mesh_sampler","sample_count","face_areas","min_area","normals","tangents","faces","index_0","index_1","index_2","v1","v2","face","c","n2","n3","normal","tangent","uv_a","uv_b","uv_c","area","get_face_area","normalized_faces_array","get_uniform_face_distribution","selected_faces","select_random_faces","sample_data_from_faces","sampled_points","sampled_normals","sampled_tangents","sampled_uvs","w1","w2","sample_point_in_face","amount","selected_face","minimum_area","extended_triangle_indices","repetitions_needed","j","vec1","vec2","w3","model_utilities","result_callback","fromGeometry","geometries","get_mesh","gltf","animations","skinnedMeshes","isSkinnedMesh","cloneBones","cloneSkinnedMeshes","isBone","skeleton","cloneSkinnedMesh","orderedCloneBones","bones","cloneBone","Skeleton","boneInverses","matrixWorld","cast","receive","castShadow","receiveShadow","object_type","ObjectUtilities","item","Array","isArray","sources","is_object","merge_deep","nodeType","attributes","attribute","nodeName","nodeValue","hasChildNodes","childNodes","xml_to_json","old","StringUtilities","hexValues","hex","words","substr","charAt","TimeUtilities","time_str","hours","minutes","seconds","Grid","derivatives","plane_geometry","convert_to_non_indexed_geometry","rotation","_Thickness","_Length","_ElapsedTime","setup","next_position","previous_position","orientation","coverage","accumulated_length","next_point","__get_next_position","previous_point","__get_previous_position","vertexList","nextPositionList","previousPositionList","orientationList","coverageList","setIndex","_length","thickness","parent","WorldImage","pivot","_ScreenAligned","_Scale","_Opacity","DoubleSide","current_scale","computeBoundingBox","tmp_bb_size","boundingBox","img","screen_aligned","boolean","Text2D","is_static","simple_text_drawer","draw_settings","draw_on_texture","LinearMipMapLinearFilter","update_texture","UIElementMaterial","intensity","_PixelOffset","_NDC","_PivotPoint","_DepthOffset","ScreenSpacePosition","WorldSpacePosition","tmp_vec3","tmp_vec2","UIElementState","ui_element","normalized_mouse_position","OnIdle","is_mouse_over","_on_enter_state","OnMouseEnter","on_mouse_enter","_on_hover_state","_on_exit_state","OnMouseExit","on_mouse_exit","_on_idle_state","OnMouseHover","__trigger_on_hover","on_mouse_hover","UIElement","is_clickable","position_strategy","_position","on_hover","mouse_pos_tmp","cached_NDC_position","screen_pos_tmp","texture_size","matrixAutoUpdate","pixel_offset","pivot_point","use_depth","depth_offset","visible","get_size","normalized_mouse_pos","get_pos_NDC","to_screen_position","rect","Box2","containsPoint","projected_pos","screen_pos","UpdatableMaterialMesh","self","onBeforeRender","TextGlyph","plane_bounds","atlas_bounds","SDFText","glyph_layout","glyphs","glyph_is_dirty","matrix_is_dirty","color_is_dirty","matrix","__opacity","__text","__generate_glyphs","compose","tilt","new_orientation","new_tilt","multiply","update_glyphs","op","cursor","unicode","charCodeAt","glyph","planeBounds","text_glyph","atlasBounds","advance","box2","first_glyph","union","box2_size","SDFTextMaterial","_Texture","_Boldness","_AtlasSize","SDFTextBatch","font_layout","atlas_texture","instanced_geometry","InstancedBufferGeometry","instanceCount","Float32BufferAttribute","transformsCol0","InstancedBufferAttribute","max_allocations","transformsCol1","transformsCol2","transformsCol3","glyph_bounds","usage","DynamicDrawUsage","text_elements","set_atlas_size","atlas","set_boldness","text_str","text_elem","remove_elem","force_update","glyph_bounds_atr","plane_bounds_atr","color_atr","matrix_needs_update","glyph_needs_update","color_needs_update","glyph_count","update_matrix","clear_glyph_dirty","clear_color_dirty","glyph_i","buffer_i","setXYZW","VectorInterpolator","tmp","MedianFilterMaterial","kernel3x3","_SourceTex","_SourceTexSize","isVideoTexture","videoWidth","videoHeight","isTexture","MedianFilter","median_filter_mat","tex_size","DualFilteringBlurMaterial","upsample","AlphaFilterMaterial","use_alpha_mask","_Offset","DualFilteringBlurrer","RT0","RT3","RT4","upscale_blur_mat","downscale_blur_mat","alpha_filter_mat","check_RT_resize","ParticleAttribute","attr_name","update_material","write","particle_attribute","particle_count","resolution","calculate_resolution","HalfFloatType","attribute_writter_scene","swap_RT","storage_material","deleteAttribute","GPUParticleSystem","build_point_mesh","attribute_writter_mesh","build_attribute_writter_mesh","item_size","instance_count","geo","instanced_geo","build_uv_storage_attribute","Points","ParticleStorageMaterial","ParticlePositionAttribute","pos_attr","build_RT","store_geometry_attribute_in_RT","CustomDataTexture","multiplier","RGBDataTexture","RGBADataTexture","RGBFloatDataTexture","RGBAFloatDataTexture","BatchedMesh","id_table","max_texture_width","batched_count","batch_height","mesh_name","set_rgb","get_mesh_index","set_rgba","MeshBatcher","meshes","attr_mesh_id","create_batched_mesh","AudioClip","loop","volume","positional","audio","audio_listener","TPositionalAudio","TAudio","setBuffer","setLoop","gain","setVolume","pause","is_playing","isPlaying","AudioLoader","instantiate_audio","AudioContext","createBuffer","arrayBuffer","array_buffer","decodeAudioData","audio_buffer","BasisLoader","loader","load","basis","xhr","msg","__set_error","CubemapLoader","extension","CubeTextureLoader","setPath","urls","DAELoader","ColladaLoader","FileLoader","TFileLoader","file","FontLoader","TFontLoader","GLTFLoader","TGLTFLoader","GLTFDRACOLoader","setDRACOLoader","HDRCubeTextureLoader","THDRCubeTextureLoader","url_suffix","setDataType","UnsignedByteType","hdr","JSONLoader","OBJLoader","TOBJLoader","PointArrayLoader","parse_path","raw_data","string_array","pop","RGBETextureLoader","RGBELoader","TextLoader","AsyncTextureLoader","load_with_old_method","load_with_new_method","Texture","Image","onload","onerror","original_url","fetchOptions","res","createImageBitmap","colorSpaceConversion","imageBitmap","TextureLoader","VideoLoader","ResourceBatch","batch_name","resource_loaders","loading_finished","finished","has_errors","print_error","get_loaded_bytes","get_total_bytes"],"mappings":"qqDAyHK,MAACA,GAAU,IAxHhB,MAEEC,OAWE,OATAC,KAAKC,aAAe,GACpBD,KAAKE,MAAQC,OAAOC,UAAUC,UAAUC,cAGxCN,KAAKO,kBAAoB,CAAC,gBAAiB,SAAU,OAAQ,OAAQ,YAAa,YAAa,YAC/FP,KAAKQ,UAAYR,KAAKO,kBAAkBE,MAAKC,GAAWV,KAAKE,MAAMS,SAASD,KAE5EV,KAAKY,gBAAkB,OAAQR,WAEvB,GAER,KAAKJ,KAAKE,MAAMW,QAAQ,SAAW,EACjCb,KAAKC,aAAe,UACpB,MACF,KAAKD,KAAKE,MAAMW,QAAQ,QAAU,EAChCb,KAAKC,aAAe,gBACpB,MACF,KAAKD,KAAKE,MAAMW,QAAQ,QAAU,KAAOV,OAAOW,IAC9Cd,KAAKC,aAAe,QACpB,MACF,KAAKD,KAAKE,MAAMW,QAAQ,WAAa,KAAOV,OAAOY,OACjDf,KAAKC,aAAe,SACpB,MACF,KAAKD,KAAKE,MAAMW,QAAQ,YAAc,EACpCb,KAAKC,aAAe,YACpB,MACF,KAAKD,KAAKE,MAAMW,QAAQ,YAAc,EACpCb,KAAKC,aAAe,UACpB,MACF,KAAKD,KAAKE,MAAMW,QAA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