A demo project for ycw/e2edce

Overview

About

A demo project for ycw/e2edce, showing how to eliminate deadcode for threejs appliaction.

πŸ“ e2edce.base.config.js - threejs specific configuration.

  • it rewrites import source from three to three/src/Three, and

  • it minifies glsl sources in shaderchunk/ and shaderlib/.

πŸ§ͺ Testbed

  • open devtools network panel, check size|content-length of 'index.bulid.js' for each test; if you're using chrome browsers, check also its coverage

πŸ”’ Stats:

Logs Vector2
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ (index) β”‚   size   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  flat   β”‚ '6.10Kb' β”‚
β”‚   dce   β”‚ '1.91Kb' β”‚
β”‚   min   β”‚  '87b'   β”‚
β”‚ min+gz  β”‚  '96b'   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Rotating Cube
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ (index) β”‚    size    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  flat   β”‚ '693.53Kb' β”‚
β”‚   dce   β”‚ '412.68Kb' β”‚
β”‚   min   β”‚ '218.51Kb' β”‚
β”‚ min+gz  β”‚ '53.56Kb'  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Pick Rotating Cube
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ (index) β”‚    size    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  flat   β”‚ '696.50Kb' β”‚
β”‚   dce   β”‚ '427.08Kb' β”‚
β”‚   min   β”‚ '226.27Kb' β”‚
β”‚ min+gz  β”‚ '55.77Kb'  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

webgl_shaders_ocean.html
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ (index) β”‚    size    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  flat   β”‚ '777.52Kb' β”‚
β”‚   dce   β”‚ '576.02Kb' β”‚
β”‚   min   β”‚ '307.84Kb' β”‚
β”‚ min+gz  β”‚ '79.44Kb'  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

cannon-es/examples/threejs_mousepick
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ (index) β”‚    size    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  flat   β”‚ '948.81Kb' β”‚
β”‚   dce   β”‚ '627.66Kb' β”‚
β”‚   min   β”‚ '296.49Kb' β”‚
β”‚ min+gz  β”‚ '75.38Kb'  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Build Locally

  1. Clone this repo
  2. Install deps, npm i
  3. Create builds, npm run build
  4. Boot http server, npm run serve
  5. Check testbed at http://localhost:8080

To test your own codes:

  1. Put your codes in src/foo.js
  2. Write tests in tests/foo.js
  3. Config e2edce in e2edce.config.js
  4. Create build, npm run build
  5. Check result at http://localhost:8080/public/foo/index.html

Credits

You might also like...

Demo showcasing information leaks resulting from an IndexedDB same-origin policy violation in WebKit.

Safari 15 IndexedDB Leaks Description This demo showcases information leaks resulting from an IndexedDB same-origin policy violation in WebKit (a brow

Nov 5, 2022

LunaSec - Open Source Security Software built by Security Engineers. Scan your dependencies for Log4Shell, or add Data Tokenization to prevent data leaks. Try our live Tokenizer demo: https://app.lunasec.dev

LunaSec - Open Source Security Software built by Security Engineers. Scan your dependencies for Log4Shell, or add Data Tokenization to prevent data leaks. Try our live Tokenizer demo: https://app.lunasec.dev

Our Software We're a team of Security Engineers on a mission to make awesome Open Source Application Security tooling. It all lives in this repo. Here

Jan 7, 2023

Example TodoMVC app(s) to demo and learn Muban

Muban Todo MVC This repo contains multiple projects that showcase different ways of creating a Todo MVC app with Muban. It serves as an example, but a

Jul 9, 2022

Demo repo used in crash course for students learning web development.

Web Development Crash Course Hosted by RubberdΓΈk Preparation Following these steps prepares you to join the interactive React demo of the crash course

Sep 20, 2022

A demo to show how to re-use Eleventy Image’s disk cache across Netlify builds.

Re-use Eleventy Image Disk Cache across Netlify Builds Live Demo This repository takes all of the high resolution browser logos and processes them thr

Apr 5, 2022

A repository of a Cypress testing demo

adeoweb-cypress-demo This is a repository of a Cypress testing demo. Based on adeoweb.biz website case study. What is this talk We will πŸ‘€ live-code a

Mar 24, 2022

Minze JS framework demo for codrops article.

Minze JS framework demo for codrops article.

Minze Demo Demo of a fictive Smart Home dashboard application. Article on Codrops Demo Running The application only needs a webserver to run. Install

Dec 31, 2022

Api for playing around with dummy data. Feel free to use it in your demo projects, tutorials, or testing tasks.

dummy-api Api similar to dummy-api Api for playing around with dummy data. Feel free to use it in your demo projects, tutorials, or testing tasks. All

Jan 7, 2023

Elven Tools Dapp - Elrond blockckchain frontend dapp demo. Primarily for NFT minting, but it can be used for other purposes.

Elven Tools Dapp Docs: elven.tools/docs/landing-page.html Demo: dapp-demo.elven.tools Sneak peek: youtu.be/ATSxD3mD4dc The Dapp is built using Nextjs

Jan 1, 2023
Hemsida fΓΆr personer i Sverige som kan och vill erbjuda boende till mΓ€nniskor pΓ₯ flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo fΓΆr kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Nftix-demo-ui - Demo UI used in my NFT course on Egghead.io

NFTix Demo UI This repository contains the UI used for my Egghead course on building a NFT ticketing system ?? ?? If you're watching the videos, use t

Ryan Harris 10 Dec 17, 2022
Team-8 E-Commerce Project for egFWD & Sprints industry exposure program You can check the live demo Here

Team-8 E-Commerce Project Team-8 E-Commerce Project for egFWD & Sprints industry exposure program You can check the live demo Here Table of Contents P

Ahmed Moussa 5 Jun 16, 2022
This is a demo project for the SecTester JS SDK framework, with some installation and usage examples

SecTester SDK Demo Table of contents About this project About SecTester Setup Fork and clone this repo Get a Bright API key Explore the demo applicati

NeuraLegion 15 Dec 16, 2022
A starter and demo project for Keycloakify v6 - Component level customization.

A starter/demo project for Keycloakify ⚠️ Please read the two following notices ⚠️ This starter is for Component-level customization, if you only want

Joseph Garrone 12 Dec 26, 2022
A demo of LaunchDarkly, React, and Vite, using the PokΓ©mon API!

PokΓ©mon Feature Flags demo Here's a demo for integrating feature flags into a React project! Built with React, Vite, the PokeAPI, and LaunchDarkly! Wh

Cassidy Williams 15 Jan 5, 2022
η§‘ζŠ€ι£Žζ™Ίζ…§εŸŽεΈ‚ Demo: http://stonerao.com/public/city/

Three.js Setup Download Node.js. Run this followed commands: # Install dependencies (only the first time) npm install # Run the local server at local

rao_yan 120 Dec 2, 2022
A demo for E2E build piplelines in Design Systems using monorepo's and automation :zap:.

Design System Pipelines demo What is it? A working demonstration for end-to-end build piplelines in Design Systems using Primer Primitives, Primer CSS

Rez 7 Oct 20, 2022
The app helps you to add todo items to your list, mark completed ones and also delete finished items. Its a handy tool for your day today activies. Check out the live demo.

Todo List App The app helps you to add todo items to your list, mark completed ones and also delete finished items. Its a handy tool for your day toda

Atugonza ( Billions ) Joel 14 Apr 22, 2022