コード例 #1
0
ファイル: MainWindow.xaml.cs プロジェクト: dom767/woofractal
        public void InitialiseScript()
        {
            _BackgroundScript = new WooScript();
            _SceneScript = new WooScript();
            _LightingScript = new WooScript();
            _BackgroundScript.Load("background", "scratch");
            _SceneScript.Load("scene", "scratch");
            _LightingScript.Load("lighting", "scratch");
            _BackgroundScript._Program = "rule main {\r\npos.y -= 0\r\ndiff = vec(1.0, 1.0, 1.0)\r\nrefl = vec(0.4, 0.4, 0.4)\r\ngloss = 0.97\r\nscale = vec(460, 460, 460)\r\npos.y-=1\r\ncylinder\r\n}";
            _SceneScript._Program = "rule main {box}";
            _LightingScript._Program = "rule main {directionalLight(vec(1.0, 1.0, 1.0), vec(-0.7, 1.0, -0.6), 0.02, 1) \r\n background(vec(0.8,0.8,0.8))}";
            LoadFractal("scratch");
//            backgroundDesc.Text = _BackgroundScript._Program;
//            sceneDesc.Text = _SceneScript._Program;
//            lightingDesc.Text = _LightingScript._Program;
        }