Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Molstar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michal Malý
Molstar
Commits
93215b6b
Commit
93215b6b
authored
3 years ago
by
dsehnal
Browse files
Options
Downloads
Patches
Plain Diff
prefer webgl 1 in Safari 15.1-15.3
parent
e4f630db
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/mol-plugin/config.ts
+8
-3
8 additions, 3 deletions
src/mol-plugin/config.ts
with
8 additions
and
3 deletions
src/mol-plugin/config.ts
+
8
−
3
View file @
93215b6b
...
...
@@ -20,12 +20,17 @@ export class PluginConfigItem<T = any> {
function
item
<
T
>
(
key
:
string
,
defaultValue
?:
T
)
{
return
new
PluginConfigItem
(
key
,
defaultValue
);
}
function
preferWebGl1
()
{
export
function
preferWebGl1
()
{
if
(
typeof
navigator
===
'
undefined
'
||
typeof
window
===
'
undefined
'
)
return
false
;
// WebGL2 isn't working in MacOS 12.0.1 Safari 15.1
(bu
t is working in Safari tech preview
)
// WebGL2 isn't working in MacOS 12.0.1 Safari 15.1
, 15.2. I
t is working in Safari
15.4
tech preview
, so disabling all versions before that.
// prefer webgl 1 based on the userAgent substring
if
(
navigator
.
userAgent
.
indexOf
(
'
Version/15.1 Safari
'
)
>
0
)
{
const
unpportedSafariVersions
=
[
'
Version/15.1 Safari
'
,
'
Version/15.2 Safari
'
,
'
Version/15.3 Safari
'
];
if
(
unpportedSafariVersions
.
some
(
v
=>
navigator
.
userAgent
.
indexOf
(
v
)
>
0
))
{
return
true
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment