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
2 lines
72 KiB
JavaScript
2 lines
72 KiB
JavaScript
async function Module(moduleArg={}){var moduleRtn;var Module=moduleArg;var ENVIRONMENT_IS_WEB=!!globalThis.window;var ENVIRONMENT_IS_WORKER=!!globalThis.WorkerGlobalScope;var ENVIRONMENT_IS_NODE=globalThis.process?.versions?.node&&globalThis.process?.type!="renderer";if(ENVIRONMENT_IS_NODE){const{createRequire}=await import("node:module");var require=createRequire(import.meta.url)}var _ManifoldInitialized=false;Module.setup=function(){if(_ManifoldInitialized)return;_ManifoldInitialized=true;Module.initTBB();function toVec(vec,list,f=(x=>x)){if(list){for(let x of list){vec.push_back(f(x))}}return vec}function fromVec(vec,f=(x=>x)){const result=[];const size=vec.size();for(let i=0;i<size;i++)result.push(f(vec.get(i)));return result}function vec2polygons(vec,f=(x=>x)){const result=[];const nPoly=vec.size();for(let i=0;i<nPoly;i++){const v=vec.get(i);const nPts=v.size();const poly=[];for(let j=0;j<nPts;j++){poly.push(f(v.get(j)))}result.push(poly)}return result}function polygons2vec(polygons){if(polygons[0].length<3){polygons=[polygons]}return toVec(new Module.Vector2_vec2,polygons,poly=>toVec(new Module.Vector_vec2,poly,p=>{if(p instanceof Array)return{x:p[0],y:p[1]};return p}))}function disposePolygons(polygonsVec){for(let i=0;i<polygonsVec.size();i++)polygonsVec.get(i).delete();polygonsVec.delete()}function vararg2vec2(vec){if(vec[0]instanceof Array)return{x:vec[0][0],y:vec[0][1]};if(typeof vec[0]=="number")return{x:vec[0]||0,y:vec[1]||0};return vec[0]}function vararg2vec3(vec){if(vec[0]instanceof Array)return{x:vec[0][0],y:vec[0][1],z:vec[0][2]};if(typeof vec[0]=="number")return{x:vec[0]||0,y:vec[1]||0,z:vec[2]||0};return vec[0]}function fillRuleToInt(fillRule){return fillRule=="EvenOdd"?0:fillRule=="NonZero"?1:fillRule=="Negative"?3:2}function joinTypeToInt(joinType){return joinType=="Round"?1:joinType=="Miter"?2:0}const CrossSectionCtor=Module.CrossSection;function cross(polygons,fillRule="Positive"){if(polygons instanceof CrossSectionCtor){return polygons}else{const polygonsVec=polygons2vec(polygons);const cs=new CrossSectionCtor(polygonsVec,fillRuleToInt(fillRule));disposePolygons(polygonsVec);return cs}}Module.CrossSection.prototype.translate=function(...vec){return this._Translate(vararg2vec2(vec))};Module.CrossSection.prototype.scale=function(vec){if(typeof vec=="number"){return this._Scale({x:vec,y:vec})}return this._Scale(vararg2vec2([vec]))};Module.CrossSection.prototype.mirror=function(vec){return this._Mirror(vararg2vec2([vec]))};Module.CrossSection.prototype.warp=function(func){const wasmFuncPtr=addFunction(function(vec2Ptr){const x=getValue(vec2Ptr,"double");const y=getValue(vec2Ptr+8,"double");const vert=[x,y];func(vert);setValue(vec2Ptr,vert[0],"double");setValue(vec2Ptr+8,vert[1],"double")},"vi");const out=this._Warp(wasmFuncPtr);removeFunction(wasmFuncPtr);return out};Module.CrossSection.prototype.decompose=function(){const vec=this._Decompose();const result=fromVec(vec);vec.delete();return result};Module.CrossSection.prototype.bounds=function(){const result=this._Bounds();return{min:["x","y"].map(f=>result.min[f]),max:["x","y"].map(f=>result.max[f])}};Module.CrossSection.prototype.offset=function(delta,joinType="Round",miterLimit=2,circularSegments=0){return this._Offset(delta,joinTypeToInt(joinType),miterLimit,circularSegments)};Module.CrossSection.prototype.simplify=function(epsilon=1e-6){return this._Simplify(epsilon)};Module.CrossSection.prototype.extrude=function(height,nDivisions=0,twistDegrees=0,scaleTop=[1,1],center=false){scaleTop=vararg2vec2([scaleTop]);const man=Module._Extrude(this._ToPolygons(),height,nDivisions,twistDegrees,scaleTop);return center?man.translate([0,0,-height/2]):man};Module.CrossSection.prototype.revolve=function(circularSegments=0,revolveDegrees=360){return Module._Revolve(this._ToPolygons(),circularSegments,revolveDegrees)};Module.CrossSection.prototype.add=function(other){return this._add(cross(other))};Module.CrossSection.prototype.subtract=function(other){return this._subtract(cross(other))};Module.CrossSection.prototype.intersect=function(other){return this._interse
|
|||
|
|
;return moduleRtn}export default Module;
|