npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

aframe-enviropacks

v0.10.0

Published

High definition environments and materials for aframe

Downloads

69

Readme

AFRAME Enviropacks

A simple way of adding high-definition-looking environments and materials to your A-Frame project.

Include the js file in the header:

<script src="https://cdn.jsdelivr.net/npm/aframe-enviropacks@latest/aframe-enviropacks.js"></script>

then add the enviropack component to an entity and you're ready to go!

<a-entity enviropack="preset: tankfarm"></a-entity>

Enviropacks Preview Screenshots

You can view the full example on Glitch:

https://glitch.com/edit/#!/aframe-enviropacks?path=index.html

Or check out this "Pumpkin Chunkin" demo to see it in a "real world" scenario:

https://gilded-rumbling-rib.glitch.me/

Components


enviropack

Sets up a whole preset environment all in one component.

| Property | Description | |------|------| | preset | Preset environment to choose from. One of: tankfarm, sandstone, interior, winter, autumn, or night| | baseUrl | Base URL for assets. If left blank will be guessed based on the included .js file location |


enviropack-material

Applies one of the materials included in the pack.

| Property | Description | |------|------| | material | Name of preset material to use. One of: ground-grass-rock, ground-sandstone, ground-wood-floor, ground-snow, ground-forest, bark, gold, metal, plastic, fabric, concrete, rock, wood, planks, snow. Or could also be a "raw" material: Fabric026, Metal009, Metal035, Plastic, Snow003, Snow004, Wood027, WoodFloor041, aerial_grass_rock, bark_brown_02, brown_planks_04, forrest_ground_03, mossy_rock, rock_05, sandstone_cracks | | autoApply | If true, it will replace any material in the entity's mesh. This is useful for replacing the material on a loaded GLTF file, for instance.| | shader | Force a specific shader. Defaults to auto, which will chose standard on desktop, and pbmatcap on mobile |


enviropack-hdri

| Property | Description | |------|------| | hdri | Name of preset HDRI. One of: abandoned_tank_farm_02, autumn_hockey, large_corridor, the_sky_is_on_fire, winter_lake_01, dikhololo_night_edit | | backstop | If specified, will use this image as the sky background image (but not for lighting or envMap) |


Physically Based Matcaps

This package registers the pbmatcap shader, which creates a "Physically Based" matcap material. The pbmatcap shader uses material textures (such as roughnessMap and metalnessMap textures) to mix between custom matcap textures created for each different environment.

pbmatcap shader can approximate the full THREE.js standard shader while giving performance acceptable to a mobile device. By default, the enviropack components will automatically switch to pbmatcap on mobile, or standard on desktop. This behavior can be overriden with the shader property of the enviropack-material system.