mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-29 23:38:11 +08:00
Rename project structure with /core and /client
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
use graphite_editor::Color as InnerColor;
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
#[wasm_bindgen]
|
||||
pub struct Color(InnerColor);
|
||||
|
||||
#[wasm_bindgen]
|
||||
impl Color {
|
||||
#[wasm_bindgen(constructor)]
|
||||
pub fn new(red: f32, green: f32, blue: f32, alpha: f32) -> Self {
|
||||
Self(InnerColor::from_rgbaf32(red, green, blue, alpha).unwrap_throw())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user