
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
onejs-core
Advanced tools
This is the Core JS Lib for OneJS V2. It contains the following:
https://github.com/Singtaa/onejs-core/tree/main/math
import { vec3, quat, mul, add } from 'onejs/math';
// Create a position vector
const position = vec3(1, 2, 3);
// Create a rotation
const rotation = quat(0, 0, 0, 1);
// Apply rotation to direction vector
const direction = vec3(0, 0, 1);
const rotatedDirection = mul(rotation, direction);
// Move in the rotated direction
const newPosition = add(position, rotatedDirection);
console.log(newPosition); // [1, 2, 4]
import { namedColor, parseColor, palettes } from "onejs-core/utils"
import { useEffect, useRef } from "preact/hooks"
import { h, render } from "preact"
import { forwardRef } from "preact/compat"
import { GameObject, PrimitiveType, MeshRenderer, Vector3, Physics, Random, Rigidbody, CollisionDetectionMode, PhysicsMaterial, SphereCollider, Mathf, Camera, Collider } from "UnityEngine"
import { RuntimePanelUtils } from "UnityEngine/UIElements"
let plane = GameObject.CreatePrimitive(PrimitiveType.Plane)
plane.transform.position = new Vector3(0, -10, 0)
plane.GetComp(MeshRenderer).material.color = namedColor("maroon")
plane.transform.localScale = new Vector3(15, 1, 15)
let pm = new PhysicsMaterial()
pm.bounciness = 0.6
plane.GetComp(Collider).material = pm
var cam = GameObject.Find("Main Camera")
cam.transform.position = new Vector3(0, 6, -10)
cam.transform.LookAt(new Vector3(0, -15, 0))
Physics.gravity = new Vector3(0, -30, 0)
let balls: GameObject[] = []
function createRandomBall() {
let ball = GameObject.CreatePrimitive(PrimitiveType.Sphere)
ball.GetComp(MeshRenderer).material.color = parseColor(palettes[Mathf.RoundToInt(Random.Range(0, 99))][2])
ball.transform.position = Vector3.op_Multiply(Random.insideUnitSphere, 2)
let rb = ball.AddComp(Rigidbody)
rb.collisionDetectionMode = CollisionDetectionMode.Continuous
rb.drag = 0.3
ball.GetComp(SphereCollider).material = pm
balls.push(ball)
}
for (let i = 0; i < 10; i++) {
createRandomBall()
}
const NamePlate = forwardRef(({ index }: { index: number }, ref) => {
return <div ref={ref} class="absolute hidden text-teal-700 text-xl">{`Ball ${index}`}</div>
})
const App = () => {
const refs = Array.from({ length: balls.length }, () => useRef<Element>())
useEffect(() => {
var interval = setInterval(update)
return () => clearInterval(interval)
}, [])
function update() {
for (let i = 0; i < balls.length; i++) {
const ball = balls[i]
var pos = RuntimePanelUtils.CameraTransformWorldToPanel(document.body!.ve.panel, ball.transform.position, Camera.main);
refs[i].current!.style.translate = pos
refs[i].current!.style.display = "flex"
}
}
return <div class="w-full h-full">
{balls.map((ball, i) => <NamePlate ref={refs[i]} index={i} />)}
</div>
}
render(<App />, document.body)
FAQs
The JS part of OneJS, a UI framework and Scripting Engine for Unity.
The npm package onejs-core receives a total of 228 weekly downloads. As such, onejs-core popularity was classified as not popular.
We found that onejs-core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.