- Build a sphere tracer with WebGPU (paper, paper2, youtube)
- Create model with sdf functions from here
- Add light and shadows
- ???
- PROFIT
This code tested in Chrome and Firefox, should work on PC too.
| require 'rubygems' | |
| require 'bundler' | |
| Bundler.require | |
| require './application' | |
| namespace :assets do | |
| desc 'compile assets' | |
| task :compile => [:compile_js, :compile_css] do | |
| end |
| # config/initializers/active_admin_mongomapper_patches.rb | |
| require "active_admin" | |
| require "active_admin/resource_controller" | |
| require 'ostruct' | |
| module ActiveAdmin | |
| class Namespace | |
| # Disable comments | |
| def comments? |
| set :rails_env, :production | |
| set :unicorn_binary, "/usr/bin/unicorn" | |
| set :unicorn_config, "#{current_path}/config/unicorn.rb" | |
| set :unicorn_pid, "#{current_path}/tmp/pids/unicorn.pid" | |
| namespace :deploy do | |
| task :start, :roles => :app, :except => { :no_release => true } do | |
| run "cd #{current_path} && #{try_sudo} #{unicorn_binary} -c #{unicorn_config} -E #{rails_env} -D" | |
| end | |
| task :stop, :roles => :app, :except => { :no_release => true } do |
| upstream app { | |
| server unix:/srv/app/current/tmp/sockets/unicorn.sock fail_timeout=0; | |
| } | |
| server { | |
| listen 80; | |
| server_name www.app.com; | |
| rewrite ^/(.*) http://app.com/$1 permanent; | |
| } | |
| server { |