Giter Site home page Giter Site logo

metagood / ocm-dimensions Goto Github PK

View Code? Open in Web Editor NEW
71.0 16.0 33.0 348 KB

Tools for inscribing ordinals using OCM Dimensions and the three.js and p5.js libraries

Home Page: https://onchainmonkey.com/ocm-dimensions

Makefile 0.07% JavaScript 0.23% HTML 99.71%
bitcoin ordinals

ocm-dimensions's Introduction

OCM Dimensions

Welcome to OCM Dimensions!

OCM Dimensions is a high-resolution, 3D animated and generative ordinal collection, making it a pioneer among collections on Bitcoin since its inscription in February 2023. Dimensions innovates in the following areas:

  1. Recursion and composability
  2. Code libraries - compression, Three.js, p5.js - the main subject of this GitHub repo, using these libraries, anyone can create art on Bitcoin. It's completely open, decentralized, and the art renders automatically on all Ord explorers from using the on-chain libraries.
  3. Generative inscriptions
  4. File size - OCM Dimensions does all this in less than 500 bytes per inscription
  5. Provenance and parent-child
  6. On-chain randomization and reveal with a fair launch
  7. Reinscription
  8. 3D animated and interactive
  9. Streaming from a satoshi, and adjusts to screen resolution and aspect ratio
  10. Special sats and sat manipulation art - the OCM Collection was inscribed on sequential block 78 sats that matched the numbers in the collection, and was a parent-child cursed collection.

Read more about OCM Dimensions.

This GitHub repository for OCM Dimensions is a suite of tools aimed at helping creators save space on the Bitcoin blockchain by compressing their HTML, and empower creators with the powerful libraries of Three.js, and p5.js which we inscribed on Bitcoin. By leveraging the Dimensions art, we're making it possible to have more power inscribing on Bitcoin, with no changes needed to the Ordinal protocol.

This toolset comprises three key utilities:

  1. Compress HTML
  2. Use Three.js
  3. Use p5.js

Let's walk through how to use each of them.

Prerequisites

You will need the following installed on your machine:

  • Node.js and npm. You can download these from here.
  • make command. This is usually pre-installed on Unix-based systems. For Windows, you can use a utility like Make for Windows.

Installation

You can download the tools directly from this GitHub repository. Simply click on the 'Code' button on this page and then click 'Download ZIP'. Once downloaded, unzip the file and navigate to the resulting directory in your terminal.

If you have git installed, you can also clone this repository by running:

git clone https://github.com/metagood/OCM-Dimensions.git
cd OCM-Dimensions

Usage

Compress HTML

  1. Navigate to the compress-html directory with cd compress-html.
  2. Place your .html file in the input directory.
  3. Run make clean && make in the terminal.
  4. Your compressed file will be index.html.
  5. To check if index.html file works locally, open index.html and search and replace "fetch(/content/" with "fetch(https://ordinals.com/content/".

Use Three.js

  1. Navigate to the threejs directory with cd ../threejs.
  2. Minify your 02_main.js file and save it as compressed-inputs/02_main.min.js.
    • If you have minify installed, run minify 02_main.js > compressed-inputs/02_main.min.js in the terminal.
    • If you don't have minify, just put the js code in compressed-inputs/02_main.min.js directly.
  3. Run make clean && make in the terminal.
  4. Your final file will be index.html.
  5. To check if index.html file works locally, open index.html and search and replace "fetch(/content/" with "fetch(https://ordinals.com/content/".

Use p5.js

  1. Navigate to the p5js directory with cd ../p5js.
  2. Put your js code in input/02_main.js.
  3. Run make clean && make in the terminal.
  4. Your final file will be index.html.
  5. To check if index.html file works locally, open index.html and search and replace "fetch(/content/" with "fetch(https://ordinals.com/content/" (2 places).

Inscribing Your Art

With your HTML, Three.js, or p5.js file compressed into index.html, you're ready to inscribe your art on the Bitcoin blockchain. Thanks to the OCM Dimensions, your art will be stored in a highly efficient manner, saving valuable space and allowing for more creativity. Happy coding and inscribing!

Feedback

We appreciate your feedback and suggestions. Please create an issue in the GitHub issue tracker.

ocm-dimensions's People

Contributors

ericatallah avatar fahmidme avatar huuep avatar lifofifox avatar priab100 avatar rudi-cilibrasi avatar wrencrypt 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

Watchers

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

ocm-dimensions's Issues

The system cannot find the file specified

Hi, I keep getting this error, could you help?

compress-html>make clean && make
rm -f src-compressed-string.base64 index.html
process_begin: CreateProcess(NULL, rm -f src-compressed-string.base64 index.html, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [Makefile:10: clean] Error 2

regards.

Minimal conf for NodeJs+Docker for ThreeJS

Hey , im trying to use but got some barriers before i can start with OCM-dimensions.

Behaviour obtained

  • Don't have JS setup files
  • Don't have docker configuration
  • Can't visualize compressed html with my own model using threejs
  • Minimal steps to start

Behaviour expected

  • Have JS setup files
  • Have docker configuration
  • Can visualize compressed html with my own model using threejs
  • So much steps before start

Steps to reproduce

  1. git clone https://github.com/metagood/OCM-Dimensions
  2. cd OCM-Dimensions
  3. cd threejs
  4. minify 02_main.js > compressed-inputs/02_main.min.js
  5. make clean && make
  6. open "index.html"

Notes

  • I have my own 3D model at myModel.glb
  • I'm running all of this down Ubuntu 22.04 LTS
  • Im uploading code for JS setup and minimal docker configuration, but images will be ready to parametrize 3dModel path, this is not done yet in my patch

After update users just need to

  1. install from JS
npm i 
npm run build
# check index.html
  1. Install from Docker, configure docker-compose and exec
docker compose up -d --build

Related

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.