Skip to content

Commit

Permalink
Move the global option "Float color renderer" to the scene option "Co…
Browse files Browse the repository at this point in the history
…rrect Brightness" (since `FloatColorRenderer` does not work well on some devices, it will not become the default in the near future as was originally planned)
  • Loading branch information
ricktu288 committed Jan 5, 2025
1 parent d056f23 commit 6080996
Show file tree
Hide file tree
Showing 26 changed files with 256 additions and 320 deletions.
2 changes: 1 addition & 1 deletion locales/en/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"description": "Simulate colors (wavelengths) of light sources, mixture of colors, color filtering of blockers and mirrors, and chromatic dispersion of glasses.",
"instruction": "You can set those parameters for those objects when selected. To simulate color spectra, overlap rays with different wavelengths.",
"title": "Simulate Colors",
"warning": "The colors shown on the screen are only rough approximations, and can be very inaccurate when 'Ray density' is too high or too low."
"warning": "Color mixing is inaccurate unless used with \"Correct Brightness\"."
},
"tools": {
"AngleSource": {
Expand Down
24 changes: 9 additions & 15 deletions locales/en/simulator.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"cancelButton": "Cancel",
"closeButton": "Close",
"defaultOption": "Default",
"legacyOption": "Legacy",
"saveButton": "Save",
"reloadToTakeEffect": "Please reload the page to take effect."
},
Expand Down Expand Up @@ -71,14 +70,9 @@
"autoSyncUrlTooLarge": "The scene is too large to sync with URL. Please save it manually.",
"brightnessInconsistent": "The brightnesses of two or more light sources saturate with inconsistent ratios. This may lead to wrong detector readings and color rendering. Please increase the ray density or reduce the brightnesses of the light sources.",
"identicalObjects": "There are two identical optical elements in the scene that overlap completely. This may cause unexpected behavior.",
"shareLinkTooLong": "The URL is too long that it may not work on some platforms. You may need to use \"Save\" and share the file instead.",
"needsFloatColorRenderer": "This scene was created with the \"{{colorMode}}\" color mode, which requires the experimental \"Float Color Renderer\" to work. You may enable it in Settings -> Float Color Renderer.",
"legacyColorMode": "This scene is currently rendered in the legacy color mode. You may want to switch to a more accurate one in Settings -> Color Mode."
"shareLinkTooLong": "The URL is too long that it may not work on some platforms. You may need to use \"Save\" and share the file instead."
},
"colorModeModal": {
"legacy": {
"description": "Compatible with the original non-float color renderer. The color is not gamma-corrected, and when \"Simulate Colors\" is off, the brightness on the screen does not consistently represent the total brightness."
},
"linear": {
"title": "Linear Value",
"description": "The value V in the HSV color space equals the total brightness of the rays when \"Simulate Colors\" is off and for monochromatic light between 420 to 620 nm. V is capped to 1 while preserving H and S. The color is gamma-corrected."
Expand Down Expand Up @@ -192,7 +186,7 @@
"format": "Format",
"rayCountLimit": "Ray count limit",
"rayCountWarning": "The current number of rays in the scene is larger than the ray count limit. You may need to increase the ray count limit in the Crop Box options.",
"svgWarning": "Export to SVG: Color mixtures and relative refractive indices below 1 are not supported.",
"svgWarning": "Export to SVG: Color mixtures, correct brightness, and relative refractive indices below 1 are not supported.",
"title": "Export",
"width": "Width"
},
Expand All @@ -207,7 +201,7 @@
"irradiance": "The irradiance in the exported CSV is in (B/s)/L.",
"length": "L is the arbitrary unit of length used in this simulator.",
"s": "The dimensionless factor s is the \"Brightness Scale\" shown in Settings -> Show status box, which equals 1 when \"Ray Density\" is above some threshold and proportional to \"Ray Density\" otherwise.",
"sNewColorModes": "In the new experimental color modes that you are currently using, the dimensionless factor s always equals 1.",
"sNewColorModes": "When \"Correct Brightness\" is on, the dimensionless factor s always equals 1.",
"truncation": "If some rays are truncated in the infinite series of internal reflection, the total truncation is shown as error estimates."
},
"irradMap": "Irradiance Map"
Expand Down Expand Up @@ -286,7 +280,7 @@
"brightnessInfo": {
"rayDensity": "Only effective if 'Ray Density' is high enough.",
"rayDensitySlider": "To control the numbers of rays emitted, please adjust the global 'Ray Density' slider instead.",
"newColorModes": "In the new experimental color modes that you are currently using, the behavior of brightnesses at low 'Ray Density' is different from that in the legacy color mode. For the unit, see the info box of a detector when it is selected."
"newColorModes": "When \"Correct Brightness\" is on, the behavior at low \"Ray Density\" is different from the default. For the unit, see the info box of a detector when it is selected."
},
"emisAngle": "Emission Angle",
"eqnInfo": {
Expand All @@ -309,14 +303,14 @@
"description": "When enabled, the URL will be updated automatically with the current scene, so you don't need to keep saving the scene manually. To set the title, use File -> Save -> Rename.",
"title": "Auto sync URL"
},
"floatColorRenderer": {
"title": "Float Color Renderer",
"description": "(This is an experimental feature) Renders the rays with a WebGL floating-point texture. This solves the issues of inaccurate colors and brightnesses in this simulator (see \"Color Mode\"). The performance may be better or worse than the default renderer, depending on the browser and the hardware.",
"error": "Your browser does not support WebGL floating-point textures. Falling back to the default renderer."
"correctBrightness": {
"title": "Correct Brightness",
"description": "By default, the brightness on the screen does not consistently represent the brightness of the rays. This option fixes it using a specialized renderer, but may reduce the performance on some devices. (On some other devices it actually improves the performance.)",
"error": "Failed to enable \"Correct Brightness\". Your browser may not support WebGL floating-point textures."
},
"colorMode": {
"title": "Color Mode",
"description": "Determines how the brightnesses (and colors if \"Simulate Colors\" is on) of the rays or images are mapped to the colors on the screen. Only configurable when \"Float Color Renderer\" is enabled."
"description": "Determines how the brightnesses (and colors if \"Simulate Colors\" is on) of the rays or images are mapped to the colors on the screen. Only configurable when using \"Correct Brightness\"."
},
"gridSize": {
"title": "Grid Size"
Expand Down
3 changes: 1 addition & 2 deletions locales/es/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
"simulateColors": {
"description": "Simular colores (longitudes de onda), mezclas de colores, filtros de color de bloqueadores y espejos y dispersión cromática de vidrios.",
"instruction": "Puede ajustar los parámetros de estos objetos cuando los seleccione. Para simular el espectro de colores, sobreponga rayos con diferentes longitudes de onda.",
"title": "Simular colores",
"warning": "Los colores mostrados en pantalla son solo aproximaciones burdas y puede ser muy impreciso cuando 'Densidad de rayos' es demasiado alta o demasiado baja."
"title": "Simular colores"
},
"tools": {
"AngleSource": {
Expand Down
3 changes: 1 addition & 2 deletions locales/ko/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
"simulateColors": {
"description": "광원의 색상 (파장), 색상 혼합, 차단기와 거울에 의한 파장 필터링, 매질의 색 분산을 시뮬레이션합니다.",
"instruction": "개체를 선택할 때 이러한 변수를 설정할 수 있습니다. 색상 스펙트럼을 시뮬레이션 하려면 여러 파장의 광선을 겹치십시오.",
"title": "색상 (파장) 시뮬레이션",
"warning": "화면에 표시되는 색상은 대략적인 근사이며, 광선 밀도가 너무 높거나 낮을 시 매우 부정확할 수 있습니다."
"title": "색상 (파장) 시뮬레이션"
},
"tools": {
"AngleSource": {
Expand Down
3 changes: 1 addition & 2 deletions locales/pl/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@
"simulateColors": {
"description": "Symulacja kolorów (długości fal) źródeł światła, mieszania kolorów, filtrowania kolorów przez filtry blokujące i lustra oraz dyspersji chromatycznej szkieł.",
"instruction": "Po wybraniu można ustawić te parametry dla tych obiektów. Aby symulować widma kolorów, należy nałożyć na siebie promienie o różnych długościach fal.",
"title": "Symuluj kolory",
"warning": "Kolory wyświetlane na ekranie są jedynie przybliżone i mogą być bardzo niedokładne, gdy 'Gęstość promieni' jest zbyt wysoka lub zbyt niska."
"title": "Symuluj kolory"
},
"tools": {
"AngleSource": {
Expand Down
1 change: 0 additions & 1 deletion locales/pl/simulator.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
"autoSyncUrlTooLarge": "Scena jest zbyt duża, aby zsynchronizować ją z URL. Zapisz ją ręcznie.",
"brightnessInconsistent": "Jasności dwóch lub więcej źródeł światła nasycają się w niespójnych proporcjach. Może to prowadzić do błędnych odczytów detektora i nieprawidłowego odwzorowania kolorów. Zwiększ gęstość promieni lub zmniejsz jasność źródeł światła.",
"identicalObjects": "Na scenie znajdują się dwa identyczne elementy optyczne, które całkowicie na siebie zachodzą. Może to spowodować nieoczekiwane zachowanie.",
"legacyColorMode": "Ta scena jest obecnie renderowana w starszym trybie kolorów. Możesz przełączyć się na bardziej dokładny w Ustawienia -> Tryb kolorów.",
"shareLinkTooLong": "Adres URL jest zbyt długi i może nie działać na niektórych platformach. Zamiast tego może być konieczne użycie \"Zapisz\" i udostępnienie pliku."
},
"languageModal": {
Expand Down
3 changes: 1 addition & 2 deletions locales/pt-BR/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@
"simulateColors": {
"description": "Simular cores (comprimentos de onda) de fontes luminosas, mistura de cores, filtragem de cores por bloqueadores e espelhos, e dispersão cromática de vidros.",
"instruction": "Você pode definir esses parâmetros para esses objetos quando selecionados. Para simular espectros de cor, sobreponha raios com comprimentos de onda diferentes.",
"title": "Simular Cores",
"warning": "As cores exibidas na tela são apenas aproximações, e podem ser muito imprecisas quando 'Densidade de Raios' está muito alta ou muito baixa."
"title": "Simular Cores"
},
"tools": {
"AngleSource": {
Expand Down
2 changes: 1 addition & 1 deletion locales/zh-CN/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"description": "模拟光源的颜色(波长)、混色、遮光物与镜子的滤光,以及透光物的色散。",
"instruction": "选取物件后可调整这些参数。重叠多条不同波长的光线可用于模拟光谱。",
"title": "模拟色彩",
"warning": "屏幕显示之颜色仅为粗略近似,且当「光线密度」太高或太低时可能非常不准确"
"warning": "除非使用「修正亮度」,否则混色并不准确"
},
"tools": {
"AngleSource": {
Expand Down
26 changes: 10 additions & 16 deletions locales/zh-CN/simulator.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"closeButton": "关闭",
"defaultOption": "默认",
"saveButton": "保存",
"reloadToTakeEffect": "请重新加载页面才能生效。",
"legacyOption": "旧版模式"
"reloadToTakeEffect": "请重新加载页面才能生效。"
},
"file": {
"copyLink": {
Expand Down Expand Up @@ -71,9 +70,7 @@
"autoSyncUrlTooLarge": "本场景过大,无法与网址同步。 请自行储存场景。",
"brightnessInconsistent": "有至少两个光源的亮度以不一致的比例达到饱和。这可能会导致探测器的读数与色彩渲染错误。请提高光线密度或降低光源亮度。",
"identicalObjects": "场景中有两个完全相同的光学元件完全重合。 这可能会导致非预期的行为。",
"shareLinkTooLong": "本网址过长,在部分平台上可能无法正常运作。建议改用「保存」并分享文件。",
"needsFloatColorRenderer": "本场景是使用「{{colorMode}}」色彩模式建立的,其需要实验性的「浮点数色彩渲染器」才能运作。您可以在设定->浮点数色彩渲染器中启用它。",
"legacyColorMode": "本场景目前以旧版色彩模式渲染。您可在设定->色彩模式中切换为较精确的模式。"
"shareLinkTooLong": "本网址过长,在部分平台上可能无法正常运作。建议改用「保存」并分享文件。"
},
"languageModal": {
"helpTranslate": "协助我们翻译本程序",
Expand Down Expand Up @@ -171,7 +168,7 @@
"format": "格式",
"rayCountLimit": "光线数量上限",
"rayCountWarning": "目前场景中的光线数量大于光线数量上限。 您可能需要将剪取框选项中的光线数量上限调高。",
"svgWarning": "导出为SVG:不支持混色与相对折射率低于1的情形",
"svgWarning": "导出为SVG:不支持混色、修正亮度与相对折射率低于1的情形",
"title": "导出",
"width": "宽度"
},
Expand All @@ -187,7 +184,7 @@
"length": "L 是本模拟器中使用的任意长度单位。",
"s": "无量纲因子 s 是「设定」->「显示状态栏」中显示的「亮度尺度」,当「光线密度」高于某个阈值时为1,否则与「光线密度」成正比。",
"truncation": "如果某些光线在内反射的无穷级数中被截断,则总截断量将显示为误差估计。",
"sNewColorModes": "在您目前使用的实验性新色彩模式中,无量纲因子 s 恒等于 1。"
"sNewColorModes": "使用「修正亮度」时,无量纲因子 s 恒等于 1。"
},
"irradMap": "辐照度图"
},
Expand Down Expand Up @@ -265,7 +262,7 @@
"brightnessInfo": {
"rayDensity": "只在「光线密度」够高时才有作用。",
"rayDensitySlider": "如需改变射出的光线数量,请调整全域性的「光线密度」滑杆。",
"newColorModes": "在您目前使用的实验性新色彩模式中,「光线密度」低时亮度的行为与旧版模式不同。关于单位,请选取一个探测器并查看其资讯框。"
"newColorModes": "使用「修正亮度」时,低「光线密度」下的行为与默认行为不同。关于单位,请选取一个探测器并查看其资讯框。"
},
"emisAngle": "发射角",
"eqnInfo": {
Expand Down Expand Up @@ -332,13 +329,13 @@
"showRayArrows": {
"title": "显示光线箭头"
},
"floatColorRenderer": {
"title": "浮点数色彩渲染器",
"description": "(此为实验性功能)使用 WebGL 浮点数纹理来渲染光线。这可以解决本模拟器中颜色与亮度不准确的问题(见「色彩模式」)。取决于浏览器与硬体,本渲染器的效能可能比预设渲染器好,也可能比较差。",
"error": "您的浏览器不支持 WebGL 浮点数纹理。将回退到默认渲染器"
"correctBrightness": {
"title": "修正亮度",
"description": "在默认情况下,萤幕上的亮度并非一致地表达光线的亮度。本选项使用特制的渲染器来修正此问题,但在某些装置上可能导致效能变差。 (在另一些装置上反而会让效能变好。)",
"error": "「修正亮度」启用失败。您的浏览器可能不支援 WebGL 浮点数纹理。"
},
"colorMode": {
"description": "决定光线或像的亮度(若启用「模拟色彩」,则还需考虑颜色)如何对应到萤幕上的颜色。只在启用「浮点数色彩渲染器」时才可调整此设定。",
"description": "决定光线或像的亮度(若启用「模拟色彩」,则还需考虑颜色)如何对应到萤幕上的颜色。只在启用「修正亮度」时才可调整此设定。",
"title": "色彩模式"
}
},
Expand All @@ -360,9 +357,6 @@
"description": "总亮度 100, 10, …, 10⁻⁵ 分别以红、橙、黄、绿、青、蓝、紫、黑表示,并以对数刻度平滑插值。",
"title": "颜色编码强度"
},
"legacy": {
"description": "相容于原本的非浮点数色彩渲染器。颜色未经过伽马校正,并且当「模拟色彩」关闭时,萤幕上的亮度并非一致地与总亮度对应。"
},
"linear": {
"description": "HSV 色彩空间中的明度 V 值等于「模拟色彩」关闭时光线的总亮度,也等于光线为 420 至 620 nm 之间的单色光时的总亮度。V 超过 1 时将调降为 1 并保持 H 和 S 不变。颜色经过伽马校正。",
"title": "线性明度"
Expand Down
2 changes: 1 addition & 1 deletion locales/zh-TW/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"description": "模擬光源的顏色(波長)、混色、遮光物與鏡子的濾光,以及透光物的色散。",
"instruction": "選取物件後可調整這些參數。重疊多條不同波長的光線可用於模擬光譜。",
"title": "模擬色彩",
"warning": "螢幕顯示之顏色僅為粗略近似,且當「光線密度」太高或太低時可能非常不準確"
"warning": "除非使用「修正亮度」,否則混色並不準確"
},
"tools": {
"AngleSource": {
Expand Down
Loading

0 comments on commit 6080996

Please sign in to comment.