Comments (9)
I played around with it a little just for fun, I imagine it could look something like that (sorry for the color artifacts):
from motion-canvas.
While it's true that we'll need a color picker sooner or later for the sake of editable signals, I am strongly against using third-party components in the editor as they destroy any sense of consistency in terms of the visuals and the feel.
It's important to keep in mind that Motion Canvas is meant to feel like a desktop application and not a website.
Here's an example of the color picker from Blender:
Most notably, it uses HSV sliders that both look and work the same as any other field in the application.
As such, the color picker should be implemented using our own components.
This shouldn't be too complex as it's just a few sliders and two CSS gradients on top of each other.
We also already depend on chroma-js
which provides all the logic necessary for color conversion an manipulation.
from motion-canvas.
I'll look into that. I guess the new NumberInput
will come in handy for the sliders.
from motion-canvas.
Does it have to be the same layout as in Blender, i.e. one (circular) map for hue and saturation and another one for brightness, or would you also be fine with one map for saturation and brightness and another linear one for hue (as in the gif I sent)? I think the latter would be easier to implement and I like the easy way of keeping the saturation and brightness while playing around with the hue, but I guess that comes down to personal preference.
from motion-canvas.
Yes, the square + hue slider from the gif is better. It's common in most drawing software so I think it would be a good default.
from motion-canvas.
I had some other things going on but I finally got to work on it again. The functionality is there now but before spending time on styling I wanted to clarify how exactly you imagine the component to look like.
That's the current (temporary) state:
Some feedback would be great @aarthificial !
from motion-canvas.
Looking good so far!
Here are some tweaks:
- The vertical gap should be
8px
everywhere, and the padding should be16px
to be consistent with the rest of the editor.
Here's it on a4x4px
grid:
- Selection circles should be
12x12px
with the one over the hue being black to stand out better. - Values should be presented with 4 decimal places
- Inputs should have nested labels on the left
- There should be an alpha/opacity slider at the bottom.
- Hue should range from
0
to1
(Consistent with Blender)
from motion-canvas.
Great, got everything looking good now. Just one more thing, where do you want the popover to be located relative to the color preview? Just some fixed distance to the right? If it just opens where the click happens, the background blends with the rest of the settings pane.
Or do you want to make the popover background darker, the way Blender handles it?
from motion-canvas.
Having it fixed on the right is ok for now, 12px to match the padding around the zoom picker.
Tho I'm also considering making it collapsible, similarly to how colors in the inspector are presented:
I think in the future this would work better with the inspector on the right
from motion-canvas.
Related Issues (20)
- Switch code node to use treesitter HOT 3
- tsc command fails with .md files HOT 3
- Make fill and stroke options accept shaders
- gap prop in LayoutProps has the wrong type
- Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The image argument is a canvas element with a width or height of 0.
- Allow specifying origin for Grid
- Allow matching substrings instead of patterns HOT 3
- Handle invalid offset values in the meta file HOT 2
- Introduce smoothstep interpolation function to chain animations with different interpolation functions smoothly
- How to use themes with the new Code node HOT 5
- Polygon side tweening moves the 0 point on the middle of the created edge HOT 1
- Stack overflow error when attempting to restore a saved state of a `Code` node. HOT 1
- Images not rendered in Camera HOT 5
- Document node's `element` property HOT 3
- Video stuttering when playing both video and animation HOT 1
- Fix reparent docs not accurate when it comes to layout
- Possibility of using Webcodecs for fast rendering HOT 3
- Video stuttering in editor/presentation mode
- Animating `Txt`'s text with emojis causes broken characters HOT 1
- Automatically set the video's speed based on the desired duration
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from motion-canvas.