Skip to content

Commit

Permalink
fix(gui): bind color & scene size
Browse files Browse the repository at this point in the history
  • Loading branch information
YunYouJun committed Jan 24, 2024
1 parent 8532f65 commit cea653b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
24 changes: 12 additions & 12 deletions editor/core/components/panel/view/InspectorView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,28 +49,28 @@ const formData = ref({
},
colorHex: '#0099ff',
colorRgba: {
r: 0,
r: 255,
g: 0,
b: 0,
a: 0,
a: 1,
},
colorHsla: {
h: 0,
s: 0,
l: 0,
a: 0,
h: 119,
s: 100,
l: 18,
a: 1,
},
colorHsva: {
h: 0,
s: 0,
v: 0,
a: 0,
h: 76,
s: 99,
v: 79,
a: 1,
},
colorRgbScale: {
r: 0,
r: 1,
g: 0,
b: 0,
a: 0,
a: 1,
},
file: '',
})
Expand Down
6 changes: 3 additions & 3 deletions packages/gui/client/components/AGUIColorPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ const value = computed(() => {
const rawValue = props.modelValue as RgbaColor
if (props.rgbScale !== 255 && typeof rawValue === 'object') {
const rgba = {
r: rawValue.r / 255 * props.rgbScale,
g: rawValue.g / 255 * props.rgbScale,
b: rawValue.b / 255 * props.rgbScale,
r: rawValue.r * 255 / props.rgbScale,
g: rawValue.g * 255 / props.rgbScale,
b: rawValue.b * 255 / props.rgbScale,
a: rawValue.a,
}
return colord(rgba).toHex()
Expand Down
4 changes: 2 additions & 2 deletions packages/gui/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@advjs/gui",
"type": "module",
"version": "0.0.4-beta.12",
"version": "0.0.4",
"repository": {
"url": "https://github.com/YunYouJun/advjs/tree/main/packages/gui",
"type": "git"
Expand Down Expand Up @@ -52,7 +52,7 @@
"devDependencies": {
"unbuild": "^2.0.0",
"vite-plugin-css-injected-by-js": "^3.3.1",
"vite-plugin-dts": "^3.7.1",
"vite-plugin-dts": "^3.7.2",
"vue-tsc": "^1.8.27"
}
}
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 comments on commit cea653b

@vercel
Copy link

@vercel vercel bot commented on cea653b Jan 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on cea653b Jan 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on cea653b Jan 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.