Skip to content
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

Fix ASCII plugin zoom on hover #49

Closed
wants to merge 147 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
82b82ec
ogl setup
clementroche Aug 7, 2024
21bffe9
random dithering & ordered wip
clementroche Aug 8, 2024
c975532
pixelation
clementroche Aug 9, 2024
f59bb27
v3
clementroche Aug 19, 2024
d1b3d0b
quantization
clementroche Aug 19, 2024
919e732
color palette
clementroche Aug 20, 2024
83f8aaa
fix build
clementroche Aug 20, 2024
c863aa8
sanitize matrices title
clementroche Aug 20, 2024
1bc3da6
limited palette
clementroche Aug 20, 2024
7389d8d
clean up
clementroche Aug 20, 2024
c84b42e
slider
clementroche Aug 20, 2024
e1fe1b8
css colors
clementroche Aug 21, 2024
7726b3a
fix image save
clementroche Aug 21, 2024
37e27dc
brightness
clementroche Aug 21, 2024
e4de0a5
placeholder
clementroche Aug 22, 2024
bea6413
inset box shadow
clementroche Aug 22, 2024
16ec4b7
threshold canvas border
clementroche Aug 22, 2024
dc6decd
replace image on save
clementroche Aug 26, 2024
52bdb44
fix hmr and cleanup on close
clementroche Aug 26, 2024
d0050a0
handle transparency
clementroche Aug 26, 2024
38788d2
fork & setup
clementroche Aug 27, 2024
79a1dbc
html title
clementroche Aug 28, 2024
a54a3cd
remove commented code
clementroche Aug 28, 2024
9e4cbd9
Merge branch 'main' of https://github.com/darkroomengineering/framer-…
clementroche Aug 28, 2024
36c5634
rename
clementroche Aug 28, 2024
29e357b
texture atlas wip
clementroche Aug 28, 2024
1d0a53b
shader v1
clementroche Aug 29, 2024
0559b25
color modes
clementroche Aug 29, 2024
3baf417
background color wip
clementroche Aug 30, 2024
3e25238
background color
clementroche Aug 30, 2024
66d80e1
ogl setup
clementroche Aug 7, 2024
42b2104
random dithering & ordered wip
clementroche Aug 8, 2024
f62811d
pixelation
clementroche Aug 9, 2024
2f6edd2
quantization
clementroche Aug 19, 2024
eea4f41
color palette
clementroche Aug 20, 2024
01232c0
fix build
clementroche Aug 20, 2024
012a45e
sanitize matrices title
clementroche Aug 20, 2024
97c16ce
limited palette
clementroche Aug 20, 2024
0267dab
clean up
clementroche Aug 20, 2024
00a0a81
slider
clementroche Aug 20, 2024
830aac8
css colors
clementroche Aug 21, 2024
3e2c7c3
fix image save
clementroche Aug 21, 2024
5522253
brightness
clementroche Aug 21, 2024
8a561c6
placeholder
clementroche Aug 22, 2024
a863b24
inset box shadow
clementroche Aug 22, 2024
a42a4a2
threshold canvas border
clementroche Aug 22, 2024
142e63b
replace image on save
clementroche Aug 26, 2024
291f477
fix hmr and cleanup on close
clementroche Aug 26, 2024
0c7322b
handle transparency
clementroche Aug 26, 2024
61005e0
html title
clementroche Aug 28, 2024
63c2e8d
remove commented code
clementroche Aug 28, 2024
4535918
remove unused packages
clementroche Aug 28, 2024
3dd7347
package lock
clementroche Aug 28, 2024
715d89a
fix package lock
clementroche Aug 30, 2024
357f07e
canvas mode
clementroche Aug 30, 2024
2282f4a
select google mono fonts
Aug 30, 2024
0ceb271
default params
clementroche Aug 30, 2024
daebbe5
default params
clementroche Aug 30, 2024
f8ce49d
google fonts
clementroche Sep 2, 2024
aae1e5b
build
clementroche Sep 2, 2024
8d6ec5a
reorganize tweaks
clementroche Sep 2, 2024
1b810dc
drag and drop on plugin & setting up for more inputs
Sep 2, 2024
4616909
drag and drop on plugin &
Sep 2, 2024
676ee7e
segmented control wip
clementroche Sep 3, 2024
1246c66
segmented control wip
clementroche Sep 3, 2024
98a8f7f
merge
clementroche Sep 3, 2024
a52fd0e
color input
clementroche Sep 3, 2024
db8093c
themes
clementroche Sep 3, 2024
806aeb0
video support WIP
Sep 3, 2024
60c943c
fix empty frame
clementroche Sep 3, 2024
6ee919e
fix shader
clementroche Sep 3, 2024
025daf2
export keep original size
clementroche Sep 3, 2024
fe4895d
resolution dropdown
clementroche Sep 3, 2024
67690f2
canvas inner shadow
clementroche Sep 3, 2024
ecc3af5
ui qa
clementroche Sep 4, 2024
225a693
magnifier
clementroche Sep 4, 2024
18a5bc1
some cleanup
clementroche Sep 4, 2024
c801013
submit button
clementroche Sep 4, 2024
95b6b2d
hooks signature
clementroche Sep 4, 2024
e433677
GLB support WIP
Sep 4, 2024
05b45ad
fix drag drop model type
Sep 5, 2024
7cb898d
fix drop state types and initial state
Sep 5, 2024
b460652
model only color based on normals
Sep 5, 2024
34c5bd3
glsl syntax
clementroche Sep 5, 2024
f5735ab
Merge branch 'ascii' of https://github.com/darkroomengineering/framer…
clementroche Sep 5, 2024
7f18ee6
keep render FBO to texture in render hook
Sep 5, 2024
6484ed7
handle videos
clementroche Sep 5, 2024
e5de9fe
merge
clementroche Sep 5, 2024
2a0de45
support glb
clementroche Sep 5, 2024
98e08c9
buttons
clementroche Sep 5, 2024
65363e6
cleanup
clementroche Sep 5, 2024
5cd6d3d
add Image
clementroche Sep 5, 2024
6f78f98
allow .gltf
clementroche Sep 5, 2024
7cdd918
GUI QA
Sep 9, 2024
ed0acc8
more qa
clementroche Sep 10, 2024
42837d5
adapt font size to resolution
clementroche Sep 10, 2024
b20691e
icon
clementroche Sep 10, 2024
f8bb11e
ui
clementroche Sep 10, 2024
546ec5c
model shading
clementroche Sep 10, 2024
2aaec8d
select on focus
clementroche Sep 10, 2024
9ce56bd
better number input sanitize
clementroche Sep 10, 2024
8bb1442
tweak number input
clementroche Sep 10, 2024
c1137ed
glb background
clementroche Sep 11, 2024
7700f75
support image upload
clementroche Sep 11, 2024
8d62c41
toggle border radius
clementroche Sep 11, 2024
28f138b
disable orbit on image
clementroche Sep 11, 2024
c84b7a6
fix color mode selection
clementroche Sep 11, 2024
3d31562
merge ascii plugin
clementroche Sep 16, 2024
cd7d42c
solve conflicts
clementroche Sep 16, 2024
a41ddf1
clean comments
clementroche Sep 16, 2024
e60692d
clean unused files
clementroche Sep 16, 2024
ce97b5c
clean styles
clementroche Sep 16, 2024
54398b3
merge
clementroche Sep 18, 2024
8fa5a9d
fix zoom
clementroche Sep 18, 2024
0e496a4
revert icon
clementroche Sep 18, 2024
907e9ee
package lock
clementroche Aug 28, 2024
75c644a
inputs
clementroche Sep 16, 2024
3609e6e
input css
clementroche Sep 16, 2024
fc79e0d
resolution wip
clementroche Sep 16, 2024
1d62218
resolution tweak
clementroche Sep 17, 2024
619afcd
fix float input format
clementroche Sep 17, 2024
0f39565
zoom
clementroche Sep 17, 2024
c6ecae5
fix placholder
clementroche Sep 17, 2024
5b7f65d
asprite matrix
clementroche Sep 18, 2024
4b3b249
Add HubSpot plugin
Sakib25800 Sep 1, 2024
cef83fb
Upgrade framer-plugin for all plugins
anthonyec Sep 17, 2024
088002d
package lock
clementroche Aug 28, 2024
f469185
matrices selection
clementroche Sep 18, 2024
733448e
image upload
clementroche Sep 18, 2024
ebf045a
try new id
clementroche Sep 19, 2024
a455057
new id
clementroche Sep 19, 2024
82d19cc
save
clementroche Sep 19, 2024
d8b394c
ascii insert
clementroche Sep 19, 2024
8f71dd2
button hover colors
clementroche Sep 19, 2024
1c19abd
default resolution
clementroche Sep 20, 2024
bba486a
assets maximum size
clementroche Sep 20, 2024
8184a9d
pixelation tweak
clementroche Sep 20, 2024
7431007
fix palette size
clementroche Sep 20, 2024
842d28a
use gradient texture
clementroche Sep 20, 2024
9d3348a
pixelation max
clementroche Sep 21, 2024
696a4ea
remove unused code
clementroche Sep 23, 2024
3a67ef6
framer id
clementroche Sep 23, 2024
ddb8689
ascii max resolution
clementroche Sep 23, 2024
f9e1b2e
Add ASCII Plugin
huntercaron Sep 17, 2024
aad1d55
Add HubSpot plugin
Sakib25800 Sep 1, 2024
dc69325
revert icon
clementroche Sep 18, 2024
fe8df16
Merge branch 'framer:main' into main
clementroche Sep 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4,922 changes: 1,688 additions & 3,234 deletions package-lock.json

Large diffs are not rendered by default.

17 changes: 15 additions & 2 deletions plugins/ascii/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ html * {
height: 100% !important;
transform: translate(0, 0) !important;
}

canvas.zoom {
max-width: unset;
}
}
}

Expand All @@ -49,6 +53,10 @@ html * {
}

body[data-framer-theme="light"] {
.canvas-container {
background-color: rgba(0, 0, 0, 0.15);
}

.canvas-container::after {
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}
Expand Down Expand Up @@ -324,14 +332,14 @@ body[data-framer-theme="dark"] .error-container {
.submit {
width: 100%;
color: #000;
background-color: #fff;
background-color: #fff !important;
font-weight: 600;
cursor: pointer;
}

body[data-framer-theme="light"] {
.submit {
background-color: #000;
background-color: #000 !important;
color: #fff;
font-weight: 500;
}
Expand All @@ -340,9 +348,14 @@ body[data-framer-theme="light"] {
.upload {
.upload-cta {
width: 100%;
background: var(--framer-color-bg-tertiary);
}
}

.clear {
background: var(--framer-color-bg-tertiary) !important;
}

.asset-buttons {
display: flex;
grid-template-columns: repeat(2, minmax(0, 1fr));
Expand Down
28 changes: 15 additions & 13 deletions plugins/ascii/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function ASCIIPlugin({ framerCanvasImage }: { framerCanvasImage: ImageAsset | nu
const { gl, toBytes, program, setProgram, setResolution } = useOGLPipeline()

useEffect(() => {
asciiRef.current?.setPixelSize(exportSize * 0.02)
asciiRef.current?.setPixelSize(exportSize * 0.04)
}, [exportSize])

useImageTexture(
Expand Down Expand Up @@ -101,7 +101,7 @@ function ASCIIPlugin({ framerCanvasImage }: { framerCanvasImage: ImageAsset | nu
canvasContainerRef.current.style.width = `${CANVAS_WIDTH}px`
canvasContainerRef.current.style.height = `${CANVAS_WIDTH / aspect}px`

setExportSize(assetResolution[0])
setExportSize(Math.min(4000, assetResolution[0]))
}, [assetResolution])

useEffect(() => {
Expand All @@ -114,7 +114,15 @@ function ASCIIPlugin({ framerCanvasImage }: { framerCanvasImage: ImageAsset | nu

setSavingInAction(true)

if (framerCanvasImage) {
if (droppedAsset || isPlaceholder) {
await framer.addImage({
image: {
type: "bytes",
bytes: bytes,
mimeType: "image/png",
},
})
} else {
const originalImage = await framerCanvasImage.getData()

await framer.setImage({
Expand All @@ -123,18 +131,10 @@ function ASCIIPlugin({ framerCanvasImage }: { framerCanvasImage: ImageAsset | nu
mimeType: originalImage.mimeType,
},
})
} else {
await framer.addImage({
image: {
type: "bytes",
bytes: bytes,
mimeType: "image/png",
},
})
}

setSavingInAction(false)
}, [toBytes, framerCanvasImage])
}, [toBytes, framerCanvasImage, droppedAsset, isPlaceholder])

// resize observer
useEffect(() => {
Expand Down Expand Up @@ -225,7 +225,9 @@ function ASCIIPlugin({ framerCanvasImage }: { framerCanvasImage: ImageAsset | nu
<option value="500">500px</option>
<option value="1000">1000px</option>
<option value="2000">2000px</option>
<option value={assetResolution[0]}>Source ({assetResolution[0]}px)</option>
<option value={Math.min(4000, assetResolution[0])}>
Source ({Math.min(4000, assetResolution[0])}px)
</option>
</select>
</div>
</div>
Expand Down
Loading