a new node #111
Replies: 2 comments
|
@canwegoback thank you for this input, this should be on top of a our todos @wass08 |
|
Reviving this with an actual technical answer — it's been sitting on "on top of our todos" since February, which isn't useful to someone offering to build it. Thanks for reading the source that carefully; your framing of the problem is right, but the conclusion isn't, and the difference matters for how you'd implement it. Your premise — "y-axis stretching requires a panel" — isn't true today. The registry has a declarative handle system in Here's the slab's height handle, which is close to a minimal push/pull in structure: // packages/nodes/src/slab/definition.ts:145
function slabRecessedDepthHandle(): HandleDescriptor<SlabNodeType> {
return {
kind: 'linear-resize',
axis: 'y',
anchor: 'min', // base stays fixed; drag the top
min: MIN_SLAB_ELEVATION,
max: (n, sceneApi) => slabElevationUpperBound(sceneApi.nodes(), n),
currentValue: (n) => n.elevation ?? 0.05,
magneticSnap: (n, newValue, sceneApi) => resolveStructuralElevationSnap(...),
apply: (n, newValue) => applySlabTopChange(n, newValue),
previewOverrides: (n, newValue, sceneApi) => slabChangePreviewOverrides(...),
placement: { position: (n) => [cx, elevation + HEIGHT_HANDLE_OFFSET, cz] },
}
}Note what you get for free by declaring rather than implementing: Where your instinct is right: the three things in your videos are not one feature, and they get progressively less compatible with how Pascal is built.
Suggested path if you want to build this: start with (1) on a single node type where the handle is missing, as a small PR that proves out the ergonomics — including whether the drag needs a modifier to disambiguate from move, which is the real UX question here since Ctrl/Meta-drag is already direct-move. Then open a separate issue for the Read |
Uh oh!
There was an error while loading. Please reload this page.
Thank you for your work on the editor's source code. During the holidays, I read through the editor's source code and have a question. Now, I want to add a feature similar to SketchUp's block pull/push functionality to the code. However, most of the nodes in the current code are stretched and expanded on the xz plane. If stretching is to be done on the y-axis, it requires the use of a panel to set up (I'm not sure if my understanding is correct). In this case, the experience for the block pull/push feature will not be very good. Could you please give me some suggestions regarding this aspect (any suggestions would be greatly appreciated)? Thank you
Here are some examples
Create shape
QQ20260202-162612.mp4
push and pull
QQ20260202-162658.mp4
dig a hole
QQ20260202-162738.mp4
Translate/Scale/Rotate (low priority)
QQ20260202-162820.mp4
In the end, we can get such a building
All reactions