Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
gl-skydome-sun
Advanced tools
Draws a skydome with a sun into a 3D scene. This project is a fork of the module gl-skybox. Demo: http://erkaman.github.io/gl-skydome-sun/
npm install gl-skydome-sun
var createSkydome = require('gl-skydome-sun')
var skydome = createSkydome(gl)
Takes a WebGL context gl
. Returns an object skybox
ready for rendering into your
scene.
skydome.draw(camera[, opts])
Draws the skydome and sun into your scene.
Takes a camera
object that defines the view and projection matrices:
{
view: gl-mat4 matrix,
projection: gl-mat4 matrix
}
This function will take care of centering the skydome and projection near/far values for you, so there is no need to make a view/projection matrix specifically for rendering the skydome. It will also disable depth buffer read/writes and then restore them to whatever you had them set to before returning, so there's no need to handle that yourself.
The optional arguments are
opts.lowerColor
the color of the lower hemisphere of the skydome.opts.upperColor
the color of the upper hemisphere of the skydome.opts.sunDirection
A unit vector that describes the position of the sun on the
skydome. Note that it is assumed that this is a unit vector!opts.sunColor
The color of the sun.opts.sunSize
The size of the sun. Should be in the range [0,500]
.opts.renderSun
Whether or not to render the sun. Default value is true
opts.doDithering
Enables dithering. Dithering can be used to reduce banding artifacts in
the rendered sky(the artifacts are mostly visible when the color of the sky is rather dark). Default value is true
.opts.ditheringAmmount
The ammount of dithering to apply to every fragment
of the rendered sky. Default value is 0.005
.skydome.constructViewProjection(camera)
Given a camera
object, returns the view/projection matrices that is used
to render the skydome(see the documentation of skydome.draw
for more details).
This function returns an object on the form
{
view: gl-mat4 matrix,
projection: gl-mat4 matrix
}
FAQs
Draws a skydome with a sun into a 3D scene.
We found that gl-skydome-sun 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.