Search found 40 matches

by Andy
Sat Mar 28, 2020 9:56 am
Forum: Coding Questions
Topic: Rounded Box (Vector Graphics) problem
Replies: 18
Views: 5531

Re: Rounded Box (Vector Graphics) problem

Hi. I am trying to achieve this

https://github.com/sketchpunk/NEditorJS
by Andy
Mon Mar 23, 2020 8:28 am
Forum: Coding Questions
Topic: Rounded Box (Vector Graphics) problem
Replies: 18
Views: 5531

Re: Rounded Box (Vector Graphics) problem

If i use a radius of less than 15, i get the same problem. I dont really get what is going on here
by Andy
Mon Mar 23, 2020 8:20 am
Forum: Coding Questions
Topic: Rounded Box (Vector Graphics) problem
Replies: 18
Views: 5531

Re: Rounded Box (Vector Graphics) problem

Very nice Peter!
by Andy
Mon Mar 23, 2020 7:29 am
Forum: Coding Questions
Topic: Rounded Box (Vector Graphics) problem
Replies: 18
Views: 5531

Re: Rounded Box (Vector Graphics) problem

Yes. Thank you. The original code i found and converted is below. // A utility function to draw a rectangle with rounded corners. function roundedRect(ctx, x, y, width, height, radius) { ctx.beginPath(); ctx.moveTo(x, y + radius); ctx.lineTo(x, y + height - radius); ctx.arcTo(x, y + height, x + radi...
by Andy
Sun Mar 22, 2020 9:21 pm
Forum: Coding Questions
Topic: Rounded Box (Vector Graphics) problem
Replies: 18
Views: 5531

Rounded Box (Vector Graphics) problem

Does anyone know why this does not produce the expected result? Procedure RoundedBox(x, y, width, height, radius) MovePathCursor(x, y + radius) AddPathArc(x, y + height, x + radius, y + height, radius) AddPathArc(x + width, y + height, x + width, y + height-radius, radius) AddPathArc(x + width, y, x...
by Andy
Sat Mar 14, 2020 8:27 am
Forum: Javascript
Topic: Need help with Button
Replies: 2
Views: 5832

Re: Need help with Button

Thanks Peter
by Andy
Fri Mar 13, 2020 2:46 pm
Forum: Javascript
Topic: Need help with Button
Replies: 2
Views: 5832

Need help with Button

Hi, I am trying to load a local audio file to play with webaudio. The below code works but i want to attach it to a spiderbasic button. ! $('body').append('<input type="file" id="fileInput"><br>') ! fileInput.onchange = function(e) { ! obj = URL.createObjectURL(this.files[0]) ! }
by Andy
Sun Feb 16, 2020 6:32 pm
Forum: Javascript
Topic: Babylon.js : Problem with the latest release
Replies: 29
Views: 24082

Re: Babylon.js : Problem with the latest release

I closed the IDE and reopened it. All working ok now. Sorry
by Andy
Sun Feb 16, 2020 4:55 pm
Forum: Javascript
Topic: Babylon.js : Problem with the latest release
Replies: 29
Views: 24082

Re: Babylon.js : Problem with the latest release

It was working until i actually saved the code in the IDE. If i run the code below in a new tab in the IDE without saving, it works. I'm still learning the basics. Anyone know whats going on here? Enumeration #mf #mfRender EndEnumeration Global BJSEngine, BJSCanvas, Scene Declare InitEngine(Callback...
by Andy
Sun Feb 16, 2020 4:49 pm
Forum: Javascript
Topic: Babylon.js : Problem with the latest release
Replies: 29
Views: 24082

Re: Babylon.js : Problem with the latest release

Works with v4 :)