![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 library to visibly cull objects designed to work with pixi.js (but not dependent on pixi.js).
Includes two types of culling algorithms: simple and spatial hash. The spatial hash may be also be used for collision detection, AI, etc.
Features include:
The Cull.SpatialHash.addContainer() only works with pixi v5.0.0rc2+ because it relies on the new container events childAdded and childRemoved. The rest of the libraries functionality will work with older versions of pixi.js.
Since I maintain pixi-viewport, I was asked a number of times for a culling library. Well here it is. Choose from two drop-in algorithms to cull your objects.
var PIXI = require('pixi.js');
var Viewport = require('pixi-viewport'); // you can use any viewport/camera as long as you can get the bounding box
var Cull = require('pixi-cull');
var app = new PIXI.Application();
document.body.appendChild(app.view);
// create viewport
var viewport = new Viewport({
screenWidth: app.view.offsetWidth,
screenHeight: app.view.offsetHeight,
worldWidth: 10000,
worldHeight: 10000
});
app.stage.addChild(viewport);
viewport.drag().pinch().wheel().decelerate().moveCenter(5000, 5000);
// add red boxes
for (var i = 0; i < 500; i++)
{
var sprite = viewport.addChild(new PIXI.Sprite(PIXI.Texture.WHITE));
sprite.tint = 0xff0000;
sprite.width = sprite.height = 100
sprite.position.set(Math.random() * 10000, Math.random() * 10000);
}
var cull = new Cull.Simple();
cull.addList(viewport.children);
cull.cull(viewport.getVisibleBounds());
// cull whenever the viewport moves
PIXI.ticker.shared.add(() =>
{
if (viewport.dirty)
{
cull.cull(viewport.getVisibleBounds());
viewport.dirty = false;
}
});
https://davidfig.github.io/pixi-cull/
https://davidfig.github.io/pixi-cull/jsdoc/
npm i pixi-cull
or grab the latest release and use it:
<script src="/directory-to-file/pixi.js"></script>
<script src="/directory-to-file/pixi-cull.min.js"></script>
<script>
var SimpleCull = new PIXI.extras.Cull.Simple();
</script>
MIT License
(c) 2018 YOPEY YOPEY LLC by David Figatner
FAQs
a library to visibly cull objects designed to work with pixi.js
The npm package pixi-cull receives a total of 2,032 weekly downloads. As such, pixi-cull popularity was classified as popular.
We found that pixi-cull 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.