mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Compare commits
35 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3d1555e278 | ||
|
|
54fab9eb4e | ||
|
|
8fea8a0b47 | ||
|
|
f14ae8e51b | ||
|
|
57f5a3e780 | ||
|
|
3be007526c | ||
|
|
9bfbd0550c | ||
|
|
0301a5dcdf | ||
|
|
db994a1197 | ||
|
|
855c13ea2a | ||
|
|
fc816d3429 | ||
|
|
ab69fd01ac | ||
|
|
cc6106f31b | ||
|
|
ead85379ed | ||
|
|
f8d6be55ee | ||
|
|
a241d75043 | ||
|
|
864a6c0a20 | ||
|
|
1c20c54191 | ||
|
|
4d722d1fd1 | ||
|
|
b67254e986 | ||
|
|
041cf9c94e | ||
|
|
b08c5a8421 | ||
|
|
125eaa4cc3 | ||
|
|
5c4129f85b | ||
|
|
17a9463588 | ||
|
|
fb9f271720 | ||
|
|
8de50edb41 | ||
|
|
a0065febe2 | ||
|
|
c454396c26 | ||
|
|
9d11128362 | ||
|
|
ee17ab3e26 | ||
|
|
06af36dac2 | ||
|
|
51d6d741e5 | ||
|
|
b593a8ae67 | ||
|
|
7b30240a7f |
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -713,3 +713,6 @@
|
||||
[submodule "vendor/grammars/language-less"]
|
||||
path = vendor/grammars/language-less
|
||||
url = https://github.com/atom/language-less.git
|
||||
[submodule "vendor/grammars/language-povray"]
|
||||
path = vendor/grammars/language-povray
|
||||
url = https://github.com/c-lipka/language-povray
|
||||
|
||||
2
grammars.yml
Normal file → Executable file
2
grammars.yml
Normal file → Executable file
@@ -360,6 +360,8 @@ vendor/grammars/language-maxscript:
|
||||
- source.maxscript
|
||||
vendor/grammars/language-ncl:
|
||||
- source.ncl
|
||||
vendor/grammars/language-povray:
|
||||
- source.pov-ray sdl
|
||||
vendor/grammars/language-python:
|
||||
- text.python.console
|
||||
- text.python.traceback
|
||||
|
||||
32
lib/linguist/languages.yml
Normal file → Executable file
32
lib/linguist/languages.yml
Normal file → Executable file
@@ -474,6 +474,13 @@ CSS:
|
||||
color: "#563d7c"
|
||||
extensions:
|
||||
- .css
|
||||
|
||||
CSV:
|
||||
type: data
|
||||
ace_mode: text
|
||||
tm_scope: none
|
||||
extensions:
|
||||
- .csv
|
||||
|
||||
Cap'n Proto:
|
||||
type: programming
|
||||
@@ -2029,6 +2036,8 @@ Makefile:
|
||||
- GNUmakefile
|
||||
- Kbuild
|
||||
- Makefile
|
||||
- Makefile.am
|
||||
- Makefile.in
|
||||
- Makefile.inc
|
||||
- makefile
|
||||
interpreters:
|
||||
@@ -2555,6 +2564,16 @@ PLpgSQL:
|
||||
extensions:
|
||||
- .sql
|
||||
|
||||
POV-Ray SDL:
|
||||
type: programming
|
||||
aliases:
|
||||
- pov-ray
|
||||
- povray
|
||||
extensions:
|
||||
- .pov
|
||||
- .inc
|
||||
ace_mode: text
|
||||
|
||||
Pan:
|
||||
type: programming
|
||||
color: '#cc0000'
|
||||
@@ -2749,8 +2768,10 @@ Prolog:
|
||||
- .pl
|
||||
- .pro
|
||||
- .prolog
|
||||
- .yap
|
||||
interpreters:
|
||||
- swipl
|
||||
- yap
|
||||
tm_scope: source.prolog
|
||||
ace_mode: prolog
|
||||
|
||||
@@ -2820,6 +2841,7 @@ Python:
|
||||
color: "#3572A5"
|
||||
extensions:
|
||||
- .py
|
||||
- .bzl
|
||||
- .cgi
|
||||
- .fcgi
|
||||
- .gyp
|
||||
@@ -3274,6 +3296,7 @@ Shell:
|
||||
color: "#89e051"
|
||||
aliases:
|
||||
- sh
|
||||
- shell-script
|
||||
- bash
|
||||
- zsh
|
||||
extensions:
|
||||
@@ -3284,6 +3307,7 @@ Shell:
|
||||
- .command
|
||||
- .fcgi
|
||||
- .ksh
|
||||
- .sh.in
|
||||
- .tmux
|
||||
- .tool
|
||||
- .zsh
|
||||
@@ -3591,6 +3615,13 @@ Unity3D Asset:
|
||||
- .unity
|
||||
tm_scope: source.yaml
|
||||
|
||||
Uno:
|
||||
type: programming
|
||||
extensions:
|
||||
- .uno
|
||||
ace_mode: csharp
|
||||
tm_scope: source.cs
|
||||
|
||||
UnrealScript:
|
||||
type: programming
|
||||
color: "#a54c4d"
|
||||
@@ -3797,6 +3828,7 @@ XML:
|
||||
- .tsx
|
||||
- .ui
|
||||
- .urdf
|
||||
- .ux
|
||||
- .vbproj
|
||||
- .vcxproj
|
||||
- .vxml
|
||||
|
||||
@@ -5,12 +5,12 @@ module Linguist
|
||||
|
||||
# First form vim modeline
|
||||
# [text]{white}{vi:|vim:|ex:}[white]{options}
|
||||
# ex: 'vim: syntax=perl'
|
||||
# ex: 'vim: syntax=ruby'
|
||||
VIM_MODELINE_1 = /(?:vim|vi|ex):\s*(?:ft|filetype|syntax)=(\w+)\s?/i
|
||||
|
||||
# Second form vim modeline (compatible with some versions of Vi)
|
||||
# [text]{white}{vi:|vim:|Vim:|ex:}[white]se[t] {options}:[text]
|
||||
# ex: 'vim set syntax=perl:'
|
||||
# ex: 'vim set syntax=ruby:'
|
||||
VIM_MODELINE_2 = /(?:vim|vi|Vim|ex):\s*se(?:t)?.*\s(?:ft|filetype|syntax)=(\w+)\s?.*:/i
|
||||
|
||||
MODELINES = [EMACS_MODELINE, VIM_MODELINE_1, VIM_MODELINE_2]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
module Linguist
|
||||
VERSION = "4.7.5"
|
||||
VERSION = "4.7.6"
|
||||
end
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
Year,Make,Model,Length
|
||||
1997,Ford,E350,2.34
|
||||
2000,Mercury,Cougar,2.38
|
||||
2000,Mercury,Cougar,2.38
|
||||
|
207
samples/POV-Ray SDL/balcony.pov
Executable file
207
samples/POV-Ray SDL/balcony.pov
Executable file
@@ -0,0 +1,207 @@
|
||||
// This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
|
||||
// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a
|
||||
// letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
|
||||
|
||||
// Persistence Of Vision Ray Tracer Scene Description File
|
||||
// File: balcony.pov
|
||||
// Desc: Povray demonstration scene
|
||||
// Date: July/August 2001
|
||||
// Auth: Christoph Hormann
|
||||
//
|
||||
// ***********************************************************************
|
||||
//
|
||||
// -------------------- 'balcony' demonstration scene --------------------
|
||||
//
|
||||
// written July-August 2001 by Christoph Hormann <chris_hormann@gmx.de>
|
||||
//
|
||||
// demonstrates use of various new or changed features:
|
||||
//
|
||||
// - isosurface (for the rail columns)
|
||||
// - mesh2 object (table cloth)
|
||||
// - uv-mapping (table cloth)
|
||||
// - pattern image type (background heightfield)
|
||||
// - slope pattern (background heightfield)
|
||||
// - variable reflection (water & glass)
|
||||
// - metallic reflection
|
||||
// - conserve_energy
|
||||
// - function pattern (water)
|
||||
// - fading interior (water, drink)
|
||||
// - 'circular' and 'orient' area_light
|
||||
// - radiosity
|
||||
// - photons (objects on the table)
|
||||
//
|
||||
// ***********************************************************************
|
||||
//
|
||||
// Command line options:
|
||||
//
|
||||
// -w240 -h320
|
||||
// -w480 -h640 +a0.3
|
||||
// -w600 -h800 +a0.3
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
|
||||
#version 3.6;
|
||||
|
||||
#include "functions.inc"
|
||||
#include "colors.inc"
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
|
||||
#declare AreaLight=on;
|
||||
#declare Radiosity=on;
|
||||
#declare Photons=on;
|
||||
#declare TestLight=off;
|
||||
#declare show_Fog=true;
|
||||
#declare show_Water=true;
|
||||
#declare show_Terrain=true;
|
||||
#declare show_Building=true;
|
||||
#declare show_Table=true;
|
||||
#declare show_TableCloth=true;
|
||||
#declare show_Chair=true;
|
||||
#declare show_Table_Stuff=true;
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
|
||||
global_settings{
|
||||
max_trace_level 15
|
||||
assumed_gamma 1
|
||||
|
||||
#if (Radiosity=on)
|
||||
radiosity{
|
||||
pretrace_start 0.08
|
||||
pretrace_end 0.01
|
||||
count 130
|
||||
nearest_count 5
|
||||
error_bound 0.3
|
||||
|
||||
recursion_limit 1
|
||||
low_error_factor 0.5
|
||||
gray_threshold 0.0
|
||||
minimum_reuse 0.015
|
||||
brightness 1.0
|
||||
adc_bailout 0.01/2
|
||||
normal on
|
||||
}
|
||||
#end
|
||||
|
||||
#if (Photons=on)
|
||||
photons {
|
||||
spacing 0.002
|
||||
}
|
||||
#end
|
||||
|
||||
}
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
// This scene uses a non-standard camera set-up.
|
||||
// (See CAMERA in the included documentation for details.)
|
||||
// If you are new to POV-Ray, you might want to try a different demo scene.
|
||||
|
||||
camera {
|
||||
location <0.5, 0.5, 1.2>
|
||||
direction y
|
||||
sky z
|
||||
up z
|
||||
right x*image_width/image_height // keep propotions with any aspect ratio
|
||||
look_at <5, 4.3, 0.9>
|
||||
angle 36
|
||||
}
|
||||
|
||||
/*
|
||||
camera { // table detail camera
|
||||
location <1.5, 1.5, 1.0>
|
||||
direction y
|
||||
sky z
|
||||
up z
|
||||
right x*image_width/image_height // keep propotions with any aspect ratio
|
||||
look_at <3.3,2.52,0.5>
|
||||
angle 30
|
||||
}
|
||||
*/
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
|
||||
|
||||
#if (TestLight=on)
|
||||
light_source {
|
||||
<2, 2, 2>
|
||||
color rgb 0.7
|
||||
}
|
||||
#end
|
||||
|
||||
|
||||
light_source {
|
||||
<3.0, -2.5, 2.6>*10000
|
||||
color rgb <3.43,2.87,1.95>
|
||||
#if (AreaLight=on)
|
||||
area_light 400*x 400*y 4,4
|
||||
jitter
|
||||
circular
|
||||
orient
|
||||
#end
|
||||
|
||||
photons {
|
||||
reflection on
|
||||
refraction on
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#if (show_Fog)
|
||||
|
||||
fog{
|
||||
fog_type 2
|
||||
fog_alt 1.2
|
||||
fog_offset 0
|
||||
color rgbt <0.60, 0.68, 0.82, 0.0>
|
||||
distance 700
|
||||
up z
|
||||
}
|
||||
|
||||
#end
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
|
||||
#include "sky.inc"
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
|
||||
#if (show_Water)
|
||||
#include "water.inc"
|
||||
#end
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
|
||||
#if (show_Building)
|
||||
#include "building.inc"
|
||||
#end
|
||||
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
|
||||
#if (show_Terrain)
|
||||
#include "terrain.inc"
|
||||
#end
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
|
||||
#if (show_Table)
|
||||
#include "table.inc"
|
||||
#end
|
||||
|
||||
#if (show_TableCloth)
|
||||
#include "table_cloth.inc"
|
||||
#end
|
||||
|
||||
#if (show_Table_Stuff)
|
||||
#include "table_stuff.inc"
|
||||
#end
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
|
||||
#if (show_Chair)
|
||||
#include "chair.inc"
|
||||
#end
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
|
||||
117
samples/POV-Ray SDL/bglass.inc
Executable file
117
samples/POV-Ray SDL/bglass.inc
Executable file
@@ -0,0 +1,117 @@
|
||||
// This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
|
||||
// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a
|
||||
// letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
|
||||
|
||||
// Persistence Of Vision Ray Tracer Include File
|
||||
// File: bglass.inc
|
||||
// Desc: drinking glass for 'balcony.pov' demonstration scene
|
||||
// Date: July/August 2001
|
||||
// Auth: Christoph Hormann
|
||||
|
||||
// Updated: 09Aug2008 (jh) for v3.7 distribution
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
|
||||
#if (version < 3.7)
|
||||
#version 3.5;
|
||||
#end
|
||||
|
||||
#declare Mat_Glass=
|
||||
material {
|
||||
texture {
|
||||
pigment { color rgbt 1 }
|
||||
finish {
|
||||
ambient 0.0
|
||||
diffuse 0.1
|
||||
specular 0.5
|
||||
roughness 0.05
|
||||
|
||||
reflection {
|
||||
0.0, 1.0
|
||||
fresnel on
|
||||
}
|
||||
|
||||
conserve_energy
|
||||
}
|
||||
}
|
||||
interior {
|
||||
ior 1.5
|
||||
fade_distance 0.1
|
||||
fade_power 1001
|
||||
fade_color <0.4,0.4,0.4>
|
||||
}
|
||||
}
|
||||
|
||||
#declare Mat_Liquid=
|
||||
material {
|
||||
texture {
|
||||
pigment { color rgbt 1 }
|
||||
finish {
|
||||
ambient 0.0
|
||||
diffuse 0.1
|
||||
specular 0.5
|
||||
roughness 0.01
|
||||
|
||||
reflection {
|
||||
0.0, 1.0
|
||||
fresnel on
|
||||
}
|
||||
|
||||
conserve_energy
|
||||
}
|
||||
}
|
||||
interior {
|
||||
ior 1.3
|
||||
fade_distance 0.03
|
||||
fade_power 1001
|
||||
fade_color <0.8,0.3,0.4>
|
||||
}
|
||||
}
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
|
||||
#include "shapes.inc"
|
||||
|
||||
#local Content_Shape=
|
||||
merge {
|
||||
cylinder {
|
||||
0*z, 5*z, 3.0
|
||||
}
|
||||
|
||||
object { Round_Cylinder_Merge (2*z, -3*z, 3.0, 0.25) }
|
||||
|
||||
material { Mat_Liquid }
|
||||
}
|
||||
|
||||
#declare Glass=
|
||||
union {
|
||||
merge {
|
||||
difference {
|
||||
cylinder {
|
||||
0.01*z, 14*z, 3.2
|
||||
}
|
||||
|
||||
cylinder {
|
||||
0*z, 10*z, 3.0
|
||||
translate 4.6*z
|
||||
}
|
||||
|
||||
object { Round_Cylinder_Merge (2*z, -3*z, 3.0, 0.25) translate 4.6*z }
|
||||
}
|
||||
torus {
|
||||
3.1, 0.1
|
||||
rotate 90*x
|
||||
translate 14*z
|
||||
}
|
||||
|
||||
material { Mat_Glass }
|
||||
}
|
||||
|
||||
object { Content_Shape scale 0.99 translate 4.6*z }
|
||||
|
||||
scale 1.1
|
||||
scale 0.01
|
||||
}
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
|
||||
212
samples/POV-Ray SDL/building.inc
Executable file
212
samples/POV-Ray SDL/building.inc
Executable file
@@ -0,0 +1,212 @@
|
||||
// This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
|
||||
// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a
|
||||
// letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
|
||||
|
||||
// Persistence Of Vision Ray Tracer Include File
|
||||
// File: building.inc
|
||||
// Desc: building for 'balcony.pov' demonstration scene
|
||||
// Date: July/August 2001
|
||||
// Auth: Christoph Hormann
|
||||
|
||||
// Updated: 09Aug2008 (jh) for v3.7 distribution
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
|
||||
#if (version < 3.7)
|
||||
#version 3.5;
|
||||
#end
|
||||
|
||||
#declare Tex_Stone=
|
||||
texture {
|
||||
pigment {
|
||||
|
||||
agate
|
||||
color_map {
|
||||
[0.7 color rgb <0.6,0.6,0.6> ]
|
||||
[1.0 color rgb 0.46 ]
|
||||
}
|
||||
warp { turbulence <0.7,0.4,0.4> }
|
||||
scale <0.3,1.2,1.2>*0.25
|
||||
rotate -60*y
|
||||
rotate 70*z
|
||||
}
|
||||
finish {
|
||||
ambient 0.0//0.1
|
||||
diffuse 0.5
|
||||
specular 0.15
|
||||
}
|
||||
normal {
|
||||
granite 0.2
|
||||
warp {turbulence 1}
|
||||
scale 0.1
|
||||
}
|
||||
}
|
||||
|
||||
#declare Tex_Floor_A=
|
||||
texture {
|
||||
pigment {
|
||||
color rgb <0.6,0.6,0.6>
|
||||
}
|
||||
finish {
|
||||
ambient 0.0
|
||||
diffuse 0.5
|
||||
specular 0.15
|
||||
}
|
||||
normal {
|
||||
granite 0.2
|
||||
warp {turbulence 1}
|
||||
scale 0.25
|
||||
translate 2
|
||||
}
|
||||
}
|
||||
|
||||
#declare Tex_Floor_B=
|
||||
texture {
|
||||
pigment {
|
||||
color rgb <0.18,0.18,0.22>
|
||||
}
|
||||
finish {
|
||||
ambient 0.0
|
||||
diffuse 0.5
|
||||
specular 0.15
|
||||
}
|
||||
normal {
|
||||
granite 0.2
|
||||
warp {turbulence 1}
|
||||
scale 0.25
|
||||
}
|
||||
}
|
||||
|
||||
#declare Tex_Floor=
|
||||
texture {
|
||||
checker
|
||||
texture { Tex_Floor_A },
|
||||
texture { Tex_Floor_B }
|
||||
scale 0.4
|
||||
rotate 45*z
|
||||
}
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
|
||||
#include "shapes.inc"
|
||||
|
||||
#declare fn_Rad=
|
||||
function {
|
||||
sin(pow(abs(z*0.4),1.8))+0.4
|
||||
}
|
||||
|
||||
#declare Small_Column_part1=
|
||||
isosurface {
|
||||
function { min(sqrt( x*x + y*y ) - fn_Rad(x, y, z), sqrt( x*x + y*y + pow(abs(z*2),1.4)) - 1.0) }
|
||||
max_gradient 1.8
|
||||
//eval
|
||||
accuracy 0.001
|
||||
contained_by { box { -4, 4 } }
|
||||
translate 4*z
|
||||
scale 6
|
||||
|
||||
texture { Tex_Stone }
|
||||
}
|
||||
|
||||
#declare Small_Column=
|
||||
union {
|
||||
object { Small_Column_part1 translate 3*z }
|
||||
object { Round_Cylinder_Union (0, 3*z, 10, 1) }
|
||||
object { Round_Cylinder_Union (51*z, 54*z, 10, 1) }
|
||||
|
||||
scale 0.01
|
||||
|
||||
translate 0.1*z
|
||||
texture { Tex_Stone }
|
||||
}
|
||||
|
||||
#declare Large_Column=
|
||||
union {
|
||||
object { Round_Cylinder_Merge (0.7*z, 0.8*z, 0.22, 0.02) }
|
||||
|
||||
cylinder { 0.75*z, 3*z, 0.2 }
|
||||
object { Round_Box_Union (<-0.23,-0.23,-0.1>, <0.23,0.23,0.15>, 0.02) }
|
||||
object { Round_Box_Union (<-0.20,-0.20,0.00>, <0.20,0.20,0.70>, 0.02) }
|
||||
object { Round_Box_Union (<-0.23,-0.23,0.58>, <0.23,0.23,0.70>, 0.02) }
|
||||
object { Round_Box_Union (<-0.26,-0.26,0.64>, <0.26,0.26,0.74>, 0.02) }
|
||||
|
||||
torus { 0.2, 0.06 rotate 90*x translate 2.74*z }
|
||||
|
||||
object { Round_Box_Union (<-0.26,-0.26,2.80>, <0.26,0.26,2.88>, 0.01) }
|
||||
|
||||
texture { Tex_Stone }
|
||||
}
|
||||
|
||||
#declare Balustrade=
|
||||
union {
|
||||
object { Round_Box_Union (<0.0,-0.15,0>, <5,0.15,0.1>, 0.02) }
|
||||
object { Round_Box_Union (<0.0,-0.15,0.64>, <5,0.15,0.74>, 0.02) }
|
||||
|
||||
#declare Cnt=0;
|
||||
|
||||
#while (Cnt<10)
|
||||
object { Small_Column translate(Cnt*0.5+0.6)*x }
|
||||
#declare Cnt=Cnt+1;
|
||||
#end
|
||||
|
||||
texture { Tex_Stone }
|
||||
}
|
||||
|
||||
#declare Walls=
|
||||
union {
|
||||
box { <-0.5,-0.5,-1>, <-2,5.5,3.2> }
|
||||
box { <-0.5,-0.5,-1>, <5.5,-2,3.2> }
|
||||
|
||||
texture { Tex_Stone }
|
||||
}
|
||||
|
||||
#declare Ceiling_Segment=
|
||||
union {
|
||||
box { <-0.20,-0.20,2.94>, <0.20,0.20,2.98> }
|
||||
box { <-0.14,-0.14,2.94>, <0.14,0.14,3.01> }
|
||||
}
|
||||
|
||||
#declare Ceiling=
|
||||
union {
|
||||
box { <5.6,5.6,3.04>, <-2,-2,3.5> }
|
||||
|
||||
union {
|
||||
object { Round_Box_Union (<0.0,-0.26,3.1>, <6,0.26,2.88>, 0.02) rotate 180*z }
|
||||
object { Round_Box_Union (<0.0,-0.26,3.1>, <6,0.26,2.88>, 0.02) rotate -90*z }
|
||||
translate <5,5,0>
|
||||
}
|
||||
|
||||
difference {
|
||||
box { <5.0,5.0,2.95>, <-2,-2,3.5> }
|
||||
object { Ceiling_Segment translate <4.44,4.44,0> }
|
||||
object { Ceiling_Segment translate <4.44,3.94,0> }
|
||||
object { Ceiling_Segment translate <3.94,4.44,0> }
|
||||
object { Ceiling_Segment translate <3.94,3.94,0> }
|
||||
object { Ceiling_Segment translate <4.44,3.44,0> }
|
||||
object { Ceiling_Segment translate <3.44,4.44,0> }
|
||||
object { Ceiling_Segment translate <3.94,3.44,0> }
|
||||
object { Ceiling_Segment translate <3.44,3.94,0> }
|
||||
object { Ceiling_Segment translate <4.44,2.94,0> }
|
||||
object { Ceiling_Segment translate <2.94,4.44,0> }
|
||||
}
|
||||
|
||||
texture { Tex_Stone }
|
||||
}
|
||||
|
||||
#declare Base=
|
||||
union {
|
||||
box { <5.4,5.4,0>, <0,0,-1> texture { Tex_Floor } }
|
||||
box { <6,6,-1>, <0,0,-2> }
|
||||
|
||||
texture { Tex_Stone }
|
||||
}
|
||||
|
||||
object { Balustrade rotate 180*z translate <5,5,0> }
|
||||
object { Balustrade rotate -90*z translate <5,5,0> }
|
||||
object { Large_Column translate <5,5,0> }
|
||||
object { Base }
|
||||
object { Walls }
|
||||
object { Ceiling }
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
|
||||
382
samples/POV-Ray SDL/chair.inc
Executable file
382
samples/POV-Ray SDL/chair.inc
Executable file
@@ -0,0 +1,382 @@
|
||||
// This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
|
||||
// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a
|
||||
// letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
|
||||
|
||||
// Persistence Of Vision Ray Tracer Include File
|
||||
// File: chair.inc
|
||||
// Desc: chair for 'balcony.pov' demonstration scene
|
||||
// Date: July/August 2001
|
||||
// Auth: Christoph Hormann
|
||||
|
||||
// Updated: 09Aug2008 (jh) for v3.7 distribution
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
|
||||
#if (version < 3.7)
|
||||
#version 3.5;
|
||||
#end
|
||||
|
||||
#declare Tex_Table_Foot=
|
||||
texture {
|
||||
pigment {
|
||||
color rgb 0.4
|
||||
}
|
||||
finish {
|
||||
ambient 0.0
|
||||
diffuse 0.3
|
||||
specular 0.4
|
||||
roughness 0.01
|
||||
metallic
|
||||
|
||||
reflection {
|
||||
0.8
|
||||
metallic
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#declare Tex_Table_Foot_Bottom=
|
||||
texture {
|
||||
pigment {
|
||||
color rgb 0.2
|
||||
}
|
||||
finish {
|
||||
ambient 0.0
|
||||
diffuse 0.3
|
||||
specular 0.4
|
||||
roughness 0.02
|
||||
}
|
||||
}
|
||||
|
||||
#declare Tex_Dark_Wood=
|
||||
texture {
|
||||
pigment {
|
||||
bozo
|
||||
color_map {
|
||||
[0.3 color rgb <0.0,0.0,0.16> ]
|
||||
[0.5 color rgb <0.0,0.0,0.08> ]
|
||||
[0.7 color rgb <0.0,0.0,0.0> ]
|
||||
}
|
||||
scale <4,1,1>*0.036
|
||||
}
|
||||
finish {
|
||||
ambient 0.09
|
||||
diffuse 0.3
|
||||
specular 0.5
|
||||
roughness 0.025
|
||||
|
||||
reflection {
|
||||
0.15
|
||||
metallic
|
||||
}
|
||||
}
|
||||
normal {
|
||||
granite 0.1
|
||||
scale 0.03
|
||||
accuracy 0.007
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
|
||||
#include "shapes.inc"
|
||||
|
||||
#local Chair_Tube_Rad=0.01;
|
||||
#local Chair_Tube_Curve_Rad=0.045;
|
||||
#local Chair_Leg_Angle=7;
|
||||
#local Chair_Leg_AngleA=4;
|
||||
#local Chair_Leg_Depth=0.13;
|
||||
|
||||
#local Chair_Plate_Curve_Rad=0.03;
|
||||
#local Chair_Plate_Thickness=0.008;
|
||||
#local Chair_Plate_Width=0.48;
|
||||
#local Chair_Plate_UWidth=0.22;
|
||||
#local Chair_Plate_Height=0.45;
|
||||
#local Chair_Plate_UAngle=5;
|
||||
#local Chair_Plate_Depth=0.26;
|
||||
|
||||
#local Chair_Leg=
|
||||
union {
|
||||
|
||||
intersection {
|
||||
torus { Chair_Tube_Curve_Rad, Chair_Tube_Rad }
|
||||
plane { x, 0 }
|
||||
plane { -x, 0 rotate (-90+Chair_Leg_Angle)*y }
|
||||
}
|
||||
|
||||
cylinder {
|
||||
<-Chair_Tube_Curve_Rad,0,0>,
|
||||
<-Chair_Tube_Curve_Rad,0,-Chair_Plate_Height+0.01>, Chair_Tube_Rad
|
||||
rotate Chair_Leg_Angle*y
|
||||
}
|
||||
cylinder {
|
||||
<0,0,Chair_Tube_Curve_Rad>,
|
||||
<Chair_Leg_Depth,0,Chair_Tube_Curve_Rad>, Chair_Tube_Rad
|
||||
}
|
||||
|
||||
object { Round_Cylinder_Merge (
|
||||
<-Chair_Tube_Curve_Rad,0,-Chair_Plate_Height-0.003>,
|
||||
<-Chair_Tube_Curve_Rad,0,-Chair_Plate_Height+0.025>, Chair_Tube_Rad+0.001, 0.005)
|
||||
rotate Chair_Leg_Angle*y
|
||||
texture { Tex_Table_Foot_Bottom }
|
||||
}
|
||||
|
||||
translate -Chair_Leg_Depth*x
|
||||
|
||||
translate Chair_Plate_Height*cos(radians(Chair_Leg_Angle))*z
|
||||
|
||||
}
|
||||
|
||||
#macro Chair_Back(Rotate)
|
||||
union {
|
||||
|
||||
intersection {
|
||||
torus { Chair_Tube_Curve_Rad, Chair_Tube_Rad }
|
||||
plane { x, 0 }
|
||||
plane { z, 0 }
|
||||
|
||||
translate <-Chair_Leg_Depth, 0.0,Chair_Tube_Curve_Rad*2>
|
||||
}
|
||||
|
||||
cylinder {
|
||||
<-0.08, 0.0,Chair_Tube_Curve_Rad>,
|
||||
< 0.05, 0.0,Chair_Tube_Curve_Rad>, Chair_Tube_Rad
|
||||
}
|
||||
|
||||
intersection {
|
||||
torus { 4, Chair_Tube_Rad }
|
||||
plane { z, 0.4 }
|
||||
plane { -z, 0 }
|
||||
|
||||
translate <-4-Chair_Leg_Depth-Chair_Tube_Curve_Rad, 0.0,Chair_Tube_Curve_Rad*2>
|
||||
}
|
||||
|
||||
translate -Chair_Tube_Curve_Rad*z
|
||||
|
||||
rotate 3*y
|
||||
rotate Rotate*x
|
||||
|
||||
translate Chair_Tube_Curve_Rad*z
|
||||
|
||||
translate Chair_Plate_Height*cos(radians(Chair_Leg_Angle))*z
|
||||
|
||||
|
||||
}
|
||||
#end
|
||||
|
||||
#local Chair_Base=
|
||||
union {
|
||||
|
||||
union {
|
||||
object { Chair_Back(-0.25) translate Chair_Tube_Rad*2*y }
|
||||
|
||||
object { Chair_Leg }
|
||||
object { Chair_Leg rotate 180*z }
|
||||
rotate -Chair_Leg_AngleA*x
|
||||
translate -0.23*y
|
||||
}
|
||||
union {
|
||||
object { Chair_Back( 0.25) translate -Chair_Tube_Rad*2*y }
|
||||
|
||||
object { Chair_Leg }
|
||||
object { Chair_Leg rotate 180*z }
|
||||
rotate Chair_Leg_AngleA*x
|
||||
translate 0.23*y
|
||||
}
|
||||
|
||||
texture { Tex_Table_Foot }
|
||||
}
|
||||
|
||||
#local Chair_Plate=
|
||||
union {
|
||||
|
||||
intersection {
|
||||
merge {
|
||||
torus { Chair_Plate_Curve_Rad, Chair_Plate_Thickness translate (Chair_Plate_Width/2)*y }
|
||||
torus { Chair_Plate_Curve_Rad, Chair_Plate_Thickness translate -(Chair_Plate_Width/2)*y }
|
||||
|
||||
difference {
|
||||
cylinder {
|
||||
-(Chair_Plate_Width/2)*y, (Chair_Plate_Width/2)*y,
|
||||
Chair_Plate_Curve_Rad+Chair_Plate_Thickness
|
||||
}
|
||||
cylinder {
|
||||
-(Chair_Plate_Width/1.8)*y, (Chair_Plate_Width/1.8)*y,
|
||||
Chair_Plate_Curve_Rad-Chair_Plate_Thickness
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
plane { -z, 0 rotate -20*y}
|
||||
plane { -x, 0 }
|
||||
}
|
||||
|
||||
|
||||
merge {
|
||||
cylinder {
|
||||
<0.0, -Chair_Plate_Width/2, Chair_Plate_Curve_Rad>
|
||||
<0.0, Chair_Plate_Width/2, Chair_Plate_Curve_Rad>,
|
||||
Chair_Plate_Thickness
|
||||
}
|
||||
|
||||
sphere { <0.0, -Chair_Plate_Width/2, Chair_Plate_Curve_Rad>, Chair_Plate_Thickness }
|
||||
sphere { <0.0, Chair_Plate_Width/2, Chair_Plate_Curve_Rad>, Chair_Plate_Thickness }
|
||||
|
||||
rotate 70*y
|
||||
}
|
||||
|
||||
box {
|
||||
< 0.00, -Chair_Plate_Width/2, Chair_Plate_Curve_Rad-Chair_Plate_Thickness>,
|
||||
<-Chair_Plate_Depth, Chair_Plate_Width/2, Chair_Plate_Curve_Rad+Chair_Plate_Thickness>
|
||||
}
|
||||
cylinder {
|
||||
< 0.00, -Chair_Plate_Width/2, Chair_Plate_Curve_Rad>
|
||||
<-Chair_Plate_Depth, -Chair_Plate_Width/2, Chair_Plate_Curve_Rad>,
|
||||
Chair_Plate_Thickness
|
||||
}
|
||||
cylinder {
|
||||
< 0.00, Chair_Plate_Width/2, Chair_Plate_Curve_Rad>
|
||||
<-Chair_Plate_Depth, Chair_Plate_Width/2, Chair_Plate_Curve_Rad>,
|
||||
Chair_Plate_Thickness
|
||||
}
|
||||
|
||||
box {
|
||||
<-Chair_Plate_Depth, -Chair_Plate_Width/2+Chair_Plate_Curve_Rad,
|
||||
Chair_Plate_Curve_Rad-Chair_Plate_Thickness>,
|
||||
<-Chair_Plate_Depth-Chair_Plate_Curve_Rad, Chair_Plate_Width/2-Chair_Plate_Curve_Rad,
|
||||
Chair_Plate_Curve_Rad+Chair_Plate_Thickness>
|
||||
}
|
||||
|
||||
cylinder {
|
||||
<-Chair_Plate_Depth, Chair_Plate_Width/2-Chair_Plate_Curve_Rad,
|
||||
Chair_Plate_Curve_Rad-Chair_Plate_Thickness>
|
||||
<-Chair_Plate_Depth, Chair_Plate_Width/2-Chair_Plate_Curve_Rad,
|
||||
Chair_Plate_Curve_Rad+Chair_Plate_Thickness>,
|
||||
Chair_Plate_Curve_Rad
|
||||
}
|
||||
cylinder {
|
||||
<-Chair_Plate_Depth, -Chair_Plate_Width/2+Chair_Plate_Curve_Rad,
|
||||
Chair_Plate_Curve_Rad-Chair_Plate_Thickness>
|
||||
<-Chair_Plate_Depth, -Chair_Plate_Width/2+Chair_Plate_Curve_Rad,
|
||||
Chair_Plate_Curve_Rad+Chair_Plate_Thickness>,
|
||||
Chair_Plate_Curve_Rad
|
||||
}
|
||||
torus {
|
||||
Chair_Plate_Curve_Rad, Chair_Plate_Thickness
|
||||
rotate 90*x
|
||||
translate <-Chair_Plate_Depth,
|
||||
-Chair_Plate_Width/2+Chair_Plate_Curve_Rad, Chair_Plate_Curve_Rad>
|
||||
}
|
||||
torus {
|
||||
Chair_Plate_Curve_Rad, Chair_Plate_Thickness
|
||||
rotate 90*x
|
||||
translate <-Chair_Plate_Depth,
|
||||
Chair_Plate_Width/2-Chair_Plate_Curve_Rad, Chair_Plate_Curve_Rad>
|
||||
}
|
||||
|
||||
translate (Chair_Plate_Height+0.03)*z
|
||||
translate 0.18*x
|
||||
}
|
||||
|
||||
#local Chair_Back_Plate=
|
||||
union {
|
||||
intersection {
|
||||
union {
|
||||
intersection {
|
||||
difference {
|
||||
cylinder { <0.0, -0.30, 0.0>, <0.0, 0.30, 0.0>, 4+2*Chair_Plate_Thickness }
|
||||
cylinder { <0.0, -0.40, 0.0>, <0.0, 0.40, 0.0>, 4 }
|
||||
}
|
||||
plane { y, Chair_Plate_UWidth rotate Chair_Plate_UAngle*x }
|
||||
plane { -y, Chair_Plate_UWidth rotate -Chair_Plate_UAngle*x }
|
||||
}
|
||||
|
||||
torus {
|
||||
4+Chair_Plate_Thickness, Chair_Plate_Thickness
|
||||
scale <1, 1, 1/cos(radians(Chair_Plate_UAngle))>
|
||||
rotate Chair_Plate_UAngle*x
|
||||
translate Chair_Plate_UWidth*y
|
||||
}
|
||||
|
||||
torus {
|
||||
4+Chair_Plate_Thickness, Chair_Plate_Thickness
|
||||
scale <1, 1, 1/cos(radians(Chair_Plate_UAngle))>
|
||||
rotate -Chair_Plate_UAngle*x
|
||||
translate -Chair_Plate_UWidth*y
|
||||
}
|
||||
}
|
||||
|
||||
plane { z, 0 rotate -8*y }
|
||||
plane { -z, 0 rotate -0.2*y }
|
||||
}
|
||||
|
||||
intersection {
|
||||
union {
|
||||
cylinder {
|
||||
<4+Chair_Plate_Thickness, 0.3, 0.0>,
|
||||
<4+Chair_Plate_Thickness, -0.3, 0.0>,
|
||||
Chair_Plate_Thickness
|
||||
rotate -0.2*y
|
||||
}
|
||||
cylinder {
|
||||
<4+Chair_Plate_Thickness, 0.3, 0.0>,
|
||||
<4+Chair_Plate_Thickness, -0.3, 0.0>,
|
||||
Chair_Plate_Thickness
|
||||
rotate -8*y
|
||||
}
|
||||
}
|
||||
plane { y, Chair_Plate_UWidth rotate Chair_Plate_UAngle*x }
|
||||
plane { -y, Chair_Plate_UWidth rotate -Chair_Plate_UAngle*x }
|
||||
}
|
||||
sphere {
|
||||
<4+Chair_Plate_Thickness, Chair_Plate_UWidth, 0.0>,
|
||||
Chair_Plate_Thickness
|
||||
rotate -0.2*y
|
||||
}
|
||||
sphere {
|
||||
<4+Chair_Plate_Thickness, -Chair_Plate_UWidth, 0.0>,
|
||||
Chair_Plate_Thickness
|
||||
rotate -0.2*y
|
||||
}
|
||||
|
||||
sphere {
|
||||
<4+Chair_Plate_Thickness,
|
||||
Chair_Plate_UWidth-4*sin(radians(Chair_Plate_UAngle))*sin(radians(8)), 0.0>,
|
||||
Chair_Plate_Thickness
|
||||
rotate -8*y
|
||||
}
|
||||
sphere {
|
||||
<4+Chair_Plate_Thickness,
|
||||
-Chair_Plate_UWidth+4*sin(radians(Chair_Plate_UAngle))*sin(radians(8)), 0.0>,
|
||||
Chair_Plate_Thickness
|
||||
rotate -8*y
|
||||
}
|
||||
|
||||
|
||||
translate <-4-Chair_Leg_Depth-Chair_Tube_Curve_Rad+Chair_Tube_Rad,
|
||||
0.0, Chair_Tube_Curve_Rad*2>
|
||||
|
||||
translate -Chair_Tube_Curve_Rad*z
|
||||
|
||||
rotate 3*y
|
||||
|
||||
translate Chair_Tube_Curve_Rad*z
|
||||
|
||||
translate Chair_Plate_Height*cos(radians(Chair_Leg_Angle))*z
|
||||
|
||||
}
|
||||
|
||||
|
||||
union {
|
||||
object { Chair_Back_Plate texture { Tex_Dark_Wood rotate 90*y } }
|
||||
object { Chair_Plate texture { Tex_Dark_Wood } }
|
||||
|
||||
object { Chair_Base }
|
||||
scale 0.92
|
||||
rotate -60*z
|
||||
translate <2.68,3.35,0>
|
||||
}
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
12217
samples/POV-Ray SDL/cloth.inc
Executable file
12217
samples/POV-Ray SDL/cloth.inc
Executable file
File diff suppressed because it is too large
Load Diff
188
samples/POV-Ray SDL/gamma_showcase.pov
Executable file
188
samples/POV-Ray SDL/gamma_showcase.pov
Executable file
@@ -0,0 +1,188 @@
|
||||
// This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
|
||||
// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a
|
||||
// letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
|
||||
|
||||
// Persistence of Vision Ray Tracer Scene Description File
|
||||
// File: gamma_showcase.pov
|
||||
// Vers: 3.7
|
||||
// Desc: Gamma Handling Test Scene - An arrangement of spheres on a marble plane
|
||||
// Date: 2010-12-21
|
||||
// Auth: Christoph Lipka
|
||||
//
|
||||
|
||||
// +w640 +h480 +a0.3 +am1 +fN -d File_Gamma=sRGB Output_File_Name=gamma_showcase.png
|
||||
// +w640 +h480 +a0.3 +am1 +fN -d File_Gamma=1.0 Output_File_Name=gamma_showcase_linear.png
|
||||
// +w320 +h240 +a0.3 +am1 +fN -d File_Gamma=sRGB Output_File_Name=gamma_showcase_ref0.png Declare=Stripes=off
|
||||
// +w320 +h240 +a0.3 +am1 +fN -d File_Gamma=sRGB Output_File_Name=gamma_showcase_ref1.png Declare=Stripes=off Declare=Gamma=1.2
|
||||
// +w320 +h240 +a0.3 +am1 +fN -d File_Gamma=sRGB Output_File_Name=gamma_showcase_ref2.png Declare=Stripes=off Declare=Gamma=0.8
|
||||
// +w640 +h480 +a0.3 +am1 -f +d
|
||||
|
||||
#version 3.7;
|
||||
|
||||
#include "colors.inc"
|
||||
#include "stones.inc"
|
||||
|
||||
#ifndef (Stripes)
|
||||
#declare Stripes = on;
|
||||
#end
|
||||
#ifndef (Gamma)
|
||||
#declare Gamma = 1.0;
|
||||
#end
|
||||
|
||||
global_settings {
|
||||
max_trace_level 5
|
||||
assumed_gamma 1.0
|
||||
radiosity {
|
||||
pretrace_start 0.08
|
||||
pretrace_end 0.01
|
||||
count 35
|
||||
nearest_count 5
|
||||
error_bound 1.8
|
||||
recursion_limit 2
|
||||
low_error_factor .5
|
||||
gray_threshold 0.0
|
||||
minimum_reuse 0.015
|
||||
brightness 1
|
||||
adc_bailout 0.01/2
|
||||
}
|
||||
}
|
||||
|
||||
#default {
|
||||
texture {
|
||||
pigment {rgb 1}
|
||||
finish {
|
||||
ambient 0.0
|
||||
diffuse 0.6
|
||||
specular 0.6 roughness 0.001
|
||||
reflection { 0.0 1.0 fresnel on }
|
||||
conserve_energy
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------
|
||||
|
||||
#local TestRed = rgb <0.5,0.1,0.1>;
|
||||
#local TestGreen = rgb <0.1,0.5,0.1>;
|
||||
#local TestBlue = rgb <0.1,0.1,0.5>;
|
||||
|
||||
#local CameraFocus = <0,0.5,0>;
|
||||
#local CameraDist = 8;
|
||||
#local CameraDepth = 1.8;
|
||||
#local CameraTilt = 20;
|
||||
|
||||
camera {
|
||||
location <0,0,0>
|
||||
direction z*CameraDepth
|
||||
right x*image_width/image_height
|
||||
up y
|
||||
translate <0,0,-CameraDist>
|
||||
rotate x*CameraTilt
|
||||
translate CameraFocus
|
||||
}
|
||||
|
||||
#macro LightSource(Pos,Color)
|
||||
light_source {
|
||||
Pos
|
||||
color Color
|
||||
spotlight
|
||||
point_at <0,0,0>
|
||||
radius 175/vlength(Pos)
|
||||
falloff 200/vlength(Pos)
|
||||
area_light x*vlength(Pos)/10, y*vlength(Pos)/10, 9,9 adaptive 1 jitter circular orient
|
||||
}
|
||||
|
||||
#end
|
||||
|
||||
LightSource(<-500,500,-500>,TestRed + <0.2,0.2,0.2>)
|
||||
LightSource(< 0,500,-500>,TestGreen + <0.2,0.2,0.2>)
|
||||
LightSource(< 500,500,-500>,TestBlue + <0.2,0.2,0.2>)
|
||||
|
||||
// ----------------------------------------
|
||||
|
||||
#macro DarkStripeBW(TargetBrightness)
|
||||
#if (TargetBrightness < 0.5)
|
||||
(0.0)
|
||||
#else
|
||||
(TargetBrightness*2 - 1.0)
|
||||
#end
|
||||
#end
|
||||
|
||||
#macro BrightStripeBW(TargetBrightness)
|
||||
#if (TargetBrightness < 0.5)
|
||||
(TargetBrightness*2)
|
||||
#else
|
||||
(1.0)
|
||||
#end
|
||||
#end
|
||||
|
||||
#macro DarkStripeRGB(TargetColor)
|
||||
<DarkStripeBW(TargetColor.red),DarkStripeBW(TargetColor.green),DarkStripeBW(TargetColor.blue)>
|
||||
#end
|
||||
|
||||
#macro BrightStripeRGB(TargetColor)
|
||||
<BrightStripeBW(TargetColor.red),BrightStripeBW(TargetColor.green),BrightStripeBW(TargetColor.blue)>
|
||||
#end
|
||||
|
||||
#macro StripedPigment(TargetColor)
|
||||
#if (Stripes)
|
||||
function { abs(mod(abs(image_height*CameraDepth*y/z+0.5),2.0)-1.0) }
|
||||
color_map {
|
||||
[0.5 color rgb DarkStripeRGB(TargetColor) ]
|
||||
[0.5 color rgb BrightStripeRGB(TargetColor) ]
|
||||
}
|
||||
translate <0,0,-CameraDist>
|
||||
rotate x*CameraTilt
|
||||
translate CameraFocus
|
||||
#else
|
||||
color TargetColor
|
||||
#end
|
||||
#end
|
||||
|
||||
|
||||
plane {
|
||||
y, 0
|
||||
texture { T_Stone11 }
|
||||
interior { ior 1.5 }
|
||||
}
|
||||
|
||||
#macro GammaAdjust(C,G)
|
||||
#local C2 = color rgbft <pow(C.red,G),pow(C.green,G),pow(C.blue,G),pow(C.filter,G),pow(C.transmit,G)>;
|
||||
(C2)
|
||||
#end
|
||||
|
||||
#macro TestSphere(Pos,Radius,TargetColor,Split)
|
||||
sphere {
|
||||
Pos + y*Radius, Radius
|
||||
texture { pigment { color GammaAdjust(TargetColor,Gamma) } }
|
||||
interior { ior 1.5 }
|
||||
}
|
||||
#if (Split)
|
||||
sphere {
|
||||
Pos + y*Radius + x*0.001, Radius
|
||||
texture { pigment { StripedPigment(TargetColor) } }
|
||||
interior { ior 1.5 }
|
||||
}
|
||||
#end
|
||||
#end
|
||||
|
||||
TestSphere(<-2,0,1>, 1, TestRed, true)
|
||||
TestSphere(< 0,0,1>, 1, TestGreen, true)
|
||||
TestSphere(< 2,0,1>, 1, TestBlue, true)
|
||||
|
||||
#local Steps = 6;
|
||||
#for(I,0,1,1/Steps)
|
||||
#if (I < 0.5)
|
||||
#local Color2 = TestRed;
|
||||
#else
|
||||
#local Color2 = TestBlue;
|
||||
#end
|
||||
#local P = abs(I-0.5)*2;
|
||||
TestSphere(<I*4-2,0,-0.5>, 2/Steps, (1-P)*TestGreen + P*Color2, true)
|
||||
#end
|
||||
|
||||
#local Steps = 8;
|
||||
#for(I,0,1,1/Steps)
|
||||
TestSphere(<I*4-2,0,-1.5>, 2/Steps, rgb I, true)
|
||||
TestSphere(<I*4-2,0,-2.0>, 2/Steps, GammaAdjust(rgb I, 2.2*Gamma), false)
|
||||
#end
|
||||
91
samples/POV-Ray SDL/sky.inc
Executable file
91
samples/POV-Ray SDL/sky.inc
Executable file
@@ -0,0 +1,91 @@
|
||||
// This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
|
||||
// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a
|
||||
// letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
|
||||
|
||||
// Persistence Of Vision Ray Tracer Include File
|
||||
// File: sky.inc
|
||||
// Desc: sky for 'balcony.pov' demonstration scene
|
||||
// Date: July/August 2001
|
||||
// Auth: Christoph Hormann
|
||||
|
||||
// Updated: 09Aug2008 (jh) for v3.7 distribution
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
|
||||
#if (version < 3.7)
|
||||
#version 3.5;
|
||||
#end
|
||||
|
||||
#local P_Clouds=
|
||||
pigment {
|
||||
gradient z
|
||||
pigment_map {
|
||||
[ 0.0 color rgbt 1]
|
||||
[ 0.1
|
||||
bozo
|
||||
color_map {
|
||||
[0.0 color rgbt < 0.85, 0.88, 0.94, 0.0>]
|
||||
[0.15 color rgbt < 0.91, 0.96, 0.99, 0.0>]
|
||||
[0.35 color rgbt < 0.91, 0.96, 0.99, 1.0>]
|
||||
}
|
||||
turbulence 0.75
|
||||
lambda 2.4
|
||||
omega 0.6
|
||||
octaves 8
|
||||
scale <0.4,0.4,0.15>
|
||||
]
|
||||
[ 0.4
|
||||
bozo
|
||||
color_map {
|
||||
[0.0 color rgbt < 0.85, 0.88, 0.94, 0.0>]
|
||||
[0.15 color rgbt < 0.91, 0.96, 0.99, 0.0>]
|
||||
[0.35 color rgbt < 0.91, 0.96, 0.99, 1.0>]
|
||||
}
|
||||
turbulence 0.75
|
||||
lambda 2.4
|
||||
omega 0.6
|
||||
octaves 8
|
||||
scale <0.4,0.4,0.15>
|
||||
]
|
||||
[ 0.65 color rgbt 1]
|
||||
|
||||
}
|
||||
rotate 10*z
|
||||
}
|
||||
|
||||
|
||||
#local Tex_Sky =
|
||||
texture {
|
||||
pigment {
|
||||
function { abs(z) }
|
||||
color_map {
|
||||
[0.0 color rgb < 0.640, 0.685, 0.800 >]
|
||||
[0.3 color rgb < 0.400, 0.550, 0.900 >]
|
||||
}
|
||||
turbulence 0.05
|
||||
}
|
||||
|
||||
finish {
|
||||
diffuse 0
|
||||
ambient 1
|
||||
}
|
||||
}
|
||||
texture {
|
||||
pigment { P_Clouds }
|
||||
finish {
|
||||
diffuse 0
|
||||
ambient 1
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sphere {
|
||||
<0, 0, 0>, 1
|
||||
texture { Tex_Sky }
|
||||
scale<1000000, 1000000, 300000>
|
||||
no_shadow
|
||||
hollow on
|
||||
photons{ collect off }
|
||||
}
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
171
samples/POV-Ray SDL/table.inc
Executable file
171
samples/POV-Ray SDL/table.inc
Executable file
@@ -0,0 +1,171 @@
|
||||
// This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
|
||||
// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a
|
||||
// letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
|
||||
|
||||
// Persistence Of Vision Ray Tracer Include File
|
||||
// File: table.inc
|
||||
// Desc: table for 'balcony.pov' demonstration scene
|
||||
// Date: July/August 2001
|
||||
// Auth: Christoph Hormann
|
||||
|
||||
// Updated: 09Aug2008 (jh) for v3.7 distribution
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
|
||||
#if (version < 3.7)
|
||||
#version 3.5;
|
||||
#end
|
||||
|
||||
#declare Tex_Table_Foot=
|
||||
texture {
|
||||
pigment {
|
||||
color rgb 0.4
|
||||
}
|
||||
finish {
|
||||
ambient 0.0
|
||||
diffuse 0.3
|
||||
specular 0.4
|
||||
roughness 0.01
|
||||
metallic
|
||||
|
||||
reflection {
|
||||
0.8
|
||||
metallic
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#declare Tex_Table_Foot_Bottom=
|
||||
texture {
|
||||
pigment {
|
||||
color rgb 0.2
|
||||
}
|
||||
finish {
|
||||
ambient 0.0
|
||||
diffuse 0.3
|
||||
specular 0.4
|
||||
roughness 0.02
|
||||
}
|
||||
}
|
||||
|
||||
#declare Tex_Dark_Wood=
|
||||
texture {
|
||||
pigment {
|
||||
bozo
|
||||
color_map {
|
||||
[0.3 color rgb <0.0,0.0,0.16> ]
|
||||
[0.5 color rgb <0.0,0.0,0.08> ]
|
||||
[0.7 color rgb <0.0,0.0,0.0> ]
|
||||
}
|
||||
scale <4,1,1>*0.036
|
||||
}
|
||||
finish {
|
||||
ambient 0.09
|
||||
diffuse 0.3
|
||||
specular 0.5
|
||||
roughness 0.025
|
||||
|
||||
reflection {
|
||||
0.15
|
||||
metallic
|
||||
}
|
||||
}
|
||||
normal {
|
||||
granite 0.1
|
||||
scale 0.03
|
||||
accuracy 0.007
|
||||
}
|
||||
scale 0.5
|
||||
rotate 90*y
|
||||
}
|
||||
|
||||
#declare Tex_Dark_Wood2 =
|
||||
texture {
|
||||
pigment {
|
||||
wood
|
||||
color_map {
|
||||
[ 0.0000 color rgb<0.6431, 0.3176, 0.0824> ]
|
||||
[ 0.1000 color rgb<0.6196, 0.2824, 0.0588> ]
|
||||
[ 0.2000 color rgb<0.7137, 0.3725, 0.1529> ]
|
||||
[ 0.3000 color rgb<0.7529, 0.4157, 0.1922> ]
|
||||
[ 0.4000 color rgb<0.8157, 0.4941, 0.2588> ]
|
||||
[ 0.5000 color rgb<0.7686, 0.4745, 0.2196> ]
|
||||
[ 0.6000 color rgb<0.8471, 0.5647, 0.2980> ]
|
||||
[ 0.7000 color rgb<0.8627, 0.5843, 0.3137> ]
|
||||
[ 0.8000 color rgb<0.8902, 0.6314, 0.3529> ]
|
||||
[ 0.9000 color rgb<0.8627, 0.6118, 0.3294> ]
|
||||
[ 1.0000 color rgb<0.8392, 0.5922, 0.3098> ]
|
||||
}
|
||||
|
||||
turbulence <0.075, 0.075, 0.65>
|
||||
scale <0.04, 0.04, 0.6>
|
||||
|
||||
scale 0.27
|
||||
rotate 91*y
|
||||
translate -0.1*z
|
||||
}
|
||||
finish {
|
||||
ambient 0.0
|
||||
diffuse 0.4
|
||||
specular 0.3
|
||||
roughness 0.025
|
||||
|
||||
reflection {
|
||||
0.17
|
||||
metallic
|
||||
}
|
||||
}
|
||||
normal {
|
||||
granite 0.015
|
||||
scale <0.02, 0.02, 0.06>
|
||||
rotate 91*y
|
||||
accuracy 0.007
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
|
||||
#include "shapes.inc"
|
||||
|
||||
#declare Table_Height=0.66;
|
||||
|
||||
#declare Table=
|
||||
union {
|
||||
|
||||
torus { 0.49, 0.01 sturm rotate 90*x translate z*(Table_Height-0.01) }
|
||||
cylinder { z*(Table_Height-0.05), z*(Table_Height-0.01), 0.5 }
|
||||
cylinder { z*(Table_Height-0.01), z*Table_Height, 0.49 }
|
||||
|
||||
union {
|
||||
cylinder { z*0.01, z*0.63, 0.03 translate 0.37*x }
|
||||
cylinder { z*0.01, z*0.63, 0.03 translate 0.37*x rotate 120*z }
|
||||
cylinder { z*0.01, z*0.63, 0.03 translate 0.37*x rotate 240*z }
|
||||
|
||||
texture { Tex_Table_Foot }
|
||||
|
||||
rotate -70*z
|
||||
}
|
||||
|
||||
union {
|
||||
object { Round_Cylinder_Merge (0, z*0.03, 0.031, 0.005) translate 0.37*x }
|
||||
object { Round_Cylinder_Merge (0, z*0.03, 0.031, 0.005) translate 0.37*x rotate 120*z }
|
||||
object { Round_Cylinder_Merge (0, z*0.03, 0.031, 0.005) translate 0.37*x rotate 240*z }
|
||||
|
||||
texture { Tex_Table_Foot_Bottom }
|
||||
|
||||
rotate -70*z
|
||||
}
|
||||
|
||||
texture { Tex_Dark_Wood2 }
|
||||
|
||||
#if (show_TableCloth)
|
||||
scale <0.97, 0.97, 0.99>
|
||||
#else
|
||||
scale <0.97, 0.97, 1.00>
|
||||
#end
|
||||
}
|
||||
|
||||
object { Table translate <3.3,2.52,0> }
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
91
samples/POV-Ray SDL/table_cloth.inc
Executable file
91
samples/POV-Ray SDL/table_cloth.inc
Executable file
@@ -0,0 +1,91 @@
|
||||
// This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
|
||||
// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a
|
||||
// letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
|
||||
|
||||
// Persistence Of Vision Ray Tracer Include File
|
||||
// File: table_cloth.inc
|
||||
// Desc: table cloth for 'balcony.pov' demonstration scene
|
||||
// Date: July/August 2001
|
||||
// Auth: Christoph Hormann
|
||||
|
||||
// Updated: 09Aug2008 (jh) for v3.7 distribution
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
|
||||
#if (version < 3.7)
|
||||
#version 3.5;
|
||||
#end
|
||||
|
||||
#declare ClCol01=color rgb <0.8, 0.7, 0.4>;
|
||||
#declare ClCol02=color rgb <0.07, 0.12, 0.4>;
|
||||
|
||||
#declare CPig1=
|
||||
pigment {
|
||||
gradient x
|
||||
triangle_wave
|
||||
color_map {
|
||||
[0.04 ClCol01 ]
|
||||
[0.04 ClCol02 ]
|
||||
[0.06 ClCol02 ]
|
||||
[0.06 ClCol01 ]
|
||||
[0.09 ClCol01 ]
|
||||
[0.09 ClCol02 ]
|
||||
[0.13 ClCol02 ]
|
||||
[0.13 ClCol01 ]
|
||||
[0.16 ClCol01 ]
|
||||
[0.16 ClCol02 ]
|
||||
[0.18 ClCol02 ]
|
||||
[0.18 ClCol01 ]
|
||||
}
|
||||
}
|
||||
|
||||
#declare CPig2=
|
||||
pigment {
|
||||
gradient y
|
||||
triangle_wave
|
||||
pigment_map {
|
||||
[0.04 CPig1 ]
|
||||
[0.04 ClCol02 ]
|
||||
[0.06 ClCol02 ]
|
||||
[0.06 CPig1 ]
|
||||
[0.09 CPig1 ]
|
||||
[0.09 ClCol02 ]
|
||||
[0.13 ClCol02 ]
|
||||
[0.13 CPig1 ]
|
||||
[0.16 CPig1 ]
|
||||
[0.16 ClCol02 ]
|
||||
[0.18 ClCol02 ]
|
||||
[0.18 CPig1 ]
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
#include "clothutil.inc"
|
||||
|
||||
ReadClothFile("cloth.cth")
|
||||
DrawSmoothTriangles2(Points, 90, 90, on, true, "cloth.inc")
|
||||
*/
|
||||
#declare Table_Cloth=
|
||||
mesh2{
|
||||
#include "cloth.inc"
|
||||
texture {
|
||||
uv_mapping
|
||||
pigment {
|
||||
CPig2
|
||||
}
|
||||
finish {
|
||||
ambient 0.0
|
||||
diffuse 0.6
|
||||
}
|
||||
normal {
|
||||
quilted 0.16
|
||||
scale 0.008
|
||||
}
|
||||
}
|
||||
rotate -30*z
|
||||
}
|
||||
|
||||
object { Table_Cloth translate <3.3,2.52,0> }
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
|
||||
136
samples/POV-Ray SDL/table_stuff.inc
Executable file
136
samples/POV-Ray SDL/table_stuff.inc
Executable file
@@ -0,0 +1,136 @@
|
||||
// This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
|
||||
// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a
|
||||
// letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
|
||||
|
||||
// Persistence Of Vision Ray Tracer Include File
|
||||
// File: table_stuff.inc
|
||||
// Desc: stuff on the table for 'balcony.pov' demonstration scene
|
||||
// Date: July/August 2001
|
||||
// Auth: Christoph Hormann
|
||||
|
||||
// Updated: 09Aug2008 (jh) for v3.7 distribution
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
|
||||
#if (version < 3.7)
|
||||
#version 3.5;
|
||||
#end
|
||||
|
||||
#declare Mat_Glass=
|
||||
material {
|
||||
texture {
|
||||
pigment { color rgbt 1 }
|
||||
finish {
|
||||
ambient 0.0
|
||||
diffuse 0.1
|
||||
specular 0.5
|
||||
roughness 0.01
|
||||
|
||||
reflection {
|
||||
0.15, 1.0
|
||||
fresnel on
|
||||
}
|
||||
|
||||
conserve_energy
|
||||
}
|
||||
}
|
||||
interior {
|
||||
ior 1.5
|
||||
fade_distance 0.1
|
||||
fade_power 1001
|
||||
fade_color <0.4,0.4,0.8>
|
||||
}
|
||||
}
|
||||
|
||||
#declare Tex_Box_Metal=
|
||||
texture {
|
||||
pigment {
|
||||
color rgb <0.5,0.45,0.4>
|
||||
}
|
||||
finish {
|
||||
ambient 0.0
|
||||
diffuse 0.05
|
||||
specular 0.5
|
||||
roughness 0.01
|
||||
metallic
|
||||
|
||||
reflection {
|
||||
0.8
|
||||
metallic
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
|
||||
#include "shapes.inc"
|
||||
#include "functions.inc"
|
||||
|
||||
#declare Table_Height=0.66;
|
||||
|
||||
#declare Box_Iso=
|
||||
isosurface {
|
||||
function { -f_superellipsoid(x,y,z, 0.2, 0.2) }
|
||||
contained_by {box { -1.2, 1.2 }}
|
||||
max_gradient 1.1
|
||||
|
||||
translate 1.001*z
|
||||
}
|
||||
|
||||
#declare Box=
|
||||
union {
|
||||
intersection {
|
||||
object { Box_Iso }
|
||||
object { Round_Box_Merge (<-1.1,-1.1,1.6>, <1.1,1.1,-0.1>, 0.4) }
|
||||
|
||||
}
|
||||
intersection {
|
||||
object { Box_Iso }
|
||||
object { Round_Box_Merge (<-1.1,-1.1,1.6>, <1.1,1.1,2.2>, 0.4) }
|
||||
scale 1.01
|
||||
rotate 0.2
|
||||
}
|
||||
torus {
|
||||
0.6, 0.13
|
||||
rotate 90*z
|
||||
translate 2*z
|
||||
}
|
||||
|
||||
scale <1,1,0.6>
|
||||
}
|
||||
|
||||
#include "bglass.inc"
|
||||
|
||||
union {
|
||||
object {
|
||||
Glass
|
||||
|
||||
photons{
|
||||
target 1.0
|
||||
refraction on
|
||||
reflection on
|
||||
}
|
||||
|
||||
translate <-0.16,-0.1,0>
|
||||
}
|
||||
|
||||
object {
|
||||
Box
|
||||
|
||||
texture {
|
||||
Tex_Box_Metal
|
||||
}
|
||||
photons{
|
||||
target 1.0
|
||||
reflection on
|
||||
}
|
||||
|
||||
scale 0.06
|
||||
translate <-0.1,0.2,0>
|
||||
}
|
||||
|
||||
|
||||
translate <3.3,2.52,Table_Height>
|
||||
}
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
118
samples/POV-Ray SDL/terrain.inc
Executable file
118
samples/POV-Ray SDL/terrain.inc
Executable file
@@ -0,0 +1,118 @@
|
||||
// This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
|
||||
// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a
|
||||
// letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
|
||||
|
||||
// Persistence of Vision Ray Tracer Include File
|
||||
// File: terrain.inc
|
||||
// Desc: terrain for 'balcony.pov' demonstration scene
|
||||
// Date: July/August 2001
|
||||
// Auth: Christoph Hormann
|
||||
|
||||
// Updated: 09Aug2008 (jh) for v3.7 distribution
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
|
||||
#if (version < 3.7)
|
||||
#version 3.5;
|
||||
#end
|
||||
|
||||
#declare Tex_Vegetation=
|
||||
texture {
|
||||
pigment {
|
||||
bozo
|
||||
color_map {
|
||||
[0.3 color rgb <0.20,0.35,0.1>*0.9 ]
|
||||
[0.8 color rgb <0.12,0.35,0.1>*0.7 ]
|
||||
}
|
||||
scale 4
|
||||
}
|
||||
finish {
|
||||
ambient 0.0
|
||||
diffuse 0.5
|
||||
brilliance 0.8
|
||||
specular 0.1
|
||||
}
|
||||
normal {
|
||||
granite 0.4
|
||||
}
|
||||
}
|
||||
|
||||
#declare Tex_Stone=
|
||||
texture {
|
||||
pigment {
|
||||
color rgb <0.6,0.6,0.6>
|
||||
}
|
||||
finish {
|
||||
ambient 0.0//0.1
|
||||
diffuse 0.45
|
||||
specular 0.15
|
||||
}
|
||||
}
|
||||
|
||||
#declare Tex_Terrain=
|
||||
texture {
|
||||
slope -z
|
||||
texture_map {
|
||||
[0.34 Tex_Vegetation ]
|
||||
[0.34 Tex_Stone ]
|
||||
}
|
||||
}
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
|
||||
|
||||
|
||||
#declare Terrain=
|
||||
object {
|
||||
height_field {
|
||||
|
||||
function 300,300 {
|
||||
pigment {
|
||||
function { 1-(min(pow(x*x + z*z,1.3), 1) -0.0001) }
|
||||
color_map {
|
||||
[0.0 color rgb 0.0]
|
||||
[1.0 color rgb 1.0]
|
||||
}
|
||||
scale 0.35
|
||||
translate <0.5,0,0.5>
|
||||
|
||||
warp { turbulence 0.3 }
|
||||
|
||||
scale 3
|
||||
warp { turbulence 0.4 lambda 2.2 octaves 8 }
|
||||
scale 1/3
|
||||
|
||||
rotate -90*x
|
||||
translate -0.5*y
|
||||
scale <1, -1, 1>
|
||||
translate 0.5*y
|
||||
}
|
||||
}
|
||||
|
||||
water_level 0.02
|
||||
|
||||
rotate 90*x
|
||||
rotate -10*z
|
||||
|
||||
scale <4, 4, 1>
|
||||
scale 30
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
union {
|
||||
object {
|
||||
Terrain
|
||||
translate <130, 368, -10>
|
||||
}
|
||||
|
||||
object {
|
||||
Terrain
|
||||
rotate -180*z
|
||||
scale 0.3
|
||||
translate <90, 97, -6>
|
||||
}
|
||||
texture { Tex_Terrain }
|
||||
}
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
74
samples/POV-Ray SDL/water.inc
Executable file
74
samples/POV-Ray SDL/water.inc
Executable file
@@ -0,0 +1,74 @@
|
||||
// This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
|
||||
// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a
|
||||
// letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
|
||||
|
||||
// Persistence Of Vision Ray Tracer Include File
|
||||
// File: water.inc
|
||||
// Desc: water for 'balcony.pov' demonstration scene
|
||||
// Date: July/August 2001
|
||||
// Auth: Christoph Hormann
|
||||
|
||||
// Updated: 09Aug2008 (jh) for v3.7 distribution
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
|
||||
#if (version < 3.7)
|
||||
#version 3.5;
|
||||
#end
|
||||
|
||||
#include "functions.inc"
|
||||
|
||||
#declare RMF=function{ f_ridged_mf(x, y, z, 0.07, 2.2, 7, 0.6, 0.9, 1)}
|
||||
|
||||
#declare M_Watx4 =
|
||||
material {
|
||||
texture {
|
||||
pigment {
|
||||
color rgbt <0.2, 0.22, 0.21, 0.94>
|
||||
}
|
||||
finish {
|
||||
diffuse 0.0
|
||||
ambient -0.2
|
||||
|
||||
reflection {
|
||||
0.0, 0.95
|
||||
fresnel on
|
||||
}
|
||||
|
||||
conserve_energy
|
||||
|
||||
specular 0.4
|
||||
roughness 0.007
|
||||
}
|
||||
normal{
|
||||
function { RMF(x, y, z) } 0.8
|
||||
scale 0.3
|
||||
}
|
||||
}
|
||||
interior {
|
||||
ior 1.31
|
||||
fade_distance 5
|
||||
fade_power 1001.0
|
||||
fade_color <0.02, 0.20, 0.06>
|
||||
}
|
||||
}
|
||||
|
||||
plane {
|
||||
z, -1
|
||||
material {
|
||||
M_Watx4
|
||||
}
|
||||
hollow on
|
||||
}
|
||||
|
||||
plane {
|
||||
z, -12.0
|
||||
|
||||
texture {
|
||||
pigment { color rgb 0 }
|
||||
finish { ambient 0.0 diffuse 0.0 }
|
||||
}
|
||||
hollow on
|
||||
}
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
280
samples/Prolog/queues.yap
Normal file
280
samples/Prolog/queues.yap
Normal file
@@ -0,0 +1,280 @@
|
||||
% This file has been included as an YAP library by Vitor Santos Costa, 1999
|
||||
|
||||
% File : QUEUES.PL
|
||||
% Author : R.A.O'Keefe
|
||||
% Updated: Friday November 18th, 1983, 8:09:31 pm
|
||||
% Purpose: define queue operations
|
||||
% Needs : lib(lists) for append/3.
|
||||
|
||||
/** @defgroup Queues Queues
|
||||
@ingroup library
|
||||
@{
|
||||
|
||||
The following queue manipulation routines are available once
|
||||
included with the `use_module(library(queues))` command. Queues are
|
||||
implemented with difference lists.
|
||||
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@pred make_queue(+ _Queue_)
|
||||
|
||||
|
||||
Creates a new empty queue. It should only be used to create a new queue.
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/** @pred empty_queue(+ _Queue_)
|
||||
|
||||
|
||||
Tests whether the queue is empty.
|
||||
|
||||
|
||||
*/
|
||||
/** @pred head_queue(+ _Queue_, ? _Head_)
|
||||
|
||||
|
||||
Unifies Head with the first element of the queue.
|
||||
|
||||
|
||||
*/
|
||||
/** @pred join_queue(+ _Element_, + _OldQueue_, - _NewQueue_)
|
||||
|
||||
|
||||
Adds the new element at the end of the queue.
|
||||
|
||||
|
||||
*/
|
||||
/** @pred jump_queue(+ _Element_, + _OldQueue_, - _NewQueue_)
|
||||
|
||||
|
||||
Adds the new element at the front of the list.
|
||||
|
||||
|
||||
*/
|
||||
/** @pred length_queue(+ _Queue_, - _Length_)
|
||||
|
||||
|
||||
Counts the number of elements currently in the queue.
|
||||
|
||||
|
||||
*/
|
||||
/** @pred list_join_queue(+ _List_, + _OldQueue_, - _NewQueue_)
|
||||
|
||||
|
||||
Ads the new elements at the end of the queue.
|
||||
|
||||
|
||||
*/
|
||||
/** @pred list_jump_queue(+ _List_, + _OldQueue_, + _NewQueue_)
|
||||
|
||||
|
||||
Adds all the elements of _List_ at the front of the queue.
|
||||
|
||||
|
||||
*/
|
||||
/** @pred list_to_queue(+ _List_, - _Queue_)
|
||||
|
||||
|
||||
Creates a new queue with the same elements as _List._
|
||||
|
||||
|
||||
*/
|
||||
/** @pred queue_to_list(+ _Queue_, - _List_)
|
||||
|
||||
|
||||
Creates a new list with the same elements as _Queue_.
|
||||
|
||||
|
||||
|
||||
|
||||
*/
|
||||
/** @pred serve_queue(+ _OldQueue_, + _Head_, - _NewQueue_)
|
||||
|
||||
|
||||
Removes the first element of the queue for service.
|
||||
|
||||
|
||||
*/
|
||||
:- module(queues, [
|
||||
make_queue/1, % create empty queue
|
||||
join_queue/3, % add element to end of queue
|
||||
list_join_queue/3, % add many elements to end of queue
|
||||
jump_queue/3, % add element to front of queue
|
||||
list_jump_queue/3, % add many elements to front of queue
|
||||
head_queue/2, % look at first element of queue
|
||||
serve_queue/3, % remove first element of queue
|
||||
length_queue/2, % count elements of queue
|
||||
empty_queue/1, % test whether queue is empty
|
||||
list_to_queue/2, % convert list to queue
|
||||
queue_to_list/2 % convert queue to list
|
||||
]).
|
||||
|
||||
:- use_module(library(lists), [append/3]).
|
||||
|
||||
/*
|
||||
:- mode
|
||||
make_queue(-),
|
||||
join_queue(+, +, -),
|
||||
list_join_queue(+, +, -),
|
||||
jump_queue(+, +, -),
|
||||
list_jump_queue(+, +, -),
|
||||
head_queue(+, ?),
|
||||
serve_queue(+, ?, -),
|
||||
length_queue(+, ?),
|
||||
length_queue(+, +, +, -),
|
||||
empty_queue(+),
|
||||
list_to_queue(+, -),
|
||||
queue_to_list(+, -),
|
||||
queue_to_list(+, +, -).
|
||||
*/
|
||||
|
||||
/* In this package, a queue is represented as a term Front-Back, where
|
||||
Front is a list and Back is a tail of that list, and is normally a
|
||||
variable. join_queue will only work when the Back is a variable,
|
||||
the other routines will accept any tail. The elements of the queue
|
||||
are the list difference, that is, all the elements starting at Front
|
||||
and stopping at Back. Examples:
|
||||
|
||||
[a,b,c,d,e|Z]-Z has elements a,b,c,d,e
|
||||
[a,b,c,d,e]-[d,e] has elements a,b,c
|
||||
Z-Z has no elements
|
||||
[1,2,3]-[1,2,3] has no elements
|
||||
*/
|
||||
|
||||
% make_queue(Queue)
|
||||
% creates a new empty queue. It will also match empty queues, but
|
||||
% because Prolog doesn't do the occurs check, it will also match
|
||||
% other queues, creating circular lists. So this should ONLY be
|
||||
% used to make new queues.
|
||||
|
||||
make_queue(X-X).
|
||||
|
||||
|
||||
|
||||
% join_queue(Element, OldQueue, NewQueue)
|
||||
% adds the new element at the end of the queue. The old queue is
|
||||
% side-effected, so you *can't* do
|
||||
% join_queue(1, OldQ, NewQ1),
|
||||
% join_queue(2, OldQ, NewQ2).
|
||||
% There isn't any easy way of doing that, sensible though it might
|
||||
% be. You *can* do
|
||||
% join_queue(1, OldQ, MidQ),
|
||||
% join_queue(2, MidQ, NewQ).
|
||||
% See list_join_queue.
|
||||
|
||||
join_queue(Element, Front-[Element|Back], Front-Back).
|
||||
|
||||
|
||||
|
||||
% list_join_queue(List, OldQueue, NewQueue)
|
||||
% adds the new elements at the end of the queue. The elements are
|
||||
% added in the same order that they appear in the list, e.g.
|
||||
% list_join_queue([y,z], [a,b,c|M]-M, [a,b,c,y,z|N]-N).
|
||||
|
||||
list_join_queue(List, Front-OldBack, Front-NewBack) :-
|
||||
append(List, OldBack, NewBack).
|
||||
|
||||
|
||||
|
||||
% jump_queue(Element, OldQueue, NewQueue)
|
||||
% adds the new element at the front of the list. Unlike join_queue,
|
||||
% jump_queue(1, OldQ, NewQ1),
|
||||
% jump_queue(2, OldQ, NewQ2)
|
||||
% *does* work, though if you add things at the end of NewQ1 they
|
||||
% will also show up in NewQ2. Note that
|
||||
% jump_queue(1, OldQ, MidQ),
|
||||
% jump_queue(2, MidQ, NewQ)
|
||||
% makes NewQ start 2, 1, ...
|
||||
|
||||
jump_queue(Element, Front-Back, [Element|Front]-Back).
|
||||
|
||||
|
||||
|
||||
% list_jump_queue(List, OldQueue, NewQueue)
|
||||
% adds all the elements of List at the front of the queue. There are
|
||||
% two ways we might do this. We could add all the elements one at a
|
||||
% time, so that they would appear at the beginning of the queue in the
|
||||
% opposite order to the order they had in the list, or we could add
|
||||
% them in one lump, so that they have the same order in the queue as
|
||||
% in the list. As you can easily add the elements one at a time if
|
||||
% that is what you want, I have chosen the latter.
|
||||
|
||||
list_jump_queue(List, OldFront-Back, NewFront-Back) :-
|
||||
append(List, OldFront, NewFront).
|
||||
% reverse(List, OldFront, NewFront). % for the other definition
|
||||
|
||||
|
||||
|
||||
% head_queue(Queue, Head)
|
||||
% unifies Head with the first element of the queue. The tricky part
|
||||
% is that we might be at the end of a queue: Back-Back, with Back a
|
||||
% variable, and in that case this predicate should not succeed, as we
|
||||
% don't know what that element is or whether it exists yet.
|
||||
|
||||
head_queue(Front-Back, Head) :-
|
||||
Front \== Back, % the queue is not empty
|
||||
Front = [Head|_].
|
||||
|
||||
|
||||
|
||||
% serve_queue(OldQueue, Head, NewQueue)
|
||||
% removes the first element of the queue for service.
|
||||
|
||||
serve_queue(OldFront-Back, Head, NewFront-Back) :-
|
||||
OldFront \== Back,
|
||||
OldFront = [Head|NewFront].
|
||||
|
||||
|
||||
|
||||
% empty_queue(Queue)
|
||||
% tests whether the queue is empty. If the back of a queue were
|
||||
% guaranteed to be a variable, we could have
|
||||
% empty_queue(Front-Back) :- var(Front).
|
||||
% but I don't see why you shouldn't be able to treat difference
|
||||
% lists as queues if you want to.
|
||||
|
||||
empty_queue(Front-Back) :-
|
||||
Front == Back.
|
||||
|
||||
|
||||
|
||||
% length_queue(Queue, Length)
|
||||
% counts the number of elements currently in the queue. Note that
|
||||
% we have to be careful in checking for the end of the list, we
|
||||
% can't test for [] the way length(List) does.
|
||||
|
||||
length_queue(Front-Back, Length) :-
|
||||
length_queue(Front, Back, 0, N),
|
||||
Length = N.
|
||||
|
||||
length_queue(Front, Back, N, N) :-
|
||||
Front == Back, !.
|
||||
length_queue([_|Front], Back, K, N) :-
|
||||
L is K+1,
|
||||
length_queue(Front, Back, L, N).
|
||||
|
||||
|
||||
|
||||
% list_to_queue(List, Queue)
|
||||
% creates a new queue with the same elements as List.
|
||||
|
||||
list_to_queue(List, Front-Back) :-
|
||||
append(List, Back, Front).
|
||||
|
||||
|
||||
|
||||
% queue_to_list(Queue, List)
|
||||
% creates a new list with the same elements as Queue.
|
||||
|
||||
queue_to_list(Front-Back, List) :-
|
||||
queue_to_list(Front, Back, List).
|
||||
|
||||
queue_to_list(Front, Back, Ans) :-
|
||||
Front == Back, !, Ans = [].
|
||||
queue_to_list([Head|Front], Back, [Head|Tail]) :-
|
||||
queue_to_list(Front, Back, Tail).
|
||||
|
||||
124
samples/Python/closure_js_binary.bzl
Normal file
124
samples/Python/closure_js_binary.bzl
Normal file
@@ -0,0 +1,124 @@
|
||||
# Copyright 2015 The Bazel Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
"""Build definitions for JavaScript binaries compiled with the Closure Compiler.
|
||||
|
||||
A single file is produced with the _compiled.js suffix.
|
||||
|
||||
By default, the name of the entry point is assumed to be the same as that of the
|
||||
build target. This behaviour may be overridden with the "main" attribute.
|
||||
|
||||
The optimization level may be set with the "compilation_level" attribute.
|
||||
Supported values are: unobfuscated, simple, and advanced.
|
||||
|
||||
Example:
|
||||
|
||||
closure_js_binary(
|
||||
name = "hello",
|
||||
compilation_level = "simple",
|
||||
language_in = "ecmascript6",
|
||||
language_out = "ecmascript3",
|
||||
externs = ["//third_party/javascript/google_cast/cast.js"],
|
||||
deps = [
|
||||
"@closure_library//:closure_library",
|
||||
":hello_lib",
|
||||
],
|
||||
)
|
||||
|
||||
This rule will produce hello_combined.js.
|
||||
"""
|
||||
|
||||
_COMPILATION_LEVELS = {
|
||||
"whitespace_only": [
|
||||
"--compilation_level=WHITESPACE_ONLY",
|
||||
"--formatting=PRETTY_PRINT"
|
||||
],
|
||||
"simple": ["--compilation_level=SIMPLE"],
|
||||
"advanced": ["--compilation_level=ADVANCED"]
|
||||
}
|
||||
|
||||
_SUPPORTED_LANGUAGES = {
|
||||
"es3": ["ES3"],
|
||||
"ecmascript3": ["ECMASCRIPT3"],
|
||||
"es5": ["ES5"],
|
||||
"ecmascript5": ["ECMASCRIPT5"],
|
||||
"es5_strict": ["ES5_STRICT"],
|
||||
"ecmascript5_strict": ["ECMASCRIPT5_STRICT"],
|
||||
"es6": ["ES6"],
|
||||
"ecmascript6": ["ECMASCRIPT6"],
|
||||
"es6_strict": ["ES6_STRICT"],
|
||||
"ecmascript6_strict": ["ECMASCRIPT6_STRICT"],
|
||||
"es6_typed": ["ES6_TYPED"],
|
||||
"ecmascript6_typed": ["ECMASCRIPT6_TYPED"],
|
||||
}
|
||||
|
||||
def _impl(ctx):
|
||||
externs = set(order="compile")
|
||||
srcs = set(order="compile")
|
||||
for dep in ctx.attr.deps:
|
||||
externs += dep.transitive_js_externs
|
||||
srcs += dep.transitive_js_srcs
|
||||
|
||||
args = [
|
||||
"--entry_point=goog:%s" % ctx.attr.main,
|
||||
"--js_output_file=%s" % ctx.outputs.out.path,
|
||||
"--dependency_mode=LOOSE",
|
||||
"--warning_level=VERBOSE",
|
||||
] + (["--js=%s" % src.path for src in srcs] +
|
||||
["--externs=%s" % extern.path for extern in externs])
|
||||
|
||||
# Set the compilation level.
|
||||
if ctx.attr.compilation_level in _COMPILATION_LEVELS:
|
||||
args += _COMPILATION_LEVELS[ctx.attr.compilation_level]
|
||||
else:
|
||||
fail("Invalid compilation_level '%s', expected one of %s" %
|
||||
(ctx.attr.compilation_level, _COMPILATION_LEVELS.keys()))
|
||||
|
||||
# Set the language in.
|
||||
if ctx.attr.language_in in _SUPPORTED_LANGUAGES:
|
||||
args += "--language_in=" + _SUPPORTED_LANGUAGES[ctx.attr.language_in]
|
||||
else:
|
||||
fail("Invalid language_in '%s', expected one of %s" %
|
||||
(ctx.attr.language_in, _SUPPORTED_LANGUAGES.keys()))
|
||||
|
||||
# Set the language out.
|
||||
if ctx.attr.language_out in _SUPPORTED_LANGUAGES:
|
||||
args += "--language_out=" + _SUPPORTED_LANGUAGES[ctx.attr.language_out]
|
||||
else:
|
||||
fail("Invalid language_out '%s', expected one of %s" %
|
||||
(ctx.attr.language_out, _SUPPORTED_LANGUAGES.keys()))
|
||||
|
||||
ctx.action(
|
||||
inputs=list(srcs) + list(externs),
|
||||
outputs=[ctx.outputs.out],
|
||||
arguments=args,
|
||||
executable=ctx.executable._closure_compiler)
|
||||
|
||||
return struct(files=set([ctx.outputs.out]))
|
||||
|
||||
closure_js_binary = rule(
|
||||
implementation=_impl,
|
||||
attrs={
|
||||
"deps": attr.label_list(
|
||||
allow_files=False,
|
||||
providers=["transitive_js_externs", "transitive_js_srcs"]),
|
||||
"main": attr.string(default="%{name}"),
|
||||
"compilation_level": attr.string(default="advanced"),
|
||||
"language_in": attr.string(default="ecmascript6"),
|
||||
"language_out": attr.string(default="ecmascript3"),
|
||||
"_closure_compiler": attr.label(
|
||||
default=Label("//external:closure_compiler_"),
|
||||
executable=True),
|
||||
},
|
||||
outputs={"out": "%{name}_combined.js"})
|
||||
154
samples/Uno/PlayerPads.uno
Normal file
154
samples/Uno/PlayerPads.uno
Normal file
@@ -0,0 +1,154 @@
|
||||
using Uno;
|
||||
using Uno.Collections;
|
||||
using Uno.Graphics;
|
||||
using Uno.Scenes;
|
||||
using Uno.Designer;
|
||||
using Uno.Content;
|
||||
using Uno.Content.Models;
|
||||
using Uno.UI;
|
||||
|
||||
namespace PONG2D
|
||||
{
|
||||
public class PlayerPads : Node
|
||||
{
|
||||
|
||||
Image _player1Image;
|
||||
Image _player2Image;
|
||||
|
||||
[Inline]
|
||||
public Image Player1
|
||||
{
|
||||
get { return _player1Image; }
|
||||
set
|
||||
{
|
||||
if (_player1Image != value)
|
||||
{
|
||||
_player1Image = value;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Inline]
|
||||
public Image Player2
|
||||
{
|
||||
get { return _player2Image; }
|
||||
set
|
||||
{
|
||||
if (_player2Image != value)
|
||||
{
|
||||
_player2Image = value;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Hide]
|
||||
public float2 Player1Pos
|
||||
{
|
||||
get { return (Player1.ActualPosition); }
|
||||
set
|
||||
{
|
||||
if (Player1 != null)
|
||||
Player1.Position = value;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
[Hide]
|
||||
public float2 Player2Pos
|
||||
{
|
||||
get { return (Player2.ActualPosition); }
|
||||
set
|
||||
{
|
||||
if (Player2 != null)
|
||||
Player2.Position = value;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public Rect Player1Rect
|
||||
{
|
||||
get { return new Rect(Player1Pos, float2(Player1.Width, Player2.Height)); }
|
||||
set
|
||||
{
|
||||
Player1Pos = value.Position;
|
||||
if (Player1 != null)
|
||||
{
|
||||
Player1.Width = value.Size.X;
|
||||
Player1.Height = value.Size.Y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Rect Player2Rect
|
||||
{
|
||||
get { return new Rect(Player2Pos, float2(Player2.Width, Player2.Height)); }
|
||||
set
|
||||
{
|
||||
Player2Pos = value.Position;
|
||||
if (Player2 != null)
|
||||
{
|
||||
Player2.Width = value.Size.X;
|
||||
Player2.Height = value.Size.Y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Ball Ball
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public float PadVelocity { get; set; }
|
||||
|
||||
public PlayerPads()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void UpdatePositions()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void OnUpdate()
|
||||
{
|
||||
base.OnUpdate();
|
||||
|
||||
if (Input.IsKeyDown(Uno.Platform.Key.W))
|
||||
{
|
||||
Player1Pos = float2(0, Player1Pos.Y - PadVelocity);
|
||||
}
|
||||
|
||||
if (Input.IsKeyDown(Uno.Platform.Key.S))
|
||||
{
|
||||
Player1Pos = float2(0, Player1Pos.Y + PadVelocity);
|
||||
}
|
||||
|
||||
if (Input.IsKeyDown(Uno.Platform.Key.Up))
|
||||
{
|
||||
Player2Pos = float2(0, Player2Pos.Y - PadVelocity);
|
||||
}
|
||||
|
||||
if (Input.IsKeyDown(Uno.Platform.Key.Down))
|
||||
{
|
||||
Player2Pos = float2(0, Player2Pos.Y + PadVelocity);
|
||||
}
|
||||
|
||||
if (Ball != null)
|
||||
{
|
||||
|
||||
if (Ball.BallRectangle.Intersects(Player1Rect) ||
|
||||
Ball.BallRectangle.Intersects(Player2Rect))
|
||||
{
|
||||
|
||||
Ball.BallVelocity = float2(Ball.BallVelocity.X * -1f, Ball.BallVelocity.Y);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
139
samples/Uno/Pong.uno
Normal file
139
samples/Uno/Pong.uno
Normal file
@@ -0,0 +1,139 @@
|
||||
using Uno;
|
||||
using Uno.Collections;
|
||||
using Uno.Graphics;
|
||||
using Uno.Scenes;
|
||||
using Uno.Content;
|
||||
using Uno.Content.Models;
|
||||
|
||||
namespace PONG2D
|
||||
{
|
||||
public class Pong : Node
|
||||
{
|
||||
float2 _player1Pos;
|
||||
float2 _player2Pos;
|
||||
float2 ballPosition;
|
||||
float2 ballVelocity;
|
||||
float2 rectangleSize;
|
||||
|
||||
Rect player1Rect;
|
||||
Rect player2Rect;
|
||||
Rect ballRect;
|
||||
|
||||
float2 resolution = Context.VirtualResolution;
|
||||
|
||||
Random random = new Random(1);
|
||||
|
||||
|
||||
float2 Player1Pos
|
||||
{
|
||||
get { return _player1Pos; }
|
||||
set
|
||||
{
|
||||
_player1Pos = Math.Clamp(value, float2(0, 0), resolution - rectangleSize);
|
||||
}
|
||||
}
|
||||
|
||||
float2 Player2Pos
|
||||
{
|
||||
get { return _player2Pos; }
|
||||
set
|
||||
{
|
||||
_player2Pos = Math.Clamp(value, float2(0, 0), resolution - rectangleSize);
|
||||
}
|
||||
}
|
||||
|
||||
public Pong()
|
||||
{
|
||||
Uno.Scenes.Input.AddGlobalListener(this);
|
||||
}
|
||||
|
||||
protected override void OnInitialize()
|
||||
{
|
||||
base.OnInitialize();
|
||||
UpdateValues();
|
||||
|
||||
}
|
||||
|
||||
void UpdateValues()
|
||||
{
|
||||
rectangleSize = float2(resolution.X / 80f, resolution.Y / 5f);
|
||||
_player1Pos = float2(0f);
|
||||
_player2Pos = float2(Context.VirtualResolution.X - rectangleSize.X, 0f);
|
||||
|
||||
player1Rect = new Rect(_player1Pos, rectangleSize);
|
||||
player2Rect = new Rect(_player2Pos, rectangleSize);
|
||||
|
||||
ballPosition = float2(resolution.X * 0.5f - 10f, resolution.Y * 0.5f - 10f);
|
||||
ballRect = new Rect(ballPosition, float2(20f));
|
||||
|
||||
|
||||
SpwanBall();
|
||||
|
||||
}
|
||||
|
||||
void SpwanBall()
|
||||
{
|
||||
ballRect.Position = float2(resolution.X * 0.5f - 10f, resolution.Y * 0.5f - 10f);
|
||||
ballVelocity = float2(5f, 10f) * 0.5f;
|
||||
}
|
||||
|
||||
void OnWindowResize(object sender, EventArgs args)
|
||||
{
|
||||
//UpdateValues();
|
||||
}
|
||||
|
||||
protected override void OnUpdate()
|
||||
{
|
||||
base.OnUpdate();
|
||||
|
||||
var padVelocity = resolution.Y * (float)Application.Current.FrameInterval * 4f;
|
||||
if (Input.IsKeyDown(Uno.Platform.Key.Up))
|
||||
{
|
||||
Player1Pos = float2(Player1Pos.X, Player1Pos.Y - padVelocity);
|
||||
}
|
||||
|
||||
if (Input.IsKeyDown(Uno.Platform.Key.Down))
|
||||
{
|
||||
Player1Pos = float2(Player1Pos.X, Player1Pos.Y + padVelocity);
|
||||
}
|
||||
|
||||
if (Input.IsKeyDown(Uno.Platform.Key.W))
|
||||
{
|
||||
Player2Pos = float2(Player2Pos.X, Player2Pos.Y - padVelocity);
|
||||
}
|
||||
|
||||
if (Input.IsKeyDown(Uno.Platform.Key.S))
|
||||
{
|
||||
Player2Pos = float2(Player2Pos.X, Player2Pos.Y + padVelocity);
|
||||
}
|
||||
player1Rect.Position = Player1Pos;
|
||||
player2Rect.Position = Player2Pos;
|
||||
|
||||
if (ballRect.Position.X > resolution.X || ballRect.Position.X < 0)
|
||||
{
|
||||
SpwanBall();
|
||||
}
|
||||
if (ballRect.Position.Y > resolution.Y ||
|
||||
ballRect.Position.Y < 0)
|
||||
{
|
||||
ballVelocity.Y *= -1f;
|
||||
}
|
||||
|
||||
if (ballRect.Intersects(player1Rect) ||
|
||||
ballRect.Intersects(player2Rect))
|
||||
{
|
||||
ballVelocity.X *= -1f;
|
||||
}
|
||||
|
||||
ballRect.Position += ballVelocity;
|
||||
|
||||
}
|
||||
|
||||
protected override void OnDraw()
|
||||
{
|
||||
Uno.Drawing.RoundedRectangle.Draw(player1Rect.Position, player1Rect.Size, float4(1f), 0);
|
||||
Uno.Drawing.RoundedRectangle.Draw(player2Rect.Position, player2Rect.Size, float4(1f), 0);
|
||||
Uno.Drawing.RoundedRectangle.Draw(ballRect.Position, ballRect.Size, float4(1f), 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
136
samples/Uno/TowerBlock.uno
Normal file
136
samples/Uno/TowerBlock.uno
Normal file
@@ -0,0 +1,136 @@
|
||||
using Uno;
|
||||
using Uno.Collections;
|
||||
using Uno.Graphics;
|
||||
using Uno.Scenes;
|
||||
using Uno.Content;
|
||||
using Uno.Content.Models;
|
||||
using Uno.Physics.Box2D;
|
||||
|
||||
using TowerBuilder.Box2DMath;
|
||||
|
||||
namespace TowerBuilder
|
||||
{
|
||||
public class TowerBlock : TestBed
|
||||
{
|
||||
Body floorBody, deleteBody, mouseBody;
|
||||
|
||||
private List<Body> bodies = new List<Body>();
|
||||
private List<Body> bodiesToDelete = new List<Body>();
|
||||
|
||||
private ContactListener contactListener;
|
||||
|
||||
protected override void OnInitializeTestBed()
|
||||
{
|
||||
World.Gravity = float2(0, -25.0f);
|
||||
World.ContactListener = contactListener = new ContactListener(this);
|
||||
|
||||
bodies.Clear();
|
||||
bodiesToDelete.Clear();
|
||||
|
||||
CreateFloor();
|
||||
CreateDeleteBody();
|
||||
CreateBox2();
|
||||
}
|
||||
|
||||
void CreateFloor()
|
||||
{
|
||||
var bodyDef = new BodyDef();
|
||||
bodyDef.position = float2(0, -40.0f);
|
||||
|
||||
floorBody = World.CreateBody(bodyDef);
|
||||
|
||||
var shape = new PolygonShape();
|
||||
shape.SetAsBox(30.0f, 10.0f);
|
||||
|
||||
var fixtureDef = new FixtureDef();
|
||||
fixtureDef.shape = shape;
|
||||
fixtureDef.density = 1.0f;
|
||||
|
||||
floorBody.CreateFixture(fixtureDef);
|
||||
}
|
||||
|
||||
void CreateDeleteBody()
|
||||
{
|
||||
var bodyDef = new BodyDef();
|
||||
bodyDef.position = float2(0, -44.0f);
|
||||
|
||||
deleteBody = World.CreateBody(bodyDef);
|
||||
|
||||
var shape = new PolygonShape();
|
||||
shape.SetAsBox(200.0f, 10.0f);
|
||||
|
||||
var fixtureDef = new FixtureDef();
|
||||
fixtureDef.shape = shape;
|
||||
fixtureDef.density = 1.0f;
|
||||
|
||||
deleteBody.CreateFixture(fixtureDef);
|
||||
}
|
||||
|
||||
Random random = new Random((int) (Uno.Diagnostics.Clock.GetSeconds() * 1000000));
|
||||
void CreateBox2()
|
||||
{
|
||||
var bodyDef = new BodyDef();
|
||||
bodyDef.type = BodyType.Dynamic;
|
||||
bodyDef.position = float2(random.NextFloat(-25f, 25f), 50.0f);
|
||||
bodyDef.angularVelocity = random.NextFloat() * 40 - 20;
|
||||
bodyDef.userData = float3(0, 0, 0);
|
||||
|
||||
var body = World.CreateBody(bodyDef);
|
||||
|
||||
var shape = new PolygonShape();
|
||||
shape.SetAsBox(0.75f, 0.75f);
|
||||
|
||||
var fixtureDef = new FixtureDef();
|
||||
fixtureDef.shape = shape;
|
||||
fixtureDef.density = 5.0f;
|
||||
//fixtureDef.friction = 0.75f;
|
||||
|
||||
body.CreateFixture(fixtureDef);
|
||||
|
||||
bodies.Add(body);
|
||||
}
|
||||
|
||||
private int c = 0;
|
||||
protected override void OnFixedUpdate()
|
||||
{
|
||||
base.OnFixedUpdate();
|
||||
|
||||
debug_log bodies.Count;
|
||||
if(c++ % 8 == 0 && bodies.Count < 20) CreateBox2();
|
||||
|
||||
foreach(var body in bodiesToDelete)
|
||||
{
|
||||
World.DestroyBody(body);
|
||||
bodies.Remove(body);
|
||||
}
|
||||
|
||||
bodiesToDelete.Clear();
|
||||
}
|
||||
|
||||
public class ContactListener : IContactListener
|
||||
{
|
||||
private TowerBlock b;
|
||||
public ContactListener(TowerBlock b)
|
||||
{
|
||||
this.b = b;
|
||||
}
|
||||
|
||||
public void BeginContact(Contact contact)
|
||||
{
|
||||
if(contact.GetFixtureA().GetBody() == b.deleteBody)
|
||||
{
|
||||
b.bodiesToDelete.Add(contact.GetFixtureB().GetBody());
|
||||
}
|
||||
else if(contact.GetFixtureB().GetBody() == b.deleteBody)
|
||||
{
|
||||
b.bodiesToDelete.Add(contact.GetFixtureA().GetBody());
|
||||
}
|
||||
}
|
||||
|
||||
public void EndContact(Contact contact) {}
|
||||
public void PreSolve(Contact contact, ref Manifold manifold) {}
|
||||
public void PostSolve(Contact contact, ref ContactImpulse impulse) {}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
57
samples/XML/MainView.ux
Normal file
57
samples/XML/MainView.ux
Normal file
@@ -0,0 +1,57 @@
|
||||
<App Theme="Basic">
|
||||
<DockPanel>
|
||||
<TopFrameBackground Dock="Top" />
|
||||
<Panel>
|
||||
<Rectangle ux:Name="newLayoutMaster" Width="50" Height="50" Color="#8889" Alignment="TopLeft" Margin="20,50"/>
|
||||
<StackPanel Alignment="Top">
|
||||
<TextInput PlaceholderText="Click me to show the keyboard" Alignment="Center">
|
||||
<WhileKeyboardVisible>
|
||||
<Move Target="rect3" RelativeTo="Keyboard" Y="-1" Duration="0.5" />
|
||||
</WhileKeyboardVisible>
|
||||
</TextInput>
|
||||
<Button Text="Click me" Alignment="Center">
|
||||
<WhilePressed>
|
||||
<Move Target="rect1" RelativeTo="Size" Y="-1" Duration="0.5" />
|
||||
<Move Target="rect2" RelativeTo="ParentSize" Y="-1" Duration="0.5" />
|
||||
<Move Target="rect5" RelativeTo="Size" RelativeNode="relativeNode" Y="-1" Duration="0.5" />
|
||||
</WhilePressed>
|
||||
</Button>
|
||||
<Switch>
|
||||
<WhileTrue>
|
||||
<Change rect4.LayoutMaster="newLayoutMaster" />
|
||||
</WhileTrue>
|
||||
</Switch>
|
||||
</StackPanel>
|
||||
<Rectangle ux:Name="relativeNode" Height="400" Width="50" Color="#bbf" Alignment="BottomRight">
|
||||
<VerticalText Alignment="Center" Width="200">relativeNode</VerticalText>
|
||||
</Rectangle>
|
||||
|
||||
<Text ux:Class="VerticalText" TransformOrigin="Center" Alignment="Bottom" TextColor="#000">
|
||||
<Rotation Degrees="-90" />
|
||||
</Text>
|
||||
|
||||
<Grid ColumnCount="5" Rows="3*,1*" Color="#ddd" Width="80%" Height="100%" Alignment="BottomLeft">
|
||||
<VerticalText Width="200">RelativeTo="Size"</VerticalText>
|
||||
<VerticalText Width="200">RelativeTo="ParentSize"</VerticalText>
|
||||
<VerticalText Width="200">RelativeTo="Keyboard"</VerticalText>
|
||||
<VerticalText Width="200">RelativeTo="PositionChange"</VerticalText>
|
||||
<VerticalText Width="200">RelativeNode="relativeNode"</VerticalText>
|
||||
|
||||
|
||||
|
||||
<Rectangle ux:Name="rect1" Width="50" Height="50" Color="#f00" Alignment="Bottom"/>
|
||||
<Rectangle ux:Name="rect2" Width="50" Height="50" Color="#0f0" Alignment="Bottom"/>
|
||||
<Rectangle ux:Name="rect3" Width="50" Height="50" Color="#00f" Alignment="Bottom"/>
|
||||
<Panel Alignment="Bottom" Width="50" Height="50">
|
||||
<Rectangle ux:Name="rect4" Width="50" Height="50" Color="#0ff" LayoutMaster="layoutMaster">
|
||||
<LayoutAnimation>
|
||||
<Move RelativeTo="PositionChange" X="1" Y="1" Duration="0.5" />
|
||||
</LayoutAnimation>
|
||||
</Rectangle>
|
||||
<Rectangle ux:Name="layoutMaster" Width="50" Height="50"/>
|
||||
</Panel>
|
||||
<Rectangle ux:Name="rect5" Width="50" Height="50" Color="#f0f" Alignment="Bottom"/>
|
||||
</Grid>
|
||||
</Panel>
|
||||
</DockPanel>
|
||||
</App>
|
||||
11
samples/XML/MyApp.ux
Normal file
11
samples/XML/MyApp.ux
Normal file
@@ -0,0 +1,11 @@
|
||||
<App Theme="Basic">
|
||||
<EdgeNavigator HitTestMode="LocalBoundsAndChildren">
|
||||
<Panel Width="150" EdgeNavigation.Edge="Left" Background="#f63" />
|
||||
|
||||
<Panel>
|
||||
<Text Alignment="Center">
|
||||
This is an example of EdgeNavigator!
|
||||
</Text>
|
||||
</Panel>
|
||||
</EdgeNavigator>
|
||||
</App>
|
||||
@@ -152,7 +152,7 @@ class TestBlob < Minitest::Test
|
||||
end
|
||||
|
||||
def test_csv
|
||||
assert fixture_blob("Data/cars.csv").csv?
|
||||
assert sample_blob("CSV/cars.csv").csv?
|
||||
end
|
||||
|
||||
def test_pdf
|
||||
|
||||
2
vendor/grammars/Sublime-Inform/.gitignore
vendored
Normal file
2
vendor/grammars/Sublime-Inform/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
.DS_Store
|
||||
6
vendor/grammars/Sublime-Inform/Inform7/book.sublime-snippet
vendored
Normal file
6
vendor/grammars/Sublime-Inform/Inform7/book.sublime-snippet
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<snippet>
|
||||
<content><![CDATA[Book $1 - ${2:Title}
|
||||
]]></content>
|
||||
<tabTrigger>book</tabTrigger>
|
||||
<scope>source.Inform7</scope>
|
||||
</snippet>
|
||||
6
vendor/grammars/Sublime-Inform/Inform7/chapter.sublime-snippet
vendored
Normal file
6
vendor/grammars/Sublime-Inform/Inform7/chapter.sublime-snippet
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<snippet>
|
||||
<content><![CDATA[Chapter $1 - ${2:Title}
|
||||
]]></content>
|
||||
<tabTrigger>chapter</tabTrigger>
|
||||
<scope>source.Inform7</scope>
|
||||
</snippet>
|
||||
7
vendor/grammars/Sublime-Inform/Inform7/door.sublime-snippet
vendored
Normal file
7
vendor/grammars/Sublime-Inform/Inform7/door.sublime-snippet
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<snippet>
|
||||
<content><![CDATA[
|
||||
${1:DoorName} is a door. $1 is ${2:Direction} from ${3:Room}.
|
||||
]]></content>
|
||||
<tabTrigger>door</tabTrigger>
|
||||
<scope>source.Inform7</scope>
|
||||
</snippet>
|
||||
34
vendor/grammars/Sublime-Inform/Inform7/inform7.JSON-tmLanguage
vendored
Normal file
34
vendor/grammars/Sublime-Inform/Inform7/inform7.JSON-tmLanguage
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
{ "name": "Inform7",
|
||||
"scopeName": "source.Inform7",
|
||||
"fileTypes": ["i7x"],
|
||||
"patterns": [
|
||||
{ "name": "keyword.control.Inform7",
|
||||
"match": "\\b(Include|Release)\\b"
|
||||
},
|
||||
{ "name" : "comment.block.Inform7",
|
||||
"begin" : "\\[",
|
||||
"end" : "\\]",
|
||||
"comment" : "All comments in Inform7 are delimited this way."
|
||||
},
|
||||
{ "name" : "string.quoted.double.Inform7",
|
||||
"begin" : "\"",
|
||||
"end" : "\"",
|
||||
"patterns": [
|
||||
{ "name" : "keyword.operator.Inform7",
|
||||
"begin" : "\\[",
|
||||
"end" : "\\]",
|
||||
"comment" : "For logic inside of strings."
|
||||
}
|
||||
]
|
||||
},
|
||||
{ "name" : "storage.type.Inform7",
|
||||
"match" : "(Volume|Book|Chapter|Part|Section|Table)\\s+\\d?\\s+-?\\s+((?:\\w|\\s|-)*)",
|
||||
"comment": "Matches headings for major sections in Inform7"
|
||||
},
|
||||
{ "name": "constant.numeric.Inform7",
|
||||
"match": "([0-9])+",
|
||||
"comment":"Gotta call out the numbers!"
|
||||
}
|
||||
],
|
||||
"uuid": "0c4cbdee-beb7-4ea6-af56-27246d479373"
|
||||
}
|
||||
74
vendor/grammars/Sublime-Inform/Inform7/inform7.tmLanguage
vendored
Executable file
74
vendor/grammars/Sublime-Inform/Inform7/inform7.tmLanguage
vendored
Executable file
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>fileTypes</key>
|
||||
<array>
|
||||
<string>i7x</string>
|
||||
<string>inform</string>
|
||||
<string>ni</string>
|
||||
</array>
|
||||
<key>name</key>
|
||||
<string>Inform7</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(Include|Release)\b</string>
|
||||
<key>name</key>
|
||||
<string>keyword.control.Inform7</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>\[</string>
|
||||
<key>comment</key>
|
||||
<string>All comments in Inform7 are delimited this way.</string>
|
||||
<key>end</key>
|
||||
<string>\]</string>
|
||||
<key>name</key>
|
||||
<string>comment.block.Inform7</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>"</string>
|
||||
<key>end</key>
|
||||
<string>"</string>
|
||||
<key>name</key>
|
||||
<string>string.quoted.double.Inform7</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>\[</string>
|
||||
<key>comment</key>
|
||||
<string>For logic inside of strings.</string>
|
||||
<key>end</key>
|
||||
<string>\]</string>
|
||||
<key>name</key>
|
||||
<string>keyword.operator.Inform7</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>comment</key>
|
||||
<string>Matches headings for major sections in Inform7</string>
|
||||
<key>match</key>
|
||||
<string>(Volume|Book|Chapter|Part|Section|Table)\s+\d?\s+-?\s+((?:\w|\s|-)*)</string>
|
||||
<key>name</key>
|
||||
<string>storage.type.Inform7</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>comment</key>
|
||||
<string>Gotta call out the numbers!</string>
|
||||
<key>match</key>
|
||||
<string>([0-9])+</string>
|
||||
<key>name</key>
|
||||
<string>constant.numeric.Inform7</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>scopeName</key>
|
||||
<string>source.Inform7</string>
|
||||
<key>uuid</key>
|
||||
<string>0c4cbdee-beb7-4ea6-af56-27246d479373</string>
|
||||
</dict>
|
||||
</plist>
|
||||
8
vendor/grammars/Sublime-Inform/Inform7/object.sublime-snippet
vendored
Normal file
8
vendor/grammars/Sublime-Inform/Inform7/object.sublime-snippet
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<snippet>
|
||||
<content><![CDATA[
|
||||
$1 is a portable thing in ${2:Room} ${3:ShortDescription}
|
||||
The description of $1 is ${4:Description}
|
||||
]]></content>
|
||||
<tabTrigger>object</tabTrigger>
|
||||
<scope>source.Inform7</scope>
|
||||
</snippet>
|
||||
6
vendor/grammars/Sublime-Inform/Inform7/part.sublime-snippet
vendored
Normal file
6
vendor/grammars/Sublime-Inform/Inform7/part.sublime-snippet
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<snippet>
|
||||
<content><![CDATA[Part $1 - ${2:Title}
|
||||
]]></content>
|
||||
<tabTrigger>part</tabTrigger>
|
||||
<scope>source.Inform7</scope>
|
||||
</snippet>
|
||||
7
vendor/grammars/Sublime-Inform/Inform7/room.sublime-snippet
vendored
Normal file
7
vendor/grammars/Sublime-Inform/Inform7/room.sublime-snippet
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<snippet>
|
||||
<content><![CDATA[
|
||||
${1:RoomName} is a room in ${2:Region}. "${3:Description}"
|
||||
]]></content>
|
||||
<tabTrigger>room</tabTrigger>
|
||||
<scope>source.Inform7</scope>
|
||||
</snippet>
|
||||
11
vendor/grammars/Sublime-Inform/Inform7/scene.sublime-snippet
vendored
Normal file
11
vendor/grammars/Sublime-Inform/Inform7/scene.sublime-snippet
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<snippet>
|
||||
<content><![CDATA[
|
||||
${1:SceneName} is a Scene.
|
||||
$1 begins when $2 .
|
||||
$1 ends when $3 .
|
||||
When $1 begins: $4 .
|
||||
When $1 ends: $5 .
|
||||
]]></content>
|
||||
<tabTrigger>scene</tabTrigger>
|
||||
<scope>source.Inform7</scope>
|
||||
</snippet>
|
||||
6
vendor/grammars/Sublime-Inform/Inform7/section.sublime-snippet
vendored
Normal file
6
vendor/grammars/Sublime-Inform/Inform7/section.sublime-snippet
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<snippet>
|
||||
<content><![CDATA[Section $1 - ${2:Title}
|
||||
]]></content>
|
||||
<tabTrigger>section</tabTrigger>
|
||||
<scope>source.Inform7</scope>
|
||||
</snippet>
|
||||
6
vendor/grammars/Sublime-Inform/Inform7/volume.sublime-snippet
vendored
Normal file
6
vendor/grammars/Sublime-Inform/Inform7/volume.sublime-snippet
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<snippet>
|
||||
<content><![CDATA[Volume $1 - ${2:Title}
|
||||
]]></content>
|
||||
<tabTrigger>volume</tabTrigger>
|
||||
<scope>source.Inform7</scope>
|
||||
</snippet>
|
||||
21
vendor/grammars/Sublime-Inform/LICENSE.txt
vendored
Normal file
21
vendor/grammars/Sublime-Inform/LICENSE.txt
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Nate Dickson
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
8
vendor/grammars/Sublime-Inform/README.md
vendored
Normal file
8
vendor/grammars/Sublime-Inform/README.md
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
#Inform7 Package for Sublime Text 2
|
||||
This package has a lot of little files that make Inform7 easier to edit in Sublime Text 2. that's why it's called what it is, you see.
|
||||
##Usage
|
||||
Grab the zip file, unzip it, and put it in your ```Packages``` Directory.
|
||||
That's pretty much it. Open an ```i7x``` file in Sublime Text 2 and it'll be all highlighted and there's a bunch of snippets you can use and all that.
|
||||
|
||||
##Want to submit a pull request for this readme file?
|
||||
Please, please do.
|
||||
1
vendor/grammars/language-povray
vendored
Submodule
1
vendor/grammars/language-povray
vendored
Submodule
Submodule vendor/grammars/language-povray added at 35b3705991
47
vendor/grammars/less.tmbundle/Commands/Save to CSS.tmCommand
vendored
Normal file
47
vendor/grammars/less.tmbundle/Commands/Save to CSS.tmCommand
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>beforeRunningCommand</key>
|
||||
<string>saveActiveFile</string>
|
||||
<key>command</key>
|
||||
<string>#!/usr/bin/env ruby18
|
||||
|
||||
file = ENV["TM_FILEPATH"]
|
||||
target = file.sub(/\.less$/, ".css")
|
||||
system("lessc \"#{file}\" \"#{target}\"")
|
||||
puts "Compiled CSS to '#{target}'"</string>
|
||||
<key>input</key>
|
||||
<string>document</string>
|
||||
<key>inputFormat</key>
|
||||
<string>text</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>@b</string>
|
||||
<key>name</key>
|
||||
<string>Save to CSS</string>
|
||||
<key>outputCaret</key>
|
||||
<string>afterOutput</string>
|
||||
<key>outputFormat</key>
|
||||
<string>text</string>
|
||||
<key>outputLocation</key>
|
||||
<string>toolTip</string>
|
||||
<key>requiredCommands</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>command</key>
|
||||
<string>lessc</string>
|
||||
<key>locations</key>
|
||||
<array>
|
||||
<string>/opt/local/bin/lessc</string>
|
||||
<string>/usr/local/bin/lessc</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>scope</key>
|
||||
<string>source.css.less</string>
|
||||
<key>uuid</key>
|
||||
<string>78788223-5E5E-434E-98BE-17BCDF600611</string>
|
||||
<key>version</key>
|
||||
<integer>2</integer>
|
||||
</dict>
|
||||
</plist>
|
||||
47
vendor/grammars/less.tmbundle/Commands/Save to Minified CSS.tmCommand
vendored
Normal file
47
vendor/grammars/less.tmbundle/Commands/Save to Minified CSS.tmCommand
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>beforeRunningCommand</key>
|
||||
<string>saveActiveFile</string>
|
||||
<key>command</key>
|
||||
<string>#!/usr/bin/env ruby18
|
||||
|
||||
file = ENV["TM_FILEPATH"]
|
||||
target = file.sub(/\.less$/, ".css")
|
||||
system("lessc -x \"#{file}\" \"#{target}\"")
|
||||
puts "Compiled Minified CSS to '#{target}'"</string>
|
||||
<key>input</key>
|
||||
<string>document</string>
|
||||
<key>inputFormat</key>
|
||||
<string>text</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>~@b</string>
|
||||
<key>name</key>
|
||||
<string>Save to Minified CSS</string>
|
||||
<key>outputCaret</key>
|
||||
<string>afterOutput</string>
|
||||
<key>outputFormat</key>
|
||||
<string>text</string>
|
||||
<key>outputLocation</key>
|
||||
<string>toolTip</string>
|
||||
<key>requiredCommands</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>command</key>
|
||||
<string>lessc</string>
|
||||
<key>locations</key>
|
||||
<array>
|
||||
<string>/opt/local/bin/lessc</string>
|
||||
<string>/usr/local/bin/lessc</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>scope</key>
|
||||
<string>source.css.less</string>
|
||||
<key>uuid</key>
|
||||
<string>448D3A8D-260E-4949-BA33-654886ECDCAF</string>
|
||||
<key>version</key>
|
||||
<integer>2</integer>
|
||||
</dict>
|
||||
</plist>
|
||||
38
vendor/grammars/less.tmbundle/DragCommands/Insert inline Image.tmDragCommand
vendored
Normal file
38
vendor/grammars/less.tmbundle/DragCommands/Insert inline Image.tmDragCommand
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>beforeRunningCommand</key>
|
||||
<string>nop</string>
|
||||
<key>command</key>
|
||||
<string>#!/usr/bin/env php
|
||||
<?php
|
||||
$path = getenv('TM_DROPPED_FILE');
|
||||
$path_parts = pathinfo($path);
|
||||
$info = getimagesize($path);
|
||||
list($width, $height) = $info;
|
||||
$mime = $info['mime'];
|
||||
$contents = base64_encode(file_get_contents($path));
|
||||
|
||||
echo "@gfx-{$path_parts['filename']}: \"data:{$mime};base64,{$contents}\";\n";
|
||||
echo "@gfx-{$path_parts['filename']}-width: {$width}px;\n";
|
||||
echo "@gfx-{$path_parts['filename']}-height: {$height}px;";</string>
|
||||
<key>draggedFileExtensions</key>
|
||||
<array>
|
||||
<string>png</string>
|
||||
<string>jpeg</string>
|
||||
<string>jpg</string>
|
||||
<string>gif</string>
|
||||
</array>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>name</key>
|
||||
<string>Insert inline Image</string>
|
||||
<key>output</key>
|
||||
<string>insertAsSnippet</string>
|
||||
<key>scope</key>
|
||||
<string>source.css.less</string>
|
||||
<key>uuid</key>
|
||||
<string>7B0CA307-CC1C-4EE2-9F63-4825800ACDA7</string>
|
||||
</dict>
|
||||
</plist>
|
||||
36
vendor/grammars/less.tmbundle/Preferences/Comment.tmPreferences
vendored
Normal file
36
vendor/grammars/less.tmbundle/Preferences/Comment.tmPreferences
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Comments</string>
|
||||
<key>scope</key>
|
||||
<string>source.css.less</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>shellVariables</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>TM_COMMENT_START</string>
|
||||
<key>value</key>
|
||||
<string>// </string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>TM_COMMENT_START_2</string>
|
||||
<key>value</key>
|
||||
<string>/* </string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>TM_COMMENT_END_2</string>
|
||||
<key>value</key>
|
||||
<string> */</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<key>uuid</key>
|
||||
<string>D0CC551B-751D-4A7C-A738-2513E3C7F285</string>
|
||||
</dict>
|
||||
</plist>
|
||||
25
vendor/grammars/less.tmbundle/README.md
vendored
Normal file
25
vendor/grammars/less.tmbundle/README.md
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
# Installation
|
||||
|
||||
You can install this bundle in TextMate by opening the preferences and going to the bundles tab. After installation it will be automatically updated for you.
|
||||
|
||||
# License (MIT)
|
||||
|
||||
Copyright (c) 2010 Scott Kyle and Rasmus Andersson
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
434
vendor/grammars/less.tmbundle/Syntaxes/LESS.tmLanguage
vendored
Normal file
434
vendor/grammars/less.tmbundle/Syntaxes/LESS.tmLanguage
vendored
Normal file
@@ -0,0 +1,434 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>comment</key>
|
||||
<string>LeSS</string>
|
||||
<key>fileTypes</key>
|
||||
<array>
|
||||
<string>less</string>
|
||||
</array>
|
||||
<key>foldingStartMarker</key>
|
||||
<string>/\*\*(?!\*)|\{\s*($|/\*(?!.*?\*/.*\S))</string>
|
||||
<key>foldingStopMarker</key>
|
||||
<string>(?<!\*)\*\*/|^\s*\}</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^~L</string>
|
||||
<key>name</key>
|
||||
<string>LESS</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(a|abbr|acronym|address|applet|article|area|audio|video|b|base|big|blockquote|body|br|button|caption|canvas|center|cite|code|col|colgroup|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figure|figcaption|form|frame|frameset|(h[1-6])|head|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|map|mark|meta|menu|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|q|ruby|s|samp|script|select|small|span|strike|strong|style|sub|sup|summary|svg|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|ul|var|header|section|footer|aside|hgroup|time)\b</string>
|
||||
<key>name</key>
|
||||
<string>keyword.control.html.elements</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>"</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.begin.css</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>"</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.end.css</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>name</key>
|
||||
<string>string.quoted.double.css</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\\.</string>
|
||||
<key>name</key>
|
||||
<string>constant.character.escaped.css</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>'</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.begin.css</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>'</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.end.css</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>name</key>
|
||||
<string>string.quoted.single.css</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\\.</string>
|
||||
<key>name</key>
|
||||
<string>constant.character.escaped.css</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.other.attribute-name.class.css</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>(\.[a-zA-Z0-9_-]+)</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>url\(</string>
|
||||
<key>contentName</key>
|
||||
<string>variable.parameter.url</string>
|
||||
<key>end</key>
|
||||
<string>\)</string>
|
||||
<key>name</key>
|
||||
<string>support.function.any-method.builtin.css</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(#)([0-9a-fA-F]{3}|[0-9a-fA-F]{6})\b</string>
|
||||
<key>name</key>
|
||||
<string>constant.other.rgb-value.css</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.other.attribute-name.id</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>#[a-zA-Z0-9_:\(\)-]+</string>
|
||||
<key>name</key>
|
||||
<string>meta.selector.css</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>/\*</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.comment.begin.css</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>\*/</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.comment.end.css</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>name</key>
|
||||
<string>comment.block.css</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(-|\+)?\s*[0-9]+(\.[0-9]+)?</string>
|
||||
<key>name</key>
|
||||
<string>constant.numeric.css</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(?<=[\d])(px|pt|cm|mm|in|em|ex|pc)\b|%</string>
|
||||
<key>name</key>
|
||||
<string>keyword.other.unit.css</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.other.attribute-name.pseudo-element.css</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>(:+(after|before|not|last-child|nth-of-type|nth-child|first-child|first-letter|first-line|selection|root))</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.other.attribute-name.pseudo-class.css</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>(:+(active|hover|link|visited|focus))</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.entity.css</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.other.attribute-name.attribute.css</string>
|
||||
</dict>
|
||||
<key>3</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.separator.operator.css</string>
|
||||
</dict>
|
||||
<key>4</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>string.unquoted.attribute-value.css</string>
|
||||
</dict>
|
||||
<key>5</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>string.quoted.double.attribute-value.css</string>
|
||||
</dict>
|
||||
<key>6</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.begin.css</string>
|
||||
</dict>
|
||||
<key>7</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.end.css</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>(?i)(\[)\s*(-?[_a-z\\[[:^ascii:]]][_a-z0-9\-\\[[:^ascii:]]]*)(?:\s*([~|^$*]?=)\s*(?:(-?[_a-z\\[[:^ascii:]]][_a-z0-9\-\\[[:^ascii:]]]*)|((?>(['"])(?:[^\\]|\\.)*?(\6)))))?\s*(\])</string>
|
||||
<key>name</key>
|
||||
<string>meta.attribute-selector.css</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.control.at-rule.import.css</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.keyword.css</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>^\s*((@)import\b)</string>
|
||||
<key>name</key>
|
||||
<string>meta.at-rule.import.css</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>support.type.property-name.css.vendor</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>(-(?:webkit|moz|khtml|o|icab|ms)-(?:background-size|border-radius|box-shadow|opacity|border-image))\s*:</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>support.type.property-name.css</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>\b(azimuth|background-attachment|background-color|background-clip|background-image|background-position|background-repeat|background-size|background|behavior|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border-radius|border|box-shadow|bottom|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|filter|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|opacity|orphans|outline-color|outline-style|outline-width|outline|overflow(-[xy])?|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|position|pre-wrap|quotes|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|stress|table-layout|text-align|text-decoration|text-indent|text-shadow|text-transform|top|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|word-wrap|z-index|zoom)</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(absolute|all-scroll|always|auto|baseline|below|bidi-override|block|bold|bolder|both|bottom|break-all|break-word|capitalize|center|char|circle|col-resize|collapse|crosshair|dashed|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fixed|groove|hand|help|hidden|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|keep-all|left|lighter|line-edge|line-through|line|linear|list-item|loose|lower-alpha|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|super|sw-resize|table-footer-group|table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-roman|uppercase|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|padding-box)\b</string>
|
||||
<key>name</key>
|
||||
<string>support.constant.property-value.css</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(\b(?i:arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace)\b)</string>
|
||||
<key>name</key>
|
||||
<string>support.constant.font-name.css</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>comment</key>
|
||||
<string>http://www.w3.org/TR/CSS21/syndata.html#value-def-color</string>
|
||||
<key>match</key>
|
||||
<string>\b(aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)\b</string>
|
||||
<key>name</key>
|
||||
<string>support.constant.color.w3c-standard-color-name.css</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(saturate|desaturate|lighten|darken|grayscale)\b</string>
|
||||
<key>name</key>
|
||||
<string>support.function.any-method.builtin.less</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(rgb|rgba|hsl|hsla|url)\b</string>
|
||||
<key>name</key>
|
||||
<string>support.function.any-method.builtin.css</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>support.function.any-method.vendor.css</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>(-(?:webkit|moz|khtml|o|icab)-(?:gradient|linear-gradient))</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(color-stop|from|to)\b</string>
|
||||
<key>name</key>
|
||||
<string>support.function.any-method.webkit.gradient.css</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>support.function.less</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>(\.[a-zA-Z0-9_-]+)\s*(;|\()</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>(^[ \t]+)?(?=//)</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.whitespace.comment.leading.less</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>(?!\G)</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>//</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.comment.less</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>\n</string>
|
||||
<key>name</key>
|
||||
<string>comment.line.double-slash.less</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>@[a-zA-Z0-9_-][\w-]*</string>
|
||||
<key>name</key>
|
||||
<string>variable.other.less</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\$|%|&|\*|\-\-|\-|\+\+|\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|(?<!\()/=|%=|\+=|\-=|&=|\^=|\/\b</string>
|
||||
<key>name</key>
|
||||
<string>keyword.operator.less</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.section.property-list.begin.css</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.section.property-list.end.css</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>comment</key>
|
||||
<string>Match empty braces to give proper ↩ action</string>
|
||||
<key>match</key>
|
||||
<string>(\{)(\})</string>
|
||||
<key>name</key>
|
||||
<string>meta.brace.curly.less</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\{|\}</string>
|
||||
<key>name</key>
|
||||
<string>meta.brace.curly.less</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\(|\)</string>
|
||||
<key>name</key>
|
||||
<string>meta.brace.round.less</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\[|\]</string>
|
||||
<key>name</key>
|
||||
<string>meta.brace.square.less</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>scopeName</key>
|
||||
<string>source.css.less</string>
|
||||
<key>uuid</key>
|
||||
<string>9343D324-75A1-4733-A5C0-5D1D4B6182D0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
26
vendor/grammars/less.tmbundle/info.plist
vendored
Normal file
26
vendor/grammars/less.tmbundle/info.plist
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>contactEmailRot13</key>
|
||||
<string>zfurrgf@juvgrsnyyf.bet</string>
|
||||
<key>contactName</key>
|
||||
<string>Michael Sheets</string>
|
||||
<key>description</key>
|
||||
<string>Extends CSS with dynamic behavior such as variables, mixins, operations and functions.</string>
|
||||
<key>mainMenu</key>
|
||||
<dict>
|
||||
<key>items</key>
|
||||
<array>
|
||||
<string>78788223-5E5E-434E-98BE-17BCDF600611</string>
|
||||
<string>448D3A8D-260E-4949-BA33-654886ECDCAF</string>
|
||||
</array>
|
||||
<key>submenus</key>
|
||||
<dict/>
|
||||
</dict>
|
||||
<key>name</key>
|
||||
<string>LESS</string>
|
||||
<key>uuid</key>
|
||||
<string>D1D51EE5-E89F-4B14-8AE4-FC364E540B47</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Reference in New Issue
Block a user