-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Переносит рендеринг снега в воркер #1318
Conversation
Превью контента из опубликовано. |
@@ -63,7 +63,7 @@ const sw = () => { | |||
|
|||
const scripts = () => { | |||
return gulp | |||
.src('src/scripts/index.js') | |||
.src(['src/scripts/index.js', 'src/scripts/workers/snow-worker-25.js']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не уверен, что этого достаточно, чтобы файл оказался где надо во всех режимах, система сборки у вас довольно сложная, буду рад советам.
@@ -1,5 +1,5 @@ | |||
{ | |||
"name": "platform", | |||
"name": "doka-platform", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"name": "doka-platform", | |
"name": "platform", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
случайно закоммитилось
Привет! Но мне очень нравится твой код и твой подход. Кажется, что из этого получился бы отличный рецепт! Что скажешь? Попробуешь написать? |
@solarrust да, я тоже подумал в процессе, что улучшение тут вряд ли пригодится, но ПР решил отправить все равно. По поводу рецепта подумаю, спасибо. |
Не решает какую-то конкретную проблему, я просто посмотрел на хорошую поддержку https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas#browser_compatibility в браузерах, и мне показалось хорошей идеей унести рендеринг из главного UI-потока, так как работу с canvas в отличие от предыдущего решения на CSS сам браузер оптимизировать и вынести на отдельное ядро или тем более GPU не способен.