Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

46 Commits

Repository files navigation

VectorJS

Description

VectorJS is a lightweight engine designed to execute JavaScript-based 2D/3D graphics, multimedia applications, and interactive scripts. Powered by QuickJS and Raylib, it bridges native performance with a simple JavaScript API.

Development Status

FeatureStatus
Shapes 2D
Audio
Text
Fonts

Dependencies

  • Raylib
  • Quickjs-ng

Example

import{Application,Rectangle,Vector2,Palette}from"vectorjs";constscreenWidth=800;constscreenHeight=600;constfpsPos=newVector2(10,10);constrect=newRectangle(30,30,200,45);constpoint1=newVector2(400,150);constpoint2=newVector2(300,350);constpoint3=newVector2(500,350);constapp=newApplication(screenWidth,screenHeight,"Window");app.run({onDraw(render){render.withLayer2D((ctx)=>{ctx.drawFPS(fpsPos);ctx.shapes.drawRectangle(rect,{color: Palette.RED})ctx.shapes.drawCircle(point1,60,{color: Palette.GREEN})ctx.shapes.drawTriangle(point1,point2,point3,{color: Palette.BLUE})});}});

Releases

Contributors

Languages