ohzi-core 10.6.8 → 10.6.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"index.module.js","sources":["../src/Browser.js","../src/utilities/Validation.js","../src/resource_loader/AbstractLoader.js","../src/utilities/OMath.js","../src/action_sequencer/ActionSequencer.js","../src/utilities/EasingFunctions.js","../src/action_sequencer/ActionInterpolator.js","../src/action_sequencer/NumberInterpolator.js","../src/view_components/ViewContext.js","../src/action_sequencer/ActionEvent.js","../src/view_components/transition/DrawIOAnimationSheet.js","../src/view_components/transition/ActionSequencerBuilder.js","../src/EventManager.js","../src/ResourceContainer.js","../src/utilities/HTMLUtilities.js","../src/view_components/transition/TransitionTable.js","../src/Time.js","../src/view_components/ViewState.js","../src/view_components/transition/ViewStateTransitionHandler.js","../src/view_components/ViewManager.js","../src/view_components/ApplicationView.js","../src/BaseApplication.js","../src/render_mode/BaseRender.js","../src/materials/BaseShaderMaterial.js","../src/materials/BlitMaterial.js","../src/materials/AddMaterial.js","../src/materials/UnrealBloomComposeMaterial.js","../src/CameraManager.js","../src/Capabilities.js","../src/canvas_drawer/CanvasDrawer.js","../src/Configuration.js","../src/html_utilities/css_animator_states/Idle.js","../src/html_utilities/css_animator_states/Animating.js","../src/html_utilities/CSSAnimator.js","../src/components/AxisHelper.js","../src/SceneManager.js","../src/primitives/Cube.js","../src/primitives/Sphere.js","../src/primitives/Arrow.js","../src/OScreen.js","../src/materials/ScreenSpaceTextureMaterial.js","../src/PerspectiveCamera.js","../src/Debug.js","../src/materials/ClearDepthNormalMaterial.js","../src/materials/DepthNormalMaterial.js","../src/render_utilities/DepthAndNormalsRenderer.js","../src/render_utilities/Blitter.js","../src/Graphics.js","../src/materials/NormalMaterial.js","../src/render_mode/DebugNormalsRender.js","../src/KeyboardInput.js","../src/OS.js","../src/ReflectionPlaneContext.js","../src/static_batcher/GeometryBatch.js","../src/static_batcher/GeometryBatcher.js","../src/UI.js","../src/utilities/PerspectiveFrustumPointFitter.js","../src/utilities/OrthographicFrustumPointFitter.js","../src/utilities/CameraUtilities.js","../src/Initializer.js","../src/materials/SSAOMaterial.js","../src/materials/SSAOComposeMaterial.js","../src/materials/DisplayNormalTextureMaterial.js","../src/materials/BoxBlurMaterial.js","../src/render_utilities/Blurrer.js","../src/render_mode/NormalAORender.js","../src/render_mode/NormalRender.js","../src/render_mode/VRRender.js","../src/materials/GaussianBlurMaterial.js","../src/materials/LuminosityHighPassMaterial.js","../src/render_utilities/GaussianBlurrer.js","../src/render_mode/UnrealBloomRender.js","../src/OrthographicCamera.js","../src/view_components/ViewComponentManager.js","../src/RenderLoop.js","../src/Screen.js","../src/canvas_drawer/SimpleTextDrawer.js","../src/view_components/ViewComponent.js","../src/primitives/HorizontalPlane.js","../src/primitives/VerticalPlane.js","../src/utilities/ArrayUtilities.js","../src/utilities/FrustumPointFitter.js","../src/utilities/GeometryUtilities.js","../src/utilities/ImageUtilities.js","../src/utilities/MeshSampler.js","../src/utilities/ModelUtilities.js","../src/utilities/ObjectUtilities.js","../src/utilities/StringUtilities.js","../src/utilities/TimeUtilities.js","../src/components/Grid.js","../src/components/Line.js","../src/components/WorldImage.js","../src/components/Text2D.js","../src/materials/UIElementMaterial.js","../src/ui/ui_element_position/ScreenSpacePosition.js","../src/ui/ui_element_position/WorldSpacePosition.js","../src/ui/ui_element_state/UIElementState.js","../src/ui/ui_element_state/OnIdle.js","../src/ui/ui_element_state/OnMouseEnter.js","../src/ui/ui_element_state/OnMouseExit.js","../src/ui/ui_element_state/OnMouseHover.js","../src/components/UIElement.js","../src/components/UpdatableMaterialMesh.js","../src/components/sdf_text/TextGlyph.js","../src/components/sdf_text/SDFText.js","../src/materials/SDFTextMaterial.js","../src/components/sdf_text/SDFTextBatch.js","../src/action_sequencer/VectorInterpolator.js","../src/materials/MedianFilterMaterial.js","../src/render_utilities/MedianFilter.js","../src/materials/DualFilteringBlurMaterial.js","../src/materials/AlphaFilterMaterial.js","../src/render_utilities/DualFilteringBlurrer.js","../src/gpu_particles/ParticleAttribute.js","../src/gpu_particles/GPUParticleSystem.js","../src/materials/gpu_particles/ParticleStorageMaterial.js","../src/gpu_particles/ParticlePositionAttribute.js","../src/data_textures/CustomDataTexture.js","../src/data_textures/RGBDataTexture.js","../src/data_textures/RGBADataTexture.js","../src/data_textures/RGBFloatDataTexture.js","../src/data_textures/RGBAFloatDataTexture.js","../src/static_batcher/BatchedMesh.js","../src/static_batcher/MeshBatcher.js","../src/components/AudioClip.js","../src/resource_loader/AudioLoader.js","../src/resource_loader/BasisLoader.js","../src/resource_loader/CubemapLoader.js","../src/resource_loader/DAELoader.js","../src/resource_loader/FileLoader.js","../src/resource_loader/FontLoader.js","../src/resource_loader/GLTFLoader.js","../src/resource_loader/GLTFDRACOLoader.js","../src/resource_loader/HDRCubeTextureLoader.js","../src/resource_loader/JSONLoader.js","../src/resource_loader/OBJLoader.js","../src/resource_loader/PointArrayLoader.js","../src/resource_loader/RGBETextureLoader.js","../src/resource_loader/TextLoader.js","../src/resource_loader/AsyncTextureLoader.js","../src/resource_loader/TextureLoader.js","../src/resource_loader/VideoLoader.js","../src/resource_loader/ResourceBatch.js"],"sourcesContent":["\nclass Browser\n{\n init()\n {\n this.browser_name = '';\n this.agent = window.navigator.userAgent.toLowerCase();\n\n // vr specific\n this.vr_browser_keywords = ['oculusbrowser', 'oculus', 'vive', 'rift', 'windowsmr', 'cardboard', 'daydream', 'wolvic'];\n this.vr_browser_name = this.vr_browser_keywords.find(keyword => this.agent.includes(keyword));\n // Check for WebXR support (indicating VR capabilities)\n this.has_web_xr_support = 'xr' in navigator;\n\n switch (true)\n {\n case this.vr_browser_name !== undefined && this.has_web_xr_support:\n this.browser_name = this.vr_browser_name;\n break;\n case this.agent.indexOf('edge') > -1:\n this.browser_name = 'edge_ie';\n break;\n case this.agent.indexOf('edg') > -1:\n this.browser_name = 'edge_chromium';\n break;\n case this.agent.indexOf('opr') > -1 && !!window.opr:\n this.browser_name = 'opera';\n break;\n case this.agent.indexOf('chrome') > -1 && !!window.chrome:\n this.browser_name = 'chrome';\n break;\n case this.agent.indexOf('trident') > -1:\n this.browser_name = 'iexplorer';\n break;\n case this.agent.indexOf('firefox') > -1:\n this.browser_name = 'firefox';\n break;\n case this.agent.indexOf('safari') > -1:\n this.browser_name = 'safari';\n break;\n default:\n this.browser_name = 'other';\n break;\n }\n\n this.version = this.get_version();\n }\n\n get name()\n {\n return this.browser_name;\n }\n\n get is_safari()\n {\n return this.browser_name === 'safari';\n }\n\n get is_chrome()\n {\n return this.browser_name === 'chrome';\n }\n\n get is_edge()\n {\n return this.browser_name === 'edge_ie';\n }\n\n get is_edge_chromium()\n {\n return this.browser_name === 'edge_chromium';\n }\n\n get is_vr()\n {\n return this.vr_browser_keywords.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 { Browser } from '../Browser';\r\nimport { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { NoColorSpace, SRGBColorSpace, Texture } from 'three';\r\n\r\nclass AsyncTextureLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, size, flipY = true, premultiplyAlpha = false, colorSpaceConversion = true)\r\n {\r\n super(resource_id, url, size);\r\n\r\n this.colorSpaceConversion = colorSpaceConversion;\r\n this.premultiplyAlpha = premultiplyAlpha;\r\n this.flipY = flipY;\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.flipY = this.flipY;\r\n texture.premultiplyAlpha = this.premultiplyAlpha;\r\n texture.colorSpace = this.colorSpaceConversion ? SRGBColorSpace : NoColorSpace;\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, {\r\n colorSpaceConversion: this.colorSpaceConversion ? 'default' : 'none',\r\n imageOrientation: this.flipY ? 'flipY' : 'none',\r\n premultiplyAlpha: this.premultiplyAlpha ? 'premultiply' : 'none'\r\n });\r\n }).then((imageBitmap) =>\r\n {\r\n const texture = new Texture(imageBitmap);\r\n texture.flipY = this.flipY;\r\n texture.premultiplyAlpha = this.premultiplyAlpha;\r\n texture.colorSpace = this.colorSpaceConversion ? SRGBColorSpace : NoColorSpace;\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","vr_browser_keywords","vr_browser_name","find","keyword","includes","has_web_xr_support","undefined","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","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","flipY","premultiplyAlpha","colorSpaceConversion","load_with_old_method","load_with_new_method","Texture","Image","onload","colorSpace","SRGBColorSpace","NoColorSpace","onerror","original_url","fetchOptions","res","createImageBitmap","imageOrientation","imageBitmap","TextureLoader","VideoLoader","ResourceBatch","batch_name","resource_loaders","loading_finished","finished","has_errors","print_error","get_loaded_bytes","get_total_bytes"],"mappings":"6sDAyHK,MAACA,GAAU,IAxHhB,MAEEC,OAWE,OATAC,KAAKC,aAAe,GACpBD,KAAKE,MAAQC,OAAOC,UAAUC,UAAUC,cAGxCN,KAAKO,oBAAsB,CAAC,gBAAiB,SAAU,OAAQ,OAAQ,YAAa,YAAa,WAAY,UAC7GP,KAAKQ,gBAAkBR,KAAKO,oBAAoBE,MAAKC,GAAWV,KAAKE,MAAMS,SAASD,KAEpFV,KAAKY,mBAAqB,OAAQR,WAE1B,GAER,UAA8BS,IAAzBb,KAAKQ,iBAAiCR,KAAKY,mBAC9CZ,KAAKC,aAAeD,KAAKQ,gB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pgD,GAAGhE,aAElD,OAAOskD,EAGTC,iBAEE,IAAItkD,GAAY,EAChB,IAAK,IAAI+D,EAAI,EAAGA,EAAIzH,KAAK6nD,iBAAiB5hD,OAAQwB,IAEhD/D,EAAYA,GAAa1D,KAAK6nD,iBAAiBpgD,GAAG/D,UAEpD,OAAOA,EAGT3D,eAEEgE,QAAQG,MAAM,UAAYlE,KAAK4nD,WAAa,iCAC5C,IAAK,IAAIngD,EAAI,EAAGA,EAAIzH,KAAK6nD,iBAAiB5hD,OAAQwB,IAE5CzH,KAAK6nD,iBAAiBpgD,GAAG/D,WAE3B1D,KAAK6nD,iBAAiBpgD,GAAGwgD,cAK/BloD,eAEE,OAAOC,KAAKkoD,mBAAqBloD,KAAKmoD,kBAGxCpoD,mBAEE,IAAIwD,EAAe,EAEnB,IAAK,IAAIkE,EAAI,EAAGA,EAAIzH,KAAK6nD,iBAAiB5hD,OAAQwB,IAEhDlE,GAAgBvD,KAAK6nD,iBAAiBpgD,GAAGlE,aAG3C,OAAOA,EAGTxD,kBAEE,IAAIyD,EAAc,EAElB,IAAK,IAAIiE,EAAI,EAAGA,EAAIzH,KAAK6nD,iBAAiB5hD,OAAQwB,IAEhDjE,GAAexD,KAAK6nD,iBAAiBpgD,GAAGjE,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 async init()\n {\n this.browser_name = '';\n this.agent = window.navigator.userAgent.toLowerCase();\n\n this.has_web_xr_support = 'xr' in navigator;\n this.is_vr = this.has_web_xr_support && await navigator.xr.isSessionSupported('immersive-vr');\n\n switch (true)\n {\n case this.agent.indexOf('edge') > -1:\n this.browser_name = 'edge_ie';\n break;\n case this.agent.indexOf('edg') > -1:\n this.browser_name = 'edge_chromium';\n break;\n case this.agent.indexOf('opr') > -1 && !!window.opr:\n this.browser_name = 'opera';\n break;\n case this.agent.indexOf('chrome') > -1 && !!window.chrome:\n this.browser_name = 'chrome';\n break;\n case this.agent.indexOf('trident') > -1:\n this.browser_name = 'iexplorer';\n break;\n case this.agent.indexOf('firefox') > -1:\n this.browser_name = 'firefox';\n break;\n case this.agent.indexOf('safari') > -1:\n this.browser_name = 'safari';\n break;\n default:\n this.browser_name = 'other';\n break;\n }\n\n this.version = this.get_version();\n }\n\n get name()\n {\n return this.browser_name;\n }\n\n get is_safari()\n {\n return this.browser_name === 'safari';\n }\n\n get is_chrome()\n {\n return this.browser_name === 'chrome';\n }\n\n get is_edge()\n {\n return this.browser_name === 'edge_ie';\n }\n\n get is_edge_chromium()\n {\n return this.browser_name === 'edge_chromium';\n }\n\n get has_webm()\n {\n return !!(this.is_chrome || this.is_firefox || this.is_edge_chromium);\n }\n\n get has_hvec()\n {\n return this.is_safari;\n }\n\n get preferred_video_extension()\n {\n return this.has_webm ? 'webm' : this.has_hvec ? 'hvec.mp4' : 'mp4';\n }\n\n get_version()\n {\n const ua = navigator.userAgent;\n let tem = '';\n let version = 0;\n\n let M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\\/))\\/?\\s*(\\d+)/i) || [];\n\n if (/trident/i.test(M[1]))\n {\n tem = /\\brv[ :]+(\\d+)/g.exec(ua) || [];\n version = 'IE ' + (tem[1] || '');\n }\n if (M[1] === 'Chrome')\n {\n tem = ua.match(/\\b(OPR|Edge)\\/(\\d+)/);\n if (tem != null) version = tem.slice(1).join(' ').replace('OPR', 'Opera');\n }\n\n M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, '-?'];\n if ((tem = ua.match(/version\\/(\\d+(\\.\\d+)?)/i)) != null) M.splice(1, 1, tem[1]);\n\n version = M.join(' ');\n\n return Number(version.split(' ')[1]);\n }\n}\n\nconst browser = new Browser();\nexport { browser as Browser };\n","class Validation\n{\n constructor()\n {}\n\n static is_int(n)\n {\n return Number(n) === n && n % 1 === 0;\n }\n\n static is_float(n)\n {\n return Number(n) === n && n % 1 !== 0;\n }\n\n static is_number(n)\n {\n return this.is_int(n) || this.is_float(n);\n }\n\n static is_json(str)\n {\n try\n {\n JSON.parse(str);\n }\n catch (e)\n {\n return false;\n }\n\n return true;\n }\n}\n\nexport { Validation };\n","import { Browser } from '../Browser';\r\nimport { Validation } from '../utilities/Validation';\r\n\r\nclass AbstractLoader\r\n{\r\n constructor(resource_id, url, size = 1)\r\n {\r\n this.resource_id = resource_id;\r\n this.url = url;\r\n this.loaded_bytes = 0;\r\n this.total_bytes = size;\r\n\r\n this.has_finished = false;\r\n this.has_error = false;\r\n this.error_message = 'none';\r\n }\r\n\r\n __update_downloaded_bytes(loaded, total)\r\n {\r\n loaded = Validation.is_number(loaded) ? loaded : 1;\r\n total = Validation.is_number(total) ? total : 1;\r\n\r\n this.loaded_bytes = loaded;\r\n\r\n if (total > 0)\r\n {\r\n this.total_bytes = total;\r\n }\r\n\r\n if (this.loaded_bytes > this.total_bytes)\r\n {\r\n console.warn('Total bytes is smaller than loaded ones. Please set total bytes by hand to:', this.url);\r\n }\r\n }\r\n\r\n __loading_ended()\r\n {\r\n this.has_finished = true;\r\n }\r\n\r\n __set_error(message)\r\n {\r\n this.has_error = true;\r\n this.error_message = message;\r\n }\r\n\r\n print_error()\r\n {\r\n console.error('Error while loading ' + this.resource_id + '\\n\\t path: ' + this.url + '\\n\\t\\t' + this.error_message);\r\n }\r\n\r\n load(resource_container)\r\n {\r\n if (resource_container.resources_by_url[this.url] === undefined)\r\n {\r\n const cache = Browser.is_safari ? 'no-cache' : 'default';\r\n\r\n fetch(this.url, {\r\n method: 'GET', // *GET, POST, PUT, DELETE, etc.\r\n mode: 'cors', // no-cors, *cors, same-origin\r\n cache: cache, // *default, no-cache, reload, force-cache, only-if-cached\r\n credentials: 'same-origin', // include, *same-origin, omit\r\n redirect: 'follow' // manual, *follow, error\r\n })\r\n .then(this.on_progress.bind(this, resource_container))\r\n .catch(this.__on_error.bind(this));\r\n }\r\n else\r\n {\r\n resource_container.set_resource(this.resource_id, this.url, resource_container.resources_by_url[this.url]);\r\n\r\n this.__update_downloaded_bytes(1, 1);\r\n this.__loading_ended();\r\n }\r\n }\r\n\r\n async on_progress(resource_container, response)\r\n {\r\n const response_clone = response.clone();\r\n const reader = response.body.getReader();\r\n\r\n // Step 2: get total length\r\n const contentLength = +response.headers.get('Content-Length');\r\n\r\n // Step 3: read the data\r\n let receivedLength = 0; // received that many bytes at the moment\r\n\r\n while (true)\r\n {\r\n const { done, value } = await reader.read();\r\n\r\n if (done)\r\n {\r\n break;\r\n }\r\n\r\n receivedLength += value.length;\r\n\r\n this.__update_downloaded_bytes(receivedLength, contentLength);\r\n // console.log(`Received ${receivedLength} of ${contentLength}`);\r\n }\r\n\r\n this.on_preloaded_finished(resource_container, response_clone);\r\n }\r\n\r\n on_preloaded_finished(resource_container, response)\r\n {\r\n }\r\n\r\n __on_error(data)\r\n {\r\n console.error(data);\r\n }\r\n}\r\n\r\nexport { AbstractLoader };\r\n","import { Vector3 } from 'three';\n\nclass OMath\n{\n constructor()\n {}\n\n static linear_map(value,\n from_range_start_value,\n from_range_end_value,\n to_range_start_value,\n to_range_end_value)\n {\n return ((value - from_range_start_value) / (from_range_end_value - from_range_start_value)) * (to_range_end_value - to_range_start_value) + to_range_start_value;\n }\n\n static between(value, min, max)\n {\n return (value >= min && value <= max);\n }\n\n static mod(number, divisor)\n {\n return ((number % divisor) + divisor) % divisor;\n }\n\n static rgb_to_hex(rgb)\n {\n rgb.r = Math.round(rgb.r * 255).toString(16);\n rgb.g = Math.round(rgb.g * 255).toString(16);\n rgb.b = Math.round(rgb.b * 255).toString(16);\n\n if (rgb.r.length === 1)\n {\n rgb.r = '0' + rgb.r;\n }\n if (rgb.g.length === 1)\n {\n rgb.g = '0' + rgb.g;\n }\n if (rgb.b.length === 1)\n {\n rgb.b = '0' + rgb.b;\n }\n\n return '#' + rgb.r + rgb.g + rgb.b;\n }\n\n static project_points_on_plane(points, plane)\n {\n const projected_point = new Vector3();\n const points_on_plane = [];\n for (let i = 0; i < points.length; i++)\n {\n plane.projectPoint(points[i], projected_point);\n points_on_plane.push(projected_point.clone());\n }\n\n return points_on_plane;\n }\n\n static matrix4_lerp(from, to, target, t)\n {\n for (let i = 0; i < 16; i++)\n {\n target.elements[i] = this.lerp(from.elements[i], to.elements[i], t);\n }\n }\n\n static equals(x1, x2)\n {\n return Math.abs(x1 - x2) < 0.000001;\n }\n\n static lerp(x, y, t)\n {\n return (1 - t) * x + t * y;\n }\n\n static clamp(value, min, max)\n {\n return Math.max(min, Math.min(max, value));\n }\n\n static euclideanModulo(n, m)\n {\n return ((n % m) + m) % m;\n }\n\n static pingpong(x, length = 1)\n {\n return length - Math.abs(OMath.euclideanModulo(x, length * 2) - length);\n }\n\n static degToRad(degrees)\n {\n return degrees * (Math.PI / 180);\n }\n\n static radToDeg(radians)\n {\n return radians * (180 / Math.PI);\n }\n\n static deg_to_rad(degrees)\n {\n return degrees * (Math.PI / 180);\n }\n\n static rad_to_deg(radians)\n {\n return radians * (180 / Math.PI);\n }\n\n static perspective_divide(v)\n {\n v.x /= v.w;\n v.y /= v.w;\n v.z /= v.w;\n return v;\n }\n\n static points_average(points)\n {\n const center = points[0].clone();\n for (let i = 1; i < points.length; i++)\n {\n center.add(points[i]);\n }\n center.multiplyScalar(1 / points.length);\n return center;\n }\n\n static get_random_color()\n {\n const arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'a', 'b', 'c', 'd', 'e', 'f'];\n\n let col = '#';\n col += arr[Math.floor(Math.random() * 16)];\n col += arr[Math.floor(Math.random() * 16)];\n\n col += arr[Math.floor(Math.random() * 16)];\n col += arr[Math.floor(Math.random() * 16)];\n\n col += arr[Math.floor(Math.random() * 16)];\n col += arr[Math.floor(Math.random() * 16)];\n return col;\n }\n\n static saturate(x)\n {\n return OMath.clamp(x, 0, 1);\n }\n}\n\nexport { OMath };\n","\nimport { OMath } from '../utilities/OMath';\n\nclass ActionSequencer\n{\n constructor(context = {})\n {\n this.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 { Browser } from '../Browser';\r\nimport { AbstractLoader } from './AbstractLoader';\r\n\r\nimport { NoColorSpace, SRGBColorSpace, Texture } from 'three';\r\n\r\nclass AsyncTextureLoader extends AbstractLoader\r\n{\r\n constructor(resource_id, url, size, flipY = true, premultiplyAlpha = false, colorSpaceConversion = true)\r\n {\r\n super(resource_id, url, size);\r\n\r\n this.colorSpaceConversion = colorSpaceConversion;\r\n this.premultiplyAlpha = premultiplyAlpha;\r\n this.flipY = flipY;\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.flipY = this.flipY;\r\n texture.premultiplyAlpha = this.premultiplyAlpha;\r\n texture.colorSpace = this.colorSpaceConversion ? SRGBColorSpace : NoColorSpace;\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, {\r\n colorSpaceConversion: this.colorSpaceConversion ? 'default' : 'none',\r\n imageOrientation: this.flipY ? 'flipY' : 'none',\r\n premultiplyAlpha: this.premultiplyAlpha ? 'premultiply' : 'none'\r\n });\r\n }).then((imageBitmap) =>\r\n {\r\n const texture = new Texture(imageBitmap);\r\n texture.flipY = this.flipY;\r\n texture.premultiplyAlpha = this.premultiplyAlpha;\r\n texture.colorSpace = this.colorSpaceConversion ? SRGBColorSpace : NoColorSpace;\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","has_web_xr_support","is_vr","xr","isSessionSupported","indexOf","opr","chrome","version","get_version","name","is_safari","is_chrome","is_edge","is_edge_chromium","has_webm","is_firefox","has_hvec","preferred_video_extension","ua","tem","M","match","test","exec","slice","join","replace","appName","appVersion","splice","Number","split","Validation","n","is_int","is_float","str","JSON","parse","e","AbstractLoader","resource_id","url","size","loaded_bytes","total_bytes","has_finished","has_error","error_message","loaded","total","is_number","console","warn","message","error","resource_container","undefined","resources_by_url","cache","Browser","fetch","method","mode","credentials","redirect","then","on_progress","bind","catch","__on_error","set_resource","__update_downloaded_bytes","__loading_ended","response","response_clone","clone","reader","body","getReader","contentLength","headers","get","receivedLength","done","value","read","length","on_preloaded_finished","data","OMath","from_range_start_value","from_range_end_value","to_range_start_value","to_range_end_value","min","max","number","divisor","rgb","r","Math","round","toString","g","b","points","plane","projected_point","Vector3","points_on_plane","i","projectPoint","push","from","to","target","t","elements","lerp","x1","x2","abs","x","y","m","euclideanModulo","degrees","PI","radians","v","w","z","center","add","multiplyScalar","arr","col","floor","random","clamp","ActionSequencer","context","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","includes","split_data","trigger_name","trigger_method","at_time","value_data","to_value","from_time","to_time","sort","a","x_pos","ActionSequencerBuilder","default_state_data","animation_data","current_context","tracks","initial_tracks","state_to_tracks","get_longest_time","find","element","sequencer","add_action_interpolator","action_event","add_action_event","state","longest_time","xml","transition_data","track_time","event_manager","queue","zoom_changed_evt","store_clickd_evt","point_selected_evt","config_changed","path_substep_completed","path_completed","go_to_store_requested_evt","resource_loaded_evt","service_clicked_evt","unit_pos_updated_evt","floor_changed_evt","on_enter_floor_navigation","on_exit_floor_navigation","on_enter_floor_selection","on_exit_floor_selection","on_enter_outside_navigation","on_exit_outside_navigation","step_selected_evt","event","payload","callback","zoom","fire","store_id","hit_data","step_number","step_index","resource","service","unit_data","floor_id","resources","EventManager","fire_resource_loaded","HTMLUtilities","container","images","image","dataset","src","image_objects","image_object","videos","video","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","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","flipY","premultiplyAlpha","colorSpaceConversion","load_with_old_method","load_with_new_method","Texture","Image","onload","colorSpace","SRGBColorSpace","NoColorSpace","onerror","original_url","fetchOptions","res","createImageBitmap","imageOrientation","imageBitmap","TextureLoader","VideoLoader","ResourceBatch","batch_name","resource_loaders","loading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