123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|150|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Off Topic -> BASIK by Realtime

Sat, 05 Jul 2025, 21:59
realtime
Alpha release Linkage

-=-=-
me blog: fork-garden
Sat, 05 Jul 2025, 21:59
Pixel_Outlaw
Looks like the first file got mangled, here it is formatted for readability. https://pastebin.com/siNe9Pax

Is this your project?
The examples seem to work pretty well!
Sat, 05 Jul 2025, 22:54
realtime
yes it does, the minify doesn't work very well. has just fixed it, and republish.


will move the demo to codepen.

simple demo for doodle.
doodle demo

-=-=-
me blog: fork-garden
Sun, 06 Jul 2025, 03:40
realtime
🖌️ Drawing with a Brush: BASIK Tutorial

🎯 What You'll Learn
- How to set up a canvas
- Load and position an image as a brush
- Track mouse input to draw interactively
- Display helpful UI text


🧩 Step-by-Step Breakdown

1. Initialize the Environment


use strict
ensures cleaner JavaScript syntax. This is not necessary but good for best practice

let brush
define variable that will hold the image used for drawing.

2. Start Function: Setup Canvas and Brush


The Start function will be triggered automatically when the application start.

Graphics()
Sets up the canvas. We are working with 320 x 240.
Basik will automatically scale the canvas for you regardless of screen resolution.
You always work in 320x240 pixels as you defined

LoadImage()
Fetches the brush graphic. You can load image from anywhere.
Make sure you have permission if you load from external resource.

handleX/Y
Set the image’s anchor point (in pixels from top-left).
this will centers the brush for accurate placement.
The brush image is 16 x 16 pixel


Update Function: Draw on Mouse Drag

Update function will be triggered on game update.

MouseIsDown()
Checks if the mouse is pressed.

MouseX() and MouseY()
Track cursor location.

DrawImage()
places the brush image.

Cls()
Clear the canvas each frame. We only clear area specified in the parameter.
If you don't set the parameter then it will clear the whole screen.

TextPos()
Write()

Set text position and write something

happy coding

-=-=-
me blog: fork-garden
Sun, 06 Jul 2025, 03:55
Jayenkai
Neat set of functions, very much needed in the Javascript environment.
Any reason you've made it "MouseIsDown" instead of "MouseDown"?

-=-=-
''Load, Next List!''
Sun, 06 Jul 2025, 04:15
realtime
MouseIsDown means the mouse is in down state.

There is an event to catch when you start pressing the mouse.

Function MouseDown()

Haven't update the doc yet.

-=-=-
me blog: fork-garden