Giter VIP home page Giter VIP logo

ianthehenry / bauble.studio Goto Github PK

View Code? Open in Web Editor NEW
343.0 6.0 7.0 1.85 MB

a playground for making 3D art with lisp and math

Home Page: https://bauble.studio

License: MIT License

Shell 2.36% CSS 4.21% Janet 68.88% Nix 0.06% TypeScript 21.38% JavaScript 0.71% C++ 2.40%
art graphics janet janet-lang sdf signed-distance-field signed-distance-functions lisp playground procedural-generation

bauble.studio's Introduction

Bauble is a toy for composing signed distance functions in a high-level language (Janet), compiling them to GLSL, and rendering them via WebGL.

Bauble is still in its early days, but it's progressed to the point that you can do some pretty neat stuff with it. Try it out at https://bauble.studio/, or watch this video introduction where I model an infinite number of hot air balloons:

Livecoding a hot air balloon (1/3)

For more examples, I sometimes tweet videos of Bauble's development:

Dependencies

Bauble requires at least Janet 1.29.1. It may work with newer versions of Janet, assuming that the image format is compatible, but it's better to update the version of Janet that Bauble includes to match your local version.

Afterwards, install JavaScript dependencies with:

$ yarn
$ (cd ui && yarn)

bauble is being developed alongside codemirror-lang-janet. If you want to make changes to the grammar, clone that repo and run yalc publish from the root of it. Then run yalc link codemirror-lang-janet in this repository, and you'll be able to see your changes locally.

Development

To build Bauble, all you have to do is run:

$ redo

To create a minified, optimized build, use:

$ BUILD_MODE=prod redo

Lint the JS with:

(cd ui/; yarn eslint .)

You can serve a local Bauble like this:

$ node_modules/.bin/alive-server public

Known bugs

  • Bauble will cast and calculate lights even for shaders that don't need lights, making it slower than it needs to be in the default RGB-normal shading view.

bauble.studio's People

Contributors

ianthehenry avatar jpaquim avatar xrd 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

bauble.studio's Issues

redo build broken?

Running redo on both osx + linux and I get:

redo  all
redo    build/public.tree
redo: no rule to redo 'main.css{,.checksum}'
redo    build/public.tree (exit 1)
redo  all (exit 1)

I see from other comments this project is on the back burner... but was wondering if you could provide any quick pointers on running locally.

Thanks!

Failed to create WebGL context: WebGL creation failed (on Firefox 105.0a1)

Hello. I am using Firefox 105.0a1 (2022-08-20) (64-bit) on Windows.

When I visit bauble.studio, I the page does not load fully and I see the following in my Developer Tools console.

WebGL warning: <Create>: AllowWebgl2:false restricts context creation on this system. janet.js:1:118683

Failed to create WebGL context: WebGL creation failed: 
* AllowWebgl2:false restricts context creation on this system. () janet.js:1:118683

failed to create context 0 main.js:1:355760
    Ad https://bauble.studio/js/main.js:1
    printErr https://bauble.studio/js/main.js:1
    put_char https://bauble.studio/js/janet.js:1
    write https://bauble.studio/js/janet.js:1
    write https://bauble.studio/js/janet.js:1
    doWritev https://bauble.studio/js/janet.js:1
    _fd_write https://bauble.studio/js/janet.js:1
    <anonymous> https://bauble.studio/js/janet.wasm:282248
    <anonymous> https://bauble.studio/js/janet.wasm:161962
    <anonymous> https://bauble.studio/js/janet.wasm:131831
    <anonymous> https://bauble.studio/js/janet.wasm:16052
    <anonymous> https://bauble.studio/js/janet.wasm:287301
    _initialize_janet https://bauble.studio/js/janet.js:1
    ccall https://bauble.studio/js/janet.js:1
    postRun https://bauble.studio/js/main.js:1
    callRuntimeCallbacks https://bauble.studio/js/janet.js:1
    postRun https://bauble.studio/js/janet.js:1
    doRun https://bauble.studio/js/janet.js:1
    run https://bauble.studio/js/janet.js:1
    runCaller https://bauble.studio/js/janet.js:1
    removeRunDependency https://bauble.studio/js/janet.js:1
    receiveInstance https://bauble.studio/js/janet.js:1
    receiveInstantiationResult https://bauble.studio/js/janet.js:1
    (Async: promise callback)
    instantiateAsync https://bauble.studio/js/janet.js:1
    (Async: promise callback)
    instantiateAsync https://bauble.studio/js/janet.js:1
    createWasm https://bauble.studio/js/janet.js:1
    <anonymous> https://bauble.studio/js/janet.js:1

Uncaught (in promise) TypeError: can't access property "createProgram", GLctx is undefined
    _glCreateProgram https://bauble.studio/js/janet.js:1
    _initialize_janet https://bauble.studio/js/janet.js:1
    ccall https://bauble.studio/js/janet.js:1
    postRun https://bauble.studio/js/main.js:1
    callRuntimeCallbacks https://bauble.studio/js/janet.js:1
    postRun https://bauble.studio/js/janet.js:1
    doRun https://bauble.studio/js/janet.js:1
    run https://bauble.studio/js/janet.js:1
    runCaller https://bauble.studio/js/janet.js:1
    removeRunDependency https://bauble.studio/js/janet.js:1
    receiveInstance https://bauble.studio/js/janet.js:1
    receiveInstantiationResult https://bauble.studio/js/janet.js:1
    promise callback*createWasm/instantiateAsync/< https://bauble.studio/js/janet.js:1
    promise callback*instantiateAsync https://bauble.studio/js/janet.js:1
    createWasm https://bauble.studio/js/janet.js:1
    <anonymous> https://bauble.studio/js/janet.js:1
janet.js:1:130056

I hope this information is useful.

The code in bauble.studio by default fails on load

I get this error immediately on load:

error: (map-color) unexpected vec3 argument (0 1 0)
  in errorf [boot.janet] (tailcall) on line 171, column 3
  in _thunk [script] (tailcall) on line 119, column 17
  in evaluate [bauble-evaluator.janet] on line 73, column 7

Svelte port of UI code

Continuing the discussion from #5
To @ianthehenry @xrd and whoever may want to contribute to the Svelte port:

I updated both with the latest changes, and I think everything is working correctly: https://bauble-svelte.vercel.app/

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.