Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dima Krasner
Sharkey
Commits
ca2ed0a5
Commit
ca2ed0a5
authored
1 year ago
by
syuilo
Browse files
Options
Downloads
Patches
Plain Diff
🎨
parent
5d22e113
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/frontend/src/components/MkAnimBg.vue
+14
-2
14 additions, 2 deletions
packages/frontend/src/components/MkAnimBg.vue
packages/frontend/src/components/MkUserSetupDialog.vue
+2
-2
2 additions, 2 deletions
packages/frontend/src/components/MkUserSetupDialog.vue
with
16 additions
and
4 deletions
packages/frontend/src/components/MkAnimBg.vue
+
14
−
2
View file @
ca2ed0a5
...
...
@@ -8,6 +8,14 @@ import isChromatic from 'chromatic/isChromatic';
const
canvasEl
=
shallowRef
<
HTMLCanvasElement
>
();
const
props
=
withDefaults
(
defineProps
<
{
scale
?:
number
;
focus
?:
number
;
}
>
(),
{
scale
:
1.0
,
focus
:
1.0
,
});
function
loadShader
(
gl
,
type
,
source
)
{
const
shader
=
gl
.
createShader
(
type
);
...
...
@@ -65,11 +73,13 @@ onMounted(() => {
const
shaderProgram
=
initShaderProgram
(
gl
,
`
attribute vec2 vertex;
uniform vec2 u_scale;
varying vec2 v_pos;
void main() {
gl_Position = vec4(vertex, 0.0, 1.0);
v_pos = vertex;
v_pos = vertex
/ u_scale
;
}
`
,
`
precision mediump float;
...
...
@@ -191,12 +201,14 @@ onMounted(() => {
const
u_warp
=
gl
.
getUniformLocation
(
shaderProgram
,
'
u_warp
'
);
const
u_focus
=
gl
.
getUniformLocation
(
shaderProgram
,
'
u_focus
'
);
const
u_itensity
=
gl
.
getUniformLocation
(
shaderProgram
,
'
u_itensity
'
);
const
u_scale
=
gl
.
getUniformLocation
(
shaderProgram
,
'
u_scale
'
);
gl
.
uniform2fv
(
u_resolution
,
[
canvas
.
width
,
canvas
.
height
]);
gl
.
uniform1f
(
u_spread
,
1.0
);
gl
.
uniform1f
(
u_speed
,
1.0
);
gl
.
uniform1f
(
u_warp
,
1.0
);
gl
.
uniform1f
(
u_focus
,
1.0
);
gl
.
uniform1f
(
u_focus
,
props
.
focus
);
gl
.
uniform1f
(
u_itensity
,
0.5
);
gl
.
uniform2fv
(
u_scale
,
[
props
.
scale
,
props
.
scale
]);
const
vertex
=
gl
.
getAttribLocation
(
shaderProgram
,
'
vertex
'
);
gl
.
enableVertexAttribArray
(
vertex
);
...
...
This diff is collapsed.
Click to expand it.
packages/frontend/src/components/MkUserSetupDialog.vue
+
2
−
2
View file @
ca2ed0a5
...
...
@@ -27,7 +27,7 @@
>
<
template
v-if=
"page === 0"
>
<div
:class=
"$style.centerPage"
>
<MkAnimBg
style=
"position: absolute; top: 0;"
/>
<MkAnimBg
style=
"position: absolute; top: 0;"
:scale=
"1.5"
/>
<MkSpacer
:margin-min=
"20"
:margin-max=
"28"
>
<div
class=
"_gaps"
style=
"text-align: center;"
>
<i
class=
"ti ti-confetti"
style=
"display: block; margin: auto; font-size: 3em; color: var(--accent);"
></i>
...
...
@@ -83,7 +83,7 @@
<
/template
>
<
template
v
-
else
-
if
=
"
page === 5
"
>
<
div
:
class
=
"
$style.centerPage
"
>
<
MkAnimBg
style
=
"
position: absolute; top: 0;
"
/>
<
MkAnimBg
style
=
"
position: absolute; top: 0;
"
:
scale
=
"
1.5
"
/>
<
MkSpacer
:
margin
-
min
=
"
20
"
:
margin
-
max
=
"
28
"
>
<
div
class
=
"
_gaps
"
style
=
"
text-align: center;
"
>
<
i
class
=
"
ti ti-check
"
style
=
"
display: block; margin: auto; font-size: 3em; color: var(--accent);
"
><
/i
>
...
...
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