Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
com.ellyality.camera.pixel
Advanced tools
Readme
A resolution independent pixel perfect camera for Unity.
This package simplifies making a Unity camera render to exact pixel units, for use with pixel art or similar art styles where blockiness is part of the aesthetic.
Standard unity camera
Pixel perfect camera
Clone the repository or download the UnityPackage of the latest release. The PixelCamera
directory can be moved to your location of choice in your unity project.
Pixel Camera
script to an existing camera.Pixels Per Unit
to an appropriate value, usually matching the settings used for your assets.Zoom Level
for the camera._MainTex
of the material.Viewport Rect
settings are not taken into account.Field of View
setting will generate unreasonably large RenderTextures. Use with caution.Pixel camera takes the size of the screen and finds the render size required to cover the screen in a pixel perfect manner, at the given settings.
A RenderTexture
of the calculated render size is created, and if needed the camera settings are modified so the render fits the calculated size.
The camera output is sent to the RenderTexture
.
A dummy camera that renders nothing is created, and the OnPostRender()
function is used to draw the output of the attached camera onto the screen using GL commands.
ZoomLevel : float
The pixel zoom scale used by the camera.
PixelsPerUnit : float
The pixels per unit value used by the camera.
CameraMaterial : Material
The Material used to render the camera output, setting to null
will use the default material. Pixel Camera sets the camera output as the _MainTex
texture of the given material.
AspectStretch : Vector2
An additional stretch applied to the camera, allows camera to render as non square pixels.
DownSample : float
Scales down the render resolution, makes the output blockier. Minimum value is clamped at 1.
PerspectiveZ : float
With a perspective camera, the distance between the camera near and far planes that is rendered as pixel perfect. Value is clamped between the near and far plane values.
RenderTexture : RenderTexture, read only
Access the RenderTexture used as the camera output.
CameraSize : int[], read only
Actual pixel size of the camera, as an integer array.
ForceRefresh() : void
Force the camera to recalculate rendering sizes.
CheckCamera() : bool
Checks camera settings. If different from the last camera settings used, camera will be setup again. Returns true
when settings have changed.
FAQs
Pixel Perfect Camera
The npm package com.ellyality.camera.pixel receives a total of 1 weekly downloads. As such, com.ellyality.camera.pixel popularity was classified as not popular.
We found that com.ellyality.camera.pixel 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.