MCPcopy Index your code
hub / github.com/NikLever/ThreeJS-PathEditor / showTip

Method showTip

index.js:180–217  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

178 }
179
180 showTip(){
181 const tipsShown = this.store.tipsShown;
182 let count = 0;
183 tipsShown.forEach( tip => {
184 if ( tip ) count++
185 } );
186 if (count == tipsShown.length) return;
187
188 const tips = [
189 "Select a tool",
190 "When editing a curve the green dots are the control points",
191 "When editing an arc, orange is the radius, green the start angle and red the end angle. The grey triangle lets you flip the direction.",
192 "Use Backdrop Ghosts to display a Path(s) while editing another.",
193 "Snap makes positioning snap to the grid",
194 "Backdrop 'Use Ghosts as holes' will convert the dotted line paths into holes when using the 'show' or 'export' buttons."
195 ]
196
197 let index;
198
199 if ( this.config.tool == 'select' && !tipsShown[0]){
200 index = 0;
201 }else if ( this.config.tool.includes( 'CurveTo') && !tipsShown[1]){
202 index = 1;
203 }else if (this.config.tool == 'arc' && !tipsShown[2]){
204 index = 2;
205 }else{
206 index = 3;
207 while(index < tips.length){
208 if (!tipsShown[index]) break;
209 index++;
210 }
211 if (index >= tips.length) return;
212 }
213
214 alert( tips[index] );
215 this.store.tipShown = index;
216 this.tipActive = true;
217 }
218
219 updatePathNamesGUI(){
220 //this.ghosts = { folder: backdrop, settings: {}, ctrls: {} };

Callers 1

constructorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected