Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFT-Shift-Log-Site
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Fabius Mettner
FFT-Shift-Log-Site
Commits
8b733afd
Verified
Commit
8b733afd
authored
6 months ago
by
Fabius Mettner
Browse files
Options
Downloads
Patches
Plain Diff
Bugfix
parent
a16a46e4
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
index.html
+2
-2
2 additions, 2 deletions
index.html
src/render_image.rs
+3
-5
3 additions, 5 deletions
src/render_image.rs
src/square_shader.wgsl
+0
-19
0 additions, 19 deletions
src/square_shader.wgsl
with
5 additions
and
26 deletions
index.html
+
2
−
2
View file @
8b733afd
...
...
@@ -70,7 +70,7 @@
<input
type=
"range"
min=
"0.25"
max=
"
2.0
"
max=
"
1.5
"
value=
"1.0"
step=
"0.01"
class=
"slider"
...
...
@@ -80,7 +80,7 @@
<input
type=
"range"
min=
"0"
max=
"
7
"
max=
"
1
"
value=
"0"
step=
"0.01"
class=
"slider"
...
...
This diff is collapsed.
Click to expand it.
src/render_image.rs
+
3
−
5
View file @
8b733afd
use
std
::
f32
::
consts
::
PI
;
use
image
::{
GrayImage
,
Luma
};
use
imageproc
::
geometric_transformations
::{
rotate_about_center
,
Interpolation
};
use
wasm_bindgen
::
prelude
::
*
;
...
...
@@ -215,8 +217,6 @@ impl ImageState {
}*/
pub
fn
resize_0
(
&
mut
self
,
scale
:
u32
)
{
self
.width
=
256
;
self
.height
=
256
;
match
&
mut
self
.form0
{
Form
::
None
=>
{}
Form
::
Square
(
s
,
_
)
=>
*
s
=
scale
,
...
...
@@ -244,8 +244,6 @@ impl ImageState {
}
pub
fn
resize_1
(
&
mut
self
,
scale
:
u32
)
{
self
.width
=
256
;
self
.height
=
256
;
match
&
mut
self
.form1
{
Form
::
None
=>
{}
Form
::
Square
(
s
,
_
)
=>
*
s
=
scale
,
...
...
@@ -278,7 +276,7 @@ impl ImageState {
}
pub
fn
rotate
(
&
mut
self
,
rotation
:
f32
)
{
self
.rotate
=
rotation
;
self
.rotate
=
rotation
*
2.0
*
PI
;
self
.display
();
}
...
...
This diff is collapsed.
Click to expand it.
src/square_shader.wgsl
deleted
100644 → 0
+
0
−
19
View file @
a16a46e4
@vertex
fn vs_main(@builtin(vertex_index) vertex_index: u32) -> @builtin(position) vec4<f32> {
var positions = array<vec2<f32>, 6>(
vec2<f32>(-0.5, -0.5),
vec2<f32>(0.5, -0.5),
vec2<f32>(0.5, 0.5),
vec2<f32>(-0.5, -0.5),
vec2<f32>(0.5, 0.5),
vec2<f32>(-0.5, 0.5)
);
let pos = positions[vertex_index];
return vec4<f32>(pos, 0.0, 1.0);
}
@fragment
fn fs_main() -> @location(0) vec4<f32> {
return vec4<f32>(1.0, 1.0, 1.0, 1.0); // White square
}
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