public DefaultTheme() { WindowBackColor = MaterialColors.Black; WindowForeColor = MaterialColors.White; WindowBorderColor = MaterialColors.White; ControlBackColor = MaterialColors.Black; ControlForeColor = MaterialColors.White; ButtonBackColor = MaterialColors.Grey(ColorDepth.C900); ButtonForeColor = MaterialColors.White; ButtonBorderSize = 1; ButtonBorderColor = MaterialColors.Grey(ColorDepth.C400); ButtonDownBackColor = MaterialColors.Grey(); ButtonOverBackColor = MaterialColors.Grey(ColorDepth.C600); ConfirmButtonColor = MaterialColors.Green(ColorDepth.C600); ConfirmButtonDownBackColor = MaterialColors.Green(ColorDepth.C300); ConfirmButtonOverBackColor = MaterialColors.Green(ColorDepth.C400); CancelButtonColor = MaterialColors.Red(); CancelButtonDownBackColor = MaterialColors.Red(ColorDepth.A700); CancelButtonOverBackColor = MaterialColors.Red(ColorDepth.C400); ToolBarBackground = MaterialColors.Grey(ColorDepth.C800); InfoBackColor = MaterialColors.Green(); WarningBackColor = MaterialColors.Amber(); ErrorBackColor = MaterialColors.Red(); }
void Awake() { if (info == null) { DontDestroyOnLoad(this.gameObject); info = this; } else if (info != this) { Destroy(this.gameObject); return; } SceneManager.sceneLoaded += OnSceneLoad; //TODO: Use playerinfo for money instead of Values dataPath = Application.persistentDataPath + "/gameData.dat"; //File.Delete(dataPath); LoadData(); mainPalette = ChooseMainColorPalette(accentPalette); mainColors = MaterialColors.GetColorPalette(mainPalette); accentColors = MaterialColors.GetColorPalette(accentPalette); PlayerController activeShape = allPlayerShapes[activePlayerShapeIndex]; basicSpeed = activeShape.speed; basicDodgeSpeed = activeShape.dodgeSpeed; basicSpeedUpCoefficient = activeShape.speedUpCoefficient; basicHitPointsMax = activeShape.hitPointsMaximum; basicStartHitPoints = activeShape.hitPoints; }
public static void UpdateTextColor(IMaterialTextField textField, IMaterialEntryRenderer element) { var uIColor = MaterialColors.GetEntryTextColor(element.TextColor); textField.ContainerScheme.ColorScheme.OnSurfaceColor = uIColor; textField.ContainerScheme.ColorScheme.PrimaryColor = uIColor; }
public static void ApplyTheme(IMaterialTextField textField, IMaterialEntryRenderer element) { if (element == null) { return; } if (textField.ActiveTextInputController == null) { return; } textField.ContainerScheme.ColorScheme = (SemanticColorScheme)CreateColorScheme(); ApplyContainerTheme(textField); var textColor = MaterialColors.GetEntryTextColor(element.TextColor); var placeHolderColors = MaterialColors.GetPlaceHolderColor(element.PlaceholderColor, element.TextColor); var underlineColors = MaterialColors.GetUnderlineColor(element.PlaceholderColor); textField.TextInput.TextColor = textColor; textField.ActiveTextInputController.InlinePlaceholderColor = placeHolderColors.InlineColor; textField.ActiveTextInputController.FloatingPlaceholderNormalColor = placeHolderColors.InlineColor; textField.ActiveTextInputController.FloatingPlaceholderActiveColor = placeHolderColors.FloatingColor; // BackgroundColor textField.ActiveTextInputController.BorderFillColor = MaterialColors.CreateEntryFilledInputBackgroundColor(element.BackgroundColor, element.TextColor); textField.ActiveTextInputController.ActiveColor = underlineColors.FocusedColor; textField.ActiveTextInputController.NormalColor = underlineColors.UnFocusedColor; }
protected override void UpdateBackgroundColor() { if (_disposed || _textInputLayout == null) { return; } _textInputLayout.BoxBackgroundColor = MaterialColors.CreateEntryFilledInputBackgroundColor(Element.BackgroundColor, Element.TextColor); }
protected override void UpdateTintColor() { if (Element.Color != Color.Default) { base.UpdateTintColor(); return; } Control.CheckBoxTintColor = MaterialColors.GetCheckBoxColor(Control.IsChecked, Element.IsEnabled).ToColor(); }
public void OnSceneLoad(Scene scene, LoadSceneMode sceneMode) { SaveData(); if (wasAcPaletteChanged) { accentColors = MaterialColors.GetColorPalette(accentPalette); wasAcPaletteChanged = false; } mainPalette = ChooseMainColorPalette(accentPalette); mainColors = MaterialColors.GetColorPalette(mainPalette); }
public virtual void ApplyBackgroundColor(Color backgroundColor, Color textColor) { if (!this.IsAlive() || !this.EditText.IsAlive()) { return; } var bgColor = (int)MaterialColors.CreateEntryFilledInputBackgroundColor(backgroundColor, textColor); this.SetBoxBackgroundColorStateList(new ColorStateList(s_colorStates, new[] { bgColor, bgColor })); }
public DefaultTheme() { WindowBackColor = MaterialColors.Black; WindowForeColor = MaterialColors.White; WindowBorderColor = MaterialColors.White; ControlBackColor = MaterialColors.Black; ControlForeColor = MaterialColors.White; ButtonBackColor = MaterialColors.Grey(ColorDepth.C900); ButtonForeColor = MaterialColors.White; SelectedButtonBackColor = MaterialColors.Grey(); SelectedButtonForeColor = ButtonForeColor; ButtonBorderSize = 1; ButtonBorderColor = MaterialColors.Grey(ColorDepth.C400); ButtonDownBackColor = MaterialColors.Grey(); ButtonOverBackColor = MaterialColors.Grey(ColorDepth.C600); ConfirmButtonColor = MaterialColors.Green(ColorDepth.C600); ConfirmButtonDownBackColor = MaterialColors.Green(ColorDepth.C300); ConfirmButtonOverBackColor = MaterialColors.Green(ColorDepth.C400); CancelButtonColor = MaterialColors.Red(); CancelButtonDownBackColor = MaterialColors.Red(ColorDepth.A700); CancelButtonOverBackColor = MaterialColors.Red(ColorDepth.C400); ToolBarBackground = MaterialColors.Grey(ColorDepth.C800); InfoBackColor = MaterialColors.Green(); WarningBackColor = MaterialColors.Amber(); ErrorBackColor = MaterialColors.Red(); FreeTableColor = MaterialColors.Green(); OpenedTableColor = MaterialColors.Amber(); OcupiedTableColor = MaterialColors.Red(); StornoOrderItemBackColor = MaterialColors.Red(ColorDepth.C200); FormTransparentBackColor = MaterialColors.Grey(ColorDepth.C200); LoadingColors = new[] { MaterialColors.Red(), MaterialColors.Amber(), MaterialColors.Green(), MaterialColors.Pink(), MaterialColors.Purple(), MaterialColors.DeepOrange(), MaterialColors.Blue(), MaterialColors.Amber() }; }
public static void ApplyTheme(IMaterialTextField textField, IMaterialEntryRenderer element) { if (element == null) { return; } if (textField.ActiveTextInputController == null) { return; } textField.ContainerScheme.ColorScheme = (SemanticColorScheme)CreateColorScheme(); ApplyContainerTheme(textField); var adjustedTextColor = AdjustTextColor(element); var textColor = MaterialColors.GetEntryTextColor(adjustedTextColor); var placeHolderColors = MaterialColors.GetPlaceHolderColor(element.PlaceholderColor, adjustedTextColor); var underlineColors = MaterialColors.GetUnderlineColor(element.PlaceholderColor); textField.TextInput.TextColor = textColor; var inputController = textField.ActiveTextInputController; inputController.InlinePlaceholderColor = placeHolderColors.InlineColor; inputController.FloatingPlaceholderNormalColor = placeHolderColors.InlineColor; inputController.FloatingPlaceholderActiveColor = placeHolderColors.FloatingColor; inputController.DisabledColor = placeHolderColors.InlineColor; var brush = element.Background; if (Brush.IsNullOrEmpty(brush)) { // BackgroundColor textField.ActiveTextInputController.BorderFillColor = MaterialColors.CreateEntryFilledInputBackgroundColor(element.BackgroundColor, adjustedTextColor); } else { // Background if (textField is UITextField || textField is MultilineTextField) { var backgroundImage = ((UIView)textField).GetBackgroundImage(brush); textField.BackgroundSize = backgroundImage?.Size; var color = backgroundImage != null?UIColor.FromPatternImage(backgroundImage) : UIColor.Clear; textField.ActiveTextInputController.BorderFillColor = color; } } textField.ActiveTextInputController.ActiveColor = underlineColors.FocusedColor; textField.ActiveTextInputController.NormalColor = underlineColors.UnFocusedColor; }
public App() { InitializeComponent(); MaterialColors.Initialize(MaterialColors.Blue, MaterialColors.LightBlue); var x = MaterialColors.Grey.Primary300; Secrets = ReadSecrets(); //Client = new RestClient("http://192.168.1.75:8000/"); Client = new RestClient("http://brock.in:4120/"); Bootstrap.Run(this); }
protected override ColorStateList GetColorStateList() { if (Element.Color != Color.Default) { return(base.GetColorStateList()); } int[] checkBoxColorsList = new int[4]; checkBoxColorsList[0] = MaterialColors.GetCheckBoxColor(true, true); checkBoxColorsList[1] = MaterialColors.GetCheckBoxColor(false, true); checkBoxColorsList[2] = MaterialColors.GetCheckBoxColor(true, false); checkBoxColorsList[3] = MaterialColors.GetCheckBoxColor(false, false); return(new ColorStateList(_checkedStates, checkBoxColorsList)); }
void ResetTextColors(Color formsTextColor, Color formsPlaceHolderColor) { _formsPlaceholderColor = formsPlaceHolderColor; _formsTextColor = formsTextColor; var underlineColors = MaterialColors.GetUnderlineColor(_formsPlaceholderColor); var placeHolderColors = MaterialColors.GetPlaceHolderColor(_formsPlaceholderColor, _formsTextColor); _placeholderColorsList = MaterialColors.CreateEntryFilledPlaceholderColors(placeHolderColors.InlineColor, placeHolderColors.FloatingColor); _placeholderDefaultColorList = MaterialColors.CreateEntryFilledPlaceholderColors(placeHolderColors.InlineColor, placeHolderColors.DefaultColor); _underlineColorsList = MaterialColors.CreateEntryUnderlineColors(underlineColors.FocusedColor, underlineColors.UnFocusedColor); var textColor = MaterialColors.GetEntryTextColor(formsTextColor).ToArgb(); EditText.SetTextColor(new ColorStateList(s_colorStates, new[] { textColor, textColor })); }
private SpButton CreateProductButton(Product arg) { var button = new SpButton { Text = arg.Name, Tag = arg, Size = menuButtonSize, Font = new Font(Font.FontFamily, 10f) }; button.ApplyTheme(Theme); button.BackColor = MaterialColors.BlueGray(); button.Click += ProductMenuClick; return(button); }
void ResetTextColors(Color formsTextColor, Color formsPlaceHolderColor) { _formsPlaceholderColor = formsPlaceHolderColor; _formsTextColor = formsTextColor; var underlineColors = MaterialColors.GetUnderlineColor(_formsTextColor); var placeHolderColors = MaterialColors.GetPlaceHolderColor(_formsPlaceholderColor, _formsTextColor); // I realize these are the same but I have to set it to a difference instance // otherwise when focused it won't change to the color I want it to and it'll just think // I'm not actually changing anything _unfocusedUnderlineColorsList = MaterialColors.CreateEntryUnderlineColors(underlineColors.FocusedColor, underlineColors.UnFocusedColor); _focusedUnderlineColorsList = MaterialColors.CreateEntryUnderlineColors(underlineColors.FocusedColor, underlineColors.UnFocusedColor); _focusedFilledColorList = MaterialColors.CreateEntryFilledPlaceholderColors(placeHolderColors.FloatingColor, placeHolderColors.FloatingColor); _unfocusedEmptyColorList = MaterialColors.CreateEntryFilledPlaceholderColors(placeHolderColors.InlineColor, placeHolderColors.FloatingColor); var textColor = MaterialColors.GetEntryTextColor(formsTextColor).ToArgb(); EditText.SetTextColor(new ColorStateList(s_colorStates, new[] { textColor, textColor })); }
private void Update() { if (undo) { undo = false; var editManager = GetComponent <VoxelEditManagerContainer>().Instance; if (editManager != null) { editManager.Undo(); } } if (redo) { redo = false; var editManager = GetComponent <VoxelEditManagerContainer>().Instance; if (editManager != null) { editManager.Redo(); } } if (!lockSelection) { Camera camera = Camera.current; if (camera != null) { Vector3 relPos = camera.transform.position - transform.position; Vector3 relDir = Quaternion.Inverse(transform.rotation) * camera.transform.forward.normalized; //if (field.RayCast(relPos, relDir, 16, out TestVoxelField.RayCastResult result)) if (gameObject.GetComponent <VoxelWorldContainer>().Instance.RayCast(relPos, relDir, 64, out VoxelWorld <MortonIndexer> .RayCastResult result)) { selectedCell = new Vector3Int(Mathf.FloorToInt(result.pos.x), Mathf.FloorToInt(result.pos.y), Mathf.FloorToInt(result.pos.z)); } else { selectedCell = null; } if (selectedCell != null) { lockedSelection = selectedCell.Value; } else { lockedSelection = Vector3Int.zero; } } else { selectedCell = null; } } else { selectedCell = lockedSelection; } if (selectedCell != null && prevSelectedCell != selectedCell) { //field.FillCell(selectedCell.Value.x, selectedCell.Value.y, selectedCell.Value.z, 0, gizmoCellMaterials, gizmoCellIntersections, gizmoCellNormals); var sculpture = gameObject.GetComponent <VoxelWorldContainer>().Instance; VoxelChunk <MortonIndexer> chunk = sculpture.GetChunk(ChunkPos.FromVoxel(selectedCell.Value, sculpture.ChunkSize)); if (chunk != null) { chunk.FillCell( ((selectedCell.Value.x % sculpture.ChunkSize) + sculpture.ChunkSize) % sculpture.ChunkSize, ((selectedCell.Value.y % sculpture.ChunkSize) + sculpture.ChunkSize) % sculpture.ChunkSize, ((selectedCell.Value.z % sculpture.ChunkSize) + sculpture.ChunkSize) % sculpture.ChunkSize, 0, gizmoCellMaterials, gizmoCellIntersections, gizmoCellNormals); gizmoCell = new RawArrayVoxelCell(0, (Vector3)selectedCell.Value, gizmoCellMaterials, gizmoCellIntersections, gizmoCellNormals); NativeMemoryCache memoryCache = new NativeMemoryCache(Allocator.Persistent); var polygonizer = new CMSVoxelPolygonizer <RawArrayVoxelCell, CMSStandardProperties, SvdQefSolver <RawArrayVoxelCell>, IntersectionSharpFeatureSolver <RawArrayVoxelCell> >(new CMSStandardProperties(), new SvdQefSolver <RawArrayVoxelCell>(), new IntersectionSharpFeatureSolver <RawArrayVoxelCell>(), memoryCache); var components = new NativeList <VoxelMeshComponent>(Allocator.Persistent); var componentIndices = new NativeList <PackedIndex>(Allocator.Persistent); var componentVertices = new NativeList <VoxelMeshComponentVertex>(Allocator.Persistent); polygonizer.Polygonize(gizmoCell, components, componentIndices, componentVertices); gizmoComponents = new List <VoxelMeshComponent>(components.Length); for (int i = 0; i < components.Length; i++) { gizmoComponents.Add(components[i]); } gizmoComponentIndices = new List <PackedIndex>(componentIndices.Length); for (int i = 0; i < componentIndices.Length; i++) { gizmoComponentIndices.Add(componentIndices[i]); } gizmoComponentVertices = new List <VoxelMeshComponentVertex>(componentVertices.Length); for (int i = 0; i < componentVertices.Length; i++) { gizmoComponentVertices.Add(componentVertices[i]); } memoryCache.Dispose(); components.Dispose(); componentIndices.Dispose(); componentVertices.Dispose(); gizmoPosition = selectedCell.Value; gizmoTransform = Matrix4x4.TRS(transform.position, transform.rotation, transform.lossyScale); } } prevSelectedCell = selectedCell; float brushSize = 2.1f + 8; if (placeSdf) { placeSdf = false; regenerate = true; var editManager = GetComponent <VoxelEditManagerContainer>().Instance; switch (brushType) { case BrushType.Sphere: gameObject.GetComponent <VoxelWorldContainer>().Instance.ApplySdf(new Vector3(gizmoPosition.x, gizmoPosition.y, gizmoPosition.z), Quaternion.Euler(sdfRotation), new SphereSDF(brushSize), MaterialColors.ToInteger(materialRed, materialGreen, materialBlue, materialTexture), replaceSdfMaterial, editManager.Consumer()); break; case BrushType.Box: gameObject.GetComponent <VoxelWorldContainer>().Instance.ApplySdf(new Vector3(gizmoPosition.x, gizmoPosition.y, gizmoPosition.z), Quaternion.Euler(sdfRotation), new BoxSDF(brushSize), MaterialColors.ToInteger(materialRed, materialGreen, materialBlue, materialTexture), replaceSdfMaterial, editManager.Consumer()); break; case BrushType.Cylinder: gameObject.GetComponent <VoxelWorldContainer>().Instance.ApplySdf(new Vector3(gizmoPosition.x, gizmoPosition.y, gizmoPosition.z), Quaternion.Euler(sdfRotation), new CylinderSDF(brushSize, brushSize), MaterialColors.ToInteger(materialRed, materialGreen, materialBlue, materialTexture), replaceSdfMaterial, editManager.Consumer()); break; case BrushType.Pyramid: gameObject.GetComponent <VoxelWorldContainer>().Instance.ApplySdf(new Vector3(gizmoPosition.x, gizmoPosition.y - brushSize / 2, gizmoPosition.z), Quaternion.Euler(sdfRotation), new PyramidSDF(brushSize * 2, brushSize * 2), MaterialColors.ToInteger(materialRed, materialGreen, materialBlue, materialTexture), replaceSdfMaterial, editManager.Consumer()); break; case BrushType.Mesh: var mesh = voxelizeMesh.mesh; var triangles = mesh.triangles; var vertices = mesh.vertices; var normals = mesh.normals; var inVertices = new NativeArray <float3>(triangles.Length, Allocator.TempJob); var inNormals = new NativeArray <float3>(triangles.Length, Allocator.TempJob); for (int l = triangles.Length, i = 0; i < l; i += 3) { inVertices[i] = vertices[triangles[i]]; inVertices[i + 1] = vertices[triangles[i + 1]]; inVertices[i + 2] = vertices[triangles[i + 2]]; inNormals[i] = normals[triangles[i]]; inNormals[i + 1] = normals[triangles[i + 1]]; inNormals[i + 2] = normals[triangles[i + 2]]; } int voxelizerSize = 64; var outVoxels = new NativeArray3D <Voxel.Voxel, MortonIndexer>(new MortonIndexer(voxelizerSize, voxelizerSize, voxelizerSize), voxelizerSize, voxelizerSize, voxelizerSize, Allocator.TempJob); var voxelizationProperties = smoothVoxelizerNormals ? Voxelizer.VoxelizationProperties.SMOOTH : Voxelizer.VoxelizationProperties.FLAT; var watch = new System.Diagnostics.Stopwatch(); watch.Start(); using (var job = Voxelizer.Voxelize(inVertices, inNormals, outVoxels, MaterialColors.ToInteger(materialRed, materialGreen, materialBlue, materialTexture), voxelizationProperties)) { job.Handle.Complete(); } watch.Stop(); Debug.Log("Voxelized mesh: " + watch.ElapsedMilliseconds + "ms"); watch.Reset(); watch.Start(); //TODO Make voxelizer also undoable? gameObject.GetComponent <VoxelWorldContainer>().Instance.ApplyGrid((int)gizmoPosition.x, (int)gizmoPosition.y, (int)gizmoPosition.z, outVoxels, true, false, null); watch.Stop(); Debug.Log("Applied to grid: " + watch.ElapsedMilliseconds + "ms"); inVertices.Dispose(); inNormals.Dispose(); outVoxels.Dispose(); break; case BrushType.Custom: using (var sdf = customBrush.Instance.CreateSdf(Allocator.TempJob)) { gameObject.GetComponent <VoxelWorldContainer>().Instance.ApplySdf(new Vector3(gizmoPosition.x, gizmoPosition.y, gizmoPosition.z), Quaternion.Euler(sdfRotation), sdf, MaterialColors.ToInteger(materialRed, materialGreen, materialBlue, materialTexture), replaceSdfMaterial, editManager.Consumer()); } break; } } if (gizmoPosition != null) { switch (brushType) { case BrushType.Sphere: gameObject.GetComponent <SdfShapeRenderHandler>().Render(new Vector3(gizmoPosition.x, gizmoPosition.y, gizmoPosition.z), Quaternion.Euler(sdfRotation), new SphereSDF(brushSize)); break; case BrushType.Box: gameObject.GetComponent <SdfShapeRenderHandler>().Render(new Vector3(gizmoPosition.x, gizmoPosition.y, gizmoPosition.z), Quaternion.Euler(sdfRotation), new BoxSDF(brushSize)); break; case BrushType.Cylinder: gameObject.GetComponent <SdfShapeRenderHandler>().Render(new Vector3(gizmoPosition.x, gizmoPosition.y, gizmoPosition.z), Quaternion.Euler(sdfRotation), new CylinderSDF(brushSize, brushSize)); break; case BrushType.Pyramid: gameObject.GetComponent <SdfShapeRenderHandler>().Render(new Vector3(gizmoPosition.x, gizmoPosition.y - brushSize / 2, gizmoPosition.z), Quaternion.Euler(sdfRotation), new PyramidSDF(brushSize * 2, brushSize * 2)); break; case BrushType.Custom: Matrix4x4 brushTransform = Matrix4x4.TRS(new Vector3(gizmoPosition.x, gizmoPosition.y, gizmoPosition.z), Quaternion.Euler(sdfRotation), new Vector3(1, 1, 1)); using (var sdf = customBrush.Instance.CreateSdf(Allocator.TempJob)) { gameObject.GetComponent <SdfShapeRenderHandler>().Render(brushTransform, sdf); } Camera camera = Camera.current; if (camera != null) { selectedPrimitive = -1; var ray = camera.transform.forward.normalized; float maxDst = 60.0f; int steps = Mathf.CeilToInt(maxDst * 2); for (int i = 0; i < steps && selectedPrimitive < 0; i++) { var pos = camera.transform.position + ray * maxDst / steps * i; int j = 0; foreach (var primitive in customBrush.Instance.Primitives) { var renderSdf = customBrush.Instance.Evaluator.GetRenderSdf(primitive); if (renderSdf != null && renderSdf.Eval(math.mul(math.mul(brushTransform, primitive.invTransform), new float4(pos, 1.0f)).xyz) < 0) { selectedPrimitive = j; break; } j++; } } } if (selectedPrimitive >= 0 && selectedPrimitive < customBrush.Instance.Primitives.Count) { var primitive = customBrush.Instance.Primitives[selectedPrimitive]; var renderSdf = customBrush.Instance.Evaluator.GetRenderSdf(primitive); if (renderSdf != null) { gameObject.GetComponent <SdfShapeRenderHandler>().Render(brushTransform * (Matrix4x4)primitive.transform, renderSdf); } } break; } } if (generateEachFrame || regenerate) { regenerate = false; //GenerateMesh(); } }
private IEnumerator Behaviour() { yield return(new WaitForSeconds(1)); renderSdfUnion = true; renderSdf = new BoxSDF(9.8f); renderSdfTransform = Matrix4x4.Translate(new Vector3(0, 10, 0)) * Matrix4x4.Rotate(Quaternion.Euler(-1, 0, -1)); yield return(new WaitForSeconds(1)); renderSdf = null; world.Instance.ApplySdf <BoxSDF>(new Vector3(0, 10, 0), Quaternion.Euler(-1, 0, -1), new BoxSDF(10), MaterialColors.ToInteger(255, 255, 255, 0), false, null); yield return(new WaitForSeconds(1)); renderSdfUnion = true; renderSdf = new SphereSDF(9.8f); renderSdfTransform = Matrix4x4.Translate(new Vector3(5, 14, 8)); yield return(new WaitForSeconds(1)); renderSdf = null; world.Instance.ApplySdf <SphereSDF>(new Vector3(5, 14, 8), Quaternion.identity, new SphereSDF(10), MaterialColors.ToInteger(255, 255, 255, 1), false, null); yield return(new WaitForSeconds(1)); renderSdfUnion = false; renderSdf = new CylinderSDF(9, 8); renderSdfTransform = Matrix4x4.Translate(new Vector3(-3.5f, 14, 16.5f)); yield return(new WaitForSeconds(1)); renderSdf = null; world.Instance.ApplySdf <CylinderSDF>(new Vector3(-3.5f, 14, 16.5f), Quaternion.identity, new CylinderSDF(8, 8), 0, false, null); yield return(new WaitForSeconds(1)); Vector3 start = new Vector3(15, 20, 15); Vector3 end = new Vector3(-15, 20, -15); for (int i = 0; i < 200; i++) { Vector3 curr = start + (end - start) / 200.0f * i; renderSdfUnion = true; renderSdf = new BoxSDF(3.123f); renderSdfTransform = Matrix4x4.Translate(curr) * Matrix4x4.Rotate(Quaternion.Euler(i / 200.0f * 90.0f, i / 200.0f * 360.0f, 0)); world.Instance.ApplySdf <BoxSDF>(curr, Quaternion.Euler(i / 200.0f * 90.0f, i / 200.0f * 360.0f, 0), new BoxSDF(3.123f), MaterialColors.ToInteger(255, 255, 255, 2), true, null); yield return(new WaitForSeconds(0.005f)); } }