- 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.
[package] | |
name = "server" | |
version = "0.1.0" | |
edition = "2018" | |
[dependencies] | |
rocket = "^0.4.0" |
import "dart:io"; | |
import "dart:async"; | |
main() async { | |
HttpClientRequest request = | |
await HttpClient().post('some.host', 8000, '/upload'); | |
request.headers.contentType = ContentType.binary; | |
final file = File('/some/big/file'); |
import 'package:flutter/material.dart'; | |
import 'package:flutter/widgets.dart'; | |
import 'package:flutter/semantics.dart'; | |
import 'dart:ui'; | |
void main() => runApp(new MyApp()); | |
class Sky extends CustomPainter { | |
final double value; |
// 1. Declare outside class definition (or in its own file). | |
// 2. UIKit must be included in file where this code is added. | |
// 3. Extends UIDevice class, thus is available anywhere in app. | |
// | |
// Usage example: | |
// | |
// if UIDevice().type == .simulator { | |
// print("You're running on the simulator... boring!") | |
// } else { | |
// print("Wow! Running on a \(UIDevice().type.rawValue)") |
Install ruby 1.8.7 on Mac OS X 10.8 (Mountain Lion) using RVM and MacPorts | |
1) Install http://xquartz.macosforge.org | |
2) sudo port install apple-gcc42 | |
3) CC=/opt/local/bin/gcc-apple-4.2 CPPFLAGS=-I/opt/X11/include rvm install 1.8.7 |
<head> | |
<title>colors</title> | |
</head> | |
<body> | |
Colors: | |
{{> color_list}} | |
<hr/> | |
Atms: | |
{{> atms}} |
var page = new WebPage(), url = 'http://refine.io'; | |
page.open(url, function (status) { | |
if (status === 'success') { | |
page.render("refineio.png"); | |
phantom.exit(); | |
} | |
}); |
require 'rubygems' # sudo gem install gosu --no-ri --no-rdoc | |
require 'gosu' | |
class Board < Array | |
def rotate cw = false | |
rotated = if cw | |
transpose.map(&:reverse) | |
else | |
transpose.reverse |
require 'rubygems' | |
require 'bundler' | |
Bundler.require | |
require './application' | |
namespace :assets do | |
desc 'compile assets' | |
task :compile => [:compile_js, :compile_css] do | |
end |