Git Komut Rehberi & Terminal Asistanı
Sıfırdan Yeni Bir Depo Başlatın:
Mevcut Bir Git Deposu veya Klasörü Gönderin:
Hataları Geri Alma, İptal & Temizlik:
Son commit'i geri al (yapılan değişiklikleri korur):
git reset --soft HEAD~1
Yapılan yerel değişiklikleri iptal et (çalışma ağacını temizler):
git restore .
Takip edilmeyen gereksiz dosyaları sil:
git clean -fd
Değişiklikleri geçici sakla ve geri getir (stash):
git stash git stash pop
Dal (Branch) ve Sürüm Etiketleri:
Yeni dal aç ve geçiş yap:
git checkout -b yeni-ozellik git push -u origin yeni-ozellik
Sürüm etiketi (tag) oluştur ve gönder:
git tag -a v1.0.0 -m "Sürüm 1.0.0" git push origin --tags
feat: improve shape tools and project previews
This commit is contained in:
@@ -54,6 +54,37 @@ describe("shape catalog", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("applies only explicitly customized creation dimensions", () => {
|
||||
const asset: ShapeAsset = { id: "cone", name: "Cone", src: "cone.png", kind: "cone", color: "#6e2786" };
|
||||
const appDefault = makeShapeFromAsset(asset);
|
||||
const customized = makeShapeFromAsset(asset, undefined, { width: 320, depth: 240, height: 180 });
|
||||
|
||||
expect(appDefault).toMatchObject({ width: 20, depth: 20, height: 20, baseRadius: 10 });
|
||||
expect(customized).toMatchObject({ width: 320, depth: 240, height: 180, size: 320, baseRadius: 160 });
|
||||
});
|
||||
|
||||
it("applies shape-specific creation defaults only when customized", () => {
|
||||
const cone = makeShapeFromAsset(
|
||||
{ id: "cone", name: "Cone", src: "cone.png", kind: "cone", color: "#6e2786" },
|
||||
undefined,
|
||||
{ topRadius: 3, baseRadius: 18, sides: 48 },
|
||||
);
|
||||
const text = makeShapeFromAsset(
|
||||
{ id: "text", name: "Text", src: "text.png", kind: "text", color: "#cf101b" },
|
||||
undefined,
|
||||
{ text: "HELLO", font: "Serif", bevel: 2, segments: 6 },
|
||||
);
|
||||
const gear = makeShapeFromAsset(
|
||||
{ id: "gear", name: "Gear", src: "gear.svg", kind: "gear", color: "#6f7f8d" },
|
||||
undefined,
|
||||
{ gearType: "helical", teeth: 24, toothSize: 3, toothWidth: 2, centerHoleSize: 10, helixAngle: 30, helixQuality: 24 },
|
||||
);
|
||||
|
||||
expect(cone).toMatchObject({ topRadius: 3, baseRadius: 18, sides: 48 });
|
||||
expect(text).toMatchObject({ text: "HELLO", font: "Serif", bevel: 2, segments: 6 });
|
||||
expect(gear).toMatchObject({ gearType: "helical", teeth: 24, toothSize: 3, toothWidth: 2, centerHoleSize: 10, helixAngle: 30, helixQuality: 24 });
|
||||
});
|
||||
|
||||
it("creates canonical scene shapes with stable defaults", () => {
|
||||
const created = sceneShape({
|
||||
name: "Part",
|
||||
|
||||
Reference in New Issue
Block a user