![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
A renderer for nona-core
that renders in a browser what looks like a terminal output.
import Engine from 'nona-core';
import {
renderer,
components,
assemblages,
keyIsDown,
} from 'nona-ascii';
// Create a new Game instance
const engine = new Engine({
renderer: renderer({
attachPoint,
width: 80,
height: 30,
}),
update: ({
// Entities and component data
}) => {
// Modify entity-component data here
if (keyIsDown(39)) { // Arrow Right
// Move carla right
}
},
components,
assemblages,
});
// Add components
engine.createComponent({
name: 'Transform',
description: 'Track entity position',
state: {
x: 0,
y: 0,
},
});
// Create an entity
const carla = engine.addEntity('Carla');
// Add a component to an entity
engine.addComponentToEntity('Transform', carla);
// Start your engine
engine.startGame();
Exports:
Name | Type | Description |
---|---|---|
renderer | Function | Takes arguments for rendering and returns a function to be passed to nona-core 's renderer. |
components | Array | An array of core components used for drawing and more. |
assemblages | Array | An array of core assemblages used for drawing and more. |
keyIsDown | Function | Takes a keyCode and return a boolean . |
keyIsUp | Function | Takes a keyCode and return a boolean . |
attachPoint
is a DOM element to which everything will be drawn.
[
{
name: 'Transform',
description: `A component for storing the 2D position.
Default: state: { x: 0, y: 0 }
Types: state: { x: <integer>, y: <integer> }`,
state: {
x: 0,
y: 0,
},
},
{
name: 'Renderer',
description: `A component for renderer an ascii character.
Default: state: { char: '#' }
Types: state: { char: <char> }`,
state: {
char: '#',
},
},
]
[
{
label: 'GameObject',
description: `An assemblage for positioning and rendering an entity.
Coponents: ['Transform', 'Renderer']`,
components: new Set([
'Transform',
'Renderer',
]),
},
]
Takes an integer
keyCode and returns a boolean
.
Takes an integer
keyCode and returns a boolean
.
Author: Wolfgang Schuster
FAQs
A renderer, components, and more to use with nona-core
The npm package nona-ascii receives a total of 0 weekly downloads. As such, nona-ascii popularity was classified as not popular.
We found that nona-ascii demonstrated a not healthy version release cadence and project activity because the last version was released 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.