Giter Club home page Giter Club logo

alien.js's Introduction

alien.js's People

Contributors

pschroen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alien.js's Issues

Rollup is nice for libraries and simple apps, but...

It doesn't (and never will) have things like module splitting and dynamic import (f.e. for loading certain code only when certain parts of the UI should be visible (f.e. if you show different UI based on client-side routes)).

Webpack is more complex, but it does have support for this, which for large apps can drastically reduce initial load time, and let the application only load bits and pieces as needed, otherwise never load un-used parts of the app.

Compressing the build file (build/alien.js)

Hi,
This is a not entirely an issue but a question rather,
For running examples, we compile the alien.js (using all.js) The size of which is around 2.7MB but when I checked in network tab for the live example (https://alien.js.org/examples/shader_reflection_emissive.html for example) there the file size is 435KB.
Screenshot 2022-06-05 at 19 53 06

I guess you are using brotli or gzip compression, but I dont know much about it.
Since I am using parcel bundler, there is an option to generate compressed builds (both brotli and gzip) but I dont know how to deploy the compressed one on github pages.
Could you please explain your deployment process (also I'm guessing that you are using Github pages since it is enabled for this repo, but if you are using cloudflare, could you explain how to enable compression there)
And Thanks for Alien.js, it has been extremely helpful for me in learning post-processing.

PS. for me, the bundle is getting large, so any suggestions on how I can reduce this? (I'm using parcel bundler v2)
Screenshot 2022-06-05 at 18 40 53

Only import parts of threejs (module import)

Currently we are relying on global THREE (in Shader class for example), I'm not a bundle expert but I assume this will load the whole three library right? Since three is already super heavy ~ 130KB minified + gzipped. Therefore can we use module import to bundle only what is needed within alien.js internal to reduce bundle size?

ie.

import { Scene } from 'three';

const scene = new Scene();
...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.